@wix/auto_sdk_bookings_resources 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +33 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.js +47 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +66 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.js +416 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js +199 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +119 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.js +106 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.d.ts +1011 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.js +104 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts +1436 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js +563 -0
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/bookings-resources-v2-resource-resources.context.d.ts +33 -0
- package/build/es/src/bookings-resources-v2-resource-resources.context.js +33 -0
- package/build/es/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
- package/build/es/src/bookings-resources-v2-resource-resources.http.d.ts +66 -0
- package/build/es/src/bookings-resources-v2-resource-resources.http.js +404 -0
- package/build/es/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
- package/build/es/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
- package/build/es/src/bookings-resources-v2-resource-resources.meta.js +164 -0
- package/build/es/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
- package/build/es/src/bookings-resources-v2-resource-resources.public.d.ts +119 -0
- package/build/es/src/bookings-resources-v2-resource-resources.public.js +83 -0
- package/build/es/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
- package/build/es/src/bookings-resources-v2-resource-resources.types.d.ts +1011 -0
- package/build/es/src/bookings-resources-v2-resource-resources.types.js +101 -0
- package/build/es/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
- package/build/es/src/bookings-resources-v2-resource-resources.universal.d.ts +1436 -0
- package/build/es/src/bookings-resources-v2-resource-resources.universal.js +528 -0
- package/build/es/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +33 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js +47 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +66 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js +416 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js +199 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +119 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js +106 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.d.ts +1011 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js +104 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts +1436 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js +563 -0
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.d.ts +33 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js +33 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.d.ts +66 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js +404 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js +164 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.d.ts +119 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js +83 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.d.ts +1011 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js +101 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.d.ts +1436 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js +528 -0
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,1011 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A resource represents an entity that can be scheduled for use, such as a room or a staff member.
|
|
3
|
+
* The availability of a resource is tracked to ensure that it can be allocated at a requested time slot and to prevent double bookings.
|
|
4
|
+
* Read more about resources in this [article](https://support.wix.com/en/article/wix-bookings-managing-your-resources).
|
|
5
|
+
*/
|
|
6
|
+
export interface Resource extends ResourceCompositionDetailsOneOf {
|
|
7
|
+
/**
|
|
8
|
+
* Resource ID.
|
|
9
|
+
* @readonly
|
|
10
|
+
*/
|
|
11
|
+
id?: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* Revision number, which increments by 1 each time the resource is updated.
|
|
14
|
+
* To prevent conflicting changes,
|
|
15
|
+
* the current revision must be passed when updating the resource.
|
|
16
|
+
* @readonly
|
|
17
|
+
*/
|
|
18
|
+
revision?: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Represents the time in `YYYY-MM-DDThh:mm:ss.sssZ` format this resource was created.
|
|
21
|
+
* @readonly
|
|
22
|
+
*/
|
|
23
|
+
createdDate?: Date | null;
|
|
24
|
+
/**
|
|
25
|
+
* Represents the time in `YYYY-MM-DDThh:mm:ss.sssZ` format this resource was last updated.
|
|
26
|
+
* @readonly
|
|
27
|
+
*/
|
|
28
|
+
updatedDate?: Date | null;
|
|
29
|
+
/** Name of the resource. */
|
|
30
|
+
name?: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-type-v2/introduction).
|
|
33
|
+
*
|
|
34
|
+
* Once a type has been set it can't be modified. You can create a resource
|
|
35
|
+
* without specifying a type. However, such resources cannot be booked.
|
|
36
|
+
*/
|
|
37
|
+
typeId?: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Schedule details that specify the working hours and locations of this resource.
|
|
40
|
+
*
|
|
41
|
+
* Resources without this field are available 24/7 at the locations specified in the field `locationOptions`.
|
|
42
|
+
* When both `workingHoursSchedules` and `locationOptions` are set then `workingHoursSchedules` takes precedence.
|
|
43
|
+
*/
|
|
44
|
+
workingHoursSchedules?: WorkingHoursSchedules;
|
|
45
|
+
/** Location details that specify where this resource is available. */
|
|
46
|
+
locationOptions?: LocationOptions;
|
|
47
|
+
/**
|
|
48
|
+
* This schedule contains the sessions in which this resource has been booked.
|
|
49
|
+
* @readonly
|
|
50
|
+
*/
|
|
51
|
+
eventsSchedule?: EventsSchedule;
|
|
52
|
+
/** Extensions enabling users to save custom data related to the resource. */
|
|
53
|
+
extendedFields?: ExtendedFields;
|
|
54
|
+
}
|
|
55
|
+
/** @oneof */
|
|
56
|
+
export interface ResourceCompositionDetailsOneOf {
|
|
57
|
+
}
|
|
58
|
+
export interface WorkingHoursSchedule {
|
|
59
|
+
/** Schedule ID. See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information. */
|
|
60
|
+
scheduleId?: string | null;
|
|
61
|
+
/**
|
|
62
|
+
* Whether this schedule is used by multiple resources or unique for this resource.
|
|
63
|
+
*
|
|
64
|
+
* `true` if it is a shared schedule (for example from a business or location), `false` this is a custom schedule specific to the resource.
|
|
65
|
+
* Default: `false`.
|
|
66
|
+
* @readonly
|
|
67
|
+
*/
|
|
68
|
+
shared?: boolean | null;
|
|
69
|
+
}
|
|
70
|
+
export interface SingleResource {
|
|
71
|
+
/**
|
|
72
|
+
* Schedule details that specify the working hours and locations of this resource.
|
|
73
|
+
*
|
|
74
|
+
* When this field is not set the resource is assumed to be available full time (7 x 24) at the locations specified
|
|
75
|
+
* in the field `location_options`. When both `working_hours_schedules` and `location_options` are set then
|
|
76
|
+
* `working_hours_schedules` takes precedence.
|
|
77
|
+
*/
|
|
78
|
+
workingHoursSchedules?: V2WorkingHoursSchedules;
|
|
79
|
+
/**
|
|
80
|
+
* Location details that specify where this resource is available.
|
|
81
|
+
*
|
|
82
|
+
* If this field is not supplied then `location_options.available_in_all_locations` is set to `true`.
|
|
83
|
+
*/
|
|
84
|
+
locationOptions?: LocationOptions;
|
|
85
|
+
/**
|
|
86
|
+
* This schedule contains the sessions in which this resource has been booked.
|
|
87
|
+
* @readonly
|
|
88
|
+
*/
|
|
89
|
+
eventsSchedule?: Schedule;
|
|
90
|
+
}
|
|
91
|
+
export interface V2WorkingHoursSchedules {
|
|
92
|
+
/** schedules specifying all the working hours of the resource. Currently a single schedule is supported. */
|
|
93
|
+
values?: Schedule[];
|
|
94
|
+
}
|
|
95
|
+
/** Deprecated and subject to removal */
|
|
96
|
+
export interface Schedule {
|
|
97
|
+
/** Schedule ID. See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information. */
|
|
98
|
+
scheduleId?: string | null;
|
|
99
|
+
/**
|
|
100
|
+
* Whether this schedule is used by multiple resources or unique for this resource.
|
|
101
|
+
*
|
|
102
|
+
* `true` if it is a shared schedule (for example from a business or location), `false` this is a custom schedule specific to the resource.
|
|
103
|
+
* Default: `false`.
|
|
104
|
+
*/
|
|
105
|
+
shared?: boolean | null;
|
|
106
|
+
}
|
|
107
|
+
export interface LocationOptions {
|
|
108
|
+
/**
|
|
109
|
+
* `true` if the resource is available in all locations, `false` if the resource is available only in specific locations.
|
|
110
|
+
* Default: `false`
|
|
111
|
+
*/
|
|
112
|
+
availableInAllLocations?: boolean | null;
|
|
113
|
+
/**
|
|
114
|
+
* Details of specific locations. It must be left empty if `availableInAllLocations` is `true`.
|
|
115
|
+
* If supplied then the field `specificLocationOptions.availableInBusinessLocations` must be set to `true`.
|
|
116
|
+
*/
|
|
117
|
+
specificLocationOptions?: SpecificLocation;
|
|
118
|
+
}
|
|
119
|
+
export interface SpecificLocation {
|
|
120
|
+
/**
|
|
121
|
+
* `true` if the resource is available in some business locations, `false` otherwise.
|
|
122
|
+
*
|
|
123
|
+
* Default: `false`
|
|
124
|
+
*/
|
|
125
|
+
availableInBusinessLocations?: boolean | null;
|
|
126
|
+
/**
|
|
127
|
+
* Information about business locations. Should be empty if `availableInBusinessLocations` is `false` or if no business location exists in Locations.
|
|
128
|
+
* Read more about business locations in this [article](https://dev.wix.com/docs/rest/business-management/locations/introduction).
|
|
129
|
+
*/
|
|
130
|
+
businessLocations?: BusinessLocation[];
|
|
131
|
+
}
|
|
132
|
+
export interface BusinessLocation {
|
|
133
|
+
/** The ID of the business location. Must not be empty. */
|
|
134
|
+
locationId?: string | null;
|
|
135
|
+
}
|
|
136
|
+
export interface WorkingHoursSchedules {
|
|
137
|
+
/** Schedules specifying all the working hours of the resource. Currently a single schedule is supported. */
|
|
138
|
+
values?: WorkingHoursSchedule[];
|
|
139
|
+
}
|
|
140
|
+
export interface EventsSchedule {
|
|
141
|
+
/** Schedule ID. See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information. */
|
|
142
|
+
scheduleId?: string | null;
|
|
143
|
+
}
|
|
144
|
+
export declare enum ManagementType {
|
|
145
|
+
/** The resource is managed by a Wix user. */
|
|
146
|
+
WIX_USER = "WIX_USER"
|
|
147
|
+
}
|
|
148
|
+
export interface ExtendedFields {
|
|
149
|
+
/**
|
|
150
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
151
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
152
|
+
*
|
|
153
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
154
|
+
*
|
|
155
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
156
|
+
*/
|
|
157
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
158
|
+
}
|
|
159
|
+
export interface CreateResourceRequest {
|
|
160
|
+
/** Resource to create. */
|
|
161
|
+
resource: Resource;
|
|
162
|
+
}
|
|
163
|
+
export interface CreateResourceResponse {
|
|
164
|
+
/** The created resource. */
|
|
165
|
+
resource?: Resource;
|
|
166
|
+
}
|
|
167
|
+
export interface BulkCreateResourcesRequest {
|
|
168
|
+
/** Resources to create. */
|
|
169
|
+
resources: Resource[];
|
|
170
|
+
/** Whether to include the created resources in the response. Default: `false` */
|
|
171
|
+
returnEntity?: boolean;
|
|
172
|
+
}
|
|
173
|
+
export interface BulkCreateResourcesResponse {
|
|
174
|
+
/** The result of each resource creation. */
|
|
175
|
+
results?: BulkResourceResult[];
|
|
176
|
+
/** Create statistics. */
|
|
177
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
178
|
+
}
|
|
179
|
+
export interface BulkResourceResult {
|
|
180
|
+
/** Item metadata */
|
|
181
|
+
itemMetadata?: ItemMetadata;
|
|
182
|
+
/** The resulting resource after the bulk operation. */
|
|
183
|
+
item?: Resource;
|
|
184
|
+
}
|
|
185
|
+
export interface ItemMetadata {
|
|
186
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
187
|
+
id?: string | null;
|
|
188
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
189
|
+
originalIndex?: number;
|
|
190
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
191
|
+
success?: boolean;
|
|
192
|
+
/** Details about the error in case of failure. */
|
|
193
|
+
error?: ApplicationError;
|
|
194
|
+
}
|
|
195
|
+
export interface ApplicationError {
|
|
196
|
+
/** Error code. */
|
|
197
|
+
code?: string;
|
|
198
|
+
/** Description of the error. */
|
|
199
|
+
description?: string;
|
|
200
|
+
/** Data related to the error. */
|
|
201
|
+
data?: Record<string, any> | null;
|
|
202
|
+
}
|
|
203
|
+
export interface BulkActionMetadata {
|
|
204
|
+
/** Number of items that were successfully processed. */
|
|
205
|
+
totalSuccesses?: number;
|
|
206
|
+
/** Number of items that couldn't be processed. */
|
|
207
|
+
totalFailures?: number;
|
|
208
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
209
|
+
undetailedFailures?: number;
|
|
210
|
+
}
|
|
211
|
+
export interface GetResourceRequest {
|
|
212
|
+
/** ID of the resource to retrieve. */
|
|
213
|
+
resourceId: string;
|
|
214
|
+
}
|
|
215
|
+
export interface GetResourceResponse {
|
|
216
|
+
/** The retrieved resource. */
|
|
217
|
+
resource?: Resource;
|
|
218
|
+
}
|
|
219
|
+
export interface GetDeletedResourceRequest {
|
|
220
|
+
/** ID of the resource to retrieve. */
|
|
221
|
+
resourceId?: string;
|
|
222
|
+
}
|
|
223
|
+
export interface GetDeletedResourceResponse {
|
|
224
|
+
/** The retrieved resource. */
|
|
225
|
+
resource?: Resource;
|
|
226
|
+
}
|
|
227
|
+
export interface ListDeletedResourcesRequest {
|
|
228
|
+
/** The ids of the resources to retrieve. */
|
|
229
|
+
resourceIds?: string[];
|
|
230
|
+
/** Paging parameter, enabling to pass a limit and a cursor. */
|
|
231
|
+
paging?: CursorPaging;
|
|
232
|
+
}
|
|
233
|
+
export interface CursorPaging {
|
|
234
|
+
/** Maximum number of items to return in the results. */
|
|
235
|
+
limit?: number | null;
|
|
236
|
+
/**
|
|
237
|
+
* Pointer to the next or previous page in the list of results.
|
|
238
|
+
*
|
|
239
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
240
|
+
* Not relevant for the first request.
|
|
241
|
+
*/
|
|
242
|
+
cursor?: string | null;
|
|
243
|
+
}
|
|
244
|
+
export interface ListDeletedResourcesResponse {
|
|
245
|
+
/** The retrieved Resources */
|
|
246
|
+
resources?: Resource[];
|
|
247
|
+
/** Paging metadata */
|
|
248
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
249
|
+
}
|
|
250
|
+
export interface CursorPagingMetadata {
|
|
251
|
+
/** Number of items returned in the response. */
|
|
252
|
+
count?: number | null;
|
|
253
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
254
|
+
cursors?: Cursors;
|
|
255
|
+
/**
|
|
256
|
+
* Whether there are more pages to retrieve following the current page.
|
|
257
|
+
*
|
|
258
|
+
* + `true`: Another page of results can be retrieved.
|
|
259
|
+
* + `false`: This is the last page.
|
|
260
|
+
*/
|
|
261
|
+
hasNext?: boolean | null;
|
|
262
|
+
}
|
|
263
|
+
export interface Cursors {
|
|
264
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
265
|
+
next?: string | null;
|
|
266
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
267
|
+
prev?: string | null;
|
|
268
|
+
}
|
|
269
|
+
export interface RemoveResourceFromTrashBinRequest {
|
|
270
|
+
/** ID of the resource to remove from the trash bin. */
|
|
271
|
+
resourceId?: string;
|
|
272
|
+
}
|
|
273
|
+
export interface RemoveResourceFromTrashBinResponse {
|
|
274
|
+
}
|
|
275
|
+
export interface RestoreResourceFromTrashBinRequest {
|
|
276
|
+
/** ID of the resource to restore from the trash bin. */
|
|
277
|
+
resourceId?: string;
|
|
278
|
+
}
|
|
279
|
+
export interface RestoreResourceFromTrashBinResponse {
|
|
280
|
+
/** The restored resource. */
|
|
281
|
+
resource?: Resource;
|
|
282
|
+
}
|
|
283
|
+
export interface UpdateResourceRequest {
|
|
284
|
+
/** Resource to be updated, may be partial. */
|
|
285
|
+
resource: Resource;
|
|
286
|
+
}
|
|
287
|
+
export interface UpdateResourceResponse {
|
|
288
|
+
/** The updated resource. */
|
|
289
|
+
resource?: Resource;
|
|
290
|
+
}
|
|
291
|
+
export interface DeleteResourceRequest {
|
|
292
|
+
/** ID of the resource to delete. */
|
|
293
|
+
resourceId: string;
|
|
294
|
+
}
|
|
295
|
+
export interface DeleteResourceResponse {
|
|
296
|
+
}
|
|
297
|
+
export interface BulkDeleteResourcesRequest {
|
|
298
|
+
/** The IDs of the resources to delete. */
|
|
299
|
+
ids: string[];
|
|
300
|
+
}
|
|
301
|
+
export interface BulkDeleteResourcesResponse {
|
|
302
|
+
/** The result of each resource removal. */
|
|
303
|
+
results?: BulkResourceResult[];
|
|
304
|
+
/** Delete statistics. */
|
|
305
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
306
|
+
}
|
|
307
|
+
export interface SearchResourcesRequest {
|
|
308
|
+
/** Search condition */
|
|
309
|
+
search?: CursorSearch;
|
|
310
|
+
}
|
|
311
|
+
export interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
312
|
+
/**
|
|
313
|
+
* Cursor pointing to page of results.
|
|
314
|
+
* When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
|
|
315
|
+
*/
|
|
316
|
+
cursorPaging?: CursorPaging;
|
|
317
|
+
/** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */
|
|
318
|
+
filter?: Record<string, any> | null;
|
|
319
|
+
/** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
|
|
320
|
+
sort?: Sorting[];
|
|
321
|
+
/** Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition. */
|
|
322
|
+
aggregations?: Aggregation[];
|
|
323
|
+
/** Free text to match in searchable fields */
|
|
324
|
+
search?: SearchDetails;
|
|
325
|
+
/**
|
|
326
|
+
* UTC offset or IANA time zone. Valid values are
|
|
327
|
+
* ISO 8601 UTC offsets, such as +02:00 or -06:00,
|
|
328
|
+
* and IANA time zone IDs, such as Europe/Rome
|
|
329
|
+
*
|
|
330
|
+
* Affects all filters and aggregations returned values.
|
|
331
|
+
* You may override this behavior in a specific filter by providing
|
|
332
|
+
* timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
|
|
333
|
+
*/
|
|
334
|
+
timeZone?: string | null;
|
|
335
|
+
}
|
|
336
|
+
/** @oneof */
|
|
337
|
+
export interface CursorSearchPagingMethodOneOf {
|
|
338
|
+
/**
|
|
339
|
+
* Cursor pointing to page of results.
|
|
340
|
+
* When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
|
|
341
|
+
*/
|
|
342
|
+
cursorPaging?: CursorPaging;
|
|
343
|
+
}
|
|
344
|
+
export interface Sorting {
|
|
345
|
+
/** Name of the field to sort by. */
|
|
346
|
+
fieldName?: string;
|
|
347
|
+
/** Sort order. */
|
|
348
|
+
order?: SortOrder;
|
|
349
|
+
}
|
|
350
|
+
export declare enum SortOrder {
|
|
351
|
+
ASC = "ASC",
|
|
352
|
+
DESC = "DESC"
|
|
353
|
+
}
|
|
354
|
+
export interface Aggregation extends AggregationKindOneOf {
|
|
355
|
+
/** Value aggregation */
|
|
356
|
+
value?: ValueAggregation;
|
|
357
|
+
/** Range aggregation */
|
|
358
|
+
range?: RangeAggregation;
|
|
359
|
+
/** Scalar aggregation */
|
|
360
|
+
scalar?: ScalarAggregation;
|
|
361
|
+
/** Date histogram aggregation */
|
|
362
|
+
dateHistogram?: DateHistogramAggregation;
|
|
363
|
+
/** Nested aggregation */
|
|
364
|
+
nested?: NestedAggregation;
|
|
365
|
+
/** User-defined name of aggregation, should be unique, will appear in aggregation results */
|
|
366
|
+
name?: string | null;
|
|
367
|
+
/** Type of aggregation, client must provide matching aggregation field below */
|
|
368
|
+
type?: AggregationType;
|
|
369
|
+
/** Field to aggregate by, use dot notation to specify json path */
|
|
370
|
+
fieldPath?: string;
|
|
371
|
+
/**
|
|
372
|
+
* deprecated, use `nested` instead
|
|
373
|
+
* @deprecated deprecated, use `nested` instead
|
|
374
|
+
* @replacedBy kind.nested
|
|
375
|
+
* @targetRemovalDate 2024-03-30
|
|
376
|
+
*/
|
|
377
|
+
groupBy?: GroupByAggregation;
|
|
378
|
+
}
|
|
379
|
+
/** @oneof */
|
|
380
|
+
export interface AggregationKindOneOf {
|
|
381
|
+
/** Value aggregation */
|
|
382
|
+
value?: ValueAggregation;
|
|
383
|
+
/** Range aggregation */
|
|
384
|
+
range?: RangeAggregation;
|
|
385
|
+
/** Scalar aggregation */
|
|
386
|
+
scalar?: ScalarAggregation;
|
|
387
|
+
/** Date histogram aggregation */
|
|
388
|
+
dateHistogram?: DateHistogramAggregation;
|
|
389
|
+
/** Nested aggregation */
|
|
390
|
+
nested?: NestedAggregation;
|
|
391
|
+
}
|
|
392
|
+
export interface RangeBucket {
|
|
393
|
+
/** Inclusive lower bound of the range. Required if to is not given */
|
|
394
|
+
from?: number | null;
|
|
395
|
+
/** Exclusive upper bound of the range. Required if from is not given */
|
|
396
|
+
to?: number | null;
|
|
397
|
+
}
|
|
398
|
+
export declare enum SortType {
|
|
399
|
+
/** Should sort by number of matches */
|
|
400
|
+
COUNT = "COUNT",
|
|
401
|
+
/** Should sort by value of the field alphabetically */
|
|
402
|
+
VALUE = "VALUE"
|
|
403
|
+
}
|
|
404
|
+
export declare enum SortDirection {
|
|
405
|
+
/** Should sort in descending order */
|
|
406
|
+
DESC = "DESC",
|
|
407
|
+
/** Should sort in ascending order */
|
|
408
|
+
ASC = "ASC"
|
|
409
|
+
}
|
|
410
|
+
export declare enum MissingValues {
|
|
411
|
+
/** Should missing values be excluded from the aggregation results */
|
|
412
|
+
EXCLUDE = "EXCLUDE",
|
|
413
|
+
/** Should missing values be included in the aggregation results */
|
|
414
|
+
INCLUDE = "INCLUDE"
|
|
415
|
+
}
|
|
416
|
+
export interface IncludeMissingValuesOptions {
|
|
417
|
+
/** Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ... */
|
|
418
|
+
addToBucket?: string;
|
|
419
|
+
}
|
|
420
|
+
export declare enum ScalarType {
|
|
421
|
+
UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
|
|
422
|
+
/** Count of distinct values */
|
|
423
|
+
COUNT_DISTINCT = "COUNT_DISTINCT",
|
|
424
|
+
/** Minimum value */
|
|
425
|
+
MIN = "MIN",
|
|
426
|
+
/** Maximum value */
|
|
427
|
+
MAX = "MAX"
|
|
428
|
+
}
|
|
429
|
+
export interface ValueAggregation extends ValueAggregationOptionsOneOf {
|
|
430
|
+
/** Options for including missing values */
|
|
431
|
+
includeOptions?: IncludeMissingValuesOptions;
|
|
432
|
+
/** Should sort by number of matches or value of the field */
|
|
433
|
+
sortType?: SortType;
|
|
434
|
+
/** Should sort in ascending or descending order */
|
|
435
|
+
sortDirection?: SortDirection;
|
|
436
|
+
/** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
|
|
437
|
+
limit?: number | null;
|
|
438
|
+
/** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
|
|
439
|
+
missingValues?: MissingValues;
|
|
440
|
+
}
|
|
441
|
+
/** @oneof */
|
|
442
|
+
export interface ValueAggregationOptionsOneOf {
|
|
443
|
+
/** Options for including missing values */
|
|
444
|
+
includeOptions?: IncludeMissingValuesOptions;
|
|
445
|
+
}
|
|
446
|
+
export declare enum NestedAggregationType {
|
|
447
|
+
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
448
|
+
/** An aggregation where result buckets are dynamically built - one per unique value */
|
|
449
|
+
VALUE = "VALUE",
|
|
450
|
+
/** An aggregation, where user can define set of ranges - each representing a bucket */
|
|
451
|
+
RANGE = "RANGE",
|
|
452
|
+
/** A single-value metric aggregation - e.g. min, max, sum, avg */
|
|
453
|
+
SCALAR = "SCALAR",
|
|
454
|
+
/** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
|
|
455
|
+
DATE_HISTOGRAM = "DATE_HISTOGRAM"
|
|
456
|
+
}
|
|
457
|
+
export interface RangeAggregation {
|
|
458
|
+
/** 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 */
|
|
459
|
+
buckets?: RangeBucket[];
|
|
460
|
+
}
|
|
461
|
+
export interface ScalarAggregation {
|
|
462
|
+
/** Define the operator for the scalar aggregation */
|
|
463
|
+
type?: ScalarType;
|
|
464
|
+
}
|
|
465
|
+
export interface DateHistogramAggregation {
|
|
466
|
+
/** Interval for date histogram aggregation */
|
|
467
|
+
interval?: Interval;
|
|
468
|
+
}
|
|
469
|
+
export declare enum Interval {
|
|
470
|
+
UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
|
|
471
|
+
/** Yearly interval */
|
|
472
|
+
YEAR = "YEAR",
|
|
473
|
+
/** Monthly interval */
|
|
474
|
+
MONTH = "MONTH",
|
|
475
|
+
/** Weekly interval */
|
|
476
|
+
WEEK = "WEEK",
|
|
477
|
+
/** Daily interval */
|
|
478
|
+
DAY = "DAY",
|
|
479
|
+
/** Hourly interval */
|
|
480
|
+
HOUR = "HOUR",
|
|
481
|
+
/** Minute interval */
|
|
482
|
+
MINUTE = "MINUTE",
|
|
483
|
+
/** Second interval */
|
|
484
|
+
SECOND = "SECOND"
|
|
485
|
+
}
|
|
486
|
+
export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
487
|
+
/** Value aggregation */
|
|
488
|
+
value?: ValueAggregation;
|
|
489
|
+
/** Range aggregation */
|
|
490
|
+
range?: RangeAggregation;
|
|
491
|
+
/** Scalar aggregation */
|
|
492
|
+
scalar?: ScalarAggregation;
|
|
493
|
+
/** Date histogram aggregation */
|
|
494
|
+
dateHistogram?: DateHistogramAggregation;
|
|
495
|
+
/** User-defined name of aggregation, should be unique, will appear in aggregation results */
|
|
496
|
+
name?: string | null;
|
|
497
|
+
/** Type of aggregation, client must provide matching aggregation field below */
|
|
498
|
+
type?: NestedAggregationType;
|
|
499
|
+
/** Field to aggregate by, use dont notation to specify json path */
|
|
500
|
+
fieldPath?: string;
|
|
501
|
+
}
|
|
502
|
+
/** @oneof */
|
|
503
|
+
export interface NestedAggregationItemKindOneOf {
|
|
504
|
+
/** Value aggregation */
|
|
505
|
+
value?: ValueAggregation;
|
|
506
|
+
/** Range aggregation */
|
|
507
|
+
range?: RangeAggregation;
|
|
508
|
+
/** Scalar aggregation */
|
|
509
|
+
scalar?: ScalarAggregation;
|
|
510
|
+
/** Date histogram aggregation */
|
|
511
|
+
dateHistogram?: DateHistogramAggregation;
|
|
512
|
+
}
|
|
513
|
+
export declare enum AggregationType {
|
|
514
|
+
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
515
|
+
/** An aggregation where result buckets are dynamically built - one per unique value */
|
|
516
|
+
VALUE = "VALUE",
|
|
517
|
+
/** An aggregation, where user can define set of ranges - each representing a bucket */
|
|
518
|
+
RANGE = "RANGE",
|
|
519
|
+
/** A single-value metric aggregation - e.g. min, max, sum, avg */
|
|
520
|
+
SCALAR = "SCALAR",
|
|
521
|
+
/** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
|
|
522
|
+
DATE_HISTOGRAM = "DATE_HISTOGRAM",
|
|
523
|
+
/** Multi-level aggregation, where each next aggregation is nested within previous one */
|
|
524
|
+
NESTED = "NESTED"
|
|
525
|
+
}
|
|
526
|
+
/** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
|
|
527
|
+
export interface NestedAggregation {
|
|
528
|
+
/** Flattened list of aggregations, where each next aggregation is nested within previous one */
|
|
529
|
+
nestedAggregations?: NestedAggregationItem[];
|
|
530
|
+
}
|
|
531
|
+
export interface GroupByAggregation extends GroupByAggregationKindOneOf {
|
|
532
|
+
/** Value aggregation configuration */
|
|
533
|
+
value?: ValueAggregation;
|
|
534
|
+
/** User-defined name of aggregation, should be unique, will appear in aggregation results */
|
|
535
|
+
name?: string | null;
|
|
536
|
+
/** Field to aggregate by */
|
|
537
|
+
fieldPath?: string;
|
|
538
|
+
}
|
|
539
|
+
/** @oneof */
|
|
540
|
+
export interface GroupByAggregationKindOneOf {
|
|
541
|
+
/** Value aggregation configuration */
|
|
542
|
+
value?: ValueAggregation;
|
|
543
|
+
}
|
|
544
|
+
export interface SearchDetails {
|
|
545
|
+
/** Defines how separate search terms in `expression` are combined */
|
|
546
|
+
mode?: Mode;
|
|
547
|
+
/** Search term or expression */
|
|
548
|
+
expression?: string | null;
|
|
549
|
+
/** Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path */
|
|
550
|
+
fields?: string[];
|
|
551
|
+
/** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
|
|
552
|
+
fuzzy?: boolean;
|
|
553
|
+
}
|
|
554
|
+
export declare enum Mode {
|
|
555
|
+
/** Any of the search terms must be present */
|
|
556
|
+
OR = "OR",
|
|
557
|
+
/** All search terms must be present */
|
|
558
|
+
AND = "AND"
|
|
559
|
+
}
|
|
560
|
+
export interface SearchResourcesResponse {
|
|
561
|
+
/** The retrieved resources */
|
|
562
|
+
resources?: Resource[];
|
|
563
|
+
/** Paging metadata */
|
|
564
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
565
|
+
/** Aggregation results */
|
|
566
|
+
aggregationData?: AggregationData;
|
|
567
|
+
}
|
|
568
|
+
export interface AggregationData {
|
|
569
|
+
/** key = aggregation name (as derived from search request) */
|
|
570
|
+
results?: AggregationResults[];
|
|
571
|
+
}
|
|
572
|
+
export interface ValueAggregationResult {
|
|
573
|
+
/** Value of the field */
|
|
574
|
+
value?: string;
|
|
575
|
+
/** Count of entities with this value */
|
|
576
|
+
count?: number;
|
|
577
|
+
}
|
|
578
|
+
export interface RangeAggregationResult {
|
|
579
|
+
/** Inclusive lower bound of the range */
|
|
580
|
+
from?: number | null;
|
|
581
|
+
/** Exclusive upper bound of the range */
|
|
582
|
+
to?: number | null;
|
|
583
|
+
/** Count of entities in this range */
|
|
584
|
+
count?: number;
|
|
585
|
+
}
|
|
586
|
+
export interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
|
|
587
|
+
/** Value aggregation results */
|
|
588
|
+
values?: ValueResults;
|
|
589
|
+
/** Range aggregation results */
|
|
590
|
+
ranges?: RangeResults;
|
|
591
|
+
/** Scalar aggregation results */
|
|
592
|
+
scalar?: AggregationResultsScalarResult;
|
|
593
|
+
/** User-defined name of aggregation, matches the one provided in request */
|
|
594
|
+
name?: string;
|
|
595
|
+
/** Type of aggregation that matches result */
|
|
596
|
+
type?: AggregationType;
|
|
597
|
+
/** Field to aggregate by, matches the one provided in request */
|
|
598
|
+
fieldPath?: string;
|
|
599
|
+
}
|
|
600
|
+
/** @oneof */
|
|
601
|
+
export interface NestedAggregationResultsResultOneOf {
|
|
602
|
+
/** Value aggregation results */
|
|
603
|
+
values?: ValueResults;
|
|
604
|
+
/** Range aggregation results */
|
|
605
|
+
ranges?: RangeResults;
|
|
606
|
+
/** Scalar aggregation results */
|
|
607
|
+
scalar?: AggregationResultsScalarResult;
|
|
608
|
+
}
|
|
609
|
+
export interface ValueResults {
|
|
610
|
+
/** List of value aggregations */
|
|
611
|
+
results?: ValueAggregationResult[];
|
|
612
|
+
}
|
|
613
|
+
export interface RangeResults {
|
|
614
|
+
/** List of ranges returned in same order as requested */
|
|
615
|
+
results?: RangeAggregationResult[];
|
|
616
|
+
}
|
|
617
|
+
export interface AggregationResultsScalarResult {
|
|
618
|
+
/** Type of scalar aggregation */
|
|
619
|
+
type?: ScalarType;
|
|
620
|
+
/** Value of the scalar aggregation */
|
|
621
|
+
value?: number;
|
|
622
|
+
}
|
|
623
|
+
export interface NestedValueAggregationResult {
|
|
624
|
+
/** Value of the field */
|
|
625
|
+
value?: string;
|
|
626
|
+
/** Nested aggregations */
|
|
627
|
+
nestedResults?: NestedAggregationResults;
|
|
628
|
+
}
|
|
629
|
+
export interface ValueResult {
|
|
630
|
+
/** Value of the field */
|
|
631
|
+
value?: string;
|
|
632
|
+
/** Count of entities with this value */
|
|
633
|
+
count?: number | null;
|
|
634
|
+
}
|
|
635
|
+
export interface RangeResult {
|
|
636
|
+
/** Inclusive lower bound of the range */
|
|
637
|
+
from?: number | null;
|
|
638
|
+
/** Exclusive upper bound of the range */
|
|
639
|
+
to?: number | null;
|
|
640
|
+
/** Count of entities in this range */
|
|
641
|
+
count?: number | null;
|
|
642
|
+
}
|
|
643
|
+
export interface ScalarResult {
|
|
644
|
+
/** Value of the scalar aggregation */
|
|
645
|
+
value?: number;
|
|
646
|
+
}
|
|
647
|
+
export interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
648
|
+
/** Value aggregation result */
|
|
649
|
+
value?: ValueResult;
|
|
650
|
+
/** Range aggregation result */
|
|
651
|
+
range?: RangeResult;
|
|
652
|
+
/** Scalar aggregation result */
|
|
653
|
+
scalar?: ScalarResult;
|
|
654
|
+
/** Date histogram aggregation result */
|
|
655
|
+
dateHistogram?: ValueResult;
|
|
656
|
+
}
|
|
657
|
+
/** @oneof */
|
|
658
|
+
export interface NestedResultValueResultOneOf {
|
|
659
|
+
/** Value aggregation result */
|
|
660
|
+
value?: ValueResult;
|
|
661
|
+
/** Range aggregation result */
|
|
662
|
+
range?: RangeResult;
|
|
663
|
+
/** Scalar aggregation result */
|
|
664
|
+
scalar?: ScalarResult;
|
|
665
|
+
/** Date histogram aggregation result */
|
|
666
|
+
dateHistogram?: ValueResult;
|
|
667
|
+
}
|
|
668
|
+
export interface Results {
|
|
669
|
+
/** List of nested aggregations */
|
|
670
|
+
results?: Record<string, NestedResultValue>;
|
|
671
|
+
}
|
|
672
|
+
export interface DateHistogramResult {
|
|
673
|
+
/** Date in ISO 8601 format */
|
|
674
|
+
value?: string;
|
|
675
|
+
/** Count of documents in the bucket */
|
|
676
|
+
count?: number;
|
|
677
|
+
}
|
|
678
|
+
export interface GroupByValueResults {
|
|
679
|
+
/** List of value aggregations */
|
|
680
|
+
results?: NestedValueAggregationResult[];
|
|
681
|
+
}
|
|
682
|
+
export interface DateHistogramResults {
|
|
683
|
+
/** List of date histogram aggregations */
|
|
684
|
+
results?: DateHistogramResult[];
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Results of `NESTED` aggregation type in a flattened form
|
|
688
|
+
* aggregations in resulting array are keyed by requested aggregation `name`.
|
|
689
|
+
*/
|
|
690
|
+
export interface NestedResults {
|
|
691
|
+
/** List of nested aggregations */
|
|
692
|
+
results?: Results[];
|
|
693
|
+
}
|
|
694
|
+
export interface AggregationResults extends AggregationResultsResultOneOf {
|
|
695
|
+
/** Value aggregation results */
|
|
696
|
+
values?: ValueResults;
|
|
697
|
+
/** Range aggregation results */
|
|
698
|
+
ranges?: RangeResults;
|
|
699
|
+
/** Scalar aggregation results */
|
|
700
|
+
scalar?: AggregationResultsScalarResult;
|
|
701
|
+
/** Group by value aggregation results */
|
|
702
|
+
groupedByValue?: GroupByValueResults;
|
|
703
|
+
/** Date histogram aggregation results */
|
|
704
|
+
dateHistogram?: DateHistogramResults;
|
|
705
|
+
/** Nested aggregation results */
|
|
706
|
+
nested?: NestedResults;
|
|
707
|
+
/** User-defined name of aggregation as derived from search request */
|
|
708
|
+
name?: string;
|
|
709
|
+
/** Type of aggregation that must match provided kind as derived from search request */
|
|
710
|
+
type?: AggregationType;
|
|
711
|
+
/** Field to aggregate by as derived from search request */
|
|
712
|
+
fieldPath?: string;
|
|
713
|
+
}
|
|
714
|
+
/** @oneof */
|
|
715
|
+
export interface AggregationResultsResultOneOf {
|
|
716
|
+
/** Value aggregation results */
|
|
717
|
+
values?: ValueResults;
|
|
718
|
+
/** Range aggregation results */
|
|
719
|
+
ranges?: RangeResults;
|
|
720
|
+
/** Scalar aggregation results */
|
|
721
|
+
scalar?: AggregationResultsScalarResult;
|
|
722
|
+
/** Group by value aggregation results */
|
|
723
|
+
groupedByValue?: GroupByValueResults;
|
|
724
|
+
/** Date histogram aggregation results */
|
|
725
|
+
dateHistogram?: DateHistogramResults;
|
|
726
|
+
/** Nested aggregation results */
|
|
727
|
+
nested?: NestedResults;
|
|
728
|
+
}
|
|
729
|
+
export interface QueryResourcesRequest {
|
|
730
|
+
/** WQL expression. */
|
|
731
|
+
query?: CursorQuery;
|
|
732
|
+
}
|
|
733
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
734
|
+
/** 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`. */
|
|
735
|
+
cursorPaging?: CursorPaging;
|
|
736
|
+
/**
|
|
737
|
+
* Filter object in the following format:
|
|
738
|
+
* `"filter" : {
|
|
739
|
+
* "fieldName1": "value1",
|
|
740
|
+
* "fieldName2":{"$operator":"value2"}
|
|
741
|
+
* }`
|
|
742
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
743
|
+
*/
|
|
744
|
+
filter?: Record<string, any> | null;
|
|
745
|
+
/**
|
|
746
|
+
* Sort object in the following format:
|
|
747
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
748
|
+
*/
|
|
749
|
+
sort?: Sorting[];
|
|
750
|
+
}
|
|
751
|
+
/** @oneof */
|
|
752
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
753
|
+
/** 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`. */
|
|
754
|
+
cursorPaging?: CursorPaging;
|
|
755
|
+
}
|
|
756
|
+
export interface QueryResourcesResponse {
|
|
757
|
+
/** The retrieved Resources. */
|
|
758
|
+
resources?: Resource[];
|
|
759
|
+
/** Paging metadata */
|
|
760
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
761
|
+
}
|
|
762
|
+
export interface CountResourcesRequest {
|
|
763
|
+
/** Filter to apply on resources to count. */
|
|
764
|
+
filter?: Record<string, any> | null;
|
|
765
|
+
/**
|
|
766
|
+
* @deprecated
|
|
767
|
+
* @targetRemovalDate 2024-05-01
|
|
768
|
+
*/
|
|
769
|
+
search?: SearchDetails;
|
|
770
|
+
}
|
|
771
|
+
export interface CountResourcesResponse {
|
|
772
|
+
/** The number of resources matching the given filter. */
|
|
773
|
+
count?: number;
|
|
774
|
+
}
|
|
775
|
+
export interface ImportResourceRequest {
|
|
776
|
+
/** Resource to be imported. */
|
|
777
|
+
resource?: Resource;
|
|
778
|
+
}
|
|
779
|
+
export interface ImportResourceResponse {
|
|
780
|
+
/** The imported resource. */
|
|
781
|
+
resource?: Resource;
|
|
782
|
+
}
|
|
783
|
+
export interface FixResourceSchedulesRequest {
|
|
784
|
+
/** Id of the resource of which the schedules must be fixed */
|
|
785
|
+
resourceId?: string;
|
|
786
|
+
/** the working hours schedule that must be set for this resource. */
|
|
787
|
+
workingHoursSchedule?: Schedule;
|
|
788
|
+
}
|
|
789
|
+
export interface FixResourceSchedulesResponse {
|
|
790
|
+
/** The resource with the fixed schedule IDs. */
|
|
791
|
+
resource?: Resource;
|
|
792
|
+
}
|
|
793
|
+
export interface ReindexTenantRequest {
|
|
794
|
+
}
|
|
795
|
+
export interface ReindexTenantResponse {
|
|
796
|
+
}
|
|
797
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
798
|
+
createdEvent?: EntityCreatedEvent;
|
|
799
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
800
|
+
deletedEvent?: EntityDeletedEvent;
|
|
801
|
+
actionEvent?: ActionEvent;
|
|
802
|
+
/**
|
|
803
|
+
* Unique event ID.
|
|
804
|
+
* Allows clients to ignore duplicate webhooks.
|
|
805
|
+
*/
|
|
806
|
+
id?: string;
|
|
807
|
+
/**
|
|
808
|
+
* Assumes actions are also always typed to an entity_type
|
|
809
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
810
|
+
*/
|
|
811
|
+
entityFqdn?: string;
|
|
812
|
+
/**
|
|
813
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
814
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
815
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
816
|
+
*/
|
|
817
|
+
slug?: string;
|
|
818
|
+
/** ID of the entity associated with the event. */
|
|
819
|
+
entityId?: string;
|
|
820
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
821
|
+
eventTime?: Date | null;
|
|
822
|
+
/**
|
|
823
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
824
|
+
* (for example, GDPR).
|
|
825
|
+
*/
|
|
826
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
827
|
+
/** If present, indicates the action that triggered the event. */
|
|
828
|
+
originatedFrom?: string | null;
|
|
829
|
+
/**
|
|
830
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
831
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
832
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
833
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
834
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
835
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
836
|
+
*/
|
|
837
|
+
entityEventSequence?: string | null;
|
|
838
|
+
}
|
|
839
|
+
/** @oneof */
|
|
840
|
+
export interface DomainEventBodyOneOf {
|
|
841
|
+
createdEvent?: EntityCreatedEvent;
|
|
842
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
843
|
+
deletedEvent?: EntityDeletedEvent;
|
|
844
|
+
actionEvent?: ActionEvent;
|
|
845
|
+
}
|
|
846
|
+
export interface EntityCreatedEvent {
|
|
847
|
+
entityAsJson?: string;
|
|
848
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
849
|
+
restoreInfo?: RestoreInfo;
|
|
850
|
+
}
|
|
851
|
+
export interface RestoreInfo {
|
|
852
|
+
deletedDate?: Date | null;
|
|
853
|
+
}
|
|
854
|
+
export interface EntityUpdatedEvent {
|
|
855
|
+
/**
|
|
856
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
857
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
858
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
859
|
+
*/
|
|
860
|
+
currentEntityAsJson?: string;
|
|
861
|
+
}
|
|
862
|
+
export interface EntityDeletedEvent {
|
|
863
|
+
/** Entity that was deleted */
|
|
864
|
+
deletedEntityAsJson?: string | null;
|
|
865
|
+
}
|
|
866
|
+
export interface ActionEvent {
|
|
867
|
+
bodyAsJson?: string;
|
|
868
|
+
}
|
|
869
|
+
export interface Empty {
|
|
870
|
+
}
|
|
871
|
+
export interface MessageEnvelope {
|
|
872
|
+
/** App instance ID. */
|
|
873
|
+
instanceId?: string | null;
|
|
874
|
+
/** Event type. */
|
|
875
|
+
eventType?: string;
|
|
876
|
+
/** The identification type and identity data. */
|
|
877
|
+
identity?: IdentificationData;
|
|
878
|
+
/** Stringify payload. */
|
|
879
|
+
data?: string;
|
|
880
|
+
}
|
|
881
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
882
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
883
|
+
anonymousVisitorId?: string;
|
|
884
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
885
|
+
memberId?: string;
|
|
886
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
887
|
+
wixUserId?: string;
|
|
888
|
+
/** ID of an app. */
|
|
889
|
+
appId?: string;
|
|
890
|
+
/** @readonly */
|
|
891
|
+
identityType?: WebhookIdentityType;
|
|
892
|
+
}
|
|
893
|
+
/** @oneof */
|
|
894
|
+
export interface IdentificationDataIdOneOf {
|
|
895
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
896
|
+
anonymousVisitorId?: string;
|
|
897
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
898
|
+
memberId?: string;
|
|
899
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
900
|
+
wixUserId?: string;
|
|
901
|
+
/** ID of an app. */
|
|
902
|
+
appId?: string;
|
|
903
|
+
}
|
|
904
|
+
export declare enum WebhookIdentityType {
|
|
905
|
+
UNKNOWN = "UNKNOWN",
|
|
906
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
907
|
+
MEMBER = "MEMBER",
|
|
908
|
+
WIX_USER = "WIX_USER",
|
|
909
|
+
APP = "APP"
|
|
910
|
+
}
|
|
911
|
+
interface ResourceNonNullableFields {
|
|
912
|
+
managementType: ManagementType;
|
|
913
|
+
}
|
|
914
|
+
export interface CreateResourceResponseNonNullableFields {
|
|
915
|
+
resource?: ResourceNonNullableFields;
|
|
916
|
+
}
|
|
917
|
+
interface ApplicationErrorNonNullableFields {
|
|
918
|
+
code: string;
|
|
919
|
+
description: string;
|
|
920
|
+
}
|
|
921
|
+
interface ItemMetadataNonNullableFields {
|
|
922
|
+
originalIndex: number;
|
|
923
|
+
success: boolean;
|
|
924
|
+
error?: ApplicationErrorNonNullableFields;
|
|
925
|
+
}
|
|
926
|
+
interface BulkResourceResultNonNullableFields {
|
|
927
|
+
itemMetadata?: ItemMetadataNonNullableFields;
|
|
928
|
+
item?: ResourceNonNullableFields;
|
|
929
|
+
}
|
|
930
|
+
interface BulkActionMetadataNonNullableFields {
|
|
931
|
+
totalSuccesses: number;
|
|
932
|
+
totalFailures: number;
|
|
933
|
+
undetailedFailures: number;
|
|
934
|
+
}
|
|
935
|
+
export interface BulkCreateResourcesResponseNonNullableFields {
|
|
936
|
+
results: BulkResourceResultNonNullableFields[];
|
|
937
|
+
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
938
|
+
}
|
|
939
|
+
export interface GetResourceResponseNonNullableFields {
|
|
940
|
+
resource?: ResourceNonNullableFields;
|
|
941
|
+
}
|
|
942
|
+
export interface UpdateResourceResponseNonNullableFields {
|
|
943
|
+
resource?: ResourceNonNullableFields;
|
|
944
|
+
}
|
|
945
|
+
export interface BulkDeleteResourcesResponseNonNullableFields {
|
|
946
|
+
results: BulkResourceResultNonNullableFields[];
|
|
947
|
+
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
948
|
+
}
|
|
949
|
+
interface ValueAggregationResultNonNullableFields {
|
|
950
|
+
value: string;
|
|
951
|
+
count: number;
|
|
952
|
+
}
|
|
953
|
+
interface ValueResultsNonNullableFields {
|
|
954
|
+
results: ValueAggregationResultNonNullableFields[];
|
|
955
|
+
}
|
|
956
|
+
interface RangeAggregationResultNonNullableFields {
|
|
957
|
+
count: number;
|
|
958
|
+
}
|
|
959
|
+
interface RangeResultsNonNullableFields {
|
|
960
|
+
results: RangeAggregationResultNonNullableFields[];
|
|
961
|
+
}
|
|
962
|
+
interface AggregationResultsScalarResultNonNullableFields {
|
|
963
|
+
type: ScalarType;
|
|
964
|
+
value: number;
|
|
965
|
+
}
|
|
966
|
+
interface NestedAggregationResultsNonNullableFields {
|
|
967
|
+
values?: ValueResultsNonNullableFields;
|
|
968
|
+
ranges?: RangeResultsNonNullableFields;
|
|
969
|
+
scalar?: AggregationResultsScalarResultNonNullableFields;
|
|
970
|
+
name: string;
|
|
971
|
+
type: AggregationType;
|
|
972
|
+
fieldPath: string;
|
|
973
|
+
}
|
|
974
|
+
interface NestedValueAggregationResultNonNullableFields {
|
|
975
|
+
value: string;
|
|
976
|
+
nestedResults?: NestedAggregationResultsNonNullableFields;
|
|
977
|
+
}
|
|
978
|
+
interface GroupByValueResultsNonNullableFields {
|
|
979
|
+
results: NestedValueAggregationResultNonNullableFields[];
|
|
980
|
+
}
|
|
981
|
+
interface DateHistogramResultNonNullableFields {
|
|
982
|
+
value: string;
|
|
983
|
+
count: number;
|
|
984
|
+
}
|
|
985
|
+
interface DateHistogramResultsNonNullableFields {
|
|
986
|
+
results: DateHistogramResultNonNullableFields[];
|
|
987
|
+
}
|
|
988
|
+
interface AggregationResultsNonNullableFields {
|
|
989
|
+
values?: ValueResultsNonNullableFields;
|
|
990
|
+
ranges?: RangeResultsNonNullableFields;
|
|
991
|
+
scalar?: AggregationResultsScalarResultNonNullableFields;
|
|
992
|
+
groupedByValue?: GroupByValueResultsNonNullableFields;
|
|
993
|
+
dateHistogram?: DateHistogramResultsNonNullableFields;
|
|
994
|
+
name: string;
|
|
995
|
+
type: AggregationType;
|
|
996
|
+
fieldPath: string;
|
|
997
|
+
}
|
|
998
|
+
interface AggregationDataNonNullableFields {
|
|
999
|
+
results: AggregationResultsNonNullableFields[];
|
|
1000
|
+
}
|
|
1001
|
+
export interface SearchResourcesResponseNonNullableFields {
|
|
1002
|
+
resources: ResourceNonNullableFields[];
|
|
1003
|
+
aggregationData?: AggregationDataNonNullableFields;
|
|
1004
|
+
}
|
|
1005
|
+
export interface QueryResourcesResponseNonNullableFields {
|
|
1006
|
+
resources: ResourceNonNullableFields[];
|
|
1007
|
+
}
|
|
1008
|
+
export interface CountResourcesResponseNonNullableFields {
|
|
1009
|
+
count: number;
|
|
1010
|
+
}
|
|
1011
|
+
export {};
|