@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.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +33 -0
  11. package/build/cjs/src/bookings-resources-v2-resource-resources.context.js +47 -0
  12. package/build/cjs/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
  13. package/build/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +66 -0
  14. package/build/cjs/src/bookings-resources-v2-resource-resources.http.js +416 -0
  15. package/build/cjs/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
  16. package/build/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
  17. package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js +199 -0
  18. package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
  19. package/build/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +119 -0
  20. package/build/cjs/src/bookings-resources-v2-resource-resources.public.js +106 -0
  21. package/build/cjs/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
  22. package/build/cjs/src/bookings-resources-v2-resource-resources.types.d.ts +1011 -0
  23. package/build/cjs/src/bookings-resources-v2-resource-resources.types.js +104 -0
  24. package/build/cjs/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
  25. package/build/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts +1436 -0
  26. package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js +563 -0
  27. package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/bookings-resources-v2-resource-resources.context.d.ts +33 -0
  39. package/build/es/src/bookings-resources-v2-resource-resources.context.js +33 -0
  40. package/build/es/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
  41. package/build/es/src/bookings-resources-v2-resource-resources.http.d.ts +66 -0
  42. package/build/es/src/bookings-resources-v2-resource-resources.http.js +404 -0
  43. package/build/es/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
  44. package/build/es/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
  45. package/build/es/src/bookings-resources-v2-resource-resources.meta.js +164 -0
  46. package/build/es/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
  47. package/build/es/src/bookings-resources-v2-resource-resources.public.d.ts +119 -0
  48. package/build/es/src/bookings-resources-v2-resource-resources.public.js +83 -0
  49. package/build/es/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
  50. package/build/es/src/bookings-resources-v2-resource-resources.types.d.ts +1011 -0
  51. package/build/es/src/bookings-resources-v2-resource-resources.types.js +101 -0
  52. package/build/es/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
  53. package/build/es/src/bookings-resources-v2-resource-resources.universal.d.ts +1436 -0
  54. package/build/es/src/bookings-resources-v2-resource-resources.universal.js +528 -0
  55. package/build/es/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +33 -0
  66. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js +47 -0
  67. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
  68. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +66 -0
  69. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js +416 -0
  70. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
  71. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
  72. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js +199 -0
  73. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
  74. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +119 -0
  75. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js +106 -0
  76. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
  77. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.d.ts +1011 -0
  78. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js +104 -0
  79. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
  80. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts +1436 -0
  81. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js +563 -0
  82. package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/bookings-resources-v2-resource-resources.context.d.ts +33 -0
  93. package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js +33 -0
  94. package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js.map +1 -0
  95. package/build/internal/es/src/bookings-resources-v2-resource-resources.http.d.ts +66 -0
  96. package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js +404 -0
  97. package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js.map +1 -0
  98. package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.d.ts +27 -0
  99. package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js +164 -0
  100. package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js.map +1 -0
  101. package/build/internal/es/src/bookings-resources-v2-resource-resources.public.d.ts +119 -0
  102. package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js +83 -0
  103. package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js.map +1 -0
  104. package/build/internal/es/src/bookings-resources-v2-resource-resources.types.d.ts +1011 -0
  105. package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js +101 -0
  106. package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js.map +1 -0
  107. package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.d.ts +1436 -0
  108. package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js +528 -0
  109. package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1436 @@
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
+ entity?: string;
848
+ }
849
+ export interface RestoreInfo {
850
+ deletedDate?: Date | null;
851
+ }
852
+ export interface EntityUpdatedEvent {
853
+ /**
854
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
855
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
856
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
857
+ */
858
+ currentEntity?: string;
859
+ }
860
+ export interface EntityDeletedEvent {
861
+ /** Entity that was deleted */
862
+ deletedEntity?: string | null;
863
+ }
864
+ export interface ActionEvent {
865
+ body?: string;
866
+ }
867
+ export interface Empty {
868
+ }
869
+ export interface MessageEnvelope {
870
+ /** App instance ID. */
871
+ instanceId?: string | null;
872
+ /** Event type. */
873
+ eventType?: string;
874
+ /** The identification type and identity data. */
875
+ identity?: IdentificationData;
876
+ /** Stringify payload. */
877
+ data?: string;
878
+ }
879
+ export interface IdentificationData extends IdentificationDataIdOneOf {
880
+ /** ID of a site visitor that has not logged in to the site. */
881
+ anonymousVisitorId?: string;
882
+ /** ID of a site visitor that has logged in to the site. */
883
+ memberId?: string;
884
+ /** ID of a Wix user (site owner, contributor, etc.). */
885
+ wixUserId?: string;
886
+ /** ID of an app. */
887
+ appId?: string;
888
+ /** @readonly */
889
+ identityType?: WebhookIdentityType;
890
+ }
891
+ /** @oneof */
892
+ export interface IdentificationDataIdOneOf {
893
+ /** ID of a site visitor that has not logged in to the site. */
894
+ anonymousVisitorId?: string;
895
+ /** ID of a site visitor that has logged in to the site. */
896
+ memberId?: string;
897
+ /** ID of a Wix user (site owner, contributor, etc.). */
898
+ wixUserId?: string;
899
+ /** ID of an app. */
900
+ appId?: string;
901
+ }
902
+ export declare enum WebhookIdentityType {
903
+ UNKNOWN = "UNKNOWN",
904
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
905
+ MEMBER = "MEMBER",
906
+ WIX_USER = "WIX_USER",
907
+ APP = "APP"
908
+ }
909
+ export interface ResourceNonNullableFields {
910
+ managementType: ManagementType;
911
+ }
912
+ export interface CreateResourceResponseNonNullableFields {
913
+ resource?: ResourceNonNullableFields;
914
+ }
915
+ interface ApplicationErrorNonNullableFields {
916
+ code: string;
917
+ description: string;
918
+ }
919
+ interface ItemMetadataNonNullableFields {
920
+ originalIndex: number;
921
+ success: boolean;
922
+ error?: ApplicationErrorNonNullableFields;
923
+ }
924
+ interface BulkResourceResultNonNullableFields {
925
+ itemMetadata?: ItemMetadataNonNullableFields;
926
+ item?: ResourceNonNullableFields;
927
+ }
928
+ interface BulkActionMetadataNonNullableFields {
929
+ totalSuccesses: number;
930
+ totalFailures: number;
931
+ undetailedFailures: number;
932
+ }
933
+ export interface BulkCreateResourcesResponseNonNullableFields {
934
+ results: BulkResourceResultNonNullableFields[];
935
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
936
+ }
937
+ export interface GetResourceResponseNonNullableFields {
938
+ resource?: ResourceNonNullableFields;
939
+ }
940
+ export interface UpdateResourceResponseNonNullableFields {
941
+ resource?: ResourceNonNullableFields;
942
+ }
943
+ export interface BulkDeleteResourcesResponseNonNullableFields {
944
+ results: BulkResourceResultNonNullableFields[];
945
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
946
+ }
947
+ interface ValueAggregationResultNonNullableFields {
948
+ value: string;
949
+ count: number;
950
+ }
951
+ interface ValueResultsNonNullableFields {
952
+ results: ValueAggregationResultNonNullableFields[];
953
+ }
954
+ interface RangeAggregationResultNonNullableFields {
955
+ count: number;
956
+ }
957
+ interface RangeResultsNonNullableFields {
958
+ results: RangeAggregationResultNonNullableFields[];
959
+ }
960
+ interface AggregationResultsScalarResultNonNullableFields {
961
+ type: ScalarType;
962
+ value: number;
963
+ }
964
+ interface NestedAggregationResultsNonNullableFields {
965
+ values?: ValueResultsNonNullableFields;
966
+ ranges?: RangeResultsNonNullableFields;
967
+ scalar?: AggregationResultsScalarResultNonNullableFields;
968
+ name: string;
969
+ type: AggregationType;
970
+ fieldPath: string;
971
+ }
972
+ interface NestedValueAggregationResultNonNullableFields {
973
+ value: string;
974
+ nestedResults?: NestedAggregationResultsNonNullableFields;
975
+ }
976
+ interface GroupByValueResultsNonNullableFields {
977
+ results: NestedValueAggregationResultNonNullableFields[];
978
+ }
979
+ interface DateHistogramResultNonNullableFields {
980
+ value: string;
981
+ count: number;
982
+ }
983
+ interface DateHistogramResultsNonNullableFields {
984
+ results: DateHistogramResultNonNullableFields[];
985
+ }
986
+ interface AggregationResultsNonNullableFields {
987
+ values?: ValueResultsNonNullableFields;
988
+ ranges?: RangeResultsNonNullableFields;
989
+ scalar?: AggregationResultsScalarResultNonNullableFields;
990
+ groupedByValue?: GroupByValueResultsNonNullableFields;
991
+ dateHistogram?: DateHistogramResultsNonNullableFields;
992
+ name: string;
993
+ type: AggregationType;
994
+ fieldPath: string;
995
+ }
996
+ interface AggregationDataNonNullableFields {
997
+ results: AggregationResultsNonNullableFields[];
998
+ }
999
+ export interface SearchResourcesResponseNonNullableFields {
1000
+ resources: ResourceNonNullableFields[];
1001
+ aggregationData?: AggregationDataNonNullableFields;
1002
+ }
1003
+ export interface QueryResourcesResponseNonNullableFields {
1004
+ resources: ResourceNonNullableFields[];
1005
+ }
1006
+ export interface CountResourcesResponseNonNullableFields {
1007
+ count: number;
1008
+ }
1009
+ export interface BaseEventMetadata {
1010
+ /** App instance ID. */
1011
+ instanceId?: string | null;
1012
+ /** Event type. */
1013
+ eventType?: string;
1014
+ /** The identification type and identity data. */
1015
+ identity?: IdentificationData;
1016
+ }
1017
+ export interface EventMetadata extends BaseEventMetadata {
1018
+ /**
1019
+ * Unique event ID.
1020
+ * Allows clients to ignore duplicate webhooks.
1021
+ */
1022
+ _id?: string;
1023
+ /**
1024
+ * Assumes actions are also always typed to an entity_type
1025
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1026
+ */
1027
+ entityFqdn?: string;
1028
+ /**
1029
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1030
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1031
+ * Example: created/updated/deleted/started/completed/email_opened
1032
+ */
1033
+ slug?: string;
1034
+ /** ID of the entity associated with the event. */
1035
+ entityId?: string;
1036
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1037
+ eventTime?: Date | null;
1038
+ /**
1039
+ * Whether the event was triggered as a result of a privacy regulation application
1040
+ * (for example, GDPR).
1041
+ */
1042
+ triggeredByAnonymizeRequest?: boolean | null;
1043
+ /** If present, indicates the action that triggered the event. */
1044
+ originatedFrom?: string | null;
1045
+ /**
1046
+ * A sequence number defining the order of updates to the underlying entity.
1047
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1048
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1049
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1050
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1051
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1052
+ */
1053
+ entityEventSequence?: string | null;
1054
+ }
1055
+ export interface ResourceCreatedEnvelope {
1056
+ entity: Resource;
1057
+ metadata: EventMetadata;
1058
+ }
1059
+ /**
1060
+ * Triggered for each resource that is created.
1061
+ *
1062
+ * This event has the same structure as [Resource Created](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-v2/create-resource#resource-created).
1063
+ * @webhook
1064
+ * @eventType wix.bookings.resources.v2.resource_created
1065
+ * @documentationMaturity preview
1066
+ */
1067
+ export declare function onResourceCreated(handler: (event: ResourceCreatedEnvelope) => void | Promise<void>): void;
1068
+ export interface ResourceDeletedEnvelope {
1069
+ metadata: EventMetadata;
1070
+ }
1071
+ /**
1072
+ * Triggered for each resource that is deleted.
1073
+ *
1074
+ * This event has the same structure as [Resource Deleted](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-v2/bulk-delete-resources#resource-deleted).
1075
+ * @webhook
1076
+ * @eventType wix.bookings.resources.v2.resource_deleted
1077
+ * @documentationMaturity preview
1078
+ */
1079
+ export declare function onResourceDeleted(handler: (event: ResourceDeletedEnvelope) => void | Promise<void>): void;
1080
+ export interface ResourceUpdatedEnvelope {
1081
+ entity: Resource;
1082
+ metadata: EventMetadata;
1083
+ }
1084
+ /**
1085
+ * Triggered when a resource is updated.
1086
+ * @webhook
1087
+ * @eventType wix.bookings.resources.v2.resource_updated
1088
+ * @documentationMaturity preview
1089
+ */
1090
+ export declare function onResourceUpdated(handler: (event: ResourceUpdatedEnvelope) => void | Promise<void>): void;
1091
+ /**
1092
+ * Creates a new resource.
1093
+ *
1094
+ * A new events schedule is automatically created specific to this resource. This schedule will contain information
1095
+ * on when the resource is booked in order to prevent double bookings.
1096
+ * See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information.
1097
+ *
1098
+ * - If the request does not include the field `locationOptions`, then the service will create this field and set
1099
+ * `availableInAllLocations` in this structure to `true`.
1100
+ * - If the request includes one or more business location IDs in the `locationOptions.specificLocationOptions.businessLocations`
1101
+ * field, then the field `locationOptions.specificLocationOptions.availableInBusinessLocations` must be set
1102
+ * to `true`.
1103
+ * @param resource - Resource to create.
1104
+ * @public
1105
+ * @documentationMaturity preview
1106
+ * @requiredField resource
1107
+ * @requiredField resource.name
1108
+ * @permissionId BOOKINGS.RESOURCE_CREATE
1109
+ * @permissionScope Manage Bookings
1110
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1111
+ * @permissionScope Manage Bookings - all permissions
1112
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1113
+ * @applicableIdentity APP
1114
+ * @returns The created resource.
1115
+ * @fqn wix.bookings.resources.v2.ResourcesService.CreateResource
1116
+ */
1117
+ export declare function createResource(resource: Resource): Promise<Resource & ResourceNonNullableFields>;
1118
+ /**
1119
+ * Creates multiple resources.
1120
+ * @param resources - Resources to create.
1121
+ * @public
1122
+ * @documentationMaturity preview
1123
+ * @requiredField resources
1124
+ * @requiredField resources.name
1125
+ * @permissionId BOOKINGS.RESOURCE_CREATE
1126
+ * @permissionScope Manage Bookings
1127
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1128
+ * @permissionScope Manage Bookings - all permissions
1129
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1130
+ * @applicableIdentity APP
1131
+ * @fqn wix.bookings.resources.v2.ResourcesService.BulkCreateResources
1132
+ */
1133
+ export declare function bulkCreateResources(resources: Resource[], options?: BulkCreateResourcesOptions): Promise<BulkCreateResourcesResponse & BulkCreateResourcesResponseNonNullableFields>;
1134
+ export interface BulkCreateResourcesOptions {
1135
+ /** Whether to include the created resources in the response. Default: `false` */
1136
+ returnEntity?: boolean;
1137
+ }
1138
+ /**
1139
+ * Retrieves a resource by ID.
1140
+ * @param resourceId - ID of the resource to retrieve.
1141
+ * @public
1142
+ * @documentationMaturity preview
1143
+ * @requiredField resourceId
1144
+ * @permissionId BOOKINGS.RESOURCE_READ
1145
+ * @permissionScope Read Bookings - Public Data
1146
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1147
+ * @permissionScope Manage Bookings
1148
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1149
+ * @permissionScope Read Bookings - Including Participants
1150
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
1151
+ * @permissionScope Read Bookings - all read permissions
1152
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
1153
+ * @permissionScope Manage Bookings - all permissions
1154
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1155
+ * @applicableIdentity APP
1156
+ * @applicableIdentity VISITOR
1157
+ * @returns The retrieved resource.
1158
+ * @fqn wix.bookings.resources.v2.ResourcesService.GetResource
1159
+ */
1160
+ export declare function getResource(resourceId: string): Promise<Resource & ResourceNonNullableFields>;
1161
+ /**
1162
+ * Updates a resource.
1163
+ *
1164
+ * Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.
1165
+ * This ensures you're working with the latest service information and prevents unintended overwrites.
1166
+ * @param _id - Resource ID.
1167
+ * @public
1168
+ * @documentationMaturity preview
1169
+ * @requiredField _id
1170
+ * @requiredField resource
1171
+ * @requiredField resource.revision
1172
+ * @permissionId BOOKINGS.RESOURCE_UPDATE
1173
+ * @permissionScope Manage Bookings
1174
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1175
+ * @permissionScope Manage Bookings - all permissions
1176
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1177
+ * @applicableIdentity APP
1178
+ * @returns The updated resource.
1179
+ * @fqn wix.bookings.resources.v2.ResourcesService.UpdateResource
1180
+ */
1181
+ export declare function updateResource(_id: string | null, resource: UpdateResource): Promise<Resource & ResourceNonNullableFields>;
1182
+ export interface UpdateResource {
1183
+ /**
1184
+ * Resource ID.
1185
+ * @readonly
1186
+ */
1187
+ _id?: string | null;
1188
+ /**
1189
+ * Revision number, which increments by 1 each time the resource is updated.
1190
+ * To prevent conflicting changes,
1191
+ * the current revision must be passed when updating the resource.
1192
+ * @readonly
1193
+ */
1194
+ revision?: string | null;
1195
+ /**
1196
+ * Represents the time in `YYYY-MM-DDThh:mm:ss.sssZ` format this resource was created.
1197
+ * @readonly
1198
+ */
1199
+ _createdDate?: Date | null;
1200
+ /**
1201
+ * Represents the time in `YYYY-MM-DDThh:mm:ss.sssZ` format this resource was last updated.
1202
+ * @readonly
1203
+ */
1204
+ _updatedDate?: Date | null;
1205
+ /** Name of the resource. */
1206
+ name?: string | null;
1207
+ /**
1208
+ * ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-type-v2/introduction).
1209
+ *
1210
+ * Once a type has been set it can't be modified. You can create a resource
1211
+ * without specifying a type. However, such resources cannot be booked.
1212
+ */
1213
+ typeId?: string | null;
1214
+ /**
1215
+ * Schedule details that specify the working hours and locations of this resource.
1216
+ *
1217
+ * Resources without this field are available 24/7 at the locations specified in the field `locationOptions`.
1218
+ * When both `workingHoursSchedules` and `locationOptions` are set then `workingHoursSchedules` takes precedence.
1219
+ */
1220
+ workingHoursSchedules?: WorkingHoursSchedules;
1221
+ /** Location details that specify where this resource is available. */
1222
+ locationOptions?: LocationOptions;
1223
+ /**
1224
+ * This schedule contains the sessions in which this resource has been booked.
1225
+ * @readonly
1226
+ */
1227
+ eventsSchedule?: EventsSchedule;
1228
+ /** Extensions enabling users to save custom data related to the resource. */
1229
+ extendedFields?: ExtendedFields;
1230
+ }
1231
+ /**
1232
+ * Deletes a resource.
1233
+ *
1234
+ * Also cancels the associated events schedule and any working hours schedule that isn’t shared among multiple resources.
1235
+ * @param resourceId - ID of the resource to delete.
1236
+ * @public
1237
+ * @documentationMaturity preview
1238
+ * @requiredField resourceId
1239
+ * @permissionId BOOKINGS.RESOURCE_DELETE
1240
+ * @permissionScope Manage Bookings
1241
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1242
+ * @permissionScope Manage Bookings - all permissions
1243
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1244
+ * @applicableIdentity APP
1245
+ * @fqn wix.bookings.resources.v2.ResourcesService.DeleteResource
1246
+ */
1247
+ export declare function deleteResource(resourceId: string): Promise<void>;
1248
+ /**
1249
+ * Deletes multiple resources.
1250
+ * @param ids - The IDs of the resources to delete.
1251
+ * @public
1252
+ * @documentationMaturity preview
1253
+ * @requiredField ids
1254
+ * @permissionId BOOKINGS.RESOURCE_DELETE
1255
+ * @permissionScope Manage Bookings
1256
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1257
+ * @permissionScope Manage Bookings - all permissions
1258
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1259
+ * @applicableIdentity APP
1260
+ * @fqn wix.bookings.resources.v2.ResourcesService.BulkDeleteResources
1261
+ */
1262
+ export declare function bulkDeleteResources(ids: string[]): Promise<BulkDeleteResourcesResponse & BulkDeleteResourcesResponseNonNullableFields>;
1263
+ /**
1264
+ * Retrieves a list of resources matching the provided search criteria.
1265
+ *
1266
+ * The search endpoints allow to perform advanced search including partial text search, exact match, and more.
1267
+ * The endpoint also allows to aggregate resources by type, name, app id, management type, management type and location options.
1268
+ * @public
1269
+ * @documentationMaturity preview
1270
+ * @permissionId BOOKINGS.RESOURCE_READ
1271
+ * @permissionScope Read Bookings - Public Data
1272
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1273
+ * @permissionScope Manage Bookings
1274
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1275
+ * @permissionScope Read Bookings - Including Participants
1276
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
1277
+ * @permissionScope Read Bookings - all read permissions
1278
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
1279
+ * @permissionScope Manage Bookings - all permissions
1280
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1281
+ * @applicableIdentity APP
1282
+ * @applicableIdentity VISITOR
1283
+ * @fqn wix.bookings.resources.v2.ResourcesService.SearchResources
1284
+ */
1285
+ export declare function searchResources(options?: SearchResourcesOptions): Promise<SearchResourcesResponse & SearchResourcesResponseNonNullableFields>;
1286
+ export interface SearchResourcesOptions {
1287
+ /** Search condition */
1288
+ search?: CursorSearch;
1289
+ }
1290
+ /**
1291
+ * Creates a query to retrieve a list of resources.
1292
+ *
1293
+ * The `queryResources()` function builds a query to retrieve a list of resources and returns a `ResourcesQueryBuilder` object.
1294
+ *
1295
+ * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/resources-query-builder/find) function.
1296
+ *
1297
+ * You can refine the query by chaining `ResourcesQueryBuilder` functions onto the query. `ResourcesQueryBuilder` functions enable you to sort, filter, and control the results that `queryResources()` returns.
1298
+ *
1299
+ * `queryResources()` runs with the following `ResourcesQueryBuilder` default that you can override:
1300
+ *
1301
+ * + `limit` is `50`.
1302
+ * + Sorted by `id` in ascending order.
1303
+ *
1304
+ * The functions that are chained to `queryResources()` are applied in the order they are called. For example, if you apply `ascending("typeId")` and then `ascending("id")`, the results are sorted first by the `"typeId"`, and then, if there are multiple results with the same `"typeId"`, the items are sorted by `"id"`.
1305
+ *
1306
+ * The following `ResourcesQueryBuilder` functions are supported for the `queryResources()` function. For a full description of the resource object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/resources-query-result/items) property in `ResourcesQueryResult`.
1307
+ * @public
1308
+ * @documentationMaturity preview
1309
+ * @permissionScope Read Bookings - Public Data
1310
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1311
+ * @permissionScope Manage Bookings
1312
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1313
+ * @permissionScope Read Bookings - Including Participants
1314
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
1315
+ * @permissionScope Read Bookings - all read permissions
1316
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
1317
+ * @permissionScope Manage Bookings - all permissions
1318
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1319
+ * @permissionId BOOKINGS.RESOURCE_READ
1320
+ * @applicableIdentity APP
1321
+ * @applicableIdentity VISITOR
1322
+ * @fqn wix.bookings.resources.v2.ResourcesService.QueryResources
1323
+ */
1324
+ export declare function queryResources(): ResourcesQueryBuilder;
1325
+ interface QueryCursorResult {
1326
+ cursors: Cursors;
1327
+ hasNext: () => boolean;
1328
+ hasPrev: () => boolean;
1329
+ length: number;
1330
+ pageSize: number;
1331
+ }
1332
+ export interface ResourcesQueryResult extends QueryCursorResult {
1333
+ items: Resource[];
1334
+ query: ResourcesQueryBuilder;
1335
+ next: () => Promise<ResourcesQueryResult>;
1336
+ prev: () => Promise<ResourcesQueryResult>;
1337
+ }
1338
+ export interface ResourcesQueryBuilder {
1339
+ /** @param propertyName - Property whose value is compared with `value`.
1340
+ * @param value - Value to compare against.
1341
+ * @documentationMaturity preview
1342
+ */
1343
+ eq: (propertyName: 'singleResource.locationOptions.availableInAllLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations' | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'locationOptions.availableInAllLocations' | 'eventsSchedule.scheduleId', value: any) => ResourcesQueryBuilder;
1344
+ /** @param propertyName - Property whose value is compared with `value`.
1345
+ * @param value - Value to compare against.
1346
+ * @documentationMaturity preview
1347
+ */
1348
+ ne: (propertyName: 'singleResource.locationOptions.availableInAllLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations' | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'locationOptions.availableInAllLocations' | 'eventsSchedule.scheduleId', value: any) => ResourcesQueryBuilder;
1349
+ /** @param propertyName - Property whose value is compared with `value`.
1350
+ * @param value - Value to compare against.
1351
+ * @documentationMaturity preview
1352
+ */
1353
+ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder;
1354
+ /** @param propertyName - Property whose value is compared with `value`.
1355
+ * @param value - Value to compare against.
1356
+ * @documentationMaturity preview
1357
+ */
1358
+ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder;
1359
+ /** @param propertyName - Property whose value is compared with `value`.
1360
+ * @param value - Value to compare against.
1361
+ * @documentationMaturity preview
1362
+ */
1363
+ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder;
1364
+ /** @param propertyName - Property whose value is compared with `value`.
1365
+ * @param value - Value to compare against.
1366
+ * @documentationMaturity preview
1367
+ */
1368
+ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder;
1369
+ /** @param propertyName - Property whose value is compared with `string`.
1370
+ * @param string - String to compare against. Case-insensitive.
1371
+ * @documentationMaturity preview
1372
+ */
1373
+ startsWith: (propertyName: 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | 'name' | 'typeId' | 'eventsSchedule.scheduleId', value: string) => ResourcesQueryBuilder;
1374
+ /** @param propertyName - Property whose value is compared with `values`.
1375
+ * @param values - List of values to compare against.
1376
+ * @documentationMaturity preview
1377
+ */
1378
+ hasSome: (propertyName: 'singleResource.locationOptions.availableInAllLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations' | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'locationOptions.availableInAllLocations' | 'eventsSchedule.scheduleId', value: any[]) => ResourcesQueryBuilder;
1379
+ /** @documentationMaturity preview */
1380
+ in: (propertyName: 'singleResource.locationOptions.availableInAllLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations' | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'locationOptions.availableInAllLocations' | 'eventsSchedule.scheduleId', value: any) => ResourcesQueryBuilder;
1381
+ /** @documentationMaturity preview */
1382
+ exists: (propertyName: 'singleResource.locationOptions.availableInAllLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations' | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'locationOptions.availableInAllLocations' | 'eventsSchedule.scheduleId', value: boolean) => ResourcesQueryBuilder;
1383
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1384
+ * @documentationMaturity preview
1385
+ */
1386
+ ascending: (...propertyNames: Array<'singleResource.locationOptions.availableInAllLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInCustomerLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInCustomLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations' | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'type' | 'typeId' | 'locationOptions.availableInAllLocations' | 'eventsSchedule.scheduleId' | 'appId' | 'managementType'>) => ResourcesQueryBuilder;
1387
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1388
+ * @documentationMaturity preview
1389
+ */
1390
+ descending: (...propertyNames: Array<'singleResource.locationOptions.availableInAllLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInCustomerLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInCustomLocations' | 'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations' | 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'type' | 'typeId' | 'locationOptions.availableInAllLocations' | 'eventsSchedule.scheduleId' | 'appId' | 'managementType'>) => ResourcesQueryBuilder;
1391
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1392
+ * @documentationMaturity preview
1393
+ */
1394
+ limit: (limit: number) => ResourcesQueryBuilder;
1395
+ /** @param cursor - A pointer to specific record
1396
+ * @documentationMaturity preview
1397
+ */
1398
+ skipTo: (cursor: string) => ResourcesQueryBuilder;
1399
+ /** @documentationMaturity preview */
1400
+ find: () => Promise<ResourcesQueryResult>;
1401
+ }
1402
+ /**
1403
+ * Counts resources according to given criteria.
1404
+ *
1405
+ * Use [WQL filter](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section) to define the criteria.
1406
+ * @public
1407
+ * @documentationMaturity preview
1408
+ * @param options - Filter to base the count on. See
1409
+ * [queryResources()](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/query-resources)
1410
+ * for supported filters.
1411
+ * @permissionId BOOKINGS.RESOURCE_READ
1412
+ * @permissionScope Read Bookings - Public Data
1413
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1414
+ * @permissionScope Manage Bookings
1415
+ * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
1416
+ * @permissionScope Read Bookings - Including Participants
1417
+ * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
1418
+ * @permissionScope Read Bookings - all read permissions
1419
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
1420
+ * @permissionScope Manage Bookings - all permissions
1421
+ * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
1422
+ * @applicableIdentity APP
1423
+ * @applicableIdentity VISITOR
1424
+ * @fqn wix.bookings.resources.v2.ResourcesService.CountResources
1425
+ */
1426
+ export declare function countResources(options?: CountResourcesOptions): Promise<CountResourcesResponse & CountResourcesResponseNonNullableFields>;
1427
+ export interface CountResourcesOptions {
1428
+ /** Filter to apply on resources to count. */
1429
+ filter?: Record<string, any> | null;
1430
+ /**
1431
+ * @deprecated
1432
+ * @targetRemovalDate 2024-05-01
1433
+ */
1434
+ search?: SearchDetails;
1435
+ }
1436
+ export {};