@wix/auto_sdk_bookings_resources 1.0.56 → 1.0.57
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/{bookings-resources-v2-resource-resources.universal-CLt-Jfz-.d.ts → bookings-resources-v2-resource-resources.universal-8jOjAHjX.d.ts} +27 -60
- package/build/cjs/index.d.ts +10 -18
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +4 -4
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +16 -34
- package/build/cjs/meta.js.map +1 -1
- package/build/es/{bookings-resources-v2-resource-resources.universal-CLt-Jfz-.d.mts → bookings-resources-v2-resource-resources.universal-8jOjAHjX.d.mts} +27 -60
- package/build/es/index.d.mts +10 -18
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +4 -4
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +16 -34
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/{bookings-resources-v2-resource-resources.universal-CLt-Jfz-.d.ts → bookings-resources-v2-resource-resources.universal-8jOjAHjX.d.ts} +27 -60
- package/build/internal/cjs/index.d.ts +10 -18
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +4 -4
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +16 -34
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/{bookings-resources-v2-resource-resources.universal-CLt-Jfz-.d.mts → bookings-resources-v2-resource-resources.universal-8jOjAHjX.d.mts} +27 -60
- package/build/internal/es/index.d.mts +10 -18
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +4 -4
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +16 -34
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -2,8 +2,7 @@ import { SearchSpec, Search, NonNullablePaths } from '@wix/sdk-types';
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A resource represents an entity, such as a room or a staff member, that can be
|
|
5
|
-
* scheduled for use in a
|
|
6
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/about-the-bookings-apis)).
|
|
5
|
+
* scheduled for use in a [booking](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/about-the-bookings-apis).
|
|
7
6
|
* The availability of a resource is tracked to ensure that it
|
|
8
7
|
* can be allocated at a requested time slot and to prevent double bookings.
|
|
9
8
|
*/
|
|
@@ -38,8 +37,7 @@ interface Resource extends ResourceCompositionDetailsOneOf {
|
|
|
38
37
|
*/
|
|
39
38
|
name?: string | null;
|
|
40
39
|
/**
|
|
41
|
-
* ID of the
|
|
42
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resource-types/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction)).
|
|
40
|
+
* ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction).
|
|
43
41
|
*
|
|
44
42
|
* Once a type has been set it can't be modified. You can create a resource
|
|
45
43
|
* without specifying a type. However, customers can't book such resources.
|
|
@@ -48,8 +46,7 @@ interface Resource extends ResourceCompositionDetailsOneOf {
|
|
|
48
46
|
*/
|
|
49
47
|
typeId?: string | null;
|
|
50
48
|
/**
|
|
51
|
-
* Information about the
|
|
52
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction))
|
|
49
|
+
* Information about the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)
|
|
53
50
|
* specifying the working hours and locations of the resource.
|
|
54
51
|
*
|
|
55
52
|
* Resources without a working hour schedule are available 24/7 at the locations
|
|
@@ -61,8 +58,7 @@ interface Resource extends ResourceCompositionDetailsOneOf {
|
|
|
61
58
|
/** Information about the location where the resource is available. */
|
|
62
59
|
locationOptions?: LocationOptions;
|
|
63
60
|
/**
|
|
64
|
-
* Schedule containing the
|
|
65
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction))
|
|
61
|
+
* Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)
|
|
66
62
|
* for which the resource has been booked.
|
|
67
63
|
* @readonly
|
|
68
64
|
*/
|
|
@@ -75,8 +71,7 @@ interface ResourceCompositionDetailsOneOf {
|
|
|
75
71
|
}
|
|
76
72
|
interface WorkingHoursSchedule {
|
|
77
73
|
/**
|
|
78
|
-
* ID of the working hour
|
|
79
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).
|
|
74
|
+
* ID of the working hour [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction).
|
|
80
75
|
* @format GUID
|
|
81
76
|
*/
|
|
82
77
|
scheduleId?: string | null;
|
|
@@ -106,8 +101,7 @@ interface SingleResource {
|
|
|
106
101
|
*/
|
|
107
102
|
locationOptions?: LocationOptions;
|
|
108
103
|
/**
|
|
109
|
-
* Schedule containing the
|
|
110
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction))
|
|
104
|
+
* Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)
|
|
111
105
|
* for which the resource has been booked.
|
|
112
106
|
* @readonly
|
|
113
107
|
*/
|
|
@@ -137,8 +131,7 @@ interface Schedule {
|
|
|
137
131
|
}
|
|
138
132
|
interface LocationOptions {
|
|
139
133
|
/**
|
|
140
|
-
* Whether the resource is available in all
|
|
141
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-locations#backend-modules_bookings_services_location-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types)).
|
|
134
|
+
* Whether the resource is available in all [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).
|
|
142
135
|
*
|
|
143
136
|
* - `true`: The resource is available in all business locations.
|
|
144
137
|
* - `false`: The resource is available only in specific locations.
|
|
@@ -151,8 +144,7 @@ interface LocationOptions {
|
|
|
151
144
|
}
|
|
152
145
|
interface SpecificLocation {
|
|
153
146
|
/**
|
|
154
|
-
* Whether the resource is available in
|
|
155
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-locations#backend-modules_bookings_services_location-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types)).
|
|
147
|
+
* Whether the resource is available in [business locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types).
|
|
156
148
|
*
|
|
157
149
|
* - `true`: The resource is available in business locations.
|
|
158
150
|
* - `false`: The resource isn't available in business locations.
|
|
@@ -171,8 +163,7 @@ interface SpecificLocation {
|
|
|
171
163
|
}
|
|
172
164
|
interface BusinessLocation {
|
|
173
165
|
/**
|
|
174
|
-
* ID of the business
|
|
175
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)).
|
|
166
|
+
* ID of the business [location](https://dev.wix.com/docs/rest/business-management/locations/introduction).
|
|
176
167
|
* @format GUID
|
|
177
168
|
*/
|
|
178
169
|
locationId?: string | null;
|
|
@@ -186,8 +177,7 @@ interface WorkingHoursSchedules {
|
|
|
186
177
|
}
|
|
187
178
|
interface EventsSchedule {
|
|
188
179
|
/**
|
|
189
|
-
* ID of the event
|
|
190
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).
|
|
180
|
+
* ID of the event [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction).
|
|
191
181
|
* @format GUID
|
|
192
182
|
*/
|
|
193
183
|
scheduleId?: string | null;
|
|
@@ -447,7 +437,7 @@ interface SearchResourcesRequest {
|
|
|
447
437
|
/**
|
|
448
438
|
* Search criteria including filter, sort, aggregations, and paging options.
|
|
449
439
|
*
|
|
450
|
-
* Refer to the supported filters article
|
|
440
|
+
* Refer to the [supported filters article](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/filtering-and-sorting) for complete filter and sorting options.
|
|
451
441
|
*/
|
|
452
442
|
search?: CursorSearch;
|
|
453
443
|
}
|
|
@@ -460,13 +450,13 @@ interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
|
460
450
|
/**
|
|
461
451
|
* Filter object for narrowing search results. For example, to return only resources available at specific business locations: `"filter": {"single_resource.location_options.specific_location_options.business_locations.location_id": {"$in": ["location-id-1", "location-id-2"]}}`.
|
|
462
452
|
*
|
|
463
|
-
* Learn more about the filter format in the supported filters article
|
|
453
|
+
* Learn more about the filter format in the [supported filters article](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting).
|
|
464
454
|
*/
|
|
465
455
|
filter?: Record<string, any> | null;
|
|
466
456
|
/**
|
|
467
457
|
* Array of sort objects specifying result order. For example, to sort by resource name in ascending order: `"sort": [{"fieldName": "name", "order": "ASC"}]`.
|
|
468
458
|
*
|
|
469
|
-
* Learn more about the sort format in the supported filters article
|
|
459
|
+
* Learn more about the sort format in the [supported filters article](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting).
|
|
470
460
|
* @maxSize 10
|
|
471
461
|
*/
|
|
472
462
|
sort?: Sorting[];
|
|
@@ -1009,11 +999,7 @@ interface AggregationResultsResultOneOf {
|
|
|
1009
999
|
nested?: NestedResults;
|
|
1010
1000
|
}
|
|
1011
1001
|
interface QueryResourcesRequest {
|
|
1012
|
-
/**
|
|
1013
|
-
* Query for retrieving resources. Refer to the *supported filters article*
|
|
1014
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))
|
|
1015
|
-
* for a complete list of supported filters.
|
|
1016
|
-
*/
|
|
1002
|
+
/** Query for retrieving resources. Refer to the [supported filters article](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/filtering-and-sorting) for a complete list of supported filters. */
|
|
1017
1003
|
query?: CursorQuery;
|
|
1018
1004
|
}
|
|
1019
1005
|
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
@@ -1047,11 +1033,7 @@ interface QueryResourcesResponse {
|
|
|
1047
1033
|
pagingMetadata?: CursorPagingMetadata;
|
|
1048
1034
|
}
|
|
1049
1035
|
interface CountResourcesRequest {
|
|
1050
|
-
/**
|
|
1051
|
-
* Filter to base the count on. Refer to the *supported filters article*
|
|
1052
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))
|
|
1053
|
-
* for a complete list of supported filters.
|
|
1054
|
-
*/
|
|
1036
|
+
/** Filter to base the count on. Refer to the [supported filters article](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/filtering-and-sorting) for a complete list of supported filters. */
|
|
1055
1037
|
filter?: Record<string, any> | null;
|
|
1056
1038
|
/**
|
|
1057
1039
|
* Free text to match in searchable fields. Field is deprecated due to decision to use query instead of search for performing the count.
|
|
@@ -1388,8 +1370,7 @@ declare function onResourceUpdated(handler: (event: ResourceUpdatedEnvelope) =>
|
|
|
1388
1370
|
*
|
|
1389
1371
|
* ### Connected schedules
|
|
1390
1372
|
*
|
|
1391
|
-
* A new event
|
|
1392
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration))
|
|
1373
|
+
* A new event [schedule](https://dev.wix.com/docs/api-reference/business-management/calendar/wix-bookings-integration)
|
|
1393
1374
|
* is automatically created for the resource.
|
|
1394
1375
|
*
|
|
1395
1376
|
* ### Locations
|
|
@@ -1416,8 +1397,7 @@ declare function createResource(resource: NonNullablePaths<Resource, `name`, 2>)
|
|
|
1416
1397
|
* Creates up to 50 resources.
|
|
1417
1398
|
*
|
|
1418
1399
|
*
|
|
1419
|
-
* Refer to
|
|
1420
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/create-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/create-resource))
|
|
1400
|
+
* Refer to [Create Resource](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/create-resource)
|
|
1421
1401
|
* for more details.
|
|
1422
1402
|
* @param resources - Resources to create.
|
|
1423
1403
|
* @public
|
|
@@ -1499,8 +1479,7 @@ interface UpdateResource {
|
|
|
1499
1479
|
*/
|
|
1500
1480
|
name?: string | null;
|
|
1501
1481
|
/**
|
|
1502
|
-
* ID of the
|
|
1503
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resource-types/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction)).
|
|
1482
|
+
* ID of the [resource type](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction).
|
|
1504
1483
|
*
|
|
1505
1484
|
* Once a type has been set it can't be modified. You can create a resource
|
|
1506
1485
|
* without specifying a type. However, customers can't book such resources.
|
|
@@ -1509,8 +1488,7 @@ interface UpdateResource {
|
|
|
1509
1488
|
*/
|
|
1510
1489
|
typeId?: string | null;
|
|
1511
1490
|
/**
|
|
1512
|
-
* Information about the
|
|
1513
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction))
|
|
1491
|
+
* Information about the [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)
|
|
1514
1492
|
* specifying the working hours and locations of the resource.
|
|
1515
1493
|
*
|
|
1516
1494
|
* Resources without a working hour schedule are available 24/7 at the locations
|
|
@@ -1522,8 +1500,7 @@ interface UpdateResource {
|
|
|
1522
1500
|
/** Information about the location where the resource is available. */
|
|
1523
1501
|
locationOptions?: LocationOptions;
|
|
1524
1502
|
/**
|
|
1525
|
-
* Schedule containing the
|
|
1526
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction))
|
|
1503
|
+
* Schedule containing the [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction)
|
|
1527
1504
|
* for which the resource has been booked.
|
|
1528
1505
|
* @readonly
|
|
1529
1506
|
*/
|
|
@@ -1535,8 +1512,7 @@ interface UpdateResource {
|
|
|
1535
1512
|
* Updates multiple resources.
|
|
1536
1513
|
*
|
|
1537
1514
|
*
|
|
1538
|
-
* Refer to
|
|
1539
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/update-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/update-resource))
|
|
1515
|
+
* Refer to [Update Resource](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/update-resource)
|
|
1540
1516
|
* for more details.
|
|
1541
1517
|
* @param resources - Resources to update.
|
|
1542
1518
|
* @public
|
|
@@ -1565,8 +1541,7 @@ interface BulkUpdateResourcesOptions {
|
|
|
1565
1541
|
*
|
|
1566
1542
|
* Deleting a resource cancels its event schedule and all its working hour
|
|
1567
1543
|
* schedules that aren't shared with another resource. Learn more about
|
|
1568
|
-
*
|
|
1569
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration)).
|
|
1544
|
+
* [how Bookings uses the Calendar APIs](https://dev.wix.com/docs/api-reference/business-management/calendar/wix-bookings-integration).
|
|
1570
1545
|
* @param resourceId - ID of the resource to delete.
|
|
1571
1546
|
* @public
|
|
1572
1547
|
* @requiredField resourceId
|
|
@@ -1579,8 +1554,7 @@ declare function deleteResource(resourceId: string): Promise<void>;
|
|
|
1579
1554
|
* Deletes multiple resources.
|
|
1580
1555
|
*
|
|
1581
1556
|
*
|
|
1582
|
-
* Refer to
|
|
1583
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/delete-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/delete-resource))
|
|
1557
|
+
* Refer to [Delete Resource](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/delete-resource)
|
|
1584
1558
|
* for more details.
|
|
1585
1559
|
* @param ids - IDs of the resources to delete.
|
|
1586
1560
|
* @public
|
|
@@ -1658,13 +1632,13 @@ type ResourceSearch = {
|
|
|
1658
1632
|
/**
|
|
1659
1633
|
Filter object for narrowing search results. For example, to return only resources available at specific business locations: `"filter": {"single_resource.location_options.specific_location_options.business_locations.location_id": {"$in": ["location-id-1", "location-id-2"]}}`.
|
|
1660
1634
|
|
|
1661
|
-
Learn more about the filter format in the supported filters article
|
|
1635
|
+
Learn more about the filter format in the [supported filters article](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting).
|
|
1662
1636
|
*/
|
|
1663
1637
|
filter?: CommonSearchWithEntityContext['filter'] | null;
|
|
1664
1638
|
/**
|
|
1665
1639
|
Array of sort objects specifying result order. For example, to sort by resource name in ascending order: `"sort": [{"fieldName": "name", "order": "ASC"}]`.
|
|
1666
1640
|
|
|
1667
|
-
Learn more about the sort format in the supported filters article
|
|
1641
|
+
Learn more about the sort format in the [supported filters article](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting).
|
|
1668
1642
|
@maxSize: 10
|
|
1669
1643
|
*/
|
|
1670
1644
|
sort?: {
|
|
@@ -1842,10 +1816,7 @@ interface ResourcesQueryBuilder {
|
|
|
1842
1816
|
/**
|
|
1843
1817
|
* Counts resources according to given criteria.
|
|
1844
1818
|
*
|
|
1845
|
-
*
|
|
1846
|
-
* Refer to the *supported filters article*
|
|
1847
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))
|
|
1848
|
-
* for a complete list of supported filters and sorting options.
|
|
1819
|
+
* Refer to the [supported filters article](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/filtering-and-sorting) for a complete list of supported filters and sorting options.
|
|
1849
1820
|
* @public
|
|
1850
1821
|
* @param options - Filter to base the count on. See *the supported filters article* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting)) for a complete list of filtering options.
|
|
1851
1822
|
* @permissionId BOOKINGS.RESOURCE_READ
|
|
@@ -1854,11 +1825,7 @@ interface ResourcesQueryBuilder {
|
|
|
1854
1825
|
*/
|
|
1855
1826
|
declare function countResources(options?: CountResourcesOptions): Promise<NonNullablePaths<CountResourcesResponse, `count`, 2>>;
|
|
1856
1827
|
interface CountResourcesOptions {
|
|
1857
|
-
/**
|
|
1858
|
-
* Filter to base the count on. Refer to the *supported filters article*
|
|
1859
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))
|
|
1860
|
-
* for a complete list of supported filters.
|
|
1861
|
-
*/
|
|
1828
|
+
/** Filter to base the count on. Refer to the [supported filters article](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/filtering-and-sorting) for a complete list of supported filters. */
|
|
1862
1829
|
filter?: Record<string, any> | null;
|
|
1863
1830
|
/**
|
|
1864
1831
|
* Free text to match in searchable fields. Field is deprecated due to decision to use query instead of search for performing the count.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { R as Resource, C as CreateResourceValidationErrors, B as BulkCreateResourcesOptions, a as BulkCreateResourcesResponse, b as BulkCreateResourcesValidationErrors, U as UpdateResource, c as UpdateResourceValidationErrors, M as MaskedResource, d as BulkUpdateResourcesOptions, e as BulkUpdateResourcesResponse, f as BulkUpdateResourcesValidationErrors, g as BulkDeleteResourcesResponse, h as ResourceSearch, S as SearchResourcesResponse, i as ResourcesQueryBuilder, j as CountResourcesOptions, k as CountResourcesResponse, l as ResourceCreatedEnvelope, m as ResourceDeletedEnvelope, n as ResourceUpdatedEnvelope } from './bookings-resources-v2-resource-resources.universal-
|
|
3
|
-
export { b5 as ActionEvent, ai as Aggregation, ax as AggregationData, aj as AggregationKindOneOf, aQ as AggregationResults, aR as AggregationResultsResultOneOf, aE as AggregationResultsScalarResult, A as AggregationType, bm as AggregationTypeWithLiterals, Q as ApplicationError, ba as BaseEventMetadata, T as BulkActionMetadata, K as BulkCreateResourcesRequest, ad as BulkDeleteResourcesRequest, O as BulkResourceResult, aa as BulkUpdateResourcesRequest, D as BusinessLocation, bp as CommonSearchWithEntityContext, aW as CountResourcesRequest, H as CreateResourceRequest, J as CreateResourceResponse, a0 as CursorPaging, a2 as CursorPagingMetadata, aT as CursorQuery, aU as CursorQueryPagingMethodOneOf, af as CursorSearch, ag as CursorSearchPagingMethodOneOf, a3 as Cursors, aq as DateHistogramAggregation, aM as DateHistogramResult, aO as DateHistogramResults, ab as DeleteResourceRequest, ac as DeleteResourceResponse, a$ as DomainEvent, b0 as DomainEventBodyOneOf, b6 as Empty, b1 as EntityCreatedEvent, b4 as EntityDeletedEvent, b3 as EntityUpdatedEvent, bb as EventMetadata, F as EventsSchedule, G as ExtendedFields, aX as FixResourceSchedulesRequest, aY as FixResourceSchedulesResponse, Z as GetDeletedResourceRequest, _ as GetDeletedResourceResponse, X as GetResourceRequest, Y as GetResourceResponse, au as GroupByAggregation, av as GroupByAggregationKindOneOf, aN as GroupByValueResults, b8 as IdentificationData, b9 as IdentificationDataIdOneOf, al as IncludeMissingValuesOptions, I as Interval, bl as IntervalWithLiterals, P as ItemMetadata, $ as ListDeletedResourcesRequest, a1 as ListDeletedResourcesResponse, L as LocationOptions, o as ManagementType, be as ManagementTypeWithLiterals, b7 as MessageEnvelope, s as MissingValues, bi as MissingValuesWithLiterals, u as Mode, bn as ModeWithLiterals, at as NestedAggregation, ar as NestedAggregationItem, as as NestedAggregationItemKindOneOf, aA as NestedAggregationResults, aB as NestedAggregationResultsResultOneOf, N as NestedAggregationType, bk as NestedAggregationTypeWithLiterals, aJ as NestedResultValue, aK as NestedResultValueResultOneOf, aP as NestedResults, aF as NestedValueAggregationResult, aS as QueryResourcesRequest, aV as QueryResourcesResponse, ao as RangeAggregation, az as RangeAggregationResult, ak as RangeBucket, aH as RangeResult, aD as RangeResults, aZ as ReindexTenantRequest, a_ as ReindexTenantResponse, a4 as RemoveResourceFromTrashBinRequest, a5 as RemoveResourceFromTrashBinResponse, v as ResourceCompositionDetailsOneOf, bc as ResourceSearchSpec, bd as ResourcesQueryResult, b2 as RestoreInfo, a6 as RestoreResourceFromTrashBinRequest, a7 as RestoreResourceFromTrashBinResponse, aL as Results, ap as ScalarAggregation, aI as ScalarResult, t as ScalarType, bj as ScalarTypeWithLiterals, y as Schedule, aw as SearchDetails, ae as SearchResourcesRequest, x as SingleResource, r as SortDirection, bh as SortDirectionWithLiterals, p as SortOrder, bf as SortOrderWithLiterals, q as SortType, bg as SortTypeWithLiterals, ah as Sorting, z as SpecificLocation, a8 as UpdateResourceRequest, a9 as UpdateResourceResponse, V as V2WorkingHoursSchedules, am as ValueAggregation, an as ValueAggregationOptionsOneOf, ay as ValueAggregationResult, aG as ValueResult, aC as ValueResults, W as WebhookIdentityType, bo as WebhookIdentityTypeWithLiterals, w as WorkingHoursSchedule, E as WorkingHoursSchedules } from './bookings-resources-v2-resource-resources.universal-
|
|
2
|
+
import { R as Resource, C as CreateResourceValidationErrors, B as BulkCreateResourcesOptions, a as BulkCreateResourcesResponse, b as BulkCreateResourcesValidationErrors, U as UpdateResource, c as UpdateResourceValidationErrors, M as MaskedResource, d as BulkUpdateResourcesOptions, e as BulkUpdateResourcesResponse, f as BulkUpdateResourcesValidationErrors, g as BulkDeleteResourcesResponse, h as ResourceSearch, S as SearchResourcesResponse, i as ResourcesQueryBuilder, j as CountResourcesOptions, k as CountResourcesResponse, l as ResourceCreatedEnvelope, m as ResourceDeletedEnvelope, n as ResourceUpdatedEnvelope } from './bookings-resources-v2-resource-resources.universal-8jOjAHjX.js';
|
|
3
|
+
export { b5 as ActionEvent, ai as Aggregation, ax as AggregationData, aj as AggregationKindOneOf, aQ as AggregationResults, aR as AggregationResultsResultOneOf, aE as AggregationResultsScalarResult, A as AggregationType, bm as AggregationTypeWithLiterals, Q as ApplicationError, ba as BaseEventMetadata, T as BulkActionMetadata, K as BulkCreateResourcesRequest, ad as BulkDeleteResourcesRequest, O as BulkResourceResult, aa as BulkUpdateResourcesRequest, D as BusinessLocation, bp as CommonSearchWithEntityContext, aW as CountResourcesRequest, H as CreateResourceRequest, J as CreateResourceResponse, a0 as CursorPaging, a2 as CursorPagingMetadata, aT as CursorQuery, aU as CursorQueryPagingMethodOneOf, af as CursorSearch, ag as CursorSearchPagingMethodOneOf, a3 as Cursors, aq as DateHistogramAggregation, aM as DateHistogramResult, aO as DateHistogramResults, ab as DeleteResourceRequest, ac as DeleteResourceResponse, a$ as DomainEvent, b0 as DomainEventBodyOneOf, b6 as Empty, b1 as EntityCreatedEvent, b4 as EntityDeletedEvent, b3 as EntityUpdatedEvent, bb as EventMetadata, F as EventsSchedule, G as ExtendedFields, aX as FixResourceSchedulesRequest, aY as FixResourceSchedulesResponse, Z as GetDeletedResourceRequest, _ as GetDeletedResourceResponse, X as GetResourceRequest, Y as GetResourceResponse, au as GroupByAggregation, av as GroupByAggregationKindOneOf, aN as GroupByValueResults, b8 as IdentificationData, b9 as IdentificationDataIdOneOf, al as IncludeMissingValuesOptions, I as Interval, bl as IntervalWithLiterals, P as ItemMetadata, $ as ListDeletedResourcesRequest, a1 as ListDeletedResourcesResponse, L as LocationOptions, o as ManagementType, be as ManagementTypeWithLiterals, b7 as MessageEnvelope, s as MissingValues, bi as MissingValuesWithLiterals, u as Mode, bn as ModeWithLiterals, at as NestedAggregation, ar as NestedAggregationItem, as as NestedAggregationItemKindOneOf, aA as NestedAggregationResults, aB as NestedAggregationResultsResultOneOf, N as NestedAggregationType, bk as NestedAggregationTypeWithLiterals, aJ as NestedResultValue, aK as NestedResultValueResultOneOf, aP as NestedResults, aF as NestedValueAggregationResult, aS as QueryResourcesRequest, aV as QueryResourcesResponse, ao as RangeAggregation, az as RangeAggregationResult, ak as RangeBucket, aH as RangeResult, aD as RangeResults, aZ as ReindexTenantRequest, a_ as ReindexTenantResponse, a4 as RemoveResourceFromTrashBinRequest, a5 as RemoveResourceFromTrashBinResponse, v as ResourceCompositionDetailsOneOf, bc as ResourceSearchSpec, bd as ResourcesQueryResult, b2 as RestoreInfo, a6 as RestoreResourceFromTrashBinRequest, a7 as RestoreResourceFromTrashBinResponse, aL as Results, ap as ScalarAggregation, aI as ScalarResult, t as ScalarType, bj as ScalarTypeWithLiterals, y as Schedule, aw as SearchDetails, ae as SearchResourcesRequest, x as SingleResource, r as SortDirection, bh as SortDirectionWithLiterals, p as SortOrder, bf as SortOrderWithLiterals, q as SortType, bg as SortTypeWithLiterals, ah as Sorting, z as SpecificLocation, a8 as UpdateResourceRequest, a9 as UpdateResourceResponse, V as V2WorkingHoursSchedules, am as ValueAggregation, an as ValueAggregationOptionsOneOf, ay as ValueAggregationResult, aG as ValueResult, aC as ValueResults, W as WebhookIdentityType, bo as WebhookIdentityTypeWithLiterals, w as WorkingHoursSchedule, E as WorkingHoursSchedules } from './bookings-resources-v2-resource-resources.universal-8jOjAHjX.js';
|
|
4
4
|
|
|
5
5
|
declare function createResource$1(httpClient: HttpClient): CreateResourceSignature;
|
|
6
6
|
interface CreateResourceSignature {
|
|
@@ -10,8 +10,7 @@ interface CreateResourceSignature {
|
|
|
10
10
|
*
|
|
11
11
|
* ### Connected schedules
|
|
12
12
|
*
|
|
13
|
-
* A new event
|
|
14
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration))
|
|
13
|
+
* A new event [schedule](https://dev.wix.com/docs/api-reference/business-management/calendar/wix-bookings-integration)
|
|
15
14
|
* is automatically created for the resource.
|
|
16
15
|
*
|
|
17
16
|
* ### Locations
|
|
@@ -35,8 +34,7 @@ interface BulkCreateResourcesSignature {
|
|
|
35
34
|
* Creates up to 50 resources.
|
|
36
35
|
*
|
|
37
36
|
*
|
|
38
|
-
* Refer to
|
|
39
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/create-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/create-resource))
|
|
37
|
+
* Refer to [Create Resource](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/create-resource)
|
|
40
38
|
* for more details.
|
|
41
39
|
* @param - Resources to create.
|
|
42
40
|
*/
|
|
@@ -74,8 +72,7 @@ interface BulkUpdateResourcesSignature {
|
|
|
74
72
|
* Updates multiple resources.
|
|
75
73
|
*
|
|
76
74
|
*
|
|
77
|
-
* Refer to
|
|
78
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/update-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/update-resource))
|
|
75
|
+
* Refer to [Update Resource](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/update-resource)
|
|
79
76
|
* for more details.
|
|
80
77
|
* @param - Resources to update.
|
|
81
78
|
*/
|
|
@@ -91,8 +88,7 @@ interface DeleteResourceSignature {
|
|
|
91
88
|
*
|
|
92
89
|
* Deleting a resource cancels its event schedule and all its working hour
|
|
93
90
|
* schedules that aren't shared with another resource. Learn more about
|
|
94
|
-
*
|
|
95
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration)).
|
|
91
|
+
* [how Bookings uses the Calendar APIs](https://dev.wix.com/docs/api-reference/business-management/calendar/wix-bookings-integration).
|
|
96
92
|
* @param - ID of the resource to delete.
|
|
97
93
|
*/
|
|
98
94
|
(resourceId: string): Promise<void>;
|
|
@@ -103,8 +99,7 @@ interface BulkDeleteResourcesSignature {
|
|
|
103
99
|
* Deletes multiple resources.
|
|
104
100
|
*
|
|
105
101
|
*
|
|
106
|
-
* Refer to
|
|
107
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/delete-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/delete-resource))
|
|
102
|
+
* Refer to [Delete Resource](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/delete-resource)
|
|
108
103
|
* for more details.
|
|
109
104
|
* @param - IDs of the resources to delete.
|
|
110
105
|
*/
|
|
@@ -116,10 +111,10 @@ interface SearchResourcesSignature {
|
|
|
116
111
|
* Retrieves a list of resources matching the provided search criteria.
|
|
117
112
|
*
|
|
118
113
|
*
|
|
119
|
-
* Refer to the supported filters article
|
|
114
|
+
* Refer to the [supported filters article](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/filtering-and-sorting) for complete filter and sorting options.
|
|
120
115
|
* @param - Search criteria including filter, sort, aggregations, and paging options.
|
|
121
116
|
*
|
|
122
|
-
* Refer to the supported filters article
|
|
117
|
+
* Refer to the [supported filters article](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/filtering-and-sorting) for complete filter and sorting options.
|
|
123
118
|
*/
|
|
124
119
|
(search: ResourceSearch): Promise<NonNullablePaths<SearchResourcesResponse, `resources` | `aggregationData.results` | `aggregationData.results.${number}.scalar.type` | `aggregationData.results.${number}.scalar.value` | `aggregationData.results.${number}.name` | `aggregationData.results.${number}.type` | `aggregationData.results.${number}.fieldPath`, 6>>;
|
|
125
120
|
}
|
|
@@ -150,10 +145,7 @@ interface CountResourcesSignature {
|
|
|
150
145
|
/**
|
|
151
146
|
* Counts resources according to given criteria.
|
|
152
147
|
*
|
|
153
|
-
*
|
|
154
|
-
* Refer to the *supported filters article*
|
|
155
|
-
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))
|
|
156
|
-
* for a complete list of supported filters and sorting options.
|
|
148
|
+
* Refer to the [supported filters article](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/filtering-and-sorting) for a complete list of supported filters and sorting options.
|
|
157
149
|
* @param - Filter to base the count on. See *the supported filters article* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting)) for a complete list of filtering options.
|
|
158
150
|
*/
|
|
159
151
|
(options?: CountResourcesOptions): Promise<NonNullablePaths<CountResourcesResponse, `count`, 2>>;
|