@wix/auto_sdk_bookings_resources 1.0.20 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{internal/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts → bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.mts} +328 -409
- package/build/{cjs/src/bookings-resources-v2-resource-resources.universal.d.ts → bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.ts} +328 -409
- package/build/index.d.mts +168 -0
- package/build/index.d.ts +168 -0
- package/build/index.js +883 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +837 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{es/src/bookings-resources-v2-resource-resources.universal.d.ts → bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.mts} +328 -409
- package/build/{es/src/bookings-resources-v2-resource-resources.universal.d.ts → internal/bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.ts} +328 -409
- package/build/internal/index.d.mts +168 -0
- package/build/internal/index.d.ts +168 -0
- package/build/internal/index.js +883 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +837 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/{es/src/bookings-resources-v2-resource-resources.types.d.ts → internal/meta.d.mts} +145 -347
- package/build/internal/{cjs/src/bookings-resources-v2-resource-resources.types.d.ts → meta.d.ts} +145 -347
- package/build/internal/meta.js +559 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +524 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{cjs/src/bookings-resources-v2-resource-resources.types.d.ts → meta.d.mts} +145 -347
- package/build/{internal/es/src/bookings-resources-v2-resource-resources.types.d.ts → meta.d.ts} +145 -347
- package/build/meta.js +559 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +524 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -27
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.js +0 -43
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.js +0 -446
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js +0 -199
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +0 -143
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.js +0 -106
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.js +0 -104
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js +0 -589
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -27
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
- package/build/es/src/bookings-resources-v2-resource-resources.context.js +0 -29
- package/build/es/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
- package/build/es/src/bookings-resources-v2-resource-resources.http.js +0 -434
- package/build/es/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
- package/build/es/src/bookings-resources-v2-resource-resources.meta.js +0 -164
- package/build/es/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.public.d.ts +0 -143
- package/build/es/src/bookings-resources-v2-resource-resources.public.js +0 -83
- package/build/es/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.types.js +0 -101
- package/build/es/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.universal.js +0 -554
- package/build/es/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -27
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js +0 -43
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js +0 -446
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js +0 -199
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +0 -143
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js +0 -106
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js +0 -104
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js +0 -589
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -27
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js +0 -29
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js +0 -434
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js +0 -164
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.d.ts +0 -143
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js +0 -83
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js +0 -101
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js +0 -554
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
package/build/{es/src/bookings-resources-v2-resource-resources.types.d.ts → internal/meta.d.mts}
RENAMED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { w as CreateResourceRequest$1, x as CreateResourceResponse$1, y as BulkCreateResourcesRequest$1, a as BulkCreateResourcesResponse$1, H as GetResourceRequest$1, J as GetResourceResponse$1, a1 as UpdateResourceRequest$1, a2 as UpdateResourceResponse$1, a3 as DeleteResourceRequest$1, a4 as DeleteResourceResponse$1, a5 as BulkDeleteResourcesRequest$1, b as BulkDeleteResourcesResponse$1, a6 as SearchResourcesRequest$1, S as SearchResourcesResponse$1, aK as QueryResourcesRequest$1, aN as QueryResourcesResponse$1, aO as CountResourcesRequest$1, e as CountResourcesResponse$1 } from './bookings-resources-v2-resource-resources.universal-BvcAlBYB.mjs';
|
|
2
|
+
import '@wix/sdk-types';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* A resource represents an entity, such as a room or a staff member, that can be
|
|
3
6
|
* scheduled for use in a *booking*
|
|
@@ -5,7 +8,7 @@
|
|
|
5
8
|
* The availability of a resource is tracked to ensure that it
|
|
6
9
|
* can be allocated at a requested time slot and to prevent double bookings.
|
|
7
10
|
*/
|
|
8
|
-
|
|
11
|
+
interface Resource extends ResourceCompositionDetailsOneOf {
|
|
9
12
|
/**
|
|
10
13
|
* Resource ID.
|
|
11
14
|
* @format GUID
|
|
@@ -69,9 +72,9 @@ export interface Resource extends ResourceCompositionDetailsOneOf {
|
|
|
69
72
|
extendedFields?: ExtendedFields;
|
|
70
73
|
}
|
|
71
74
|
/** @oneof */
|
|
72
|
-
|
|
75
|
+
interface ResourceCompositionDetailsOneOf {
|
|
73
76
|
}
|
|
74
|
-
|
|
77
|
+
interface WorkingHoursSchedule {
|
|
75
78
|
/**
|
|
76
79
|
* ID of the working hour *schedule*
|
|
77
80
|
* ([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,54 +89,7 @@ export interface WorkingHoursSchedule {
|
|
|
86
89
|
*/
|
|
87
90
|
shared?: boolean | null;
|
|
88
91
|
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Schedule details that specify the working hours and locations of this resource.
|
|
92
|
-
*
|
|
93
|
-
* When this field is missing or empty, the resource is assumed to be available
|
|
94
|
-
* around the clock (24/7) at the locations specified in `locationOptions`. When
|
|
95
|
-
* both `workingHoursSchedules` and `locationOptions` are set,
|
|
96
|
-
* `workingHoursSchedules` takes precedence.
|
|
97
|
-
*/
|
|
98
|
-
workingHoursSchedules?: V2WorkingHoursSchedules;
|
|
99
|
-
/**
|
|
100
|
-
* Information about the location where the resource is available.
|
|
101
|
-
*
|
|
102
|
-
* If you don't specify `locationOptions`, Wix Bookings automatically sets
|
|
103
|
-
* `{"availableInAllLocations": true}`.
|
|
104
|
-
*/
|
|
105
|
-
locationOptions?: LocationOptions;
|
|
106
|
-
/**
|
|
107
|
-
* Schedule containing the *events*
|
|
108
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction))
|
|
109
|
-
* for which the resource has been booked.
|
|
110
|
-
* @readonly
|
|
111
|
-
*/
|
|
112
|
-
eventsSchedule?: Schedule;
|
|
113
|
-
}
|
|
114
|
-
export interface V2WorkingHoursSchedules {
|
|
115
|
-
/**
|
|
116
|
-
* Schedules specifying the working hours of the resource. Currently, only a single schedule is supported.
|
|
117
|
-
* @maxSize 1
|
|
118
|
-
*/
|
|
119
|
-
values?: Schedule[];
|
|
120
|
-
}
|
|
121
|
-
/** Deprecated and subject to removal */
|
|
122
|
-
export interface Schedule {
|
|
123
|
-
/**
|
|
124
|
-
* Schedule ID. See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information.
|
|
125
|
-
* @format GUID
|
|
126
|
-
*/
|
|
127
|
-
scheduleId?: string | null;
|
|
128
|
-
/**
|
|
129
|
-
* Whether this schedule is used by multiple resources or unique for this resource.
|
|
130
|
-
*
|
|
131
|
-
* `true` if it is a shared schedule (for example from a business or location), `false` this is a custom schedule specific to the resource.
|
|
132
|
-
* Default: `false`.
|
|
133
|
-
*/
|
|
134
|
-
shared?: boolean | null;
|
|
135
|
-
}
|
|
136
|
-
export interface LocationOptions {
|
|
92
|
+
interface LocationOptions {
|
|
137
93
|
/**
|
|
138
94
|
* Whether the resource is available in all *business locations*
|
|
139
95
|
* ([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 +103,7 @@ export interface LocationOptions {
|
|
|
147
103
|
/** Details of resource availability in specific locations. */
|
|
148
104
|
specificLocationOptions?: SpecificLocation;
|
|
149
105
|
}
|
|
150
|
-
|
|
106
|
+
interface SpecificLocation {
|
|
151
107
|
/**
|
|
152
108
|
* Whether the resource is available in *business locations*
|
|
153
109
|
* ([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 +123,7 @@ export interface SpecificLocation {
|
|
|
167
123
|
*/
|
|
168
124
|
businessLocations?: BusinessLocation[];
|
|
169
125
|
}
|
|
170
|
-
|
|
126
|
+
interface BusinessLocation {
|
|
171
127
|
/**
|
|
172
128
|
* ID of the business *location*
|
|
173
129
|
* ([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 +131,14 @@ export interface BusinessLocation {
|
|
|
175
131
|
*/
|
|
176
132
|
locationId?: string | null;
|
|
177
133
|
}
|
|
178
|
-
|
|
134
|
+
interface WorkingHoursSchedules {
|
|
179
135
|
/**
|
|
180
136
|
* Schedules specifying the working hours of the resource. Currently, only a single schedule is supported.
|
|
181
137
|
* @maxSize 1
|
|
182
138
|
*/
|
|
183
139
|
values?: WorkingHoursSchedule[];
|
|
184
140
|
}
|
|
185
|
-
|
|
141
|
+
interface EventsSchedule {
|
|
186
142
|
/**
|
|
187
143
|
* ID of the event *schedule*
|
|
188
144
|
* ([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 +146,7 @@ export interface EventsSchedule {
|
|
|
190
146
|
*/
|
|
191
147
|
scheduleId?: string | null;
|
|
192
148
|
}
|
|
193
|
-
|
|
194
|
-
/** The resource is managed by a Wix user. */
|
|
195
|
-
WIX_USER = "WIX_USER"
|
|
196
|
-
}
|
|
197
|
-
export interface ExtendedFields {
|
|
149
|
+
interface ExtendedFields {
|
|
198
150
|
/**
|
|
199
151
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
200
152
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -205,15 +157,15 @@ export interface ExtendedFields {
|
|
|
205
157
|
*/
|
|
206
158
|
namespaces?: Record<string, Record<string, any>>;
|
|
207
159
|
}
|
|
208
|
-
|
|
160
|
+
interface CreateResourceRequest {
|
|
209
161
|
/** Resource to create. */
|
|
210
162
|
resource: Resource;
|
|
211
163
|
}
|
|
212
|
-
|
|
164
|
+
interface CreateResourceResponse {
|
|
213
165
|
/** Created resource. */
|
|
214
166
|
resource?: Resource;
|
|
215
167
|
}
|
|
216
|
-
|
|
168
|
+
interface BulkCreateResourcesRequest {
|
|
217
169
|
/**
|
|
218
170
|
* Resources to create.
|
|
219
171
|
* @maxSize 50
|
|
@@ -226,19 +178,19 @@ export interface BulkCreateResourcesRequest {
|
|
|
226
178
|
*/
|
|
227
179
|
returnEntity?: boolean;
|
|
228
180
|
}
|
|
229
|
-
|
|
181
|
+
interface BulkCreateResourcesResponse {
|
|
230
182
|
/** The result of each resource creation. */
|
|
231
183
|
results?: BulkResourceResult[];
|
|
232
184
|
/** Create statistics. */
|
|
233
185
|
bulkActionMetadata?: BulkActionMetadata;
|
|
234
186
|
}
|
|
235
|
-
|
|
187
|
+
interface BulkResourceResult {
|
|
236
188
|
/** Item metadata. */
|
|
237
189
|
itemMetadata?: ItemMetadata;
|
|
238
190
|
/** The resulting resource after the bulk operation. */
|
|
239
191
|
item?: Resource;
|
|
240
192
|
}
|
|
241
|
-
|
|
193
|
+
interface ItemMetadata {
|
|
242
194
|
/**
|
|
243
195
|
* Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
|
|
244
196
|
* @format GUID
|
|
@@ -251,7 +203,7 @@ export interface ItemMetadata {
|
|
|
251
203
|
/** Details about the error in case of failure. */
|
|
252
204
|
error?: ApplicationError;
|
|
253
205
|
}
|
|
254
|
-
|
|
206
|
+
interface ApplicationError {
|
|
255
207
|
/** Error code. */
|
|
256
208
|
code?: string;
|
|
257
209
|
/** Description of the error. */
|
|
@@ -259,7 +211,7 @@ export interface ApplicationError {
|
|
|
259
211
|
/** Data related to the error. */
|
|
260
212
|
data?: Record<string, any> | null;
|
|
261
213
|
}
|
|
262
|
-
|
|
214
|
+
interface BulkActionMetadata {
|
|
263
215
|
/** Number of items that were successfully processed. */
|
|
264
216
|
totalSuccesses?: number;
|
|
265
217
|
/** Number of items that couldn't be processed. */
|
|
@@ -267,39 +219,18 @@ export interface BulkActionMetadata {
|
|
|
267
219
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
268
220
|
undetailedFailures?: number;
|
|
269
221
|
}
|
|
270
|
-
|
|
222
|
+
interface GetResourceRequest {
|
|
271
223
|
/**
|
|
272
224
|
* ID of the resource to retrieve.
|
|
273
225
|
* @format GUID
|
|
274
226
|
*/
|
|
275
227
|
resourceId: string;
|
|
276
228
|
}
|
|
277
|
-
|
|
278
|
-
/** Retrieved resource. */
|
|
279
|
-
resource?: Resource;
|
|
280
|
-
}
|
|
281
|
-
export interface GetDeletedResourceRequest {
|
|
282
|
-
/**
|
|
283
|
-
* ID of the deleted resource to retrieve from the trash bin.
|
|
284
|
-
* @format GUID
|
|
285
|
-
*/
|
|
286
|
-
resourceId?: string;
|
|
287
|
-
}
|
|
288
|
-
export interface GetDeletedResourceResponse {
|
|
229
|
+
interface GetResourceResponse {
|
|
289
230
|
/** Retrieved resource. */
|
|
290
231
|
resource?: Resource;
|
|
291
232
|
}
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* IDs of the resources to retrieve.
|
|
295
|
-
* @format GUID
|
|
296
|
-
* @maxSize 100
|
|
297
|
-
*/
|
|
298
|
-
resourceIds?: string[];
|
|
299
|
-
/** Paging details, allowing you specify a limit and a cursor. */
|
|
300
|
-
paging?: CursorPaging;
|
|
301
|
-
}
|
|
302
|
-
export interface CursorPaging {
|
|
233
|
+
interface CursorPaging {
|
|
303
234
|
/**
|
|
304
235
|
* Maximum number of items to return in the results.
|
|
305
236
|
* @max 100
|
|
@@ -314,13 +245,7 @@ export interface CursorPaging {
|
|
|
314
245
|
*/
|
|
315
246
|
cursor?: string | null;
|
|
316
247
|
}
|
|
317
|
-
|
|
318
|
-
/** Retrieved resources. */
|
|
319
|
-
resources?: Resource[];
|
|
320
|
-
/** Paging metadata. */
|
|
321
|
-
pagingMetadata?: CursorPagingMetadata;
|
|
322
|
-
}
|
|
323
|
-
export interface CursorPagingMetadata {
|
|
248
|
+
interface CursorPagingMetadata {
|
|
324
249
|
/** Number of items returned in the response. */
|
|
325
250
|
count?: number | null;
|
|
326
251
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -333,7 +258,7 @@ export interface CursorPagingMetadata {
|
|
|
333
258
|
*/
|
|
334
259
|
hasNext?: boolean | null;
|
|
335
260
|
}
|
|
336
|
-
|
|
261
|
+
interface Cursors {
|
|
337
262
|
/**
|
|
338
263
|
* Cursor string pointing to the next page in the list of results.
|
|
339
264
|
* @maxLength 16000
|
|
@@ -345,44 +270,24 @@ export interface Cursors {
|
|
|
345
270
|
*/
|
|
346
271
|
prev?: string | null;
|
|
347
272
|
}
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* ID of the resource to permanently delete from the trash bin.
|
|
351
|
-
* @format GUID
|
|
352
|
-
*/
|
|
353
|
-
resourceId?: string;
|
|
354
|
-
}
|
|
355
|
-
export interface RemoveResourceFromTrashBinResponse {
|
|
356
|
-
}
|
|
357
|
-
export interface RestoreResourceFromTrashBinRequest {
|
|
358
|
-
/**
|
|
359
|
-
* ID of the resource to restore from the trash bin.
|
|
360
|
-
* @format GUID
|
|
361
|
-
*/
|
|
362
|
-
resourceId?: string;
|
|
363
|
-
}
|
|
364
|
-
export interface RestoreResourceFromTrashBinResponse {
|
|
365
|
-
/** Restored resource. */
|
|
366
|
-
resource?: Resource;
|
|
367
|
-
}
|
|
368
|
-
export interface UpdateResourceRequest {
|
|
273
|
+
interface UpdateResourceRequest {
|
|
369
274
|
/** Resource to update. */
|
|
370
275
|
resource: Resource;
|
|
371
276
|
}
|
|
372
|
-
|
|
277
|
+
interface UpdateResourceResponse {
|
|
373
278
|
/** Updated resource. */
|
|
374
279
|
resource?: Resource;
|
|
375
280
|
}
|
|
376
|
-
|
|
281
|
+
interface DeleteResourceRequest {
|
|
377
282
|
/**
|
|
378
283
|
* ID of the resource to delete.
|
|
379
284
|
* @format GUID
|
|
380
285
|
*/
|
|
381
286
|
resourceId: string;
|
|
382
287
|
}
|
|
383
|
-
|
|
288
|
+
interface DeleteResourceResponse {
|
|
384
289
|
}
|
|
385
|
-
|
|
290
|
+
interface BulkDeleteResourcesRequest {
|
|
386
291
|
/**
|
|
387
292
|
* IDs of the resources to delete.
|
|
388
293
|
* @format GUID
|
|
@@ -390,13 +295,13 @@ export interface BulkDeleteResourcesRequest {
|
|
|
390
295
|
*/
|
|
391
296
|
ids: string[];
|
|
392
297
|
}
|
|
393
|
-
|
|
298
|
+
interface BulkDeleteResourcesResponse {
|
|
394
299
|
/** The result of each resource removal. */
|
|
395
300
|
results?: BulkResourceResult[];
|
|
396
301
|
/** Delete statistics. */
|
|
397
302
|
bulkActionMetadata?: BulkActionMetadata;
|
|
398
303
|
}
|
|
399
|
-
|
|
304
|
+
interface SearchResourcesRequest {
|
|
400
305
|
/**
|
|
401
306
|
* Search condition. Refer to the *supported filters article*
|
|
402
307
|
* ([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 +309,7 @@ export interface SearchResourcesRequest {
|
|
|
404
309
|
*/
|
|
405
310
|
search?: CursorSearch;
|
|
406
311
|
}
|
|
407
|
-
|
|
312
|
+
interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
408
313
|
/**
|
|
409
314
|
* Cursor pointing to page of results.
|
|
410
315
|
* When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
|
|
@@ -437,27 +342,29 @@ export interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
|
437
342
|
timeZone?: string | null;
|
|
438
343
|
}
|
|
439
344
|
/** @oneof */
|
|
440
|
-
|
|
345
|
+
interface CursorSearchPagingMethodOneOf {
|
|
441
346
|
/**
|
|
442
347
|
* Cursor pointing to page of results.
|
|
443
348
|
* When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
|
|
444
349
|
*/
|
|
445
350
|
cursorPaging?: CursorPaging;
|
|
446
351
|
}
|
|
447
|
-
|
|
352
|
+
interface Sorting {
|
|
448
353
|
/**
|
|
449
354
|
* Name of the field to sort by.
|
|
450
355
|
* @maxLength 512
|
|
451
356
|
*/
|
|
452
357
|
fieldName?: string;
|
|
453
358
|
/** Sort order. */
|
|
454
|
-
order?:
|
|
359
|
+
order?: SortOrderWithLiterals;
|
|
455
360
|
}
|
|
456
|
-
|
|
361
|
+
declare enum SortOrder {
|
|
457
362
|
ASC = "ASC",
|
|
458
363
|
DESC = "DESC"
|
|
459
364
|
}
|
|
460
|
-
|
|
365
|
+
/** @enumType */
|
|
366
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
367
|
+
interface Aggregation extends AggregationKindOneOf {
|
|
461
368
|
/** Value aggregation */
|
|
462
369
|
value?: ValueAggregation;
|
|
463
370
|
/** Range aggregation */
|
|
@@ -474,7 +381,7 @@ export interface Aggregation extends AggregationKindOneOf {
|
|
|
474
381
|
*/
|
|
475
382
|
name?: string | null;
|
|
476
383
|
/** Type of aggregation, client must provide matching aggregation field below */
|
|
477
|
-
type?:
|
|
384
|
+
type?: AggregationTypeWithLiterals;
|
|
478
385
|
/**
|
|
479
386
|
* Field to aggregate by, use dot notation to specify json path
|
|
480
387
|
* @maxLength 200
|
|
@@ -489,7 +396,7 @@ export interface Aggregation extends AggregationKindOneOf {
|
|
|
489
396
|
groupBy?: GroupByAggregation;
|
|
490
397
|
}
|
|
491
398
|
/** @oneof */
|
|
492
|
-
|
|
399
|
+
interface AggregationKindOneOf {
|
|
493
400
|
/** Value aggregation */
|
|
494
401
|
value?: ValueAggregation;
|
|
495
402
|
/** Range aggregation */
|
|
@@ -501,38 +408,44 @@ export interface AggregationKindOneOf {
|
|
|
501
408
|
/** Nested aggregation */
|
|
502
409
|
nested?: NestedAggregation;
|
|
503
410
|
}
|
|
504
|
-
|
|
411
|
+
interface RangeBucket {
|
|
505
412
|
/** Inclusive lower bound of the range. Required if to is not given */
|
|
506
413
|
from?: number | null;
|
|
507
414
|
/** Exclusive upper bound of the range. Required if from is not given */
|
|
508
415
|
to?: number | null;
|
|
509
416
|
}
|
|
510
|
-
|
|
417
|
+
declare enum SortType {
|
|
511
418
|
/** Should sort by number of matches */
|
|
512
419
|
COUNT = "COUNT",
|
|
513
420
|
/** Should sort by value of the field alphabetically */
|
|
514
421
|
VALUE = "VALUE"
|
|
515
422
|
}
|
|
516
|
-
|
|
423
|
+
/** @enumType */
|
|
424
|
+
type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';
|
|
425
|
+
declare enum SortDirection {
|
|
517
426
|
/** Should sort in descending order */
|
|
518
427
|
DESC = "DESC",
|
|
519
428
|
/** Should sort in ascending order */
|
|
520
429
|
ASC = "ASC"
|
|
521
430
|
}
|
|
522
|
-
|
|
431
|
+
/** @enumType */
|
|
432
|
+
type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';
|
|
433
|
+
declare enum MissingValues {
|
|
523
434
|
/** Should missing values be excluded from the aggregation results */
|
|
524
435
|
EXCLUDE = "EXCLUDE",
|
|
525
436
|
/** Should missing values be included in the aggregation results */
|
|
526
437
|
INCLUDE = "INCLUDE"
|
|
527
438
|
}
|
|
528
|
-
|
|
439
|
+
/** @enumType */
|
|
440
|
+
type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';
|
|
441
|
+
interface IncludeMissingValuesOptions {
|
|
529
442
|
/**
|
|
530
443
|
* Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
|
|
531
444
|
* @maxLength 20
|
|
532
445
|
*/
|
|
533
446
|
addToBucket?: string;
|
|
534
447
|
}
|
|
535
|
-
|
|
448
|
+
declare enum ScalarType {
|
|
536
449
|
UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
|
|
537
450
|
/** Count of distinct values */
|
|
538
451
|
COUNT_DISTINCT = "COUNT_DISTINCT",
|
|
@@ -541,24 +454,26 @@ export declare enum ScalarType {
|
|
|
541
454
|
/** Maximum value */
|
|
542
455
|
MAX = "MAX"
|
|
543
456
|
}
|
|
544
|
-
|
|
457
|
+
/** @enumType */
|
|
458
|
+
type ScalarTypeWithLiterals = ScalarType | 'UNKNOWN_SCALAR_TYPE' | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
|
|
459
|
+
interface ValueAggregation extends ValueAggregationOptionsOneOf {
|
|
545
460
|
/** Options for including missing values */
|
|
546
461
|
includeOptions?: IncludeMissingValuesOptions;
|
|
547
462
|
/** Should sort by number of matches or value of the field */
|
|
548
|
-
sortType?:
|
|
463
|
+
sortType?: SortTypeWithLiterals;
|
|
549
464
|
/** Should sort in ascending or descending order */
|
|
550
|
-
sortDirection?:
|
|
465
|
+
sortDirection?: SortDirectionWithLiterals;
|
|
551
466
|
/** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
|
|
552
467
|
limit?: number | null;
|
|
553
468
|
/** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
|
|
554
|
-
missingValues?:
|
|
469
|
+
missingValues?: MissingValuesWithLiterals;
|
|
555
470
|
}
|
|
556
471
|
/** @oneof */
|
|
557
|
-
|
|
472
|
+
interface ValueAggregationOptionsOneOf {
|
|
558
473
|
/** Options for including missing values */
|
|
559
474
|
includeOptions?: IncludeMissingValuesOptions;
|
|
560
475
|
}
|
|
561
|
-
|
|
476
|
+
declare enum NestedAggregationType {
|
|
562
477
|
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
563
478
|
/** An aggregation where result buckets are dynamically built - one per unique value */
|
|
564
479
|
VALUE = "VALUE",
|
|
@@ -569,22 +484,24 @@ export declare enum NestedAggregationType {
|
|
|
569
484
|
/** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
|
|
570
485
|
DATE_HISTOGRAM = "DATE_HISTOGRAM"
|
|
571
486
|
}
|
|
572
|
-
|
|
487
|
+
/** @enumType */
|
|
488
|
+
type NestedAggregationTypeWithLiterals = NestedAggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
|
|
489
|
+
interface RangeAggregation {
|
|
573
490
|
/**
|
|
574
491
|
* 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
492
|
* @maxSize 50
|
|
576
493
|
*/
|
|
577
494
|
buckets?: RangeBucket[];
|
|
578
495
|
}
|
|
579
|
-
|
|
496
|
+
interface ScalarAggregation {
|
|
580
497
|
/** Define the operator for the scalar aggregation */
|
|
581
|
-
type?:
|
|
498
|
+
type?: ScalarTypeWithLiterals;
|
|
582
499
|
}
|
|
583
|
-
|
|
500
|
+
interface DateHistogramAggregation {
|
|
584
501
|
/** Interval for date histogram aggregation */
|
|
585
|
-
interval?:
|
|
502
|
+
interval?: IntervalWithLiterals;
|
|
586
503
|
}
|
|
587
|
-
|
|
504
|
+
declare enum Interval {
|
|
588
505
|
UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
|
|
589
506
|
/** Yearly interval */
|
|
590
507
|
YEAR = "YEAR",
|
|
@@ -601,7 +518,9 @@ export declare enum Interval {
|
|
|
601
518
|
/** Second interval */
|
|
602
519
|
SECOND = "SECOND"
|
|
603
520
|
}
|
|
604
|
-
|
|
521
|
+
/** @enumType */
|
|
522
|
+
type IntervalWithLiterals = Interval | 'UNKNOWN_INTERVAL' | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
|
|
523
|
+
interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
605
524
|
/** Value aggregation */
|
|
606
525
|
value?: ValueAggregation;
|
|
607
526
|
/** Range aggregation */
|
|
@@ -616,7 +535,7 @@ export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
|
616
535
|
*/
|
|
617
536
|
name?: string | null;
|
|
618
537
|
/** Type of aggregation, client must provide matching aggregation field below */
|
|
619
|
-
type?:
|
|
538
|
+
type?: NestedAggregationTypeWithLiterals;
|
|
620
539
|
/**
|
|
621
540
|
* Field to aggregate by, use dont notation to specify json path
|
|
622
541
|
* @maxLength 200
|
|
@@ -624,7 +543,7 @@ export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
|
624
543
|
fieldPath?: string;
|
|
625
544
|
}
|
|
626
545
|
/** @oneof */
|
|
627
|
-
|
|
546
|
+
interface NestedAggregationItemKindOneOf {
|
|
628
547
|
/** Value aggregation */
|
|
629
548
|
value?: ValueAggregation;
|
|
630
549
|
/** Range aggregation */
|
|
@@ -634,7 +553,7 @@ export interface NestedAggregationItemKindOneOf {
|
|
|
634
553
|
/** Date histogram aggregation */
|
|
635
554
|
dateHistogram?: DateHistogramAggregation;
|
|
636
555
|
}
|
|
637
|
-
|
|
556
|
+
declare enum AggregationType {
|
|
638
557
|
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
639
558
|
/** An aggregation where result buckets are dynamically built - one per unique value */
|
|
640
559
|
VALUE = "VALUE",
|
|
@@ -647,8 +566,10 @@ export declare enum AggregationType {
|
|
|
647
566
|
/** Multi-level aggregation, where each next aggregation is nested within previous one */
|
|
648
567
|
NESTED = "NESTED"
|
|
649
568
|
}
|
|
569
|
+
/** @enumType */
|
|
570
|
+
type AggregationTypeWithLiterals = AggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
|
|
650
571
|
/** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
|
|
651
|
-
|
|
572
|
+
interface NestedAggregation {
|
|
652
573
|
/**
|
|
653
574
|
* Flattened list of aggregations, where each next aggregation is nested within previous one
|
|
654
575
|
* @minSize 2
|
|
@@ -656,7 +577,7 @@ export interface NestedAggregation {
|
|
|
656
577
|
*/
|
|
657
578
|
nestedAggregations?: NestedAggregationItem[];
|
|
658
579
|
}
|
|
659
|
-
|
|
580
|
+
interface GroupByAggregation extends GroupByAggregationKindOneOf {
|
|
660
581
|
/** Value aggregation configuration */
|
|
661
582
|
value?: ValueAggregation;
|
|
662
583
|
/**
|
|
@@ -671,13 +592,13 @@ export interface GroupByAggregation extends GroupByAggregationKindOneOf {
|
|
|
671
592
|
fieldPath?: string;
|
|
672
593
|
}
|
|
673
594
|
/** @oneof */
|
|
674
|
-
|
|
595
|
+
interface GroupByAggregationKindOneOf {
|
|
675
596
|
/** Value aggregation configuration */
|
|
676
597
|
value?: ValueAggregation;
|
|
677
598
|
}
|
|
678
|
-
|
|
599
|
+
interface SearchDetails {
|
|
679
600
|
/** Defines how separate search terms in `expression` are combined */
|
|
680
|
-
mode?:
|
|
601
|
+
mode?: ModeWithLiterals;
|
|
681
602
|
/**
|
|
682
603
|
* Search term or expression
|
|
683
604
|
* @maxLength 100
|
|
@@ -692,13 +613,15 @@ export interface SearchDetails {
|
|
|
692
613
|
/** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
|
|
693
614
|
fuzzy?: boolean;
|
|
694
615
|
}
|
|
695
|
-
|
|
616
|
+
declare enum Mode {
|
|
696
617
|
/** Any of the search terms must be present */
|
|
697
618
|
OR = "OR",
|
|
698
619
|
/** All search terms must be present */
|
|
699
620
|
AND = "AND"
|
|
700
621
|
}
|
|
701
|
-
|
|
622
|
+
/** @enumType */
|
|
623
|
+
type ModeWithLiterals = Mode | 'OR' | 'AND';
|
|
624
|
+
interface SearchResourcesResponse {
|
|
702
625
|
/** Retrieved resources. */
|
|
703
626
|
resources?: Resource[];
|
|
704
627
|
/** Paging metadata. */
|
|
@@ -706,14 +629,14 @@ export interface SearchResourcesResponse {
|
|
|
706
629
|
/** Aggregation results. */
|
|
707
630
|
aggregationData?: AggregationData;
|
|
708
631
|
}
|
|
709
|
-
|
|
632
|
+
interface AggregationData {
|
|
710
633
|
/**
|
|
711
634
|
* key = aggregation name (as derived from search request)
|
|
712
635
|
* @maxSize 10000
|
|
713
636
|
*/
|
|
714
637
|
results?: AggregationResults[];
|
|
715
638
|
}
|
|
716
|
-
|
|
639
|
+
interface ValueAggregationResult {
|
|
717
640
|
/**
|
|
718
641
|
* Value of the field
|
|
719
642
|
* @maxLength 100
|
|
@@ -722,7 +645,7 @@ export interface ValueAggregationResult {
|
|
|
722
645
|
/** Count of entities with this value */
|
|
723
646
|
count?: number;
|
|
724
647
|
}
|
|
725
|
-
|
|
648
|
+
interface RangeAggregationResult {
|
|
726
649
|
/** Inclusive lower bound of the range */
|
|
727
650
|
from?: number | null;
|
|
728
651
|
/** Exclusive upper bound of the range */
|
|
@@ -730,7 +653,7 @@ export interface RangeAggregationResult {
|
|
|
730
653
|
/** Count of entities in this range */
|
|
731
654
|
count?: number;
|
|
732
655
|
}
|
|
733
|
-
|
|
656
|
+
interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
|
|
734
657
|
/** Value aggregation results */
|
|
735
658
|
values?: ValueResults;
|
|
736
659
|
/** Range aggregation results */
|
|
@@ -743,7 +666,7 @@ export interface NestedAggregationResults extends NestedAggregationResultsResult
|
|
|
743
666
|
*/
|
|
744
667
|
name?: string;
|
|
745
668
|
/** Type of aggregation that matches result */
|
|
746
|
-
type?:
|
|
669
|
+
type?: AggregationTypeWithLiterals;
|
|
747
670
|
/**
|
|
748
671
|
* Field to aggregate by, matches the one provided in request
|
|
749
672
|
* @maxLength 200
|
|
@@ -751,7 +674,7 @@ export interface NestedAggregationResults extends NestedAggregationResultsResult
|
|
|
751
674
|
fieldPath?: string;
|
|
752
675
|
}
|
|
753
676
|
/** @oneof */
|
|
754
|
-
|
|
677
|
+
interface NestedAggregationResultsResultOneOf {
|
|
755
678
|
/** Value aggregation results */
|
|
756
679
|
values?: ValueResults;
|
|
757
680
|
/** Range aggregation results */
|
|
@@ -759,27 +682,27 @@ export interface NestedAggregationResultsResultOneOf {
|
|
|
759
682
|
/** Scalar aggregation results */
|
|
760
683
|
scalar?: AggregationResultsScalarResult;
|
|
761
684
|
}
|
|
762
|
-
|
|
685
|
+
interface ValueResults {
|
|
763
686
|
/**
|
|
764
687
|
* List of value aggregations
|
|
765
688
|
* @maxSize 250
|
|
766
689
|
*/
|
|
767
690
|
results?: ValueAggregationResult[];
|
|
768
691
|
}
|
|
769
|
-
|
|
692
|
+
interface RangeResults {
|
|
770
693
|
/**
|
|
771
694
|
* List of ranges returned in same order as requested
|
|
772
695
|
* @maxSize 50
|
|
773
696
|
*/
|
|
774
697
|
results?: RangeAggregationResult[];
|
|
775
698
|
}
|
|
776
|
-
|
|
699
|
+
interface AggregationResultsScalarResult {
|
|
777
700
|
/** Type of scalar aggregation */
|
|
778
|
-
type?:
|
|
701
|
+
type?: ScalarTypeWithLiterals;
|
|
779
702
|
/** Value of the scalar aggregation */
|
|
780
703
|
value?: number;
|
|
781
704
|
}
|
|
782
|
-
|
|
705
|
+
interface NestedValueAggregationResult {
|
|
783
706
|
/**
|
|
784
707
|
* Value of the field
|
|
785
708
|
* @maxLength 1000
|
|
@@ -788,7 +711,7 @@ export interface NestedValueAggregationResult {
|
|
|
788
711
|
/** Nested aggregations */
|
|
789
712
|
nestedResults?: NestedAggregationResults;
|
|
790
713
|
}
|
|
791
|
-
|
|
714
|
+
interface ValueResult {
|
|
792
715
|
/**
|
|
793
716
|
* Value of the field
|
|
794
717
|
* @maxLength 1000
|
|
@@ -797,7 +720,7 @@ export interface ValueResult {
|
|
|
797
720
|
/** Count of entities with this value */
|
|
798
721
|
count?: number | null;
|
|
799
722
|
}
|
|
800
|
-
|
|
723
|
+
interface RangeResult {
|
|
801
724
|
/** Inclusive lower bound of the range */
|
|
802
725
|
from?: number | null;
|
|
803
726
|
/** Exclusive upper bound of the range */
|
|
@@ -805,11 +728,11 @@ export interface RangeResult {
|
|
|
805
728
|
/** Count of entities in this range */
|
|
806
729
|
count?: number | null;
|
|
807
730
|
}
|
|
808
|
-
|
|
731
|
+
interface ScalarResult {
|
|
809
732
|
/** Value of the scalar aggregation */
|
|
810
733
|
value?: number;
|
|
811
734
|
}
|
|
812
|
-
|
|
735
|
+
interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
813
736
|
/** Value aggregation result */
|
|
814
737
|
value?: ValueResult;
|
|
815
738
|
/** Range aggregation result */
|
|
@@ -820,7 +743,7 @@ export interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
|
820
743
|
dateHistogram?: ValueResult;
|
|
821
744
|
}
|
|
822
745
|
/** @oneof */
|
|
823
|
-
|
|
746
|
+
interface NestedResultValueResultOneOf {
|
|
824
747
|
/** Value aggregation result */
|
|
825
748
|
value?: ValueResult;
|
|
826
749
|
/** Range aggregation result */
|
|
@@ -830,11 +753,11 @@ export interface NestedResultValueResultOneOf {
|
|
|
830
753
|
/** Date histogram aggregation result */
|
|
831
754
|
dateHistogram?: ValueResult;
|
|
832
755
|
}
|
|
833
|
-
|
|
756
|
+
interface Results {
|
|
834
757
|
/** List of nested aggregations */
|
|
835
758
|
results?: Record<string, NestedResultValue>;
|
|
836
759
|
}
|
|
837
|
-
|
|
760
|
+
interface DateHistogramResult {
|
|
838
761
|
/**
|
|
839
762
|
* Date in ISO 8601 format
|
|
840
763
|
* @maxLength 100
|
|
@@ -843,14 +766,14 @@ export interface DateHistogramResult {
|
|
|
843
766
|
/** Count of documents in the bucket */
|
|
844
767
|
count?: number;
|
|
845
768
|
}
|
|
846
|
-
|
|
769
|
+
interface GroupByValueResults {
|
|
847
770
|
/**
|
|
848
771
|
* List of value aggregations
|
|
849
772
|
* @maxSize 1000
|
|
850
773
|
*/
|
|
851
774
|
results?: NestedValueAggregationResult[];
|
|
852
775
|
}
|
|
853
|
-
|
|
776
|
+
interface DateHistogramResults {
|
|
854
777
|
/**
|
|
855
778
|
* List of date histogram aggregations
|
|
856
779
|
* @maxSize 200
|
|
@@ -861,14 +784,14 @@ export interface DateHistogramResults {
|
|
|
861
784
|
* Results of `NESTED` aggregation type in a flattened form
|
|
862
785
|
* aggregations in resulting array are keyed by requested aggregation `name`.
|
|
863
786
|
*/
|
|
864
|
-
|
|
787
|
+
interface NestedResults {
|
|
865
788
|
/**
|
|
866
789
|
* List of nested aggregations
|
|
867
790
|
* @maxSize 1000
|
|
868
791
|
*/
|
|
869
792
|
results?: Results[];
|
|
870
793
|
}
|
|
871
|
-
|
|
794
|
+
interface AggregationResults extends AggregationResultsResultOneOf {
|
|
872
795
|
/** Value aggregation results */
|
|
873
796
|
values?: ValueResults;
|
|
874
797
|
/** Range aggregation results */
|
|
@@ -887,7 +810,7 @@ export interface AggregationResults extends AggregationResultsResultOneOf {
|
|
|
887
810
|
*/
|
|
888
811
|
name?: string;
|
|
889
812
|
/** Type of aggregation that must match provided kind as derived from search request */
|
|
890
|
-
type?:
|
|
813
|
+
type?: AggregationTypeWithLiterals;
|
|
891
814
|
/**
|
|
892
815
|
* Field to aggregate by as derived from search request
|
|
893
816
|
* @maxLength 200
|
|
@@ -895,7 +818,7 @@ export interface AggregationResults extends AggregationResultsResultOneOf {
|
|
|
895
818
|
fieldPath?: string;
|
|
896
819
|
}
|
|
897
820
|
/** @oneof */
|
|
898
|
-
|
|
821
|
+
interface AggregationResultsResultOneOf {
|
|
899
822
|
/** Value aggregation results */
|
|
900
823
|
values?: ValueResults;
|
|
901
824
|
/** Range aggregation results */
|
|
@@ -909,7 +832,7 @@ export interface AggregationResultsResultOneOf {
|
|
|
909
832
|
/** Nested aggregation results */
|
|
910
833
|
nested?: NestedResults;
|
|
911
834
|
}
|
|
912
|
-
|
|
835
|
+
interface QueryResourcesRequest {
|
|
913
836
|
/**
|
|
914
837
|
* Query for retrieving resources. Refer to the *supported filters article*
|
|
915
838
|
* ([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 +840,7 @@ export interface QueryResourcesRequest {
|
|
|
917
840
|
*/
|
|
918
841
|
query?: CursorQuery;
|
|
919
842
|
}
|
|
920
|
-
|
|
843
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
921
844
|
/** 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
845
|
cursorPaging?: CursorPaging;
|
|
923
846
|
/**
|
|
@@ -937,17 +860,17 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
937
860
|
sort?: Sorting[];
|
|
938
861
|
}
|
|
939
862
|
/** @oneof */
|
|
940
|
-
|
|
863
|
+
interface CursorQueryPagingMethodOneOf {
|
|
941
864
|
/** 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
865
|
cursorPaging?: CursorPaging;
|
|
943
866
|
}
|
|
944
|
-
|
|
867
|
+
interface QueryResourcesResponse {
|
|
945
868
|
/** Retrieved resources. */
|
|
946
869
|
resources?: Resource[];
|
|
947
870
|
/** Paging metadata. */
|
|
948
871
|
pagingMetadata?: CursorPagingMetadata;
|
|
949
872
|
}
|
|
950
|
-
|
|
873
|
+
interface CountResourcesRequest {
|
|
951
874
|
/**
|
|
952
875
|
* Filter to base the count on. Refer to the *supported filters article*
|
|
953
876
|
* ([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,160 +884,35 @@ export interface CountResourcesRequest {
|
|
|
961
884
|
*/
|
|
962
885
|
search?: SearchDetails;
|
|
963
886
|
}
|
|
964
|
-
|
|
887
|
+
interface CountResourcesResponse {
|
|
965
888
|
/** Total number of resources matching the filter. */
|
|
966
889
|
count?: number;
|
|
967
890
|
}
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
entityFqdn?: string;
|
|
997
|
-
/**
|
|
998
|
-
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
999
|
-
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
1000
|
-
*/
|
|
1001
|
-
slug?: string;
|
|
1002
|
-
/** ID of the entity associated with the event. */
|
|
1003
|
-
entityId?: string;
|
|
1004
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
1005
|
-
eventTime?: Date | null;
|
|
1006
|
-
/**
|
|
1007
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
1008
|
-
* (for example, GDPR).
|
|
1009
|
-
*/
|
|
1010
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
1011
|
-
/** If present, indicates the action that triggered the event. */
|
|
1012
|
-
originatedFrom?: string | null;
|
|
1013
|
-
/**
|
|
1014
|
-
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
1015
|
-
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
1016
|
-
*/
|
|
1017
|
-
entityEventSequence?: string | null;
|
|
1018
|
-
}
|
|
1019
|
-
/** @oneof */
|
|
1020
|
-
export interface DomainEventBodyOneOf {
|
|
1021
|
-
createdEvent?: EntityCreatedEvent;
|
|
1022
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
1023
|
-
deletedEvent?: EntityDeletedEvent;
|
|
1024
|
-
actionEvent?: ActionEvent;
|
|
1025
|
-
}
|
|
1026
|
-
export interface EntityCreatedEvent {
|
|
1027
|
-
entityAsJson?: string;
|
|
1028
|
-
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
1029
|
-
restoreInfo?: RestoreInfo;
|
|
1030
|
-
}
|
|
1031
|
-
export interface RestoreInfo {
|
|
1032
|
-
deletedDate?: Date | null;
|
|
1033
|
-
}
|
|
1034
|
-
export interface EntityUpdatedEvent {
|
|
1035
|
-
/**
|
|
1036
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1037
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1038
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1039
|
-
*/
|
|
1040
|
-
currentEntityAsJson?: string;
|
|
1041
|
-
}
|
|
1042
|
-
export interface EntityDeletedEvent {
|
|
1043
|
-
/** Entity that was deleted. */
|
|
1044
|
-
deletedEntityAsJson?: string | null;
|
|
1045
|
-
}
|
|
1046
|
-
export interface ActionEvent {
|
|
1047
|
-
bodyAsJson?: string;
|
|
1048
|
-
}
|
|
1049
|
-
export interface Empty {
|
|
1050
|
-
}
|
|
1051
|
-
export interface MessageEnvelope {
|
|
1052
|
-
/**
|
|
1053
|
-
* App instance ID.
|
|
1054
|
-
* @format GUID
|
|
1055
|
-
*/
|
|
1056
|
-
instanceId?: string | null;
|
|
1057
|
-
/**
|
|
1058
|
-
* Event type.
|
|
1059
|
-
* @maxLength 150
|
|
1060
|
-
*/
|
|
1061
|
-
eventType?: string;
|
|
1062
|
-
/** The identification type and identity data. */
|
|
1063
|
-
identity?: IdentificationData;
|
|
1064
|
-
/** Stringify payload. */
|
|
1065
|
-
data?: string;
|
|
1066
|
-
}
|
|
1067
|
-
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1068
|
-
/**
|
|
1069
|
-
* ID of a site visitor that has not logged in to the site.
|
|
1070
|
-
* @format GUID
|
|
1071
|
-
*/
|
|
1072
|
-
anonymousVisitorId?: string;
|
|
1073
|
-
/**
|
|
1074
|
-
* ID of a site visitor that has logged in to the site.
|
|
1075
|
-
* @format GUID
|
|
1076
|
-
*/
|
|
1077
|
-
memberId?: string;
|
|
1078
|
-
/**
|
|
1079
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
1080
|
-
* @format GUID
|
|
1081
|
-
*/
|
|
1082
|
-
wixUserId?: string;
|
|
1083
|
-
/**
|
|
1084
|
-
* ID of an app.
|
|
1085
|
-
* @format GUID
|
|
1086
|
-
*/
|
|
1087
|
-
appId?: string;
|
|
1088
|
-
/** @readonly */
|
|
1089
|
-
identityType?: WebhookIdentityType;
|
|
1090
|
-
}
|
|
1091
|
-
/** @oneof */
|
|
1092
|
-
export interface IdentificationDataIdOneOf {
|
|
1093
|
-
/**
|
|
1094
|
-
* ID of a site visitor that has not logged in to the site.
|
|
1095
|
-
* @format GUID
|
|
1096
|
-
*/
|
|
1097
|
-
anonymousVisitorId?: string;
|
|
1098
|
-
/**
|
|
1099
|
-
* ID of a site visitor that has logged in to the site.
|
|
1100
|
-
* @format GUID
|
|
1101
|
-
*/
|
|
1102
|
-
memberId?: string;
|
|
1103
|
-
/**
|
|
1104
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
1105
|
-
* @format GUID
|
|
1106
|
-
*/
|
|
1107
|
-
wixUserId?: string;
|
|
1108
|
-
/**
|
|
1109
|
-
* ID of an app.
|
|
1110
|
-
* @format GUID
|
|
1111
|
-
*/
|
|
1112
|
-
appId?: string;
|
|
1113
|
-
}
|
|
1114
|
-
export declare enum WebhookIdentityType {
|
|
1115
|
-
UNKNOWN = "UNKNOWN",
|
|
1116
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1117
|
-
MEMBER = "MEMBER",
|
|
1118
|
-
WIX_USER = "WIX_USER",
|
|
1119
|
-
APP = "APP"
|
|
1120
|
-
}
|
|
891
|
+
|
|
892
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
893
|
+
getUrl: (context: any) => string;
|
|
894
|
+
httpMethod: K;
|
|
895
|
+
path: string;
|
|
896
|
+
pathParams: M;
|
|
897
|
+
__requestType: T;
|
|
898
|
+
__originalRequestType: S;
|
|
899
|
+
__responseType: Q;
|
|
900
|
+
__originalResponseType: R;
|
|
901
|
+
};
|
|
902
|
+
declare function createResource(): __PublicMethodMetaInfo<'POST', {}, CreateResourceRequest$1, CreateResourceRequest, CreateResourceResponse$1, CreateResourceResponse>;
|
|
903
|
+
declare function bulkCreateResources(): __PublicMethodMetaInfo<'POST', {}, BulkCreateResourcesRequest$1, BulkCreateResourcesRequest, BulkCreateResourcesResponse$1, BulkCreateResourcesResponse>;
|
|
904
|
+
declare function getResource(): __PublicMethodMetaInfo<'GET', {
|
|
905
|
+
resourceId: string;
|
|
906
|
+
}, GetResourceRequest$1, GetResourceRequest, GetResourceResponse$1, GetResourceResponse>;
|
|
907
|
+
declare function updateResource(): __PublicMethodMetaInfo<'PATCH', {
|
|
908
|
+
resourceId: string;
|
|
909
|
+
}, UpdateResourceRequest$1, UpdateResourceRequest, UpdateResourceResponse$1, UpdateResourceResponse>;
|
|
910
|
+
declare function deleteResource(): __PublicMethodMetaInfo<'DELETE', {
|
|
911
|
+
resourceId: string;
|
|
912
|
+
}, DeleteResourceRequest$1, DeleteResourceRequest, DeleteResourceResponse$1, DeleteResourceResponse>;
|
|
913
|
+
declare function bulkDeleteResources(): __PublicMethodMetaInfo<'POST', {}, BulkDeleteResourcesRequest$1, BulkDeleteResourcesRequest, BulkDeleteResourcesResponse$1, BulkDeleteResourcesResponse>;
|
|
914
|
+
declare function searchResources(): __PublicMethodMetaInfo<'POST', {}, SearchResourcesRequest$1, SearchResourcesRequest, SearchResourcesResponse$1, SearchResourcesResponse>;
|
|
915
|
+
declare function queryResources(): __PublicMethodMetaInfo<'POST', {}, QueryResourcesRequest$1, QueryResourcesRequest, QueryResourcesResponse$1, QueryResourcesResponse>;
|
|
916
|
+
declare function countResources(): __PublicMethodMetaInfo<'POST', {}, CountResourcesRequest$1, CountResourcesRequest, CountResourcesResponse$1, CountResourcesResponse>;
|
|
917
|
+
|
|
918
|
+
export { type __PublicMethodMetaInfo, bulkCreateResources, bulkDeleteResources, countResources, createResource, deleteResource, getResource, queryResources, searchResources, updateResource };
|