@wix/auto_sdk_bookings_resources 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +29 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.js +43 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +96 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.js +446 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js +199 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
- package/build/{internal/index.d.ts → cjs/src/bookings-resources-v2-resource-resources.public.d.ts} +18 -38
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.js +106 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
- package/build/{internal/meta.d.mts → cjs/src/bookings-resources-v2-resource-resources.types.d.ts} +351 -114
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.js +104 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
- package/build/{bookings-resources-v2-resource-resources.universal-hYjNdpWu.d.mts → cjs/src/bookings-resources-v2-resource-resources.universal.d.ts} +387 -127
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js +587 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/bookings-resources-v2-resource-resources.context.d.ts +29 -0
- package/build/es/src/bookings-resources-v2-resource-resources.context.js +29 -0
- package/build/es/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
- package/build/es/src/bookings-resources-v2-resource-resources.http.d.ts +96 -0
- package/build/es/src/bookings-resources-v2-resource-resources.http.js +434 -0
- package/build/es/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
- package/build/es/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
- package/build/es/src/bookings-resources-v2-resource-resources.meta.js +164 -0
- package/build/es/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
- package/build/{index.d.ts → es/src/bookings-resources-v2-resource-resources.public.d.ts} +18 -38
- package/build/es/src/bookings-resources-v2-resource-resources.public.js +83 -0
- package/build/es/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
- package/build/{internal/meta.d.ts → es/src/bookings-resources-v2-resource-resources.types.d.ts} +351 -114
- package/build/es/src/bookings-resources-v2-resource-resources.types.js +101 -0
- package/build/es/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
- package/build/{bookings-resources-v2-resource-resources.universal-hYjNdpWu.d.ts → es/src/bookings-resources-v2-resource-resources.universal.d.ts} +387 -127
- package/build/es/src/bookings-resources-v2-resource-resources.universal.js +552 -0
- package/build/es/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +29 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js +43 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +96 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js +446 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js +199 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
- package/build/internal/{index.d.mts → cjs/src/bookings-resources-v2-resource-resources.public.d.ts} +18 -38
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js +106 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
- package/build/{meta.d.mts → internal/cjs/src/bookings-resources-v2-resource-resources.types.d.ts} +351 -114
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js +104 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
- package/build/internal/{bookings-resources-v2-resource-resources.universal-hYjNdpWu.d.mts → cjs/src/bookings-resources-v2-resource-resources.universal.d.ts} +387 -127
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js +587 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.d.ts +29 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js +29 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.d.ts +96 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js +434 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js +164 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
- package/build/{index.d.mts → internal/es/src/bookings-resources-v2-resource-resources.public.d.ts} +18 -38
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js +83 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
- package/build/{meta.d.ts → internal/es/src/bookings-resources-v2-resource-resources.types.d.ts} +351 -114
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js +101 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
- package/build/internal/{bookings-resources-v2-resource-resources.universal-hYjNdpWu.d.ts → es/src/bookings-resources-v2-resource-resources.universal.d.ts} +387 -127
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js +552 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.js +0 -882
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -836
- package/build/index.mjs.map +0 -1
- package/build/internal/index.js +0 -882
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -836
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.js +0 -559
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -524
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.js +0 -559
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -524
- package/build/meta.mjs.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
1
2
|
/**
|
|
2
3
|
* A resource represents an entity, such as a room or a staff member, that can be
|
|
3
4
|
* scheduled for use in a *booking*
|
|
@@ -5,7 +6,7 @@
|
|
|
5
6
|
* The availability of a resource is tracked to ensure that it
|
|
6
7
|
* can be allocated at a requested time slot and to prevent double bookings.
|
|
7
8
|
*/
|
|
8
|
-
interface Resource extends ResourceCompositionDetailsOneOf {
|
|
9
|
+
export interface Resource extends ResourceCompositionDetailsOneOf {
|
|
9
10
|
/**
|
|
10
11
|
* Resource ID.
|
|
11
12
|
* @format GUID
|
|
@@ -69,9 +70,9 @@ interface Resource extends ResourceCompositionDetailsOneOf {
|
|
|
69
70
|
extendedFields?: ExtendedFields;
|
|
70
71
|
}
|
|
71
72
|
/** @oneof */
|
|
72
|
-
interface ResourceCompositionDetailsOneOf {
|
|
73
|
+
export interface ResourceCompositionDetailsOneOf {
|
|
73
74
|
}
|
|
74
|
-
interface WorkingHoursSchedule {
|
|
75
|
+
export interface WorkingHoursSchedule {
|
|
75
76
|
/**
|
|
76
77
|
* ID of the working hour *schedule*
|
|
77
78
|
* ([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)).
|
|
@@ -86,7 +87,7 @@ interface WorkingHoursSchedule {
|
|
|
86
87
|
*/
|
|
87
88
|
shared?: boolean | null;
|
|
88
89
|
}
|
|
89
|
-
interface SingleResource {
|
|
90
|
+
export interface SingleResource {
|
|
90
91
|
/**
|
|
91
92
|
* Schedule details that specify the working hours and locations of this resource.
|
|
92
93
|
*
|
|
@@ -111,7 +112,7 @@ interface SingleResource {
|
|
|
111
112
|
*/
|
|
112
113
|
eventsSchedule?: Schedule;
|
|
113
114
|
}
|
|
114
|
-
interface V2WorkingHoursSchedules {
|
|
115
|
+
export interface V2WorkingHoursSchedules {
|
|
115
116
|
/**
|
|
116
117
|
* Schedules specifying the working hours of the resource. Currently, only a single schedule is supported.
|
|
117
118
|
* @maxSize 1
|
|
@@ -119,7 +120,7 @@ interface V2WorkingHoursSchedules {
|
|
|
119
120
|
values?: Schedule[];
|
|
120
121
|
}
|
|
121
122
|
/** Deprecated and subject to removal */
|
|
122
|
-
interface Schedule {
|
|
123
|
+
export interface Schedule {
|
|
123
124
|
/**
|
|
124
125
|
* Schedule ID. See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information.
|
|
125
126
|
* @format GUID
|
|
@@ -133,7 +134,7 @@ interface Schedule {
|
|
|
133
134
|
*/
|
|
134
135
|
shared?: boolean | null;
|
|
135
136
|
}
|
|
136
|
-
interface LocationOptions {
|
|
137
|
+
export interface LocationOptions {
|
|
137
138
|
/**
|
|
138
139
|
* Whether the resource is available in all *business locations*
|
|
139
140
|
* ([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)).
|
|
@@ -147,7 +148,7 @@ interface LocationOptions {
|
|
|
147
148
|
/** Details of resource availability in specific locations. */
|
|
148
149
|
specificLocationOptions?: SpecificLocation;
|
|
149
150
|
}
|
|
150
|
-
interface SpecificLocation {
|
|
151
|
+
export interface SpecificLocation {
|
|
151
152
|
/**
|
|
152
153
|
* Whether the resource is available in *business locations*
|
|
153
154
|
* ([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)).
|
|
@@ -167,7 +168,7 @@ interface SpecificLocation {
|
|
|
167
168
|
*/
|
|
168
169
|
businessLocations?: BusinessLocation[];
|
|
169
170
|
}
|
|
170
|
-
interface BusinessLocation {
|
|
171
|
+
export interface BusinessLocation {
|
|
171
172
|
/**
|
|
172
173
|
* ID of the business *location*
|
|
173
174
|
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)).
|
|
@@ -175,14 +176,14 @@ interface BusinessLocation {
|
|
|
175
176
|
*/
|
|
176
177
|
locationId?: string | null;
|
|
177
178
|
}
|
|
178
|
-
interface WorkingHoursSchedules {
|
|
179
|
+
export interface WorkingHoursSchedules {
|
|
179
180
|
/**
|
|
180
181
|
* Schedules specifying the working hours of the resource. Currently, only a single schedule is supported.
|
|
181
182
|
* @maxSize 1
|
|
182
183
|
*/
|
|
183
184
|
values?: WorkingHoursSchedule[];
|
|
184
185
|
}
|
|
185
|
-
interface EventsSchedule {
|
|
186
|
+
export interface EventsSchedule {
|
|
186
187
|
/**
|
|
187
188
|
* ID of the event *schedule*
|
|
188
189
|
* ([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)).
|
|
@@ -190,11 +191,11 @@ interface EventsSchedule {
|
|
|
190
191
|
*/
|
|
191
192
|
scheduleId?: string | null;
|
|
192
193
|
}
|
|
193
|
-
declare enum ManagementType {
|
|
194
|
+
export declare enum ManagementType {
|
|
194
195
|
/** The resource is managed by a Wix user. */
|
|
195
196
|
WIX_USER = "WIX_USER"
|
|
196
197
|
}
|
|
197
|
-
interface ExtendedFields {
|
|
198
|
+
export interface ExtendedFields {
|
|
198
199
|
/**
|
|
199
200
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
200
201
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -205,15 +206,15 @@ interface ExtendedFields {
|
|
|
205
206
|
*/
|
|
206
207
|
namespaces?: Record<string, Record<string, any>>;
|
|
207
208
|
}
|
|
208
|
-
interface CreateResourceRequest {
|
|
209
|
+
export interface CreateResourceRequest {
|
|
209
210
|
/** Resource to create. */
|
|
210
211
|
resource: Resource;
|
|
211
212
|
}
|
|
212
|
-
interface CreateResourceResponse {
|
|
213
|
+
export interface CreateResourceResponse {
|
|
213
214
|
/** Created resource. */
|
|
214
215
|
resource?: Resource;
|
|
215
216
|
}
|
|
216
|
-
interface BulkCreateResourcesRequest {
|
|
217
|
+
export interface BulkCreateResourcesRequest {
|
|
217
218
|
/**
|
|
218
219
|
* Resources to create.
|
|
219
220
|
* @maxSize 50
|
|
@@ -226,19 +227,19 @@ interface BulkCreateResourcesRequest {
|
|
|
226
227
|
*/
|
|
227
228
|
returnEntity?: boolean;
|
|
228
229
|
}
|
|
229
|
-
interface BulkCreateResourcesResponse {
|
|
230
|
+
export interface BulkCreateResourcesResponse {
|
|
230
231
|
/** The result of each resource creation. */
|
|
231
232
|
results?: BulkResourceResult[];
|
|
232
233
|
/** Create statistics. */
|
|
233
234
|
bulkActionMetadata?: BulkActionMetadata;
|
|
234
235
|
}
|
|
235
|
-
interface BulkResourceResult {
|
|
236
|
+
export interface BulkResourceResult {
|
|
236
237
|
/** Item metadata. */
|
|
237
238
|
itemMetadata?: ItemMetadata;
|
|
238
239
|
/** The resulting resource after the bulk operation. */
|
|
239
240
|
item?: Resource;
|
|
240
241
|
}
|
|
241
|
-
interface ItemMetadata {
|
|
242
|
+
export interface ItemMetadata {
|
|
242
243
|
/**
|
|
243
244
|
* Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
|
|
244
245
|
* @format GUID
|
|
@@ -251,7 +252,7 @@ interface ItemMetadata {
|
|
|
251
252
|
/** Details about the error in case of failure. */
|
|
252
253
|
error?: ApplicationError;
|
|
253
254
|
}
|
|
254
|
-
interface ApplicationError {
|
|
255
|
+
export interface ApplicationError {
|
|
255
256
|
/** Error code. */
|
|
256
257
|
code?: string;
|
|
257
258
|
/** Description of the error. */
|
|
@@ -259,7 +260,7 @@ interface ApplicationError {
|
|
|
259
260
|
/** Data related to the error. */
|
|
260
261
|
data?: Record<string, any> | null;
|
|
261
262
|
}
|
|
262
|
-
interface BulkActionMetadata {
|
|
263
|
+
export interface BulkActionMetadata {
|
|
263
264
|
/** Number of items that were successfully processed. */
|
|
264
265
|
totalSuccesses?: number;
|
|
265
266
|
/** Number of items that couldn't be processed. */
|
|
@@ -267,29 +268,29 @@ interface BulkActionMetadata {
|
|
|
267
268
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
268
269
|
undetailedFailures?: number;
|
|
269
270
|
}
|
|
270
|
-
interface GetResourceRequest {
|
|
271
|
+
export interface GetResourceRequest {
|
|
271
272
|
/**
|
|
272
273
|
* ID of the resource to retrieve.
|
|
273
274
|
* @format GUID
|
|
274
275
|
*/
|
|
275
276
|
resourceId: string;
|
|
276
277
|
}
|
|
277
|
-
interface GetResourceResponse {
|
|
278
|
+
export interface GetResourceResponse {
|
|
278
279
|
/** Retrieved resource. */
|
|
279
280
|
resource?: Resource;
|
|
280
281
|
}
|
|
281
|
-
interface GetDeletedResourceRequest {
|
|
282
|
+
export interface GetDeletedResourceRequest {
|
|
282
283
|
/**
|
|
283
284
|
* ID of the deleted resource to retrieve from the trash bin.
|
|
284
285
|
* @format GUID
|
|
285
286
|
*/
|
|
286
287
|
resourceId?: string;
|
|
287
288
|
}
|
|
288
|
-
interface GetDeletedResourceResponse {
|
|
289
|
+
export interface GetDeletedResourceResponse {
|
|
289
290
|
/** Retrieved resource. */
|
|
290
291
|
resource?: Resource;
|
|
291
292
|
}
|
|
292
|
-
interface ListDeletedResourcesRequest {
|
|
293
|
+
export interface ListDeletedResourcesRequest {
|
|
293
294
|
/**
|
|
294
295
|
* IDs of the resources to retrieve.
|
|
295
296
|
* @format GUID
|
|
@@ -299,7 +300,7 @@ interface ListDeletedResourcesRequest {
|
|
|
299
300
|
/** Paging details, allowing you specify a limit and a cursor. */
|
|
300
301
|
paging?: CursorPaging;
|
|
301
302
|
}
|
|
302
|
-
interface CursorPaging {
|
|
303
|
+
export interface CursorPaging {
|
|
303
304
|
/**
|
|
304
305
|
* Maximum number of items to return in the results.
|
|
305
306
|
* @max 100
|
|
@@ -314,13 +315,13 @@ interface CursorPaging {
|
|
|
314
315
|
*/
|
|
315
316
|
cursor?: string | null;
|
|
316
317
|
}
|
|
317
|
-
interface ListDeletedResourcesResponse {
|
|
318
|
+
export interface ListDeletedResourcesResponse {
|
|
318
319
|
/** Retrieved resources. */
|
|
319
320
|
resources?: Resource[];
|
|
320
321
|
/** Paging metadata. */
|
|
321
322
|
pagingMetadata?: CursorPagingMetadata;
|
|
322
323
|
}
|
|
323
|
-
interface CursorPagingMetadata {
|
|
324
|
+
export interface CursorPagingMetadata {
|
|
324
325
|
/** Number of items returned in the response. */
|
|
325
326
|
count?: number | null;
|
|
326
327
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -333,7 +334,7 @@ interface CursorPagingMetadata {
|
|
|
333
334
|
*/
|
|
334
335
|
hasNext?: boolean | null;
|
|
335
336
|
}
|
|
336
|
-
interface Cursors {
|
|
337
|
+
export interface Cursors {
|
|
337
338
|
/**
|
|
338
339
|
* Cursor string pointing to the next page in the list of results.
|
|
339
340
|
* @maxLength 16000
|
|
@@ -345,44 +346,44 @@ interface Cursors {
|
|
|
345
346
|
*/
|
|
346
347
|
prev?: string | null;
|
|
347
348
|
}
|
|
348
|
-
interface RemoveResourceFromTrashBinRequest {
|
|
349
|
+
export interface RemoveResourceFromTrashBinRequest {
|
|
349
350
|
/**
|
|
350
351
|
* ID of the resource to permanently delete from the trash bin.
|
|
351
352
|
* @format GUID
|
|
352
353
|
*/
|
|
353
354
|
resourceId?: string;
|
|
354
355
|
}
|
|
355
|
-
interface RemoveResourceFromTrashBinResponse {
|
|
356
|
+
export interface RemoveResourceFromTrashBinResponse {
|
|
356
357
|
}
|
|
357
|
-
interface RestoreResourceFromTrashBinRequest {
|
|
358
|
+
export interface RestoreResourceFromTrashBinRequest {
|
|
358
359
|
/**
|
|
359
360
|
* ID of the resource to restore from the trash bin.
|
|
360
361
|
* @format GUID
|
|
361
362
|
*/
|
|
362
363
|
resourceId?: string;
|
|
363
364
|
}
|
|
364
|
-
interface RestoreResourceFromTrashBinResponse {
|
|
365
|
+
export interface RestoreResourceFromTrashBinResponse {
|
|
365
366
|
/** Restored resource. */
|
|
366
367
|
resource?: Resource;
|
|
367
368
|
}
|
|
368
|
-
interface UpdateResourceRequest {
|
|
369
|
+
export interface UpdateResourceRequest {
|
|
369
370
|
/** Resource to update. */
|
|
370
371
|
resource: Resource;
|
|
371
372
|
}
|
|
372
|
-
interface UpdateResourceResponse {
|
|
373
|
+
export interface UpdateResourceResponse {
|
|
373
374
|
/** Updated resource. */
|
|
374
375
|
resource?: Resource;
|
|
375
376
|
}
|
|
376
|
-
interface DeleteResourceRequest {
|
|
377
|
+
export interface DeleteResourceRequest {
|
|
377
378
|
/**
|
|
378
379
|
* ID of the resource to delete.
|
|
379
380
|
* @format GUID
|
|
380
381
|
*/
|
|
381
382
|
resourceId: string;
|
|
382
383
|
}
|
|
383
|
-
interface DeleteResourceResponse {
|
|
384
|
+
export interface DeleteResourceResponse {
|
|
384
385
|
}
|
|
385
|
-
interface BulkDeleteResourcesRequest {
|
|
386
|
+
export interface BulkDeleteResourcesRequest {
|
|
386
387
|
/**
|
|
387
388
|
* IDs of the resources to delete.
|
|
388
389
|
* @format GUID
|
|
@@ -390,13 +391,13 @@ interface BulkDeleteResourcesRequest {
|
|
|
390
391
|
*/
|
|
391
392
|
ids: string[];
|
|
392
393
|
}
|
|
393
|
-
interface BulkDeleteResourcesResponse {
|
|
394
|
+
export interface BulkDeleteResourcesResponse {
|
|
394
395
|
/** The result of each resource removal. */
|
|
395
396
|
results?: BulkResourceResult[];
|
|
396
397
|
/** Delete statistics. */
|
|
397
398
|
bulkActionMetadata?: BulkActionMetadata;
|
|
398
399
|
}
|
|
399
|
-
interface SearchResourcesRequest {
|
|
400
|
+
export interface SearchResourcesRequest {
|
|
400
401
|
/**
|
|
401
402
|
* Search condition. Refer to the *supported filters article*
|
|
402
403
|
* ([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))
|
|
@@ -404,7 +405,7 @@ interface SearchResourcesRequest {
|
|
|
404
405
|
*/
|
|
405
406
|
search?: CursorSearch;
|
|
406
407
|
}
|
|
407
|
-
interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
408
|
+
export interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
408
409
|
/**
|
|
409
410
|
* Cursor pointing to page of results.
|
|
410
411
|
* When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
|
|
@@ -437,14 +438,14 @@ interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
|
437
438
|
timeZone?: string | null;
|
|
438
439
|
}
|
|
439
440
|
/** @oneof */
|
|
440
|
-
interface CursorSearchPagingMethodOneOf {
|
|
441
|
+
export interface CursorSearchPagingMethodOneOf {
|
|
441
442
|
/**
|
|
442
443
|
* Cursor pointing to page of results.
|
|
443
444
|
* When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
|
|
444
445
|
*/
|
|
445
446
|
cursorPaging?: CursorPaging;
|
|
446
447
|
}
|
|
447
|
-
interface Sorting {
|
|
448
|
+
export interface Sorting {
|
|
448
449
|
/**
|
|
449
450
|
* Name of the field to sort by.
|
|
450
451
|
* @maxLength 512
|
|
@@ -453,11 +454,11 @@ interface Sorting {
|
|
|
453
454
|
/** Sort order. */
|
|
454
455
|
order?: SortOrder;
|
|
455
456
|
}
|
|
456
|
-
declare enum SortOrder {
|
|
457
|
+
export declare enum SortOrder {
|
|
457
458
|
ASC = "ASC",
|
|
458
459
|
DESC = "DESC"
|
|
459
460
|
}
|
|
460
|
-
interface Aggregation extends AggregationKindOneOf {
|
|
461
|
+
export interface Aggregation extends AggregationKindOneOf {
|
|
461
462
|
/** Value aggregation */
|
|
462
463
|
value?: ValueAggregation;
|
|
463
464
|
/** Range aggregation */
|
|
@@ -489,7 +490,7 @@ interface Aggregation extends AggregationKindOneOf {
|
|
|
489
490
|
groupBy?: GroupByAggregation;
|
|
490
491
|
}
|
|
491
492
|
/** @oneof */
|
|
492
|
-
interface AggregationKindOneOf {
|
|
493
|
+
export interface AggregationKindOneOf {
|
|
493
494
|
/** Value aggregation */
|
|
494
495
|
value?: ValueAggregation;
|
|
495
496
|
/** Range aggregation */
|
|
@@ -501,38 +502,38 @@ interface AggregationKindOneOf {
|
|
|
501
502
|
/** Nested aggregation */
|
|
502
503
|
nested?: NestedAggregation;
|
|
503
504
|
}
|
|
504
|
-
interface RangeBucket {
|
|
505
|
+
export interface RangeBucket {
|
|
505
506
|
/** Inclusive lower bound of the range. Required if to is not given */
|
|
506
507
|
from?: number | null;
|
|
507
508
|
/** Exclusive upper bound of the range. Required if from is not given */
|
|
508
509
|
to?: number | null;
|
|
509
510
|
}
|
|
510
|
-
declare enum SortType {
|
|
511
|
+
export declare enum SortType {
|
|
511
512
|
/** Should sort by number of matches */
|
|
512
513
|
COUNT = "COUNT",
|
|
513
514
|
/** Should sort by value of the field alphabetically */
|
|
514
515
|
VALUE = "VALUE"
|
|
515
516
|
}
|
|
516
|
-
declare enum SortDirection {
|
|
517
|
+
export declare enum SortDirection {
|
|
517
518
|
/** Should sort in descending order */
|
|
518
519
|
DESC = "DESC",
|
|
519
520
|
/** Should sort in ascending order */
|
|
520
521
|
ASC = "ASC"
|
|
521
522
|
}
|
|
522
|
-
declare enum MissingValues {
|
|
523
|
+
export declare enum MissingValues {
|
|
523
524
|
/** Should missing values be excluded from the aggregation results */
|
|
524
525
|
EXCLUDE = "EXCLUDE",
|
|
525
526
|
/** Should missing values be included in the aggregation results */
|
|
526
527
|
INCLUDE = "INCLUDE"
|
|
527
528
|
}
|
|
528
|
-
interface IncludeMissingValuesOptions {
|
|
529
|
+
export interface IncludeMissingValuesOptions {
|
|
529
530
|
/**
|
|
530
531
|
* Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
|
|
531
532
|
* @maxLength 20
|
|
532
533
|
*/
|
|
533
534
|
addToBucket?: string;
|
|
534
535
|
}
|
|
535
|
-
declare enum ScalarType {
|
|
536
|
+
export declare enum ScalarType {
|
|
536
537
|
UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
|
|
537
538
|
/** Count of distinct values */
|
|
538
539
|
COUNT_DISTINCT = "COUNT_DISTINCT",
|
|
@@ -541,7 +542,7 @@ declare enum ScalarType {
|
|
|
541
542
|
/** Maximum value */
|
|
542
543
|
MAX = "MAX"
|
|
543
544
|
}
|
|
544
|
-
interface ValueAggregation extends ValueAggregationOptionsOneOf {
|
|
545
|
+
export interface ValueAggregation extends ValueAggregationOptionsOneOf {
|
|
545
546
|
/** Options for including missing values */
|
|
546
547
|
includeOptions?: IncludeMissingValuesOptions;
|
|
547
548
|
/** Should sort by number of matches or value of the field */
|
|
@@ -554,11 +555,11 @@ interface ValueAggregation extends ValueAggregationOptionsOneOf {
|
|
|
554
555
|
missingValues?: MissingValues;
|
|
555
556
|
}
|
|
556
557
|
/** @oneof */
|
|
557
|
-
interface ValueAggregationOptionsOneOf {
|
|
558
|
+
export interface ValueAggregationOptionsOneOf {
|
|
558
559
|
/** Options for including missing values */
|
|
559
560
|
includeOptions?: IncludeMissingValuesOptions;
|
|
560
561
|
}
|
|
561
|
-
declare enum NestedAggregationType {
|
|
562
|
+
export declare enum NestedAggregationType {
|
|
562
563
|
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
563
564
|
/** An aggregation where result buckets are dynamically built - one per unique value */
|
|
564
565
|
VALUE = "VALUE",
|
|
@@ -569,22 +570,22 @@ declare enum NestedAggregationType {
|
|
|
569
570
|
/** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
|
|
570
571
|
DATE_HISTOGRAM = "DATE_HISTOGRAM"
|
|
571
572
|
}
|
|
572
|
-
interface RangeAggregation {
|
|
573
|
+
export interface RangeAggregation {
|
|
573
574
|
/**
|
|
574
575
|
* 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
|
|
575
576
|
* @maxSize 50
|
|
576
577
|
*/
|
|
577
578
|
buckets?: RangeBucket[];
|
|
578
579
|
}
|
|
579
|
-
interface ScalarAggregation {
|
|
580
|
+
export interface ScalarAggregation {
|
|
580
581
|
/** Define the operator for the scalar aggregation */
|
|
581
582
|
type?: ScalarType;
|
|
582
583
|
}
|
|
583
|
-
interface DateHistogramAggregation {
|
|
584
|
+
export interface DateHistogramAggregation {
|
|
584
585
|
/** Interval for date histogram aggregation */
|
|
585
586
|
interval?: Interval;
|
|
586
587
|
}
|
|
587
|
-
declare enum Interval {
|
|
588
|
+
export declare enum Interval {
|
|
588
589
|
UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
|
|
589
590
|
/** Yearly interval */
|
|
590
591
|
YEAR = "YEAR",
|
|
@@ -601,7 +602,7 @@ declare enum Interval {
|
|
|
601
602
|
/** Second interval */
|
|
602
603
|
SECOND = "SECOND"
|
|
603
604
|
}
|
|
604
|
-
interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
605
|
+
export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
605
606
|
/** Value aggregation */
|
|
606
607
|
value?: ValueAggregation;
|
|
607
608
|
/** Range aggregation */
|
|
@@ -624,7 +625,7 @@ interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
|
624
625
|
fieldPath?: string;
|
|
625
626
|
}
|
|
626
627
|
/** @oneof */
|
|
627
|
-
interface NestedAggregationItemKindOneOf {
|
|
628
|
+
export interface NestedAggregationItemKindOneOf {
|
|
628
629
|
/** Value aggregation */
|
|
629
630
|
value?: ValueAggregation;
|
|
630
631
|
/** Range aggregation */
|
|
@@ -634,7 +635,7 @@ interface NestedAggregationItemKindOneOf {
|
|
|
634
635
|
/** Date histogram aggregation */
|
|
635
636
|
dateHistogram?: DateHistogramAggregation;
|
|
636
637
|
}
|
|
637
|
-
declare enum AggregationType {
|
|
638
|
+
export declare enum AggregationType {
|
|
638
639
|
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
639
640
|
/** An aggregation where result buckets are dynamically built - one per unique value */
|
|
640
641
|
VALUE = "VALUE",
|
|
@@ -648,7 +649,7 @@ declare enum AggregationType {
|
|
|
648
649
|
NESTED = "NESTED"
|
|
649
650
|
}
|
|
650
651
|
/** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
|
|
651
|
-
interface NestedAggregation {
|
|
652
|
+
export interface NestedAggregation {
|
|
652
653
|
/**
|
|
653
654
|
* Flattened list of aggregations, where each next aggregation is nested within previous one
|
|
654
655
|
* @minSize 2
|
|
@@ -656,7 +657,7 @@ interface NestedAggregation {
|
|
|
656
657
|
*/
|
|
657
658
|
nestedAggregations?: NestedAggregationItem[];
|
|
658
659
|
}
|
|
659
|
-
interface GroupByAggregation extends GroupByAggregationKindOneOf {
|
|
660
|
+
export interface GroupByAggregation extends GroupByAggregationKindOneOf {
|
|
660
661
|
/** Value aggregation configuration */
|
|
661
662
|
value?: ValueAggregation;
|
|
662
663
|
/**
|
|
@@ -671,11 +672,11 @@ interface GroupByAggregation extends GroupByAggregationKindOneOf {
|
|
|
671
672
|
fieldPath?: string;
|
|
672
673
|
}
|
|
673
674
|
/** @oneof */
|
|
674
|
-
interface GroupByAggregationKindOneOf {
|
|
675
|
+
export interface GroupByAggregationKindOneOf {
|
|
675
676
|
/** Value aggregation configuration */
|
|
676
677
|
value?: ValueAggregation;
|
|
677
678
|
}
|
|
678
|
-
interface SearchDetails {
|
|
679
|
+
export interface SearchDetails {
|
|
679
680
|
/** Defines how separate search terms in `expression` are combined */
|
|
680
681
|
mode?: Mode;
|
|
681
682
|
/**
|
|
@@ -692,13 +693,13 @@ interface SearchDetails {
|
|
|
692
693
|
/** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
|
|
693
694
|
fuzzy?: boolean;
|
|
694
695
|
}
|
|
695
|
-
declare enum Mode {
|
|
696
|
+
export declare enum Mode {
|
|
696
697
|
/** Any of the search terms must be present */
|
|
697
698
|
OR = "OR",
|
|
698
699
|
/** All search terms must be present */
|
|
699
700
|
AND = "AND"
|
|
700
701
|
}
|
|
701
|
-
interface SearchResourcesResponse {
|
|
702
|
+
export interface SearchResourcesResponse {
|
|
702
703
|
/** Retrieved resources. */
|
|
703
704
|
resources?: Resource[];
|
|
704
705
|
/** Paging metadata. */
|
|
@@ -706,14 +707,14 @@ interface SearchResourcesResponse {
|
|
|
706
707
|
/** Aggregation results. */
|
|
707
708
|
aggregationData?: AggregationData;
|
|
708
709
|
}
|
|
709
|
-
interface AggregationData {
|
|
710
|
+
export interface AggregationData {
|
|
710
711
|
/**
|
|
711
712
|
* key = aggregation name (as derived from search request)
|
|
712
713
|
* @maxSize 10000
|
|
713
714
|
*/
|
|
714
715
|
results?: AggregationResults[];
|
|
715
716
|
}
|
|
716
|
-
interface ValueAggregationResult {
|
|
717
|
+
export interface ValueAggregationResult {
|
|
717
718
|
/**
|
|
718
719
|
* Value of the field
|
|
719
720
|
* @maxLength 100
|
|
@@ -722,7 +723,7 @@ interface ValueAggregationResult {
|
|
|
722
723
|
/** Count of entities with this value */
|
|
723
724
|
count?: number;
|
|
724
725
|
}
|
|
725
|
-
interface RangeAggregationResult {
|
|
726
|
+
export interface RangeAggregationResult {
|
|
726
727
|
/** Inclusive lower bound of the range */
|
|
727
728
|
from?: number | null;
|
|
728
729
|
/** Exclusive upper bound of the range */
|
|
@@ -730,7 +731,7 @@ interface RangeAggregationResult {
|
|
|
730
731
|
/** Count of entities in this range */
|
|
731
732
|
count?: number;
|
|
732
733
|
}
|
|
733
|
-
interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
|
|
734
|
+
export interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
|
|
734
735
|
/** Value aggregation results */
|
|
735
736
|
values?: ValueResults;
|
|
736
737
|
/** Range aggregation results */
|
|
@@ -751,7 +752,7 @@ interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
|
|
|
751
752
|
fieldPath?: string;
|
|
752
753
|
}
|
|
753
754
|
/** @oneof */
|
|
754
|
-
interface NestedAggregationResultsResultOneOf {
|
|
755
|
+
export interface NestedAggregationResultsResultOneOf {
|
|
755
756
|
/** Value aggregation results */
|
|
756
757
|
values?: ValueResults;
|
|
757
758
|
/** Range aggregation results */
|
|
@@ -759,27 +760,27 @@ interface NestedAggregationResultsResultOneOf {
|
|
|
759
760
|
/** Scalar aggregation results */
|
|
760
761
|
scalar?: AggregationResultsScalarResult;
|
|
761
762
|
}
|
|
762
|
-
interface ValueResults {
|
|
763
|
+
export interface ValueResults {
|
|
763
764
|
/**
|
|
764
765
|
* List of value aggregations
|
|
765
766
|
* @maxSize 250
|
|
766
767
|
*/
|
|
767
768
|
results?: ValueAggregationResult[];
|
|
768
769
|
}
|
|
769
|
-
interface RangeResults {
|
|
770
|
+
export interface RangeResults {
|
|
770
771
|
/**
|
|
771
772
|
* List of ranges returned in same order as requested
|
|
772
773
|
* @maxSize 50
|
|
773
774
|
*/
|
|
774
775
|
results?: RangeAggregationResult[];
|
|
775
776
|
}
|
|
776
|
-
interface AggregationResultsScalarResult {
|
|
777
|
+
export interface AggregationResultsScalarResult {
|
|
777
778
|
/** Type of scalar aggregation */
|
|
778
779
|
type?: ScalarType;
|
|
779
780
|
/** Value of the scalar aggregation */
|
|
780
781
|
value?: number;
|
|
781
782
|
}
|
|
782
|
-
interface NestedValueAggregationResult {
|
|
783
|
+
export interface NestedValueAggregationResult {
|
|
783
784
|
/**
|
|
784
785
|
* Value of the field
|
|
785
786
|
* @maxLength 1000
|
|
@@ -788,7 +789,7 @@ interface NestedValueAggregationResult {
|
|
|
788
789
|
/** Nested aggregations */
|
|
789
790
|
nestedResults?: NestedAggregationResults;
|
|
790
791
|
}
|
|
791
|
-
interface ValueResult {
|
|
792
|
+
export interface ValueResult {
|
|
792
793
|
/**
|
|
793
794
|
* Value of the field
|
|
794
795
|
* @maxLength 1000
|
|
@@ -797,7 +798,7 @@ interface ValueResult {
|
|
|
797
798
|
/** Count of entities with this value */
|
|
798
799
|
count?: number | null;
|
|
799
800
|
}
|
|
800
|
-
interface RangeResult {
|
|
801
|
+
export interface RangeResult {
|
|
801
802
|
/** Inclusive lower bound of the range */
|
|
802
803
|
from?: number | null;
|
|
803
804
|
/** Exclusive upper bound of the range */
|
|
@@ -805,11 +806,11 @@ interface RangeResult {
|
|
|
805
806
|
/** Count of entities in this range */
|
|
806
807
|
count?: number | null;
|
|
807
808
|
}
|
|
808
|
-
interface ScalarResult {
|
|
809
|
+
export interface ScalarResult {
|
|
809
810
|
/** Value of the scalar aggregation */
|
|
810
811
|
value?: number;
|
|
811
812
|
}
|
|
812
|
-
interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
813
|
+
export interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
813
814
|
/** Value aggregation result */
|
|
814
815
|
value?: ValueResult;
|
|
815
816
|
/** Range aggregation result */
|
|
@@ -820,7 +821,7 @@ interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
|
820
821
|
dateHistogram?: ValueResult;
|
|
821
822
|
}
|
|
822
823
|
/** @oneof */
|
|
823
|
-
interface NestedResultValueResultOneOf {
|
|
824
|
+
export interface NestedResultValueResultOneOf {
|
|
824
825
|
/** Value aggregation result */
|
|
825
826
|
value?: ValueResult;
|
|
826
827
|
/** Range aggregation result */
|
|
@@ -830,11 +831,11 @@ interface NestedResultValueResultOneOf {
|
|
|
830
831
|
/** Date histogram aggregation result */
|
|
831
832
|
dateHistogram?: ValueResult;
|
|
832
833
|
}
|
|
833
|
-
interface Results {
|
|
834
|
+
export interface Results {
|
|
834
835
|
/** List of nested aggregations */
|
|
835
836
|
results?: Record<string, NestedResultValue>;
|
|
836
837
|
}
|
|
837
|
-
interface DateHistogramResult {
|
|
838
|
+
export interface DateHistogramResult {
|
|
838
839
|
/**
|
|
839
840
|
* Date in ISO 8601 format
|
|
840
841
|
* @maxLength 100
|
|
@@ -843,14 +844,14 @@ interface DateHistogramResult {
|
|
|
843
844
|
/** Count of documents in the bucket */
|
|
844
845
|
count?: number;
|
|
845
846
|
}
|
|
846
|
-
interface GroupByValueResults {
|
|
847
|
+
export interface GroupByValueResults {
|
|
847
848
|
/**
|
|
848
849
|
* List of value aggregations
|
|
849
850
|
* @maxSize 1000
|
|
850
851
|
*/
|
|
851
852
|
results?: NestedValueAggregationResult[];
|
|
852
853
|
}
|
|
853
|
-
interface DateHistogramResults {
|
|
854
|
+
export interface DateHistogramResults {
|
|
854
855
|
/**
|
|
855
856
|
* List of date histogram aggregations
|
|
856
857
|
* @maxSize 200
|
|
@@ -861,14 +862,14 @@ interface DateHistogramResults {
|
|
|
861
862
|
* Results of `NESTED` aggregation type in a flattened form
|
|
862
863
|
* aggregations in resulting array are keyed by requested aggregation `name`.
|
|
863
864
|
*/
|
|
864
|
-
interface NestedResults {
|
|
865
|
+
export interface NestedResults {
|
|
865
866
|
/**
|
|
866
867
|
* List of nested aggregations
|
|
867
868
|
* @maxSize 1000
|
|
868
869
|
*/
|
|
869
870
|
results?: Results[];
|
|
870
871
|
}
|
|
871
|
-
interface AggregationResults extends AggregationResultsResultOneOf {
|
|
872
|
+
export interface AggregationResults extends AggregationResultsResultOneOf {
|
|
872
873
|
/** Value aggregation results */
|
|
873
874
|
values?: ValueResults;
|
|
874
875
|
/** Range aggregation results */
|
|
@@ -895,7 +896,7 @@ interface AggregationResults extends AggregationResultsResultOneOf {
|
|
|
895
896
|
fieldPath?: string;
|
|
896
897
|
}
|
|
897
898
|
/** @oneof */
|
|
898
|
-
interface AggregationResultsResultOneOf {
|
|
899
|
+
export interface AggregationResultsResultOneOf {
|
|
899
900
|
/** Value aggregation results */
|
|
900
901
|
values?: ValueResults;
|
|
901
902
|
/** Range aggregation results */
|
|
@@ -909,7 +910,7 @@ interface AggregationResultsResultOneOf {
|
|
|
909
910
|
/** Nested aggregation results */
|
|
910
911
|
nested?: NestedResults;
|
|
911
912
|
}
|
|
912
|
-
interface QueryResourcesRequest {
|
|
913
|
+
export interface QueryResourcesRequest {
|
|
913
914
|
/**
|
|
914
915
|
* Query for retrieving resources. Refer to the *supported filters article*
|
|
915
916
|
* ([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))
|
|
@@ -917,7 +918,7 @@ interface QueryResourcesRequest {
|
|
|
917
918
|
*/
|
|
918
919
|
query?: CursorQuery;
|
|
919
920
|
}
|
|
920
|
-
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
921
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
921
922
|
/** 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`. */
|
|
922
923
|
cursorPaging?: CursorPaging;
|
|
923
924
|
/**
|
|
@@ -937,17 +938,17 @@ interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
937
938
|
sort?: Sorting[];
|
|
938
939
|
}
|
|
939
940
|
/** @oneof */
|
|
940
|
-
interface CursorQueryPagingMethodOneOf {
|
|
941
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
941
942
|
/** 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`. */
|
|
942
943
|
cursorPaging?: CursorPaging;
|
|
943
944
|
}
|
|
944
|
-
interface QueryResourcesResponse {
|
|
945
|
+
export interface QueryResourcesResponse {
|
|
945
946
|
/** Retrieved resources. */
|
|
946
947
|
resources?: Resource[];
|
|
947
948
|
/** Paging metadata. */
|
|
948
949
|
pagingMetadata?: CursorPagingMetadata;
|
|
949
950
|
}
|
|
950
|
-
interface CountResourcesRequest {
|
|
951
|
+
export interface CountResourcesRequest {
|
|
951
952
|
/**
|
|
952
953
|
* Filter to base the count on. Refer to the *supported filters article*
|
|
953
954
|
* ([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))
|
|
@@ -961,19 +962,19 @@ interface CountResourcesRequest {
|
|
|
961
962
|
*/
|
|
962
963
|
search?: SearchDetails;
|
|
963
964
|
}
|
|
964
|
-
interface CountResourcesResponse {
|
|
965
|
+
export interface CountResourcesResponse {
|
|
965
966
|
/** Total number of resources matching the filter. */
|
|
966
967
|
count?: number;
|
|
967
968
|
}
|
|
968
|
-
interface ImportResourceRequest {
|
|
969
|
+
export interface ImportResourceRequest {
|
|
969
970
|
/** Resource to import. */
|
|
970
971
|
resource?: Resource;
|
|
971
972
|
}
|
|
972
|
-
interface ImportResourceResponse {
|
|
973
|
+
export interface ImportResourceResponse {
|
|
973
974
|
/** Imported resource. */
|
|
974
975
|
resource?: Resource;
|
|
975
976
|
}
|
|
976
|
-
interface FixResourceSchedulesRequest {
|
|
977
|
+
export interface FixResourceSchedulesRequest {
|
|
977
978
|
/**
|
|
978
979
|
* ID of the resource to fix schedules for.
|
|
979
980
|
* @format GUID
|
|
@@ -982,15 +983,15 @@ interface FixResourceSchedulesRequest {
|
|
|
982
983
|
/** Working hour schedule that must be set for this resource. */
|
|
983
984
|
workingHoursSchedule?: Schedule;
|
|
984
985
|
}
|
|
985
|
-
interface FixResourceSchedulesResponse {
|
|
986
|
+
export interface FixResourceSchedulesResponse {
|
|
986
987
|
/** Updated resource. */
|
|
987
988
|
resource?: Resource;
|
|
988
989
|
}
|
|
989
|
-
interface ReindexTenantRequest {
|
|
990
|
+
export interface ReindexTenantRequest {
|
|
990
991
|
}
|
|
991
|
-
interface ReindexTenantResponse {
|
|
992
|
+
export interface ReindexTenantResponse {
|
|
992
993
|
}
|
|
993
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
994
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
994
995
|
createdEvent?: EntityCreatedEvent;
|
|
995
996
|
updatedEvent?: EntityUpdatedEvent;
|
|
996
997
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -1033,19 +1034,19 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
1033
1034
|
entityEventSequence?: string | null;
|
|
1034
1035
|
}
|
|
1035
1036
|
/** @oneof */
|
|
1036
|
-
interface DomainEventBodyOneOf {
|
|
1037
|
+
export interface DomainEventBodyOneOf {
|
|
1037
1038
|
createdEvent?: EntityCreatedEvent;
|
|
1038
1039
|
updatedEvent?: EntityUpdatedEvent;
|
|
1039
1040
|
deletedEvent?: EntityDeletedEvent;
|
|
1040
1041
|
actionEvent?: ActionEvent;
|
|
1041
1042
|
}
|
|
1042
|
-
interface EntityCreatedEvent {
|
|
1043
|
+
export interface EntityCreatedEvent {
|
|
1043
1044
|
entity?: string;
|
|
1044
1045
|
}
|
|
1045
|
-
interface RestoreInfo {
|
|
1046
|
+
export interface RestoreInfo {
|
|
1046
1047
|
deletedDate?: Date | null;
|
|
1047
1048
|
}
|
|
1048
|
-
interface EntityUpdatedEvent {
|
|
1049
|
+
export interface EntityUpdatedEvent {
|
|
1049
1050
|
/**
|
|
1050
1051
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1051
1052
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -1053,16 +1054,16 @@ interface EntityUpdatedEvent {
|
|
|
1053
1054
|
*/
|
|
1054
1055
|
currentEntity?: string;
|
|
1055
1056
|
}
|
|
1056
|
-
interface EntityDeletedEvent {
|
|
1057
|
+
export interface EntityDeletedEvent {
|
|
1057
1058
|
/** Entity that was deleted */
|
|
1058
1059
|
deletedEntity?: string | null;
|
|
1059
1060
|
}
|
|
1060
|
-
interface ActionEvent {
|
|
1061
|
+
export interface ActionEvent {
|
|
1061
1062
|
body?: string;
|
|
1062
1063
|
}
|
|
1063
|
-
interface Empty {
|
|
1064
|
+
export interface Empty {
|
|
1064
1065
|
}
|
|
1065
|
-
interface MessageEnvelope {
|
|
1066
|
+
export interface MessageEnvelope {
|
|
1066
1067
|
/**
|
|
1067
1068
|
* App instance ID.
|
|
1068
1069
|
* @format GUID
|
|
@@ -1078,7 +1079,7 @@ interface MessageEnvelope {
|
|
|
1078
1079
|
/** Stringify payload. */
|
|
1079
1080
|
data?: string;
|
|
1080
1081
|
}
|
|
1081
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1082
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1082
1083
|
/**
|
|
1083
1084
|
* ID of a site visitor that has not logged in to the site.
|
|
1084
1085
|
* @format GUID
|
|
@@ -1103,7 +1104,7 @@ interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
1103
1104
|
identityType?: WebhookIdentityType;
|
|
1104
1105
|
}
|
|
1105
1106
|
/** @oneof */
|
|
1106
|
-
interface IdentificationDataIdOneOf {
|
|
1107
|
+
export interface IdentificationDataIdOneOf {
|
|
1107
1108
|
/**
|
|
1108
1109
|
* ID of a site visitor that has not logged in to the site.
|
|
1109
1110
|
* @format GUID
|
|
@@ -1125,14 +1126,14 @@ interface IdentificationDataIdOneOf {
|
|
|
1125
1126
|
*/
|
|
1126
1127
|
appId?: string;
|
|
1127
1128
|
}
|
|
1128
|
-
declare enum WebhookIdentityType {
|
|
1129
|
+
export declare enum WebhookIdentityType {
|
|
1129
1130
|
UNKNOWN = "UNKNOWN",
|
|
1130
1131
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1131
1132
|
MEMBER = "MEMBER",
|
|
1132
1133
|
WIX_USER = "WIX_USER",
|
|
1133
1134
|
APP = "APP"
|
|
1134
1135
|
}
|
|
1135
|
-
interface BaseEventMetadata {
|
|
1136
|
+
export interface BaseEventMetadata {
|
|
1136
1137
|
/**
|
|
1137
1138
|
* App instance ID.
|
|
1138
1139
|
* @format GUID
|
|
@@ -1146,7 +1147,7 @@ interface BaseEventMetadata {
|
|
|
1146
1147
|
/** The identification type and identity data. */
|
|
1147
1148
|
identity?: IdentificationData;
|
|
1148
1149
|
}
|
|
1149
|
-
interface EventMetadata extends BaseEventMetadata {
|
|
1150
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
1150
1151
|
/**
|
|
1151
1152
|
* Unique event ID.
|
|
1152
1153
|
* Allows clients to ignore duplicate webhooks.
|
|
@@ -1184,18 +1185,102 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
1184
1185
|
*/
|
|
1185
1186
|
entityEventSequence?: string | null;
|
|
1186
1187
|
}
|
|
1187
|
-
interface ResourceCreatedEnvelope {
|
|
1188
|
+
export interface ResourceCreatedEnvelope {
|
|
1188
1189
|
entity: Resource;
|
|
1189
1190
|
metadata: EventMetadata;
|
|
1190
1191
|
}
|
|
1191
|
-
|
|
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 {
|
|
1192
1202
|
metadata: EventMetadata;
|
|
1193
1203
|
}
|
|
1194
|
-
|
|
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 {
|
|
1195
1214
|
entity: Resource;
|
|
1196
1215
|
metadata: EventMetadata;
|
|
1197
1216
|
}
|
|
1198
|
-
|
|
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 {
|
|
1199
1284
|
/**
|
|
1200
1285
|
* Whether to include the created resources in the response.
|
|
1201
1286
|
*
|
|
@@ -1203,7 +1288,52 @@ interface BulkCreateResourcesOptions {
|
|
|
1203
1288
|
*/
|
|
1204
1289
|
returnEntity?: boolean;
|
|
1205
1290
|
}
|
|
1206
|
-
|
|
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 {
|
|
1207
1337
|
/**
|
|
1208
1338
|
* Resource ID.
|
|
1209
1339
|
* @format GUID
|
|
@@ -1266,7 +1396,77 @@ interface UpdateResource {
|
|
|
1266
1396
|
/** Extensions enabling users to save custom data related to the resource. */
|
|
1267
1397
|
extendedFields?: ExtendedFields;
|
|
1268
1398
|
}
|
|
1269
|
-
|
|
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}.scalar.type` | `aggregationData.results.${number}.scalar.value` | `aggregationData.results.${number}.name` | `aggregationData.results.${number}.type` | `aggregationData.results.${number}.fieldPath`>>;
|
|
1469
|
+
export interface SearchResourcesOptions {
|
|
1270
1470
|
/**
|
|
1271
1471
|
* Search condition. Refer to the *supported filters article*
|
|
1272
1472
|
* ([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))
|
|
@@ -1274,6 +1474,41 @@ interface SearchResourcesOptions {
|
|
|
1274
1474
|
*/
|
|
1275
1475
|
search?: CursorSearch;
|
|
1276
1476
|
}
|
|
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;
|
|
1277
1512
|
interface QueryCursorResult {
|
|
1278
1513
|
cursors: Cursors;
|
|
1279
1514
|
hasNext: () => boolean;
|
|
@@ -1281,13 +1516,13 @@ interface QueryCursorResult {
|
|
|
1281
1516
|
length: number;
|
|
1282
1517
|
pageSize: number;
|
|
1283
1518
|
}
|
|
1284
|
-
interface ResourcesQueryResult extends QueryCursorResult {
|
|
1519
|
+
export interface ResourcesQueryResult extends QueryCursorResult {
|
|
1285
1520
|
items: Resource[];
|
|
1286
1521
|
query: ResourcesQueryBuilder;
|
|
1287
1522
|
next: () => Promise<ResourcesQueryResult>;
|
|
1288
1523
|
prev: () => Promise<ResourcesQueryResult>;
|
|
1289
1524
|
}
|
|
1290
|
-
interface ResourcesQueryBuilder {
|
|
1525
|
+
export interface ResourcesQueryBuilder {
|
|
1291
1526
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1292
1527
|
* @param value - Value to compare against.
|
|
1293
1528
|
* @documentationMaturity preview
|
|
@@ -1351,7 +1586,33 @@ interface ResourcesQueryBuilder {
|
|
|
1351
1586
|
/** @documentationMaturity preview */
|
|
1352
1587
|
find: () => Promise<ResourcesQueryResult>;
|
|
1353
1588
|
}
|
|
1354
|
-
|
|
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 {
|
|
1355
1616
|
/**
|
|
1356
1617
|
* Filter to base the count on. Refer to the *supported filters article*
|
|
1357
1618
|
* ([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))
|
|
@@ -1365,5 +1626,4 @@ interface CountResourcesOptions {
|
|
|
1365
1626
|
*/
|
|
1366
1627
|
search?: SearchDetails;
|
|
1367
1628
|
}
|
|
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 };
|
|
1629
|
+
export {};
|