@wix/auto_sdk_bookings_resources 1.0.20 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{internal/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts → bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.mts} +328 -409
- package/build/{cjs/src/bookings-resources-v2-resource-resources.universal.d.ts → bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.ts} +328 -409
- package/build/index.d.mts +168 -0
- package/build/index.d.ts +168 -0
- package/build/index.js +883 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +837 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{es/src/bookings-resources-v2-resource-resources.universal.d.ts → bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.mts} +328 -409
- package/build/{es/src/bookings-resources-v2-resource-resources.universal.d.ts → internal/bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.ts} +328 -409
- package/build/internal/index.d.mts +168 -0
- package/build/internal/index.d.ts +168 -0
- package/build/internal/index.js +883 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +837 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/{es/src/bookings-resources-v2-resource-resources.types.d.ts → internal/meta.d.mts} +145 -347
- package/build/internal/{cjs/src/bookings-resources-v2-resource-resources.types.d.ts → meta.d.ts} +145 -347
- package/build/internal/meta.js +559 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +524 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{cjs/src/bookings-resources-v2-resource-resources.types.d.ts → meta.d.mts} +145 -347
- package/build/{internal/es/src/bookings-resources-v2-resource-resources.types.d.ts → meta.d.ts} +145 -347
- package/build/meta.js +559 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +524 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -27
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.js +0 -43
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.js +0 -446
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js +0 -199
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +0 -143
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.js +0 -106
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.js +0 -104
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js +0 -589
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -27
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
- package/build/es/src/bookings-resources-v2-resource-resources.context.js +0 -29
- package/build/es/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
- package/build/es/src/bookings-resources-v2-resource-resources.http.js +0 -434
- package/build/es/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
- package/build/es/src/bookings-resources-v2-resource-resources.meta.js +0 -164
- package/build/es/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.public.d.ts +0 -143
- package/build/es/src/bookings-resources-v2-resource-resources.public.js +0 -83
- package/build/es/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.types.js +0 -101
- package/build/es/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.universal.js +0 -554
- package/build/es/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -27
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js +0 -43
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js +0 -446
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js +0 -199
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +0 -143
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js +0 -106
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js +0 -104
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js +0 -589
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -27
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js +0 -29
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js +0 -434
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js +0 -164
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.d.ts +0 -143
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js +0 -83
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js +0 -101
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js +0 -554
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { R as Resource, B as BulkCreateResourcesOptions, a as BulkCreateResourcesResponse, U as UpdateResource, b as BulkDeleteResourcesResponse, c as ResourceSearch, S as SearchResourcesResponse, d as ResourcesQueryBuilder, C as CountResourcesOptions, e as CountResourcesResponse, f as ResourceCreatedEnvelope, g as ResourceDeletedEnvelope, h as ResourceUpdatedEnvelope } from './bookings-resources-v2-resource-resources.universal-BvcAlBYB.mjs';
|
|
3
|
+
export { aZ as ActionEvent, aa as Aggregation, ap as AggregationData, ab as AggregationKindOneOf, aI as AggregationResults, aJ as AggregationResultsResultOneOf, aw as AggregationResultsScalarResult, A as AggregationType, F as ApplicationError, b2 as BaseEventMetadata, G as BulkActionMetadata, y as BulkCreateResourcesRequest, a5 as BulkDeleteResourcesRequest, z as BulkResourceResult, t as BusinessLocation, aO as CountResourcesRequest, w as CreateResourceRequest, x as CreateResourceResponse, Q as CursorPaging, X as CursorPagingMetadata, aL as CursorQuery, aM as CursorQueryPagingMethodOneOf, a7 as CursorSearch, a8 as CursorSearchPagingMethodOneOf, Y as Cursors, ai as DateHistogramAggregation, aE as DateHistogramResult, aG as DateHistogramResults, a3 as DeleteResourceRequest, a4 as DeleteResourceResponse, aT as DomainEvent, aU as DomainEventBodyOneOf, a_ as Empty, aV as EntityCreatedEvent, aY as EntityDeletedEvent, aX as EntityUpdatedEvent, b3 as EventMetadata, E as EventsSchedule, v as ExtendedFields, aP as FixResourceSchedulesRequest, aQ as FixResourceSchedulesResponse, K as GetDeletedResourceRequest, O as GetDeletedResourceResponse, H as GetResourceRequest, J as GetResourceResponse, am as GroupByAggregation, an as GroupByAggregationKindOneOf, aF as GroupByValueResults, b0 as IdentificationData, b1 as IdentificationDataIdOneOf, ad as IncludeMissingValuesOptions, I as Interval, D as ItemMetadata, P as ListDeletedResourcesRequest, T as ListDeletedResourcesResponse, L as LocationOptions, M as ManagementType, a$ as MessageEnvelope, l as MissingValues, n as Mode, al as NestedAggregation, aj as NestedAggregationItem, ak as NestedAggregationItemKindOneOf, as as NestedAggregationResults, at as NestedAggregationResultsResultOneOf, N as NestedAggregationType, aB as NestedResultValue, aC as NestedResultValueResultOneOf, aH as NestedResults, ax as NestedValueAggregationResult, aK as QueryResourcesRequest, aN as QueryResourcesResponse, ag as RangeAggregation, ar as RangeAggregationResult, ac as RangeBucket, az as RangeResult, av as RangeResults, aR as ReindexTenantRequest, aS as ReindexTenantResponse, Z as RemoveResourceFromTrashBinRequest, _ as RemoveResourceFromTrashBinResponse, o as ResourceCompositionDetailsOneOf, b4 as ResourceSearchSpec, b5 as ResourcesQueryResult, aW as RestoreInfo, $ as RestoreResourceFromTrashBinRequest, a0 as RestoreResourceFromTrashBinResponse, aD as Results, ah as ScalarAggregation, aA as ScalarResult, m as ScalarType, r as Schedule, ao as SearchDetails, a6 as SearchResourcesRequest, q as SingleResource, k as SortDirection, i as SortOrder, j as SortType, a9 as Sorting, s as SpecificLocation, a1 as UpdateResourceRequest, a2 as UpdateResourceResponse, V as V2WorkingHoursSchedules, ae as ValueAggregation, af as ValueAggregationOptionsOneOf, aq as ValueAggregationResult, ay as ValueResult, au as ValueResults, W as WebhookIdentityType, p as WorkingHoursSchedule, u as WorkingHoursSchedules } from './bookings-resources-v2-resource-resources.universal-BvcAlBYB.mjs';
|
|
4
|
+
|
|
5
|
+
declare function createResource$1(httpClient: HttpClient): CreateResourceSignature;
|
|
6
|
+
interface CreateResourceSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new resource.
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* ## Connected schedules
|
|
12
|
+
*
|
|
13
|
+
* A new event *schedule*
|
|
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))
|
|
15
|
+
* is automatically created for the resource.
|
|
16
|
+
*
|
|
17
|
+
* ## Locations
|
|
18
|
+
*
|
|
19
|
+
* If you don't specify `locationOptions`, Wix Bookings automatically sets
|
|
20
|
+
* `locationOptions.availableInAllLocations` to `true`.
|
|
21
|
+
*
|
|
22
|
+
* If you specify 1 business location ID in `locationOptions.specificLocationOptions.businessLocations`,
|
|
23
|
+
* you must specify `locationOptions.specificLocationOptions.availableInBusinessLocations`
|
|
24
|
+
* as `true`. Currently, you can specify only a single business location.
|
|
25
|
+
* @param - Resource to create.
|
|
26
|
+
* @returns Created resource.
|
|
27
|
+
*/
|
|
28
|
+
(resource: Resource): Promise<Resource>;
|
|
29
|
+
}
|
|
30
|
+
declare function bulkCreateResources$1(httpClient: HttpClient): BulkCreateResourcesSignature;
|
|
31
|
+
interface BulkCreateResourcesSignature {
|
|
32
|
+
/**
|
|
33
|
+
* Creates up to 50 resources.
|
|
34
|
+
*
|
|
35
|
+
*
|
|
36
|
+
* Refer to *Create Resource*
|
|
37
|
+
* ([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))
|
|
38
|
+
* for more details.
|
|
39
|
+
* @param - Resources to create.
|
|
40
|
+
*/
|
|
41
|
+
(resources: Resource[], options?: BulkCreateResourcesOptions | undefined): Promise<BulkCreateResourcesResponse>;
|
|
42
|
+
}
|
|
43
|
+
declare function getResource$1(httpClient: HttpClient): GetResourceSignature;
|
|
44
|
+
interface GetResourceSignature {
|
|
45
|
+
/**
|
|
46
|
+
* Retrieves a resource.
|
|
47
|
+
* @param - ID of the resource to retrieve.
|
|
48
|
+
* @returns Retrieved resource.
|
|
49
|
+
*/
|
|
50
|
+
(resourceId: string): Promise<Resource>;
|
|
51
|
+
}
|
|
52
|
+
declare function updateResource$1(httpClient: HttpClient): UpdateResourceSignature;
|
|
53
|
+
interface UpdateResourceSignature {
|
|
54
|
+
/**
|
|
55
|
+
* Updates a resource.
|
|
56
|
+
*
|
|
57
|
+
*
|
|
58
|
+
* Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.
|
|
59
|
+
* This ensures you're working with the latest service information and prevents unintended overwrites.
|
|
60
|
+
* @param - Resource ID.
|
|
61
|
+
* @returns Updated resource.
|
|
62
|
+
*/
|
|
63
|
+
(_id: string, resource: UpdateResource): Promise<Resource>;
|
|
64
|
+
}
|
|
65
|
+
declare function deleteResource$1(httpClient: HttpClient): DeleteResourceSignature;
|
|
66
|
+
interface DeleteResourceSignature {
|
|
67
|
+
/**
|
|
68
|
+
* Deletes a resource.
|
|
69
|
+
*
|
|
70
|
+
*
|
|
71
|
+
* Deleting a resource cancels its event schedule and all its working hour
|
|
72
|
+
* schedules that aren't shared with another resource. Learn more about
|
|
73
|
+
* _how Bookings uses the Calendar APIs_
|
|
74
|
+
* ([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)).
|
|
75
|
+
* @param - ID of the resource to delete.
|
|
76
|
+
*/
|
|
77
|
+
(resourceId: string): Promise<void>;
|
|
78
|
+
}
|
|
79
|
+
declare function bulkDeleteResources$1(httpClient: HttpClient): BulkDeleteResourcesSignature;
|
|
80
|
+
interface BulkDeleteResourcesSignature {
|
|
81
|
+
/**
|
|
82
|
+
* Deletes multiple resources.
|
|
83
|
+
*
|
|
84
|
+
*
|
|
85
|
+
* Refer to *Delete Resource*
|
|
86
|
+
* ([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))
|
|
87
|
+
* for more details.
|
|
88
|
+
* @param - IDs of the resources to delete.
|
|
89
|
+
*/
|
|
90
|
+
(ids: string[]): Promise<BulkDeleteResourcesResponse>;
|
|
91
|
+
}
|
|
92
|
+
declare function searchResources$1(httpClient: HttpClient): SearchResourcesSignature;
|
|
93
|
+
interface SearchResourcesSignature {
|
|
94
|
+
/**
|
|
95
|
+
* Retrieves a list of resources matching the provided search criteria.
|
|
96
|
+
*
|
|
97
|
+
*
|
|
98
|
+
* Refer to the *supported filters article*
|
|
99
|
+
* ([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))
|
|
100
|
+
* for a complete list of supported filters and sorting options.
|
|
101
|
+
* @param - Search condition. Refer to the *supported filters article*
|
|
102
|
+
* ([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))
|
|
103
|
+
* for a complete list of supported filters and sorting options.
|
|
104
|
+
*/
|
|
105
|
+
(search: ResourceSearch): Promise<SearchResourcesResponse>;
|
|
106
|
+
}
|
|
107
|
+
declare function queryResources$1(httpClient: HttpClient): QueryResourcesSignature;
|
|
108
|
+
interface QueryResourcesSignature {
|
|
109
|
+
/**
|
|
110
|
+
* Creates a query to retrieve a list of resources.
|
|
111
|
+
*
|
|
112
|
+
* The `queryResources()` function builds a query to retrieve a list of resources and returns a `ResourcesQueryBuilder` object.
|
|
113
|
+
*
|
|
114
|
+
* 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.
|
|
115
|
+
*
|
|
116
|
+
* 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.
|
|
117
|
+
*
|
|
118
|
+
* `queryResources()` runs with the following `ResourcesQueryBuilder` default that you can override:
|
|
119
|
+
*
|
|
120
|
+
* + `limit` is `50`.
|
|
121
|
+
* + Sorted by `id` in ascending order.
|
|
122
|
+
*
|
|
123
|
+
* 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("name")`, the results are sorted first by the `"typeId"`, and then, if there are multiple results with the same `"typeId"`, the items are sorted by `"name"`.
|
|
124
|
+
*
|
|
125
|
+
* 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`.
|
|
126
|
+
*/
|
|
127
|
+
(): ResourcesQueryBuilder;
|
|
128
|
+
}
|
|
129
|
+
declare function countResources$1(httpClient: HttpClient): CountResourcesSignature;
|
|
130
|
+
interface CountResourcesSignature {
|
|
131
|
+
/**
|
|
132
|
+
* Counts resources according to given criteria.
|
|
133
|
+
*
|
|
134
|
+
*
|
|
135
|
+
* Refer to the *supported filters article*
|
|
136
|
+
* ([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))
|
|
137
|
+
* for a complete list of supported filters and sorting options.
|
|
138
|
+
* @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.
|
|
139
|
+
*/
|
|
140
|
+
(options?: CountResourcesOptions | undefined): Promise<CountResourcesResponse>;
|
|
141
|
+
}
|
|
142
|
+
declare const onResourceCreated$1: EventDefinition<ResourceCreatedEnvelope, "wix.bookings.resources.v2.resource_created">;
|
|
143
|
+
declare const onResourceDeleted$1: EventDefinition<ResourceDeletedEnvelope, "wix.bookings.resources.v2.resource_deleted">;
|
|
144
|
+
declare const onResourceUpdated$1: EventDefinition<ResourceUpdatedEnvelope, "wix.bookings.resources.v2.resource_updated">;
|
|
145
|
+
|
|
146
|
+
declare const createResource: MaybeContext<BuildRESTFunction<typeof createResource$1> & typeof createResource$1>;
|
|
147
|
+
declare const bulkCreateResources: MaybeContext<BuildRESTFunction<typeof bulkCreateResources$1> & typeof bulkCreateResources$1>;
|
|
148
|
+
declare const getResource: MaybeContext<BuildRESTFunction<typeof getResource$1> & typeof getResource$1>;
|
|
149
|
+
declare const updateResource: MaybeContext<BuildRESTFunction<typeof updateResource$1> & typeof updateResource$1>;
|
|
150
|
+
declare const deleteResource: MaybeContext<BuildRESTFunction<typeof deleteResource$1> & typeof deleteResource$1>;
|
|
151
|
+
declare const bulkDeleteResources: MaybeContext<BuildRESTFunction<typeof bulkDeleteResources$1> & typeof bulkDeleteResources$1>;
|
|
152
|
+
declare const searchResources: MaybeContext<BuildRESTFunction<typeof searchResources$1> & typeof searchResources$1>;
|
|
153
|
+
declare const queryResources: MaybeContext<BuildRESTFunction<typeof queryResources$1> & typeof queryResources$1>;
|
|
154
|
+
declare const countResources: MaybeContext<BuildRESTFunction<typeof countResources$1> & typeof countResources$1>;
|
|
155
|
+
/**
|
|
156
|
+
* Triggered when a resource is created.
|
|
157
|
+
*/
|
|
158
|
+
declare const onResourceCreated: BuildEventDefinition<typeof onResourceCreated$1>;
|
|
159
|
+
/**
|
|
160
|
+
* Triggered when a resource is deleted.
|
|
161
|
+
*/
|
|
162
|
+
declare const onResourceDeleted: BuildEventDefinition<typeof onResourceDeleted$1>;
|
|
163
|
+
/**
|
|
164
|
+
* Triggered when a resource is updated.
|
|
165
|
+
*/
|
|
166
|
+
declare const onResourceUpdated: BuildEventDefinition<typeof onResourceUpdated$1>;
|
|
167
|
+
|
|
168
|
+
export { BulkCreateResourcesOptions, BulkCreateResourcesResponse, BulkDeleteResourcesResponse, CountResourcesOptions, CountResourcesResponse, Resource, ResourceCreatedEnvelope, ResourceDeletedEnvelope, ResourceUpdatedEnvelope, ResourcesQueryBuilder, SearchResourcesResponse, UpdateResource, bulkCreateResources, bulkDeleteResources, countResources, createResource, deleteResource, getResource, onResourceCreated, onResourceDeleted, onResourceUpdated, queryResources, searchResources, updateResource };
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { R as Resource, B as BulkCreateResourcesOptions, a as BulkCreateResourcesResponse, U as UpdateResource, b as BulkDeleteResourcesResponse, c as ResourceSearch, S as SearchResourcesResponse, d as ResourcesQueryBuilder, C as CountResourcesOptions, e as CountResourcesResponse, f as ResourceCreatedEnvelope, g as ResourceDeletedEnvelope, h as ResourceUpdatedEnvelope } from './bookings-resources-v2-resource-resources.universal-BvcAlBYB.js';
|
|
3
|
+
export { aZ as ActionEvent, aa as Aggregation, ap as AggregationData, ab as AggregationKindOneOf, aI as AggregationResults, aJ as AggregationResultsResultOneOf, aw as AggregationResultsScalarResult, A as AggregationType, F as ApplicationError, b2 as BaseEventMetadata, G as BulkActionMetadata, y as BulkCreateResourcesRequest, a5 as BulkDeleteResourcesRequest, z as BulkResourceResult, t as BusinessLocation, aO as CountResourcesRequest, w as CreateResourceRequest, x as CreateResourceResponse, Q as CursorPaging, X as CursorPagingMetadata, aL as CursorQuery, aM as CursorQueryPagingMethodOneOf, a7 as CursorSearch, a8 as CursorSearchPagingMethodOneOf, Y as Cursors, ai as DateHistogramAggregation, aE as DateHistogramResult, aG as DateHistogramResults, a3 as DeleteResourceRequest, a4 as DeleteResourceResponse, aT as DomainEvent, aU as DomainEventBodyOneOf, a_ as Empty, aV as EntityCreatedEvent, aY as EntityDeletedEvent, aX as EntityUpdatedEvent, b3 as EventMetadata, E as EventsSchedule, v as ExtendedFields, aP as FixResourceSchedulesRequest, aQ as FixResourceSchedulesResponse, K as GetDeletedResourceRequest, O as GetDeletedResourceResponse, H as GetResourceRequest, J as GetResourceResponse, am as GroupByAggregation, an as GroupByAggregationKindOneOf, aF as GroupByValueResults, b0 as IdentificationData, b1 as IdentificationDataIdOneOf, ad as IncludeMissingValuesOptions, I as Interval, D as ItemMetadata, P as ListDeletedResourcesRequest, T as ListDeletedResourcesResponse, L as LocationOptions, M as ManagementType, a$ as MessageEnvelope, l as MissingValues, n as Mode, al as NestedAggregation, aj as NestedAggregationItem, ak as NestedAggregationItemKindOneOf, as as NestedAggregationResults, at as NestedAggregationResultsResultOneOf, N as NestedAggregationType, aB as NestedResultValue, aC as NestedResultValueResultOneOf, aH as NestedResults, ax as NestedValueAggregationResult, aK as QueryResourcesRequest, aN as QueryResourcesResponse, ag as RangeAggregation, ar as RangeAggregationResult, ac as RangeBucket, az as RangeResult, av as RangeResults, aR as ReindexTenantRequest, aS as ReindexTenantResponse, Z as RemoveResourceFromTrashBinRequest, _ as RemoveResourceFromTrashBinResponse, o as ResourceCompositionDetailsOneOf, b4 as ResourceSearchSpec, b5 as ResourcesQueryResult, aW as RestoreInfo, $ as RestoreResourceFromTrashBinRequest, a0 as RestoreResourceFromTrashBinResponse, aD as Results, ah as ScalarAggregation, aA as ScalarResult, m as ScalarType, r as Schedule, ao as SearchDetails, a6 as SearchResourcesRequest, q as SingleResource, k as SortDirection, i as SortOrder, j as SortType, a9 as Sorting, s as SpecificLocation, a1 as UpdateResourceRequest, a2 as UpdateResourceResponse, V as V2WorkingHoursSchedules, ae as ValueAggregation, af as ValueAggregationOptionsOneOf, aq as ValueAggregationResult, ay as ValueResult, au as ValueResults, W as WebhookIdentityType, p as WorkingHoursSchedule, u as WorkingHoursSchedules } from './bookings-resources-v2-resource-resources.universal-BvcAlBYB.js';
|
|
4
|
+
|
|
5
|
+
declare function createResource$1(httpClient: HttpClient): CreateResourceSignature;
|
|
6
|
+
interface CreateResourceSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new resource.
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* ## Connected schedules
|
|
12
|
+
*
|
|
13
|
+
* A new event *schedule*
|
|
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))
|
|
15
|
+
* is automatically created for the resource.
|
|
16
|
+
*
|
|
17
|
+
* ## Locations
|
|
18
|
+
*
|
|
19
|
+
* If you don't specify `locationOptions`, Wix Bookings automatically sets
|
|
20
|
+
* `locationOptions.availableInAllLocations` to `true`.
|
|
21
|
+
*
|
|
22
|
+
* If you specify 1 business location ID in `locationOptions.specificLocationOptions.businessLocations`,
|
|
23
|
+
* you must specify `locationOptions.specificLocationOptions.availableInBusinessLocations`
|
|
24
|
+
* as `true`. Currently, you can specify only a single business location.
|
|
25
|
+
* @param - Resource to create.
|
|
26
|
+
* @returns Created resource.
|
|
27
|
+
*/
|
|
28
|
+
(resource: Resource): Promise<Resource>;
|
|
29
|
+
}
|
|
30
|
+
declare function bulkCreateResources$1(httpClient: HttpClient): BulkCreateResourcesSignature;
|
|
31
|
+
interface BulkCreateResourcesSignature {
|
|
32
|
+
/**
|
|
33
|
+
* Creates up to 50 resources.
|
|
34
|
+
*
|
|
35
|
+
*
|
|
36
|
+
* Refer to *Create Resource*
|
|
37
|
+
* ([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))
|
|
38
|
+
* for more details.
|
|
39
|
+
* @param - Resources to create.
|
|
40
|
+
*/
|
|
41
|
+
(resources: Resource[], options?: BulkCreateResourcesOptions | undefined): Promise<BulkCreateResourcesResponse>;
|
|
42
|
+
}
|
|
43
|
+
declare function getResource$1(httpClient: HttpClient): GetResourceSignature;
|
|
44
|
+
interface GetResourceSignature {
|
|
45
|
+
/**
|
|
46
|
+
* Retrieves a resource.
|
|
47
|
+
* @param - ID of the resource to retrieve.
|
|
48
|
+
* @returns Retrieved resource.
|
|
49
|
+
*/
|
|
50
|
+
(resourceId: string): Promise<Resource>;
|
|
51
|
+
}
|
|
52
|
+
declare function updateResource$1(httpClient: HttpClient): UpdateResourceSignature;
|
|
53
|
+
interface UpdateResourceSignature {
|
|
54
|
+
/**
|
|
55
|
+
* Updates a resource.
|
|
56
|
+
*
|
|
57
|
+
*
|
|
58
|
+
* Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.
|
|
59
|
+
* This ensures you're working with the latest service information and prevents unintended overwrites.
|
|
60
|
+
* @param - Resource ID.
|
|
61
|
+
* @returns Updated resource.
|
|
62
|
+
*/
|
|
63
|
+
(_id: string, resource: UpdateResource): Promise<Resource>;
|
|
64
|
+
}
|
|
65
|
+
declare function deleteResource$1(httpClient: HttpClient): DeleteResourceSignature;
|
|
66
|
+
interface DeleteResourceSignature {
|
|
67
|
+
/**
|
|
68
|
+
* Deletes a resource.
|
|
69
|
+
*
|
|
70
|
+
*
|
|
71
|
+
* Deleting a resource cancels its event schedule and all its working hour
|
|
72
|
+
* schedules that aren't shared with another resource. Learn more about
|
|
73
|
+
* _how Bookings uses the Calendar APIs_
|
|
74
|
+
* ([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)).
|
|
75
|
+
* @param - ID of the resource to delete.
|
|
76
|
+
*/
|
|
77
|
+
(resourceId: string): Promise<void>;
|
|
78
|
+
}
|
|
79
|
+
declare function bulkDeleteResources$1(httpClient: HttpClient): BulkDeleteResourcesSignature;
|
|
80
|
+
interface BulkDeleteResourcesSignature {
|
|
81
|
+
/**
|
|
82
|
+
* Deletes multiple resources.
|
|
83
|
+
*
|
|
84
|
+
*
|
|
85
|
+
* Refer to *Delete Resource*
|
|
86
|
+
* ([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))
|
|
87
|
+
* for more details.
|
|
88
|
+
* @param - IDs of the resources to delete.
|
|
89
|
+
*/
|
|
90
|
+
(ids: string[]): Promise<BulkDeleteResourcesResponse>;
|
|
91
|
+
}
|
|
92
|
+
declare function searchResources$1(httpClient: HttpClient): SearchResourcesSignature;
|
|
93
|
+
interface SearchResourcesSignature {
|
|
94
|
+
/**
|
|
95
|
+
* Retrieves a list of resources matching the provided search criteria.
|
|
96
|
+
*
|
|
97
|
+
*
|
|
98
|
+
* Refer to the *supported filters article*
|
|
99
|
+
* ([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))
|
|
100
|
+
* for a complete list of supported filters and sorting options.
|
|
101
|
+
* @param - Search condition. Refer to the *supported filters article*
|
|
102
|
+
* ([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))
|
|
103
|
+
* for a complete list of supported filters and sorting options.
|
|
104
|
+
*/
|
|
105
|
+
(search: ResourceSearch): Promise<SearchResourcesResponse>;
|
|
106
|
+
}
|
|
107
|
+
declare function queryResources$1(httpClient: HttpClient): QueryResourcesSignature;
|
|
108
|
+
interface QueryResourcesSignature {
|
|
109
|
+
/**
|
|
110
|
+
* Creates a query to retrieve a list of resources.
|
|
111
|
+
*
|
|
112
|
+
* The `queryResources()` function builds a query to retrieve a list of resources and returns a `ResourcesQueryBuilder` object.
|
|
113
|
+
*
|
|
114
|
+
* 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.
|
|
115
|
+
*
|
|
116
|
+
* 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.
|
|
117
|
+
*
|
|
118
|
+
* `queryResources()` runs with the following `ResourcesQueryBuilder` default that you can override:
|
|
119
|
+
*
|
|
120
|
+
* + `limit` is `50`.
|
|
121
|
+
* + Sorted by `id` in ascending order.
|
|
122
|
+
*
|
|
123
|
+
* 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("name")`, the results are sorted first by the `"typeId"`, and then, if there are multiple results with the same `"typeId"`, the items are sorted by `"name"`.
|
|
124
|
+
*
|
|
125
|
+
* 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`.
|
|
126
|
+
*/
|
|
127
|
+
(): ResourcesQueryBuilder;
|
|
128
|
+
}
|
|
129
|
+
declare function countResources$1(httpClient: HttpClient): CountResourcesSignature;
|
|
130
|
+
interface CountResourcesSignature {
|
|
131
|
+
/**
|
|
132
|
+
* Counts resources according to given criteria.
|
|
133
|
+
*
|
|
134
|
+
*
|
|
135
|
+
* Refer to the *supported filters article*
|
|
136
|
+
* ([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))
|
|
137
|
+
* for a complete list of supported filters and sorting options.
|
|
138
|
+
* @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.
|
|
139
|
+
*/
|
|
140
|
+
(options?: CountResourcesOptions | undefined): Promise<CountResourcesResponse>;
|
|
141
|
+
}
|
|
142
|
+
declare const onResourceCreated$1: EventDefinition<ResourceCreatedEnvelope, "wix.bookings.resources.v2.resource_created">;
|
|
143
|
+
declare const onResourceDeleted$1: EventDefinition<ResourceDeletedEnvelope, "wix.bookings.resources.v2.resource_deleted">;
|
|
144
|
+
declare const onResourceUpdated$1: EventDefinition<ResourceUpdatedEnvelope, "wix.bookings.resources.v2.resource_updated">;
|
|
145
|
+
|
|
146
|
+
declare const createResource: MaybeContext<BuildRESTFunction<typeof createResource$1> & typeof createResource$1>;
|
|
147
|
+
declare const bulkCreateResources: MaybeContext<BuildRESTFunction<typeof bulkCreateResources$1> & typeof bulkCreateResources$1>;
|
|
148
|
+
declare const getResource: MaybeContext<BuildRESTFunction<typeof getResource$1> & typeof getResource$1>;
|
|
149
|
+
declare const updateResource: MaybeContext<BuildRESTFunction<typeof updateResource$1> & typeof updateResource$1>;
|
|
150
|
+
declare const deleteResource: MaybeContext<BuildRESTFunction<typeof deleteResource$1> & typeof deleteResource$1>;
|
|
151
|
+
declare const bulkDeleteResources: MaybeContext<BuildRESTFunction<typeof bulkDeleteResources$1> & typeof bulkDeleteResources$1>;
|
|
152
|
+
declare const searchResources: MaybeContext<BuildRESTFunction<typeof searchResources$1> & typeof searchResources$1>;
|
|
153
|
+
declare const queryResources: MaybeContext<BuildRESTFunction<typeof queryResources$1> & typeof queryResources$1>;
|
|
154
|
+
declare const countResources: MaybeContext<BuildRESTFunction<typeof countResources$1> & typeof countResources$1>;
|
|
155
|
+
/**
|
|
156
|
+
* Triggered when a resource is created.
|
|
157
|
+
*/
|
|
158
|
+
declare const onResourceCreated: BuildEventDefinition<typeof onResourceCreated$1>;
|
|
159
|
+
/**
|
|
160
|
+
* Triggered when a resource is deleted.
|
|
161
|
+
*/
|
|
162
|
+
declare const onResourceDeleted: BuildEventDefinition<typeof onResourceDeleted$1>;
|
|
163
|
+
/**
|
|
164
|
+
* Triggered when a resource is updated.
|
|
165
|
+
*/
|
|
166
|
+
declare const onResourceUpdated: BuildEventDefinition<typeof onResourceUpdated$1>;
|
|
167
|
+
|
|
168
|
+
export { BulkCreateResourcesOptions, BulkCreateResourcesResponse, BulkDeleteResourcesResponse, CountResourcesOptions, CountResourcesResponse, Resource, ResourceCreatedEnvelope, ResourceDeletedEnvelope, ResourceUpdatedEnvelope, ResourcesQueryBuilder, SearchResourcesResponse, UpdateResource, bulkCreateResources, bulkDeleteResources, countResources, createResource, deleteResource, getResource, onResourceCreated, onResourceDeleted, onResourceUpdated, queryResources, searchResources, updateResource };
|