@wix/auto_sdk_bookings_resources 1.0.9 → 1.0.10
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-hYjNdpWu.d.mts} +127 -387
- package/build/{cjs/src/bookings-resources-v2-resource-resources.universal.d.ts → bookings-resources-v2-resource-resources.universal-hYjNdpWu.d.ts} +127 -387
- package/build/{es/src/bookings-resources-v2-resource-resources.public.d.ts → index.d.mts} +38 -18
- package/build/{internal/cjs/src/bookings-resources-v2-resource-resources.public.d.ts → index.d.ts} +38 -18
- package/build/index.js +882 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +836 -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-hYjNdpWu.d.mts} +127 -387
- package/build/{es/src/bookings-resources-v2-resource-resources.universal.d.ts → internal/bookings-resources-v2-resource-resources.universal-hYjNdpWu.d.ts} +127 -387
- package/build/{cjs/src/bookings-resources-v2-resource-resources.public.d.ts → internal/index.d.mts} +38 -18
- package/build/internal/{es/src/bookings-resources-v2-resource-resources.public.d.ts → index.d.ts} +38 -18
- package/build/internal/index.js +882 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +836 -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} +114 -351
- package/build/internal/{cjs/src/bookings-resources-v2-resource-resources.types.d.ts → meta.d.ts} +114 -351
- 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} +114 -351
- package/build/{internal/es/src/bookings-resources-v2-resource-resources.types.d.ts → meta.d.ts} +114 -351
- 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 -1
- 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.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 -587
- 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 -1
- 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/package.json +0 -3
- 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.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 -552
- 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 -1
- 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.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 -587
- 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 -1
- 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.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 -552
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
1
|
/**
|
|
3
2
|
* A resource represents an entity, such as a room or a staff member, that can be
|
|
4
3
|
* scheduled for use in a *booking*
|
|
@@ -6,7 +5,7 @@ import { NonNullablePaths } from '@wix/sdk-types';
|
|
|
6
5
|
* The availability of a resource is tracked to ensure that it
|
|
7
6
|
* can be allocated at a requested time slot and to prevent double bookings.
|
|
8
7
|
*/
|
|
9
|
-
|
|
8
|
+
interface Resource extends ResourceCompositionDetailsOneOf {
|
|
10
9
|
/**
|
|
11
10
|
* Resource ID.
|
|
12
11
|
* @format GUID
|
|
@@ -70,9 +69,9 @@ export interface Resource extends ResourceCompositionDetailsOneOf {
|
|
|
70
69
|
extendedFields?: ExtendedFields;
|
|
71
70
|
}
|
|
72
71
|
/** @oneof */
|
|
73
|
-
|
|
72
|
+
interface ResourceCompositionDetailsOneOf {
|
|
74
73
|
}
|
|
75
|
-
|
|
74
|
+
interface WorkingHoursSchedule {
|
|
76
75
|
/**
|
|
77
76
|
* ID of the working hour *schedule*
|
|
78
77
|
* ([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 +86,7 @@ export interface WorkingHoursSchedule {
|
|
|
87
86
|
*/
|
|
88
87
|
shared?: boolean | null;
|
|
89
88
|
}
|
|
90
|
-
|
|
89
|
+
interface SingleResource {
|
|
91
90
|
/**
|
|
92
91
|
* Schedule details that specify the working hours and locations of this resource.
|
|
93
92
|
*
|
|
@@ -112,7 +111,7 @@ export interface SingleResource {
|
|
|
112
111
|
*/
|
|
113
112
|
eventsSchedule?: Schedule;
|
|
114
113
|
}
|
|
115
|
-
|
|
114
|
+
interface V2WorkingHoursSchedules {
|
|
116
115
|
/**
|
|
117
116
|
* Schedules specifying the working hours of the resource. Currently, only a single schedule is supported.
|
|
118
117
|
* @maxSize 1
|
|
@@ -120,7 +119,7 @@ export interface V2WorkingHoursSchedules {
|
|
|
120
119
|
values?: Schedule[];
|
|
121
120
|
}
|
|
122
121
|
/** Deprecated and subject to removal */
|
|
123
|
-
|
|
122
|
+
interface Schedule {
|
|
124
123
|
/**
|
|
125
124
|
* Schedule ID. See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information.
|
|
126
125
|
* @format GUID
|
|
@@ -134,7 +133,7 @@ export interface Schedule {
|
|
|
134
133
|
*/
|
|
135
134
|
shared?: boolean | null;
|
|
136
135
|
}
|
|
137
|
-
|
|
136
|
+
interface LocationOptions {
|
|
138
137
|
/**
|
|
139
138
|
* Whether the resource is available in all *business locations*
|
|
140
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)).
|
|
@@ -148,7 +147,7 @@ export interface LocationOptions {
|
|
|
148
147
|
/** Details of resource availability in specific locations. */
|
|
149
148
|
specificLocationOptions?: SpecificLocation;
|
|
150
149
|
}
|
|
151
|
-
|
|
150
|
+
interface SpecificLocation {
|
|
152
151
|
/**
|
|
153
152
|
* Whether the resource is available in *business locations*
|
|
154
153
|
* ([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 +167,7 @@ export interface SpecificLocation {
|
|
|
168
167
|
*/
|
|
169
168
|
businessLocations?: BusinessLocation[];
|
|
170
169
|
}
|
|
171
|
-
|
|
170
|
+
interface BusinessLocation {
|
|
172
171
|
/**
|
|
173
172
|
* ID of the business *location*
|
|
174
173
|
* ([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 +175,14 @@ export interface BusinessLocation {
|
|
|
176
175
|
*/
|
|
177
176
|
locationId?: string | null;
|
|
178
177
|
}
|
|
179
|
-
|
|
178
|
+
interface WorkingHoursSchedules {
|
|
180
179
|
/**
|
|
181
180
|
* Schedules specifying the working hours of the resource. Currently, only a single schedule is supported.
|
|
182
181
|
* @maxSize 1
|
|
183
182
|
*/
|
|
184
183
|
values?: WorkingHoursSchedule[];
|
|
185
184
|
}
|
|
186
|
-
|
|
185
|
+
interface EventsSchedule {
|
|
187
186
|
/**
|
|
188
187
|
* ID of the event *schedule*
|
|
189
188
|
* ([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 +190,11 @@ export interface EventsSchedule {
|
|
|
191
190
|
*/
|
|
192
191
|
scheduleId?: string | null;
|
|
193
192
|
}
|
|
194
|
-
|
|
193
|
+
declare enum ManagementType {
|
|
195
194
|
/** The resource is managed by a Wix user. */
|
|
196
195
|
WIX_USER = "WIX_USER"
|
|
197
196
|
}
|
|
198
|
-
|
|
197
|
+
interface ExtendedFields {
|
|
199
198
|
/**
|
|
200
199
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
201
200
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -206,15 +205,15 @@ export interface ExtendedFields {
|
|
|
206
205
|
*/
|
|
207
206
|
namespaces?: Record<string, Record<string, any>>;
|
|
208
207
|
}
|
|
209
|
-
|
|
208
|
+
interface CreateResourceRequest {
|
|
210
209
|
/** Resource to create. */
|
|
211
210
|
resource: Resource;
|
|
212
211
|
}
|
|
213
|
-
|
|
212
|
+
interface CreateResourceResponse {
|
|
214
213
|
/** Created resource. */
|
|
215
214
|
resource?: Resource;
|
|
216
215
|
}
|
|
217
|
-
|
|
216
|
+
interface BulkCreateResourcesRequest {
|
|
218
217
|
/**
|
|
219
218
|
* Resources to create.
|
|
220
219
|
* @maxSize 50
|
|
@@ -227,19 +226,19 @@ export interface BulkCreateResourcesRequest {
|
|
|
227
226
|
*/
|
|
228
227
|
returnEntity?: boolean;
|
|
229
228
|
}
|
|
230
|
-
|
|
229
|
+
interface BulkCreateResourcesResponse {
|
|
231
230
|
/** The result of each resource creation. */
|
|
232
231
|
results?: BulkResourceResult[];
|
|
233
232
|
/** Create statistics. */
|
|
234
233
|
bulkActionMetadata?: BulkActionMetadata;
|
|
235
234
|
}
|
|
236
|
-
|
|
235
|
+
interface BulkResourceResult {
|
|
237
236
|
/** Item metadata. */
|
|
238
237
|
itemMetadata?: ItemMetadata;
|
|
239
238
|
/** The resulting resource after the bulk operation. */
|
|
240
239
|
item?: Resource;
|
|
241
240
|
}
|
|
242
|
-
|
|
241
|
+
interface ItemMetadata {
|
|
243
242
|
/**
|
|
244
243
|
* Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
|
|
245
244
|
* @format GUID
|
|
@@ -252,7 +251,7 @@ export interface ItemMetadata {
|
|
|
252
251
|
/** Details about the error in case of failure. */
|
|
253
252
|
error?: ApplicationError;
|
|
254
253
|
}
|
|
255
|
-
|
|
254
|
+
interface ApplicationError {
|
|
256
255
|
/** Error code. */
|
|
257
256
|
code?: string;
|
|
258
257
|
/** Description of the error. */
|
|
@@ -260,7 +259,7 @@ export interface ApplicationError {
|
|
|
260
259
|
/** Data related to the error. */
|
|
261
260
|
data?: Record<string, any> | null;
|
|
262
261
|
}
|
|
263
|
-
|
|
262
|
+
interface BulkActionMetadata {
|
|
264
263
|
/** Number of items that were successfully processed. */
|
|
265
264
|
totalSuccesses?: number;
|
|
266
265
|
/** Number of items that couldn't be processed. */
|
|
@@ -268,29 +267,29 @@ export interface BulkActionMetadata {
|
|
|
268
267
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
269
268
|
undetailedFailures?: number;
|
|
270
269
|
}
|
|
271
|
-
|
|
270
|
+
interface GetResourceRequest {
|
|
272
271
|
/**
|
|
273
272
|
* ID of the resource to retrieve.
|
|
274
273
|
* @format GUID
|
|
275
274
|
*/
|
|
276
275
|
resourceId: string;
|
|
277
276
|
}
|
|
278
|
-
|
|
277
|
+
interface GetResourceResponse {
|
|
279
278
|
/** Retrieved resource. */
|
|
280
279
|
resource?: Resource;
|
|
281
280
|
}
|
|
282
|
-
|
|
281
|
+
interface GetDeletedResourceRequest {
|
|
283
282
|
/**
|
|
284
283
|
* ID of the deleted resource to retrieve from the trash bin.
|
|
285
284
|
* @format GUID
|
|
286
285
|
*/
|
|
287
286
|
resourceId?: string;
|
|
288
287
|
}
|
|
289
|
-
|
|
288
|
+
interface GetDeletedResourceResponse {
|
|
290
289
|
/** Retrieved resource. */
|
|
291
290
|
resource?: Resource;
|
|
292
291
|
}
|
|
293
|
-
|
|
292
|
+
interface ListDeletedResourcesRequest {
|
|
294
293
|
/**
|
|
295
294
|
* IDs of the resources to retrieve.
|
|
296
295
|
* @format GUID
|
|
@@ -300,7 +299,7 @@ export interface ListDeletedResourcesRequest {
|
|
|
300
299
|
/** Paging details, allowing you specify a limit and a cursor. */
|
|
301
300
|
paging?: CursorPaging;
|
|
302
301
|
}
|
|
303
|
-
|
|
302
|
+
interface CursorPaging {
|
|
304
303
|
/**
|
|
305
304
|
* Maximum number of items to return in the results.
|
|
306
305
|
* @max 100
|
|
@@ -315,13 +314,13 @@ export interface CursorPaging {
|
|
|
315
314
|
*/
|
|
316
315
|
cursor?: string | null;
|
|
317
316
|
}
|
|
318
|
-
|
|
317
|
+
interface ListDeletedResourcesResponse {
|
|
319
318
|
/** Retrieved resources. */
|
|
320
319
|
resources?: Resource[];
|
|
321
320
|
/** Paging metadata. */
|
|
322
321
|
pagingMetadata?: CursorPagingMetadata;
|
|
323
322
|
}
|
|
324
|
-
|
|
323
|
+
interface CursorPagingMetadata {
|
|
325
324
|
/** Number of items returned in the response. */
|
|
326
325
|
count?: number | null;
|
|
327
326
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -334,7 +333,7 @@ export interface CursorPagingMetadata {
|
|
|
334
333
|
*/
|
|
335
334
|
hasNext?: boolean | null;
|
|
336
335
|
}
|
|
337
|
-
|
|
336
|
+
interface Cursors {
|
|
338
337
|
/**
|
|
339
338
|
* Cursor string pointing to the next page in the list of results.
|
|
340
339
|
* @maxLength 16000
|
|
@@ -346,44 +345,44 @@ export interface Cursors {
|
|
|
346
345
|
*/
|
|
347
346
|
prev?: string | null;
|
|
348
347
|
}
|
|
349
|
-
|
|
348
|
+
interface RemoveResourceFromTrashBinRequest {
|
|
350
349
|
/**
|
|
351
350
|
* ID of the resource to permanently delete from the trash bin.
|
|
352
351
|
* @format GUID
|
|
353
352
|
*/
|
|
354
353
|
resourceId?: string;
|
|
355
354
|
}
|
|
356
|
-
|
|
355
|
+
interface RemoveResourceFromTrashBinResponse {
|
|
357
356
|
}
|
|
358
|
-
|
|
357
|
+
interface RestoreResourceFromTrashBinRequest {
|
|
359
358
|
/**
|
|
360
359
|
* ID of the resource to restore from the trash bin.
|
|
361
360
|
* @format GUID
|
|
362
361
|
*/
|
|
363
362
|
resourceId?: string;
|
|
364
363
|
}
|
|
365
|
-
|
|
364
|
+
interface RestoreResourceFromTrashBinResponse {
|
|
366
365
|
/** Restored resource. */
|
|
367
366
|
resource?: Resource;
|
|
368
367
|
}
|
|
369
|
-
|
|
368
|
+
interface UpdateResourceRequest {
|
|
370
369
|
/** Resource to update. */
|
|
371
370
|
resource: Resource;
|
|
372
371
|
}
|
|
373
|
-
|
|
372
|
+
interface UpdateResourceResponse {
|
|
374
373
|
/** Updated resource. */
|
|
375
374
|
resource?: Resource;
|
|
376
375
|
}
|
|
377
|
-
|
|
376
|
+
interface DeleteResourceRequest {
|
|
378
377
|
/**
|
|
379
378
|
* ID of the resource to delete.
|
|
380
379
|
* @format GUID
|
|
381
380
|
*/
|
|
382
381
|
resourceId: string;
|
|
383
382
|
}
|
|
384
|
-
|
|
383
|
+
interface DeleteResourceResponse {
|
|
385
384
|
}
|
|
386
|
-
|
|
385
|
+
interface BulkDeleteResourcesRequest {
|
|
387
386
|
/**
|
|
388
387
|
* IDs of the resources to delete.
|
|
389
388
|
* @format GUID
|
|
@@ -391,13 +390,13 @@ export interface BulkDeleteResourcesRequest {
|
|
|
391
390
|
*/
|
|
392
391
|
ids: string[];
|
|
393
392
|
}
|
|
394
|
-
|
|
393
|
+
interface BulkDeleteResourcesResponse {
|
|
395
394
|
/** The result of each resource removal. */
|
|
396
395
|
results?: BulkResourceResult[];
|
|
397
396
|
/** Delete statistics. */
|
|
398
397
|
bulkActionMetadata?: BulkActionMetadata;
|
|
399
398
|
}
|
|
400
|
-
|
|
399
|
+
interface SearchResourcesRequest {
|
|
401
400
|
/**
|
|
402
401
|
* Search condition. Refer to the *supported filters article*
|
|
403
402
|
* ([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 +404,7 @@ export interface SearchResourcesRequest {
|
|
|
405
404
|
*/
|
|
406
405
|
search?: CursorSearch;
|
|
407
406
|
}
|
|
408
|
-
|
|
407
|
+
interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
409
408
|
/**
|
|
410
409
|
* Cursor pointing to page of results.
|
|
411
410
|
* When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
|
|
@@ -438,14 +437,14 @@ export interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
|
438
437
|
timeZone?: string | null;
|
|
439
438
|
}
|
|
440
439
|
/** @oneof */
|
|
441
|
-
|
|
440
|
+
interface CursorSearchPagingMethodOneOf {
|
|
442
441
|
/**
|
|
443
442
|
* Cursor pointing to page of results.
|
|
444
443
|
* When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
|
|
445
444
|
*/
|
|
446
445
|
cursorPaging?: CursorPaging;
|
|
447
446
|
}
|
|
448
|
-
|
|
447
|
+
interface Sorting {
|
|
449
448
|
/**
|
|
450
449
|
* Name of the field to sort by.
|
|
451
450
|
* @maxLength 512
|
|
@@ -454,11 +453,11 @@ export interface Sorting {
|
|
|
454
453
|
/** Sort order. */
|
|
455
454
|
order?: SortOrder;
|
|
456
455
|
}
|
|
457
|
-
|
|
456
|
+
declare enum SortOrder {
|
|
458
457
|
ASC = "ASC",
|
|
459
458
|
DESC = "DESC"
|
|
460
459
|
}
|
|
461
|
-
|
|
460
|
+
interface Aggregation extends AggregationKindOneOf {
|
|
462
461
|
/** Value aggregation */
|
|
463
462
|
value?: ValueAggregation;
|
|
464
463
|
/** Range aggregation */
|
|
@@ -490,7 +489,7 @@ export interface Aggregation extends AggregationKindOneOf {
|
|
|
490
489
|
groupBy?: GroupByAggregation;
|
|
491
490
|
}
|
|
492
491
|
/** @oneof */
|
|
493
|
-
|
|
492
|
+
interface AggregationKindOneOf {
|
|
494
493
|
/** Value aggregation */
|
|
495
494
|
value?: ValueAggregation;
|
|
496
495
|
/** Range aggregation */
|
|
@@ -502,38 +501,38 @@ export interface AggregationKindOneOf {
|
|
|
502
501
|
/** Nested aggregation */
|
|
503
502
|
nested?: NestedAggregation;
|
|
504
503
|
}
|
|
505
|
-
|
|
504
|
+
interface RangeBucket {
|
|
506
505
|
/** Inclusive lower bound of the range. Required if to is not given */
|
|
507
506
|
from?: number | null;
|
|
508
507
|
/** Exclusive upper bound of the range. Required if from is not given */
|
|
509
508
|
to?: number | null;
|
|
510
509
|
}
|
|
511
|
-
|
|
510
|
+
declare enum SortType {
|
|
512
511
|
/** Should sort by number of matches */
|
|
513
512
|
COUNT = "COUNT",
|
|
514
513
|
/** Should sort by value of the field alphabetically */
|
|
515
514
|
VALUE = "VALUE"
|
|
516
515
|
}
|
|
517
|
-
|
|
516
|
+
declare enum SortDirection {
|
|
518
517
|
/** Should sort in descending order */
|
|
519
518
|
DESC = "DESC",
|
|
520
519
|
/** Should sort in ascending order */
|
|
521
520
|
ASC = "ASC"
|
|
522
521
|
}
|
|
523
|
-
|
|
522
|
+
declare enum MissingValues {
|
|
524
523
|
/** Should missing values be excluded from the aggregation results */
|
|
525
524
|
EXCLUDE = "EXCLUDE",
|
|
526
525
|
/** Should missing values be included in the aggregation results */
|
|
527
526
|
INCLUDE = "INCLUDE"
|
|
528
527
|
}
|
|
529
|
-
|
|
528
|
+
interface IncludeMissingValuesOptions {
|
|
530
529
|
/**
|
|
531
530
|
* Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
|
|
532
531
|
* @maxLength 20
|
|
533
532
|
*/
|
|
534
533
|
addToBucket?: string;
|
|
535
534
|
}
|
|
536
|
-
|
|
535
|
+
declare enum ScalarType {
|
|
537
536
|
UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
|
|
538
537
|
/** Count of distinct values */
|
|
539
538
|
COUNT_DISTINCT = "COUNT_DISTINCT",
|
|
@@ -542,7 +541,7 @@ export declare enum ScalarType {
|
|
|
542
541
|
/** Maximum value */
|
|
543
542
|
MAX = "MAX"
|
|
544
543
|
}
|
|
545
|
-
|
|
544
|
+
interface ValueAggregation extends ValueAggregationOptionsOneOf {
|
|
546
545
|
/** Options for including missing values */
|
|
547
546
|
includeOptions?: IncludeMissingValuesOptions;
|
|
548
547
|
/** Should sort by number of matches or value of the field */
|
|
@@ -555,11 +554,11 @@ export interface ValueAggregation extends ValueAggregationOptionsOneOf {
|
|
|
555
554
|
missingValues?: MissingValues;
|
|
556
555
|
}
|
|
557
556
|
/** @oneof */
|
|
558
|
-
|
|
557
|
+
interface ValueAggregationOptionsOneOf {
|
|
559
558
|
/** Options for including missing values */
|
|
560
559
|
includeOptions?: IncludeMissingValuesOptions;
|
|
561
560
|
}
|
|
562
|
-
|
|
561
|
+
declare enum NestedAggregationType {
|
|
563
562
|
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
564
563
|
/** An aggregation where result buckets are dynamically built - one per unique value */
|
|
565
564
|
VALUE = "VALUE",
|
|
@@ -570,22 +569,22 @@ export declare enum NestedAggregationType {
|
|
|
570
569
|
/** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
|
|
571
570
|
DATE_HISTOGRAM = "DATE_HISTOGRAM"
|
|
572
571
|
}
|
|
573
|
-
|
|
572
|
+
interface RangeAggregation {
|
|
574
573
|
/**
|
|
575
574
|
* 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
575
|
* @maxSize 50
|
|
577
576
|
*/
|
|
578
577
|
buckets?: RangeBucket[];
|
|
579
578
|
}
|
|
580
|
-
|
|
579
|
+
interface ScalarAggregation {
|
|
581
580
|
/** Define the operator for the scalar aggregation */
|
|
582
581
|
type?: ScalarType;
|
|
583
582
|
}
|
|
584
|
-
|
|
583
|
+
interface DateHistogramAggregation {
|
|
585
584
|
/** Interval for date histogram aggregation */
|
|
586
585
|
interval?: Interval;
|
|
587
586
|
}
|
|
588
|
-
|
|
587
|
+
declare enum Interval {
|
|
589
588
|
UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
|
|
590
589
|
/** Yearly interval */
|
|
591
590
|
YEAR = "YEAR",
|
|
@@ -602,7 +601,7 @@ export declare enum Interval {
|
|
|
602
601
|
/** Second interval */
|
|
603
602
|
SECOND = "SECOND"
|
|
604
603
|
}
|
|
605
|
-
|
|
604
|
+
interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
606
605
|
/** Value aggregation */
|
|
607
606
|
value?: ValueAggregation;
|
|
608
607
|
/** Range aggregation */
|
|
@@ -625,7 +624,7 @@ export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
|
625
624
|
fieldPath?: string;
|
|
626
625
|
}
|
|
627
626
|
/** @oneof */
|
|
628
|
-
|
|
627
|
+
interface NestedAggregationItemKindOneOf {
|
|
629
628
|
/** Value aggregation */
|
|
630
629
|
value?: ValueAggregation;
|
|
631
630
|
/** Range aggregation */
|
|
@@ -635,7 +634,7 @@ export interface NestedAggregationItemKindOneOf {
|
|
|
635
634
|
/** Date histogram aggregation */
|
|
636
635
|
dateHistogram?: DateHistogramAggregation;
|
|
637
636
|
}
|
|
638
|
-
|
|
637
|
+
declare enum AggregationType {
|
|
639
638
|
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
640
639
|
/** An aggregation where result buckets are dynamically built - one per unique value */
|
|
641
640
|
VALUE = "VALUE",
|
|
@@ -649,7 +648,7 @@ export declare enum AggregationType {
|
|
|
649
648
|
NESTED = "NESTED"
|
|
650
649
|
}
|
|
651
650
|
/** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
|
|
652
|
-
|
|
651
|
+
interface NestedAggregation {
|
|
653
652
|
/**
|
|
654
653
|
* Flattened list of aggregations, where each next aggregation is nested within previous one
|
|
655
654
|
* @minSize 2
|
|
@@ -657,7 +656,7 @@ export interface NestedAggregation {
|
|
|
657
656
|
*/
|
|
658
657
|
nestedAggregations?: NestedAggregationItem[];
|
|
659
658
|
}
|
|
660
|
-
|
|
659
|
+
interface GroupByAggregation extends GroupByAggregationKindOneOf {
|
|
661
660
|
/** Value aggregation configuration */
|
|
662
661
|
value?: ValueAggregation;
|
|
663
662
|
/**
|
|
@@ -672,11 +671,11 @@ export interface GroupByAggregation extends GroupByAggregationKindOneOf {
|
|
|
672
671
|
fieldPath?: string;
|
|
673
672
|
}
|
|
674
673
|
/** @oneof */
|
|
675
|
-
|
|
674
|
+
interface GroupByAggregationKindOneOf {
|
|
676
675
|
/** Value aggregation configuration */
|
|
677
676
|
value?: ValueAggregation;
|
|
678
677
|
}
|
|
679
|
-
|
|
678
|
+
interface SearchDetails {
|
|
680
679
|
/** Defines how separate search terms in `expression` are combined */
|
|
681
680
|
mode?: Mode;
|
|
682
681
|
/**
|
|
@@ -693,13 +692,13 @@ export interface SearchDetails {
|
|
|
693
692
|
/** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
|
|
694
693
|
fuzzy?: boolean;
|
|
695
694
|
}
|
|
696
|
-
|
|
695
|
+
declare enum Mode {
|
|
697
696
|
/** Any of the search terms must be present */
|
|
698
697
|
OR = "OR",
|
|
699
698
|
/** All search terms must be present */
|
|
700
699
|
AND = "AND"
|
|
701
700
|
}
|
|
702
|
-
|
|
701
|
+
interface SearchResourcesResponse {
|
|
703
702
|
/** Retrieved resources. */
|
|
704
703
|
resources?: Resource[];
|
|
705
704
|
/** Paging metadata. */
|
|
@@ -707,14 +706,14 @@ export interface SearchResourcesResponse {
|
|
|
707
706
|
/** Aggregation results. */
|
|
708
707
|
aggregationData?: AggregationData;
|
|
709
708
|
}
|
|
710
|
-
|
|
709
|
+
interface AggregationData {
|
|
711
710
|
/**
|
|
712
711
|
* key = aggregation name (as derived from search request)
|
|
713
712
|
* @maxSize 10000
|
|
714
713
|
*/
|
|
715
714
|
results?: AggregationResults[];
|
|
716
715
|
}
|
|
717
|
-
|
|
716
|
+
interface ValueAggregationResult {
|
|
718
717
|
/**
|
|
719
718
|
* Value of the field
|
|
720
719
|
* @maxLength 100
|
|
@@ -723,7 +722,7 @@ export interface ValueAggregationResult {
|
|
|
723
722
|
/** Count of entities with this value */
|
|
724
723
|
count?: number;
|
|
725
724
|
}
|
|
726
|
-
|
|
725
|
+
interface RangeAggregationResult {
|
|
727
726
|
/** Inclusive lower bound of the range */
|
|
728
727
|
from?: number | null;
|
|
729
728
|
/** Exclusive upper bound of the range */
|
|
@@ -731,7 +730,7 @@ export interface RangeAggregationResult {
|
|
|
731
730
|
/** Count of entities in this range */
|
|
732
731
|
count?: number;
|
|
733
732
|
}
|
|
734
|
-
|
|
733
|
+
interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
|
|
735
734
|
/** Value aggregation results */
|
|
736
735
|
values?: ValueResults;
|
|
737
736
|
/** Range aggregation results */
|
|
@@ -752,7 +751,7 @@ export interface NestedAggregationResults extends NestedAggregationResultsResult
|
|
|
752
751
|
fieldPath?: string;
|
|
753
752
|
}
|
|
754
753
|
/** @oneof */
|
|
755
|
-
|
|
754
|
+
interface NestedAggregationResultsResultOneOf {
|
|
756
755
|
/** Value aggregation results */
|
|
757
756
|
values?: ValueResults;
|
|
758
757
|
/** Range aggregation results */
|
|
@@ -760,27 +759,27 @@ export interface NestedAggregationResultsResultOneOf {
|
|
|
760
759
|
/** Scalar aggregation results */
|
|
761
760
|
scalar?: AggregationResultsScalarResult;
|
|
762
761
|
}
|
|
763
|
-
|
|
762
|
+
interface ValueResults {
|
|
764
763
|
/**
|
|
765
764
|
* List of value aggregations
|
|
766
765
|
* @maxSize 250
|
|
767
766
|
*/
|
|
768
767
|
results?: ValueAggregationResult[];
|
|
769
768
|
}
|
|
770
|
-
|
|
769
|
+
interface RangeResults {
|
|
771
770
|
/**
|
|
772
771
|
* List of ranges returned in same order as requested
|
|
773
772
|
* @maxSize 50
|
|
774
773
|
*/
|
|
775
774
|
results?: RangeAggregationResult[];
|
|
776
775
|
}
|
|
777
|
-
|
|
776
|
+
interface AggregationResultsScalarResult {
|
|
778
777
|
/** Type of scalar aggregation */
|
|
779
778
|
type?: ScalarType;
|
|
780
779
|
/** Value of the scalar aggregation */
|
|
781
780
|
value?: number;
|
|
782
781
|
}
|
|
783
|
-
|
|
782
|
+
interface NestedValueAggregationResult {
|
|
784
783
|
/**
|
|
785
784
|
* Value of the field
|
|
786
785
|
* @maxLength 1000
|
|
@@ -789,7 +788,7 @@ export interface NestedValueAggregationResult {
|
|
|
789
788
|
/** Nested aggregations */
|
|
790
789
|
nestedResults?: NestedAggregationResults;
|
|
791
790
|
}
|
|
792
|
-
|
|
791
|
+
interface ValueResult {
|
|
793
792
|
/**
|
|
794
793
|
* Value of the field
|
|
795
794
|
* @maxLength 1000
|
|
@@ -798,7 +797,7 @@ export interface ValueResult {
|
|
|
798
797
|
/** Count of entities with this value */
|
|
799
798
|
count?: number | null;
|
|
800
799
|
}
|
|
801
|
-
|
|
800
|
+
interface RangeResult {
|
|
802
801
|
/** Inclusive lower bound of the range */
|
|
803
802
|
from?: number | null;
|
|
804
803
|
/** Exclusive upper bound of the range */
|
|
@@ -806,11 +805,11 @@ export interface RangeResult {
|
|
|
806
805
|
/** Count of entities in this range */
|
|
807
806
|
count?: number | null;
|
|
808
807
|
}
|
|
809
|
-
|
|
808
|
+
interface ScalarResult {
|
|
810
809
|
/** Value of the scalar aggregation */
|
|
811
810
|
value?: number;
|
|
812
811
|
}
|
|
813
|
-
|
|
812
|
+
interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
814
813
|
/** Value aggregation result */
|
|
815
814
|
value?: ValueResult;
|
|
816
815
|
/** Range aggregation result */
|
|
@@ -821,7 +820,7 @@ export interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
|
821
820
|
dateHistogram?: ValueResult;
|
|
822
821
|
}
|
|
823
822
|
/** @oneof */
|
|
824
|
-
|
|
823
|
+
interface NestedResultValueResultOneOf {
|
|
825
824
|
/** Value aggregation result */
|
|
826
825
|
value?: ValueResult;
|
|
827
826
|
/** Range aggregation result */
|
|
@@ -831,11 +830,11 @@ export interface NestedResultValueResultOneOf {
|
|
|
831
830
|
/** Date histogram aggregation result */
|
|
832
831
|
dateHistogram?: ValueResult;
|
|
833
832
|
}
|
|
834
|
-
|
|
833
|
+
interface Results {
|
|
835
834
|
/** List of nested aggregations */
|
|
836
835
|
results?: Record<string, NestedResultValue>;
|
|
837
836
|
}
|
|
838
|
-
|
|
837
|
+
interface DateHistogramResult {
|
|
839
838
|
/**
|
|
840
839
|
* Date in ISO 8601 format
|
|
841
840
|
* @maxLength 100
|
|
@@ -844,14 +843,14 @@ export interface DateHistogramResult {
|
|
|
844
843
|
/** Count of documents in the bucket */
|
|
845
844
|
count?: number;
|
|
846
845
|
}
|
|
847
|
-
|
|
846
|
+
interface GroupByValueResults {
|
|
848
847
|
/**
|
|
849
848
|
* List of value aggregations
|
|
850
849
|
* @maxSize 1000
|
|
851
850
|
*/
|
|
852
851
|
results?: NestedValueAggregationResult[];
|
|
853
852
|
}
|
|
854
|
-
|
|
853
|
+
interface DateHistogramResults {
|
|
855
854
|
/**
|
|
856
855
|
* List of date histogram aggregations
|
|
857
856
|
* @maxSize 200
|
|
@@ -862,14 +861,14 @@ export interface DateHistogramResults {
|
|
|
862
861
|
* Results of `NESTED` aggregation type in a flattened form
|
|
863
862
|
* aggregations in resulting array are keyed by requested aggregation `name`.
|
|
864
863
|
*/
|
|
865
|
-
|
|
864
|
+
interface NestedResults {
|
|
866
865
|
/**
|
|
867
866
|
* List of nested aggregations
|
|
868
867
|
* @maxSize 1000
|
|
869
868
|
*/
|
|
870
869
|
results?: Results[];
|
|
871
870
|
}
|
|
872
|
-
|
|
871
|
+
interface AggregationResults extends AggregationResultsResultOneOf {
|
|
873
872
|
/** Value aggregation results */
|
|
874
873
|
values?: ValueResults;
|
|
875
874
|
/** Range aggregation results */
|
|
@@ -896,7 +895,7 @@ export interface AggregationResults extends AggregationResultsResultOneOf {
|
|
|
896
895
|
fieldPath?: string;
|
|
897
896
|
}
|
|
898
897
|
/** @oneof */
|
|
899
|
-
|
|
898
|
+
interface AggregationResultsResultOneOf {
|
|
900
899
|
/** Value aggregation results */
|
|
901
900
|
values?: ValueResults;
|
|
902
901
|
/** Range aggregation results */
|
|
@@ -910,7 +909,7 @@ export interface AggregationResultsResultOneOf {
|
|
|
910
909
|
/** Nested aggregation results */
|
|
911
910
|
nested?: NestedResults;
|
|
912
911
|
}
|
|
913
|
-
|
|
912
|
+
interface QueryResourcesRequest {
|
|
914
913
|
/**
|
|
915
914
|
* Query for retrieving resources. Refer to the *supported filters article*
|
|
916
915
|
* ([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 +917,7 @@ export interface QueryResourcesRequest {
|
|
|
918
917
|
*/
|
|
919
918
|
query?: CursorQuery;
|
|
920
919
|
}
|
|
921
|
-
|
|
920
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
922
921
|
/** 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
922
|
cursorPaging?: CursorPaging;
|
|
924
923
|
/**
|
|
@@ -938,17 +937,17 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
938
937
|
sort?: Sorting[];
|
|
939
938
|
}
|
|
940
939
|
/** @oneof */
|
|
941
|
-
|
|
940
|
+
interface CursorQueryPagingMethodOneOf {
|
|
942
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`. */
|
|
943
942
|
cursorPaging?: CursorPaging;
|
|
944
943
|
}
|
|
945
|
-
|
|
944
|
+
interface QueryResourcesResponse {
|
|
946
945
|
/** Retrieved resources. */
|
|
947
946
|
resources?: Resource[];
|
|
948
947
|
/** Paging metadata. */
|
|
949
948
|
pagingMetadata?: CursorPagingMetadata;
|
|
950
949
|
}
|
|
951
|
-
|
|
950
|
+
interface CountResourcesRequest {
|
|
952
951
|
/**
|
|
953
952
|
* Filter to base the count on. Refer to the *supported filters article*
|
|
954
953
|
* ([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,19 +961,19 @@ export interface CountResourcesRequest {
|
|
|
962
961
|
*/
|
|
963
962
|
search?: SearchDetails;
|
|
964
963
|
}
|
|
965
|
-
|
|
964
|
+
interface CountResourcesResponse {
|
|
966
965
|
/** Total number of resources matching the filter. */
|
|
967
966
|
count?: number;
|
|
968
967
|
}
|
|
969
|
-
|
|
968
|
+
interface ImportResourceRequest {
|
|
970
969
|
/** Resource to import. */
|
|
971
970
|
resource?: Resource;
|
|
972
971
|
}
|
|
973
|
-
|
|
972
|
+
interface ImportResourceResponse {
|
|
974
973
|
/** Imported resource. */
|
|
975
974
|
resource?: Resource;
|
|
976
975
|
}
|
|
977
|
-
|
|
976
|
+
interface FixResourceSchedulesRequest {
|
|
978
977
|
/**
|
|
979
978
|
* ID of the resource to fix schedules for.
|
|
980
979
|
* @format GUID
|
|
@@ -983,15 +982,15 @@ export interface FixResourceSchedulesRequest {
|
|
|
983
982
|
/** Working hour schedule that must be set for this resource. */
|
|
984
983
|
workingHoursSchedule?: Schedule;
|
|
985
984
|
}
|
|
986
|
-
|
|
985
|
+
interface FixResourceSchedulesResponse {
|
|
987
986
|
/** Updated resource. */
|
|
988
987
|
resource?: Resource;
|
|
989
988
|
}
|
|
990
|
-
|
|
989
|
+
interface ReindexTenantRequest {
|
|
991
990
|
}
|
|
992
|
-
|
|
991
|
+
interface ReindexTenantResponse {
|
|
993
992
|
}
|
|
994
|
-
|
|
993
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
995
994
|
createdEvent?: EntityCreatedEvent;
|
|
996
995
|
updatedEvent?: EntityUpdatedEvent;
|
|
997
996
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -1034,19 +1033,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
1034
1033
|
entityEventSequence?: string | null;
|
|
1035
1034
|
}
|
|
1036
1035
|
/** @oneof */
|
|
1037
|
-
|
|
1036
|
+
interface DomainEventBodyOneOf {
|
|
1038
1037
|
createdEvent?: EntityCreatedEvent;
|
|
1039
1038
|
updatedEvent?: EntityUpdatedEvent;
|
|
1040
1039
|
deletedEvent?: EntityDeletedEvent;
|
|
1041
1040
|
actionEvent?: ActionEvent;
|
|
1042
1041
|
}
|
|
1043
|
-
|
|
1042
|
+
interface EntityCreatedEvent {
|
|
1044
1043
|
entity?: string;
|
|
1045
1044
|
}
|
|
1046
|
-
|
|
1045
|
+
interface RestoreInfo {
|
|
1047
1046
|
deletedDate?: Date | null;
|
|
1048
1047
|
}
|
|
1049
|
-
|
|
1048
|
+
interface EntityUpdatedEvent {
|
|
1050
1049
|
/**
|
|
1051
1050
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1052
1051
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -1054,16 +1053,16 @@ export interface EntityUpdatedEvent {
|
|
|
1054
1053
|
*/
|
|
1055
1054
|
currentEntity?: string;
|
|
1056
1055
|
}
|
|
1057
|
-
|
|
1056
|
+
interface EntityDeletedEvent {
|
|
1058
1057
|
/** Entity that was deleted */
|
|
1059
1058
|
deletedEntity?: string | null;
|
|
1060
1059
|
}
|
|
1061
|
-
|
|
1060
|
+
interface ActionEvent {
|
|
1062
1061
|
body?: string;
|
|
1063
1062
|
}
|
|
1064
|
-
|
|
1063
|
+
interface Empty {
|
|
1065
1064
|
}
|
|
1066
|
-
|
|
1065
|
+
interface MessageEnvelope {
|
|
1067
1066
|
/**
|
|
1068
1067
|
* App instance ID.
|
|
1069
1068
|
* @format GUID
|
|
@@ -1079,7 +1078,7 @@ export interface MessageEnvelope {
|
|
|
1079
1078
|
/** Stringify payload. */
|
|
1080
1079
|
data?: string;
|
|
1081
1080
|
}
|
|
1082
|
-
|
|
1081
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1083
1082
|
/**
|
|
1084
1083
|
* ID of a site visitor that has not logged in to the site.
|
|
1085
1084
|
* @format GUID
|
|
@@ -1104,7 +1103,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
1104
1103
|
identityType?: WebhookIdentityType;
|
|
1105
1104
|
}
|
|
1106
1105
|
/** @oneof */
|
|
1107
|
-
|
|
1106
|
+
interface IdentificationDataIdOneOf {
|
|
1108
1107
|
/**
|
|
1109
1108
|
* ID of a site visitor that has not logged in to the site.
|
|
1110
1109
|
* @format GUID
|
|
@@ -1126,14 +1125,14 @@ export interface IdentificationDataIdOneOf {
|
|
|
1126
1125
|
*/
|
|
1127
1126
|
appId?: string;
|
|
1128
1127
|
}
|
|
1129
|
-
|
|
1128
|
+
declare enum WebhookIdentityType {
|
|
1130
1129
|
UNKNOWN = "UNKNOWN",
|
|
1131
1130
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1132
1131
|
MEMBER = "MEMBER",
|
|
1133
1132
|
WIX_USER = "WIX_USER",
|
|
1134
1133
|
APP = "APP"
|
|
1135
1134
|
}
|
|
1136
|
-
|
|
1135
|
+
interface BaseEventMetadata {
|
|
1137
1136
|
/**
|
|
1138
1137
|
* App instance ID.
|
|
1139
1138
|
* @format GUID
|
|
@@ -1147,7 +1146,7 @@ export interface BaseEventMetadata {
|
|
|
1147
1146
|
/** The identification type and identity data. */
|
|
1148
1147
|
identity?: IdentificationData;
|
|
1149
1148
|
}
|
|
1150
|
-
|
|
1149
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
1151
1150
|
/**
|
|
1152
1151
|
* Unique event ID.
|
|
1153
1152
|
* Allows clients to ignore duplicate webhooks.
|
|
@@ -1185,102 +1184,18 @@ export interface EventMetadata extends BaseEventMetadata {
|
|
|
1185
1184
|
*/
|
|
1186
1185
|
entityEventSequence?: string | null;
|
|
1187
1186
|
}
|
|
1188
|
-
|
|
1187
|
+
interface ResourceCreatedEnvelope {
|
|
1189
1188
|
entity: Resource;
|
|
1190
1189
|
metadata: EventMetadata;
|
|
1191
1190
|
}
|
|
1192
|
-
|
|
1193
|
-
* Triggered when a resource is created.
|
|
1194
|
-
* @webhook
|
|
1195
|
-
* @eventType wix.bookings.resources.v2.resource_created
|
|
1196
|
-
* @serviceIdentifier wix.bookings.resources.v2.ResourcesService
|
|
1197
|
-
* @slug created
|
|
1198
|
-
* @documentationMaturity preview
|
|
1199
|
-
*/
|
|
1200
|
-
export declare function onResourceCreated(handler: (event: ResourceCreatedEnvelope) => void | Promise<void>): void;
|
|
1201
|
-
export interface ResourceDeletedEnvelope {
|
|
1191
|
+
interface ResourceDeletedEnvelope {
|
|
1202
1192
|
metadata: EventMetadata;
|
|
1203
1193
|
}
|
|
1204
|
-
|
|
1205
|
-
* Triggered when a resource is deleted.
|
|
1206
|
-
* @webhook
|
|
1207
|
-
* @eventType wix.bookings.resources.v2.resource_deleted
|
|
1208
|
-
* @serviceIdentifier wix.bookings.resources.v2.ResourcesService
|
|
1209
|
-
* @slug deleted
|
|
1210
|
-
* @documentationMaturity preview
|
|
1211
|
-
*/
|
|
1212
|
-
export declare function onResourceDeleted(handler: (event: ResourceDeletedEnvelope) => void | Promise<void>): void;
|
|
1213
|
-
export interface ResourceUpdatedEnvelope {
|
|
1194
|
+
interface ResourceUpdatedEnvelope {
|
|
1214
1195
|
entity: Resource;
|
|
1215
1196
|
metadata: EventMetadata;
|
|
1216
1197
|
}
|
|
1217
|
-
|
|
1218
|
-
* Triggered when a resource is updated.
|
|
1219
|
-
* @webhook
|
|
1220
|
-
* @eventType wix.bookings.resources.v2.resource_updated
|
|
1221
|
-
* @serviceIdentifier wix.bookings.resources.v2.ResourcesService
|
|
1222
|
-
* @slug updated
|
|
1223
|
-
* @documentationMaturity preview
|
|
1224
|
-
*/
|
|
1225
|
-
export declare function onResourceUpdated(handler: (event: ResourceUpdatedEnvelope) => void | Promise<void>): void;
|
|
1226
|
-
type ResourceNonNullablePaths = `workingHoursSchedules.values` | `locationOptions.specificLocationOptions.businessLocations`;
|
|
1227
|
-
/**
|
|
1228
|
-
* Creates a new resource.
|
|
1229
|
-
*
|
|
1230
|
-
*
|
|
1231
|
-
* ## Connected schedules
|
|
1232
|
-
*
|
|
1233
|
-
* A new event *schedule*
|
|
1234
|
-
* ([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
|
-
* is automatically created for the resource.
|
|
1236
|
-
*
|
|
1237
|
-
* ## Locations
|
|
1238
|
-
*
|
|
1239
|
-
* If you don't specify `locationOptions`, Wix Bookings automatically sets
|
|
1240
|
-
* `locationOptions.availableInAllLocations` to `true`.
|
|
1241
|
-
*
|
|
1242
|
-
* If you specify 1 business location ID in `locationOptions.specificLocationOptions.businessLocations`,
|
|
1243
|
-
* you must specify `locationOptions.specificLocationOptions.availableInBusinessLocations`
|
|
1244
|
-
* as `true`. Currently, you can specify only a single business location.
|
|
1245
|
-
* @param resource - Resource to create.
|
|
1246
|
-
* @public
|
|
1247
|
-
* @documentationMaturity preview
|
|
1248
|
-
* @requiredField resource
|
|
1249
|
-
* @requiredField resource.name
|
|
1250
|
-
* @permissionId BOOKINGS.RESOURCE_CREATE
|
|
1251
|
-
* @permissionScope Manage Bookings
|
|
1252
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1253
|
-
* @permissionScope Manage Bookings - all permissions
|
|
1254
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1255
|
-
* @applicableIdentity APP
|
|
1256
|
-
* @returns Created resource.
|
|
1257
|
-
* @fqn wix.bookings.resources.v2.ResourcesService.CreateResource
|
|
1258
|
-
*/
|
|
1259
|
-
export declare function createResource(resource: NonNullablePaths<Resource, `name`>): Promise<NonNullablePaths<Resource, ResourceNonNullablePaths>>;
|
|
1260
|
-
/**
|
|
1261
|
-
* Creates up to 50 resources.
|
|
1262
|
-
*
|
|
1263
|
-
*
|
|
1264
|
-
* Refer to *Create Resource*
|
|
1265
|
-
* ([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))
|
|
1266
|
-
* for more details.
|
|
1267
|
-
* @param resources - Resources to create.
|
|
1268
|
-
* @public
|
|
1269
|
-
* @documentationMaturity preview
|
|
1270
|
-
* @requiredField resources
|
|
1271
|
-
* @requiredField resources.name
|
|
1272
|
-
* @permissionId BOOKINGS.RESOURCE_CREATE
|
|
1273
|
-
* @permissionScope Manage Bookings
|
|
1274
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1275
|
-
* @permissionScope Manage Bookings - all permissions
|
|
1276
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1277
|
-
* @applicableIdentity APP
|
|
1278
|
-
* @fqn wix.bookings.resources.v2.ResourcesService.BulkCreateResources
|
|
1279
|
-
*/
|
|
1280
|
-
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` | {
|
|
1281
|
-
[P in ResourceNonNullablePaths]: `results.${number}.item.${P}`;
|
|
1282
|
-
}[ResourceNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
1283
|
-
export interface BulkCreateResourcesOptions {
|
|
1198
|
+
interface BulkCreateResourcesOptions {
|
|
1284
1199
|
/**
|
|
1285
1200
|
* Whether to include the created resources in the response.
|
|
1286
1201
|
*
|
|
@@ -1288,52 +1203,7 @@ export interface BulkCreateResourcesOptions {
|
|
|
1288
1203
|
*/
|
|
1289
1204
|
returnEntity?: boolean;
|
|
1290
1205
|
}
|
|
1291
|
-
|
|
1292
|
-
* Retrieves a resource.
|
|
1293
|
-
* @param resourceId - ID of the resource to retrieve.
|
|
1294
|
-
* @public
|
|
1295
|
-
* @documentationMaturity preview
|
|
1296
|
-
* @requiredField resourceId
|
|
1297
|
-
* @permissionId BOOKINGS.RESOURCE_READ
|
|
1298
|
-
* @permissionScope Read Bookings - Public Data
|
|
1299
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1300
|
-
* @permissionScope Manage Bookings
|
|
1301
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1302
|
-
* @permissionScope Read Bookings - Including Participants
|
|
1303
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
1304
|
-
* @permissionScope Read Bookings - all read permissions
|
|
1305
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
1306
|
-
* @permissionScope Manage Bookings - all permissions
|
|
1307
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1308
|
-
* @applicableIdentity APP
|
|
1309
|
-
* @applicableIdentity VISITOR
|
|
1310
|
-
* @returns Retrieved resource.
|
|
1311
|
-
* @fqn wix.bookings.resources.v2.ResourcesService.GetResource
|
|
1312
|
-
*/
|
|
1313
|
-
export declare function getResource(resourceId: string): Promise<NonNullablePaths<Resource, ResourceNonNullablePaths>>;
|
|
1314
|
-
/**
|
|
1315
|
-
* Updates a resource.
|
|
1316
|
-
*
|
|
1317
|
-
*
|
|
1318
|
-
* Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.
|
|
1319
|
-
* This ensures you're working with the latest service information and prevents unintended overwrites.
|
|
1320
|
-
* @param _id - Resource ID.
|
|
1321
|
-
* @public
|
|
1322
|
-
* @documentationMaturity preview
|
|
1323
|
-
* @requiredField _id
|
|
1324
|
-
* @requiredField resource
|
|
1325
|
-
* @requiredField resource.revision
|
|
1326
|
-
* @permissionId BOOKINGS.RESOURCE_UPDATE
|
|
1327
|
-
* @permissionScope Manage Bookings
|
|
1328
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1329
|
-
* @permissionScope Manage Bookings - all permissions
|
|
1330
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1331
|
-
* @applicableIdentity APP
|
|
1332
|
-
* @returns Updated resource.
|
|
1333
|
-
* @fqn wix.bookings.resources.v2.ResourcesService.UpdateResource
|
|
1334
|
-
*/
|
|
1335
|
-
export declare function updateResource(_id: string, resource: NonNullablePaths<UpdateResource, `revision`>): Promise<NonNullablePaths<Resource, ResourceNonNullablePaths>>;
|
|
1336
|
-
export interface UpdateResource {
|
|
1206
|
+
interface UpdateResource {
|
|
1337
1207
|
/**
|
|
1338
1208
|
* Resource ID.
|
|
1339
1209
|
* @format GUID
|
|
@@ -1396,77 +1266,7 @@ export interface UpdateResource {
|
|
|
1396
1266
|
/** Extensions enabling users to save custom data related to the resource. */
|
|
1397
1267
|
extendedFields?: ExtendedFields;
|
|
1398
1268
|
}
|
|
1399
|
-
|
|
1400
|
-
* Deletes a resource.
|
|
1401
|
-
*
|
|
1402
|
-
*
|
|
1403
|
-
* Deleting a resource cancels its event schedule and all its working hour
|
|
1404
|
-
* schedules that aren't shared with another resource. Learn more about
|
|
1405
|
-
* _how Bookings uses the Calendar APIs_
|
|
1406
|
-
* ([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)).
|
|
1407
|
-
* @param resourceId - ID of the resource to delete.
|
|
1408
|
-
* @public
|
|
1409
|
-
* @documentationMaturity preview
|
|
1410
|
-
* @requiredField resourceId
|
|
1411
|
-
* @permissionId BOOKINGS.RESOURCE_DELETE
|
|
1412
|
-
* @permissionScope Manage Bookings
|
|
1413
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1414
|
-
* @permissionScope Manage Bookings - all permissions
|
|
1415
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1416
|
-
* @applicableIdentity APP
|
|
1417
|
-
* @fqn wix.bookings.resources.v2.ResourcesService.DeleteResource
|
|
1418
|
-
*/
|
|
1419
|
-
export declare function deleteResource(resourceId: string): Promise<void>;
|
|
1420
|
-
/**
|
|
1421
|
-
* Deletes multiple resources.
|
|
1422
|
-
*
|
|
1423
|
-
*
|
|
1424
|
-
* Refer to *Delete Resource*
|
|
1425
|
-
* ([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))
|
|
1426
|
-
* for more details.
|
|
1427
|
-
* @param ids - IDs of the resources to delete.
|
|
1428
|
-
* @public
|
|
1429
|
-
* @documentationMaturity preview
|
|
1430
|
-
* @requiredField ids
|
|
1431
|
-
* @permissionId BOOKINGS.RESOURCE_DELETE
|
|
1432
|
-
* @permissionScope Manage Bookings
|
|
1433
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1434
|
-
* @permissionScope Manage Bookings - all permissions
|
|
1435
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1436
|
-
* @applicableIdentity APP
|
|
1437
|
-
* @fqn wix.bookings.resources.v2.ResourcesService.BulkDeleteResources
|
|
1438
|
-
*/
|
|
1439
|
-
export declare function bulkDeleteResources(ids: string[]): Promise<NonNullablePaths<BulkDeleteResourcesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
|
|
1440
|
-
[P in ResourceNonNullablePaths]: `results.${number}.item.${P}`;
|
|
1441
|
-
}[ResourceNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
1442
|
-
/**
|
|
1443
|
-
* Retrieves a list of resources matching the provided search criteria.
|
|
1444
|
-
*
|
|
1445
|
-
*
|
|
1446
|
-
* Refer to the *supported filters article*
|
|
1447
|
-
* ([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))
|
|
1448
|
-
* for a complete list of supported filters and sorting options.
|
|
1449
|
-
* @public
|
|
1450
|
-
* @documentationMaturity preview
|
|
1451
|
-
* @permissionId BOOKINGS.RESOURCE_READ
|
|
1452
|
-
* @permissionScope Read Bookings - Public Data
|
|
1453
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1454
|
-
* @permissionScope Manage Bookings
|
|
1455
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1456
|
-
* @permissionScope Read Bookings - Including Participants
|
|
1457
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
1458
|
-
* @permissionScope Read Bookings - all read permissions
|
|
1459
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
1460
|
-
* @permissionScope Manage Bookings - all permissions
|
|
1461
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1462
|
-
* @applicableIdentity APP
|
|
1463
|
-
* @applicableIdentity VISITOR
|
|
1464
|
-
* @fqn wix.bookings.resources.v2.ResourcesService.SearchResources
|
|
1465
|
-
*/
|
|
1466
|
-
export declare function searchResources(options?: SearchResourcesOptions): Promise<NonNullablePaths<SearchResourcesResponse, {
|
|
1467
|
-
[P in ResourceNonNullablePaths]: `resources.${number}.${P}`;
|
|
1468
|
-
}[ResourceNonNullablePaths] | `aggregationData.results` | `aggregationData.results.${number}.values.results` | `aggregationData.results.${number}.values.results.${number}.value` | `aggregationData.results.${number}.values.results.${number}.count` | `aggregationData.results.${number}.ranges.results` | `aggregationData.results.${number}.ranges.results.${number}.count` | `aggregationData.results.${number}.scalar.type` | `aggregationData.results.${number}.scalar.value` | `aggregationData.results.${number}.groupedByValue.results` | `aggregationData.results.${number}.groupedByValue.results.${number}.value` | `aggregationData.results.${number}.groupedByValue.results.${number}.nestedResults.name` | `aggregationData.results.${number}.groupedByValue.results.${number}.nestedResults.type` | `aggregationData.results.${number}.groupedByValue.results.${number}.nestedResults.fieldPath` | `aggregationData.results.${number}.dateHistogram.results` | `aggregationData.results.${number}.dateHistogram.results.${number}.value` | `aggregationData.results.${number}.dateHistogram.results.${number}.count` | `aggregationData.results.${number}.nested.results` | `aggregationData.results.${number}.name` | `aggregationData.results.${number}.type` | `aggregationData.results.${number}.fieldPath`>>;
|
|
1469
|
-
export interface SearchResourcesOptions {
|
|
1269
|
+
interface SearchResourcesOptions {
|
|
1470
1270
|
/**
|
|
1471
1271
|
* Search condition. Refer to the *supported filters article*
|
|
1472
1272
|
* ([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))
|
|
@@ -1474,41 +1274,6 @@ export interface SearchResourcesOptions {
|
|
|
1474
1274
|
*/
|
|
1475
1275
|
search?: CursorSearch;
|
|
1476
1276
|
}
|
|
1477
|
-
/**
|
|
1478
|
-
* Creates a query to retrieve a list of resources.
|
|
1479
|
-
*
|
|
1480
|
-
* The `queryResources()` function builds a query to retrieve a list of resources and returns a `ResourcesQueryBuilder` object.
|
|
1481
|
-
*
|
|
1482
|
-
* The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/resources-query-builder/find) function.
|
|
1483
|
-
*
|
|
1484
|
-
* You can refine the query by chaining `ResourcesQueryBuilder` functions onto the query. `ResourcesQueryBuilder` functions enable you to sort, filter, and control the results that `queryResources()` returns.
|
|
1485
|
-
*
|
|
1486
|
-
* `queryResources()` runs with the following `ResourcesQueryBuilder` default that you can override:
|
|
1487
|
-
*
|
|
1488
|
-
* + `limit` is `50`.
|
|
1489
|
-
* + Sorted by `id` in ascending order.
|
|
1490
|
-
*
|
|
1491
|
-
* 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"`.
|
|
1492
|
-
*
|
|
1493
|
-
* 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`.
|
|
1494
|
-
* @public
|
|
1495
|
-
* @documentationMaturity preview
|
|
1496
|
-
* @permissionScope Read Bookings - Public Data
|
|
1497
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1498
|
-
* @permissionScope Manage Bookings
|
|
1499
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1500
|
-
* @permissionScope Read Bookings - Including Participants
|
|
1501
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
1502
|
-
* @permissionScope Read Bookings - all read permissions
|
|
1503
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
1504
|
-
* @permissionScope Manage Bookings - all permissions
|
|
1505
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1506
|
-
* @permissionId BOOKINGS.RESOURCE_READ
|
|
1507
|
-
* @applicableIdentity APP
|
|
1508
|
-
* @applicableIdentity VISITOR
|
|
1509
|
-
* @fqn wix.bookings.resources.v2.ResourcesService.QueryResources
|
|
1510
|
-
*/
|
|
1511
|
-
export declare function queryResources(): ResourcesQueryBuilder;
|
|
1512
1277
|
interface QueryCursorResult {
|
|
1513
1278
|
cursors: Cursors;
|
|
1514
1279
|
hasNext: () => boolean;
|
|
@@ -1516,13 +1281,13 @@ interface QueryCursorResult {
|
|
|
1516
1281
|
length: number;
|
|
1517
1282
|
pageSize: number;
|
|
1518
1283
|
}
|
|
1519
|
-
|
|
1284
|
+
interface ResourcesQueryResult extends QueryCursorResult {
|
|
1520
1285
|
items: Resource[];
|
|
1521
1286
|
query: ResourcesQueryBuilder;
|
|
1522
1287
|
next: () => Promise<ResourcesQueryResult>;
|
|
1523
1288
|
prev: () => Promise<ResourcesQueryResult>;
|
|
1524
1289
|
}
|
|
1525
|
-
|
|
1290
|
+
interface ResourcesQueryBuilder {
|
|
1526
1291
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1527
1292
|
* @param value - Value to compare against.
|
|
1528
1293
|
* @documentationMaturity preview
|
|
@@ -1586,33 +1351,7 @@ export interface ResourcesQueryBuilder {
|
|
|
1586
1351
|
/** @documentationMaturity preview */
|
|
1587
1352
|
find: () => Promise<ResourcesQueryResult>;
|
|
1588
1353
|
}
|
|
1589
|
-
|
|
1590
|
-
* Counts resources according to given criteria.
|
|
1591
|
-
*
|
|
1592
|
-
*
|
|
1593
|
-
* Refer to the *supported filters article*
|
|
1594
|
-
* ([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))
|
|
1595
|
-
* for a complete list of supported filters and sorting options.
|
|
1596
|
-
* @public
|
|
1597
|
-
* @documentationMaturity preview
|
|
1598
|
-
* @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.
|
|
1599
|
-
* @permissionId BOOKINGS.RESOURCE_READ
|
|
1600
|
-
* @permissionScope Read Bookings - Public Data
|
|
1601
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1602
|
-
* @permissionScope Manage Bookings
|
|
1603
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1604
|
-
* @permissionScope Read Bookings - Including Participants
|
|
1605
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
1606
|
-
* @permissionScope Read Bookings - all read permissions
|
|
1607
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
1608
|
-
* @permissionScope Manage Bookings - all permissions
|
|
1609
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1610
|
-
* @applicableIdentity APP
|
|
1611
|
-
* @applicableIdentity VISITOR
|
|
1612
|
-
* @fqn wix.bookings.resources.v2.ResourcesService.CountResources
|
|
1613
|
-
*/
|
|
1614
|
-
export declare function countResources(options?: CountResourcesOptions): Promise<NonNullablePaths<CountResourcesResponse, `count`>>;
|
|
1615
|
-
export interface CountResourcesOptions {
|
|
1354
|
+
interface CountResourcesOptions {
|
|
1616
1355
|
/**
|
|
1617
1356
|
* Filter to base the count on. Refer to the *supported filters article*
|
|
1618
1357
|
* ([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))
|
|
@@ -1626,4 +1365,5 @@ export interface CountResourcesOptions {
|
|
|
1626
1365
|
*/
|
|
1627
1366
|
search?: SearchDetails;
|
|
1628
1367
|
}
|
|
1629
|
-
|
|
1368
|
+
|
|
1369
|
+
export { type UpdateResourceResponse as $, AggregationType as A, type BulkCreateResourcesOptions as B, type CountResourcesOptions as C, type GetResourceResponse as D, type EventsSchedule as E, type GetDeletedResourceRequest as F, type GetResourceRequest as G, type GetDeletedResourceResponse as H, Interval as I, type ListDeletedResourcesRequest as J, type CursorPaging as K, type LocationOptions as L, ManagementType as M, NestedAggregationType as N, type ListDeletedResourcesResponse as O, type CursorPagingMetadata as P, type Cursors as Q, type Resource as R, type SearchResourcesOptions as S, type RemoveResourceFromTrashBinRequest as T, type UpdateResource as U, type V2WorkingHoursSchedules as V, WebhookIdentityType as W, type RemoveResourceFromTrashBinResponse as X, type RestoreResourceFromTrashBinRequest as Y, type RestoreResourceFromTrashBinResponse as Z, type UpdateResourceRequest as _, type BulkCreateResourcesResponse as a, type IdentificationData as a$, type DeleteResourceRequest as a0, type DeleteResourceResponse as a1, type BulkDeleteResourcesRequest as a2, type SearchResourcesRequest as a3, type CursorSearch as a4, type CursorSearchPagingMethodOneOf as a5, type Sorting as a6, type Aggregation as a7, type AggregationKindOneOf as a8, type RangeBucket as a9, type Results as aA, type DateHistogramResult as aB, type GroupByValueResults as aC, type DateHistogramResults as aD, type NestedResults as aE, type AggregationResults as aF, type AggregationResultsResultOneOf as aG, type QueryResourcesRequest as aH, type CursorQuery as aI, type CursorQueryPagingMethodOneOf as aJ, type QueryResourcesResponse as aK, type CountResourcesRequest as aL, type ImportResourceRequest as aM, type ImportResourceResponse as aN, type FixResourceSchedulesRequest as aO, type FixResourceSchedulesResponse as aP, type ReindexTenantRequest as aQ, type ReindexTenantResponse as aR, type DomainEvent as aS, type DomainEventBodyOneOf as aT, type EntityCreatedEvent as aU, type RestoreInfo as aV, type EntityUpdatedEvent as aW, type EntityDeletedEvent as aX, type ActionEvent as aY, type Empty as aZ, type MessageEnvelope as a_, type IncludeMissingValuesOptions as aa, type ValueAggregation as ab, type ValueAggregationOptionsOneOf as ac, type RangeAggregation as ad, type ScalarAggregation as ae, type DateHistogramAggregation as af, type NestedAggregationItem as ag, type NestedAggregationItemKindOneOf as ah, type NestedAggregation as ai, type GroupByAggregation as aj, type GroupByAggregationKindOneOf as ak, type SearchDetails as al, type AggregationData as am, type ValueAggregationResult as an, type RangeAggregationResult as ao, type NestedAggregationResults as ap, type NestedAggregationResultsResultOneOf as aq, type ValueResults as ar, type RangeResults as as, type AggregationResultsScalarResult as at, type NestedValueAggregationResult as au, type ValueResult as av, type RangeResult as aw, type ScalarResult as ax, type NestedResultValue as ay, type NestedResultValueResultOneOf as az, type BulkDeleteResourcesResponse as b, type IdentificationDataIdOneOf as b0, type BaseEventMetadata as b1, type EventMetadata as b2, type ResourceCreatedEnvelope as b3, type ResourceDeletedEnvelope as b4, type ResourceUpdatedEnvelope as b5, type ResourcesQueryResult as b6, type SearchResourcesResponse as c, type ResourcesQueryBuilder as d, type CountResourcesResponse as e, SortOrder as f, SortType as g, SortDirection as h, MissingValues as i, ScalarType as j, Mode as k, type ResourceCompositionDetailsOneOf as l, type WorkingHoursSchedule as m, type SingleResource as n, type Schedule as o, type SpecificLocation as p, type BusinessLocation as q, type WorkingHoursSchedules as r, type ExtendedFields as s, type CreateResourceRequest as t, type CreateResourceResponse as u, type BulkCreateResourcesRequest as v, type BulkResourceResult as w, type ItemMetadata as x, type ApplicationError as y, type BulkActionMetadata as z };
|