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