@wix/bookings 1.0.231 → 1.0.233
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/src/bookings-catalog-v1-resource.http.d.ts +26 -69
- package/build/cjs/src/bookings-catalog-v1-resource.http.js +26 -101
- package/build/cjs/src/bookings-catalog-v1-resource.http.js.map +1 -1
- package/build/cjs/src/bookings-catalog-v1-resource.public.d.ts +6 -7
- package/build/cjs/src/bookings-catalog-v1-resource.public.js +13 -19
- package/build/cjs/src/bookings-catalog-v1-resource.public.js.map +1 -1
- package/build/cjs/src/bookings-catalog-v1-resource.types.d.ts +0 -307
- package/build/cjs/src/bookings-catalog-v1-resource.universal.d.ts +34 -176
- package/build/cjs/src/bookings-catalog-v1-resource.universal.js +34 -140
- package/build/cjs/src/bookings-catalog-v1-resource.universal.js.map +1 -1
- package/build/es/src/bookings-catalog-v1-resource.http.d.ts +26 -69
- package/build/es/src/bookings-catalog-v1-resource.http.js +25 -99
- package/build/es/src/bookings-catalog-v1-resource.http.js.map +1 -1
- package/build/es/src/bookings-catalog-v1-resource.public.d.ts +6 -7
- package/build/es/src/bookings-catalog-v1-resource.public.js +9 -14
- package/build/es/src/bookings-catalog-v1-resource.public.js.map +1 -1
- package/build/es/src/bookings-catalog-v1-resource.types.d.ts +0 -307
- package/build/es/src/bookings-catalog-v1-resource.universal.d.ts +34 -176
- package/build/es/src/bookings-catalog-v1-resource.universal.js +29 -134
- package/build/es/src/bookings-catalog-v1-resource.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
-
import { CreateResourceRequest, CreateResourceResponse, DeleteResourceRequest, DeleteResourceResponse,
|
|
3
|
-
/** @internal */
|
|
4
|
-
export declare function list(payload: ListResourcesRequest): RequestOptionsFactory<ListResourcesResponse & ListResourcesResponseNonNullableFields>;
|
|
2
|
+
import { CreateResourceRequest, CreateResourceResponse, DeleteResourceRequest, DeleteResourceResponse, QueryResourcesRequest, QueryResourcesResponse, UpdateResourceRequest, UpdateResourceResponse, ResourceUpdateScheduleRequest, UpdateScheduleResponse, QueryResourcesResponseNonNullableFields, CreateResourceResponseNonNullableFields, UpdateResourceResponseNonNullableFields, UpdateScheduleResponseNonNullableFields, DeleteResourceResponseNonNullableFields } from './bookings-catalog-v1-resource.types';
|
|
5
3
|
/**
|
|
6
4
|
* Retrieves a list of the resources according to the specified filters and paging.
|
|
7
5
|
*
|
|
@@ -28,69 +26,37 @@ export declare function list(payload: ListResourcesRequest): RequestOptionsFacto
|
|
|
28
26
|
export declare function query(payload: QueryResourcesRequest): RequestOptionsFactory<QueryResourcesResponse & QueryResourcesResponseNonNullableFields>;
|
|
29
27
|
/**
|
|
30
28
|
* Creates a resource.
|
|
31
|
-
* <!--ONLY:VELO
|
|
32
|
-
* The `createResource()` function returns a Promise that resolves to the created resource.
|
|
33
|
-
* <!--END:ONLY:VELO-->
|
|
34
29
|
*
|
|
35
|
-
* Bookings resources are created with a schedule. The schedule and its sessions determine the resource's availability. Note that the schedule must contain a start date in the `availability.start` property.
|
|
36
|
-
* For resources that are available during the business's default hours, add the business's schedule as a linked schedule in the resource's schedule. For resources that have their own hours, create sessions with type `"WORKING_HOURS"` using the resource's schedule.
|
|
37
|
-
* You can use both individual and recurring sessions to define resource availability. You cannot use availability constraints for resource schedules.
|
|
38
|
-
*
|
|
39
|
-
* <!--ONLY:VELO
|
|
40
|
-
* When creating a resource using `createResource()`, include the resource's schedule information. Set the schedule information as follows:
|
|
41
|
-
* + If the resource uses the default business hours, get the business resource's schedule ID and include it in the `scheduleInfo.availability.linkedSchedules` array in the `scheduleInfo` parameter. The default hours can bee found in the Dashboard under **Settings** in the **Bookings** section, on the **Appointment hours** page.
|
|
42
|
-
* + If the resource has its own custom working hours, create the resource, then create sessions of type `"WORKING_HOURS"` using the [`createSession()`](wix-bookings-backend.Sessions/createsession) function. Use the `scheduleId` returned from `createResource()` when creating the sessions. These session can be single sessions or recurring sessions.
|
|
43
|
-
* + You can have both default business hours and custom hours for the same resource schedule by combining the steps above.
|
|
44
30
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* > + The Wix Bookings app does not show non-recurring `WORKING_HOURS` sessions in the resource calendar.
|
|
48
|
-
* > + You can only add the business resource's schedule as a linked schedule for a resource.
|
|
49
|
-
* > + A resource can have one schedule only.
|
|
50
|
-
* > + You can have up to 135 active resources and an additional 135 deleted resources.
|
|
51
|
-
* > + Only users with the **Bookings Admin** [role](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin) can create a resource. You can override the role permissions by setting the `options.suppressAuth` parameter to `true`.
|
|
52
|
-
* <!--END:ONLY:VELO-->
|
|
53
|
-
*
|
|
54
|
-
* <!--ONLY:REST-->
|
|
55
|
-
* Use the following steps to create resources:
|
|
56
|
-
* - Create the resource using including schedule information.
|
|
57
|
-
* - If the resource uses the default business hours, get the business resource's schedule ID and include it in the `scheduleInfo.availability.linkedSchedules` array in the in the schedule parameters.
|
|
58
|
-
* - If the resource has its own custom working hours, create sessions of type `"WORKING_HOURS"`. Use the `scheduleId` of the new resource when creating the sessions. These session can be single sessions or recurring sessions. You can have both business hours and custom hours for the same resource schedule.
|
|
31
|
+
* The `createResource()` function returns a Promise that resolves to the created resource.
|
|
32
|
+
* Bookings resources are created with a schedule. The schedule and its sessions determine the resource's availability. Note that the schedule must contain a start date in the availability.start property. For resources that are available during the business's default hours, add the business's schedule as a linked schedule in the resource's schedule. For resources that have their own hours, create sessions with type `WORKING_HOURS` using the resource's schedule. You can use both individual and recurring sessions to define resource availability. You cannot use availability constraints for resource schedules.
|
|
59
33
|
*
|
|
60
|
-
* >**Notes:**
|
|
61
|
-
* > + A resource can have one schedule only.
|
|
62
|
-
* > + You can have up to 135 active resources and an additional 135 deleted resources.
|
|
63
|
-
* > + The `businessLocation.businessSchedule` object in the `schedule.location` object is not supported.
|
|
64
34
|
*
|
|
35
|
+
* When creating a resource using `createResource()`, include the resource's schedule information. Set the schedule information as follows:
|
|
36
|
+
* - If the resource uses the default business hours, get the business resource's schedule ID and include it in the `scheduleInfo.availability.linkedSchedules` array in the `scheduleInfo` parameter. The default hours can bee found in the Dashboard under **Settings** in the **Bookings** section, on the **Appointment hours** page.
|
|
37
|
+
* - If the resource has its own custom working hours, create the resource, then create sessions of type `WORKING_HOURS` using the [`createSession()`](wix-bookings-v2/sessions/createsession) function. Use the `scheduleId` returned from `createResource()` when creating the sessions. These session can be single sessions or recurring sessions.
|
|
38
|
+
* - You can have both default business hours and custom hours for the same resource schedule by combining the steps above.
|
|
65
39
|
*
|
|
66
40
|
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
41
|
+
* > **Notes:**
|
|
42
|
+
* - The Wix Bookings app does not show both default business hours and custom hours on the **Staff** page in the dashboard. If you've set up both custom and default business hours, only the default business hours will appear in the app, although both are working.
|
|
43
|
+
* - The Wix Bookings app does not show non-recurring `WORKING_HOURS` sessions in the resource calendar.
|
|
44
|
+
* - You can only add the business resource's schedule as a linked schedule for a resource.
|
|
45
|
+
* - A resource can have one schedule only.
|
|
46
|
+
* - You can have up to 135 active resources and an additional 135 deleted resources.
|
|
47
|
+
* - Only users with the **Bookings Admin** [role](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin) can create a resource.
|
|
70
48
|
*/
|
|
71
49
|
export declare function create(payload: CreateResourceRequest): RequestOptionsFactory<CreateResourceResponse & CreateResourceResponseNonNullableFields>;
|
|
72
50
|
/**
|
|
73
51
|
* Updates a resource.
|
|
74
|
-
* <!--ONLY:VELO
|
|
75
|
-
* The `updateResource()` function returns a Promise that resolves when a resource is updated.
|
|
76
|
-
* Use this function to update all bookings resource information except for the resource's schedule. To update a resource's schedule use [`updateResourceSchedule()`](wix-bookings-backend/resource/updateresourceschedule).
|
|
77
52
|
*
|
|
78
|
-
* >**Notes:**
|
|
79
|
-
* > + When updating a resource you cannot change the system tags used by the Wix Bookings app. Tags used by the app have the values `"business"` and `"staff"`.
|
|
80
|
-
* > + Only users with the **Bookings Admin** [role](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin) can update a resource. You can override the role permissions by setting the `options.suppressAuth` parameter to `true`.
|
|
81
|
-
* <!--END:ONLY:VELO-->
|
|
82
|
-
* <!--ONLY:REST-->
|
|
83
|
-
* Use this endpoint to update all resource information except for the resource's schedule. To update a resource's schedule use
|
|
84
|
-
* the [Update Schedule](https://dev.wix.com/api/rest/wix-bookings/resources/update-schedule) endpoint.
|
|
85
53
|
*
|
|
86
|
-
*
|
|
87
|
-
* > + When updating a resource you cannot change the system tags used by the Wix Bookings app. Tags used by the app have the values `"business"` and `"staff"`.
|
|
88
|
-
* > + When updating a resource's schedule you cannot change the resource tag used by the Wix Bookings app. Tags used by the app have the values `"INDIVIDUAL"`, `"GROUP"`, and `"COURSE”`.
|
|
89
|
-
* > + The `businessLocation.businessSchedule` object in the `schedule.location` object is not supported.
|
|
54
|
+
* The `updateResource()` function returns a Promise that resolves when a resource is updated. Use this function to update all bookings resource information except for the resource's schedule. To update a resource's schedule use [`updateResourceSchedule()`](#updateresourceschedule).
|
|
90
55
|
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
56
|
+
*
|
|
57
|
+
* >**Notes:**
|
|
58
|
+
* - When updating a resource you cannot change the system tags used by the Wix Bookings app. Tags used by the app have the values `"business"` and `"staff"`.
|
|
59
|
+
* - Only users with the **Bookings Admin** [role](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin) can update a resource.
|
|
94
60
|
*/
|
|
95
61
|
export declare function update(payload: UpdateResourceRequest): RequestOptionsFactory<UpdateResourceResponse & UpdateResourceResponseNonNullableFields>;
|
|
96
62
|
/**
|
|
@@ -149,27 +115,18 @@ export declare function update(payload: UpdateResourceRequest): RequestOptionsFa
|
|
|
149
115
|
export declare function updateSchedule(payload: ResourceUpdateScheduleRequest): RequestOptionsFactory<UpdateScheduleResponse & UpdateScheduleResponseNonNullableFields>;
|
|
150
116
|
/**
|
|
151
117
|
* Deletes a resource.
|
|
152
|
-
*
|
|
118
|
+
*
|
|
153
119
|
* The `deleteResource()` function returns a Promise that is resolved when a resource is deleted.
|
|
154
|
-
*
|
|
155
|
-
*
|
|
120
|
+
*
|
|
121
|
+
*
|
|
122
|
+
* Deleting a resource updates its status to `DELETED`.
|
|
156
123
|
*
|
|
157
124
|
* You cannot delete a resource if it has booked sessions.
|
|
158
125
|
*
|
|
159
|
-
* <!--ONLY:VELO
|
|
160
|
-
* >**Notes:**
|
|
161
|
-
* > + The Bookings app automatically creates a resource with a name and tag of value `"business"``. This resource is used for the business's schedule and working hours and cannot be deleted.
|
|
162
|
-
* > + You can have up to 135 active resources and an additional 135 deleted resources.
|
|
163
|
-
* > + Only users with the **Bookings Admin** [role](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin) can delete a resource. You can override the role permissions by setting the `options.suppressAuth` parameter to `true`.
|
|
164
|
-
* <!--END:ONLY:VELO-->
|
|
165
126
|
*
|
|
166
|
-
* <!--ONLY:REST-->
|
|
167
127
|
* >**Notes:**
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
* >**Permissions:**
|
|
172
|
-
* > This endpoint requires the Manage Bookings [permission scope](https://devforum.wix.com/kb/en/article/available-permissions).
|
|
173
|
-
* <!--END:ONLY:REST-->
|
|
128
|
+
* - The Bookings app automatically creates a resource with a name and tag of value `business`. This resource is used for the business's schedule and working hours and cannot be deleted.
|
|
129
|
+
* - You can have up to 135 active resources and an additional 135 deleted resources.
|
|
130
|
+
* - Only users with the **Bookings Admin** [role](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin) can delete a resource.
|
|
174
131
|
*/
|
|
175
132
|
export declare function _delete(payload: DeleteResourceRequest): RequestOptionsFactory<DeleteResourceResponse & DeleteResourceResponseNonNullableFields>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._delete = exports.updateSchedule = exports.update = exports.create = exports.query =
|
|
3
|
+
exports._delete = exports.updateSchedule = exports.update = exports.create = exports.query = void 0;
|
|
4
4
|
const metro_runtime_1 = require("@wix/metro-runtime");
|
|
5
5
|
const ambassador_1 = require("@wix/metro-runtime/ambassador");
|
|
6
6
|
const metro_runtime_2 = require("@wix/metro-runtime");
|
|
@@ -34,8 +34,6 @@ const _createScheduleRequest = { schedule: '_schedule' };
|
|
|
34
34
|
const _deleteResourceRequest = {};
|
|
35
35
|
const _deleteResourceResponse = {};
|
|
36
36
|
const _image = { urlExpirationDate: 'google.protobuf.Timestamp' };
|
|
37
|
-
const _listResourcesRequest = {};
|
|
38
|
-
const _listResourcesResponse = { resources: '_resource' };
|
|
39
37
|
const _location = {
|
|
40
38
|
customAddress: '_address',
|
|
41
39
|
businessLocation: '_locationsLocation',
|
|
@@ -179,38 +177,6 @@ function resolveComWixpressBookingsResourcesCoreApiV1ResourceResourcesServiceUrl
|
|
|
179
177
|
};
|
|
180
178
|
return (0, metro_runtime_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
181
179
|
}
|
|
182
|
-
/** @internal */
|
|
183
|
-
function list(payload) {
|
|
184
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_listResourcesRequest, {});
|
|
185
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_listResourcesResponse, {
|
|
186
|
-
_address,
|
|
187
|
-
_addressLocation,
|
|
188
|
-
_availability,
|
|
189
|
-
_image,
|
|
190
|
-
_location,
|
|
191
|
-
_locationsAddress,
|
|
192
|
-
_locationsAddressLocation,
|
|
193
|
-
_locationsLocation,
|
|
194
|
-
_recurringInterval,
|
|
195
|
-
_resource,
|
|
196
|
-
_schedule,
|
|
197
|
-
});
|
|
198
|
-
function __list({ host }) {
|
|
199
|
-
const serializedData = toReq(payload);
|
|
200
|
-
const metadata = {
|
|
201
|
-
entityFqdn: 'wix.bookings.catalog.v1.resource',
|
|
202
|
-
method: 'GET',
|
|
203
|
-
methodFqn: 'com.wixpress.bookings.resources.core.api.v1.resource.ResourcesService.List',
|
|
204
|
-
url: resolveComWixpressBookingsResourcesCoreApiV1ResourceResourcesServiceUrl({ protoPath: '/v1/resources', data: serializedData, host }),
|
|
205
|
-
params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
|
|
206
|
-
transformResponse: fromRes,
|
|
207
|
-
};
|
|
208
|
-
return metadata;
|
|
209
|
-
}
|
|
210
|
-
__list.fromReq = fromReq;
|
|
211
|
-
return __list;
|
|
212
|
-
}
|
|
213
|
-
exports.list = list;
|
|
214
180
|
/**
|
|
215
181
|
* Retrieves a list of the resources according to the specified filters and paging.
|
|
216
182
|
*
|
|
@@ -267,45 +233,25 @@ function query(payload) {
|
|
|
267
233
|
exports.query = query;
|
|
268
234
|
/**
|
|
269
235
|
* Creates a resource.
|
|
270
|
-
* <!--ONLY:VELO
|
|
271
|
-
* The `createResource()` function returns a Promise that resolves to the created resource.
|
|
272
|
-
* <!--END:ONLY:VELO-->
|
|
273
236
|
*
|
|
274
|
-
* Bookings resources are created with a schedule. The schedule and its sessions determine the resource's availability. Note that the schedule must contain a start date in the `availability.start` property.
|
|
275
|
-
* For resources that are available during the business's default hours, add the business's schedule as a linked schedule in the resource's schedule. For resources that have their own hours, create sessions with type `"WORKING_HOURS"` using the resource's schedule.
|
|
276
|
-
* You can use both individual and recurring sessions to define resource availability. You cannot use availability constraints for resource schedules.
|
|
277
237
|
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
* + If the resource uses the default business hours, get the business resource's schedule ID and include it in the `scheduleInfo.availability.linkedSchedules` array in the `scheduleInfo` parameter. The default hours can bee found in the Dashboard under **Settings** in the **Bookings** section, on the **Appointment hours** page.
|
|
281
|
-
* + If the resource has its own custom working hours, create the resource, then create sessions of type `"WORKING_HOURS"` using the [`createSession()`](wix-bookings-backend.Sessions/createsession) function. Use the `scheduleId` returned from `createResource()` when creating the sessions. These session can be single sessions or recurring sessions.
|
|
282
|
-
* + You can have both default business hours and custom hours for the same resource schedule by combining the steps above.
|
|
283
|
-
*
|
|
284
|
-
* > **Notes:**
|
|
285
|
-
* > + The Wix Bookings app does not show both default business hours and custom hours on the **Staff** page in the dashboard. If you've set up both custom and default business hours, only the default business hours will appear in the app, although both are working.
|
|
286
|
-
* > + The Wix Bookings app does not show non-recurring `WORKING_HOURS` sessions in the resource calendar.
|
|
287
|
-
* > + You can only add the business resource's schedule as a linked schedule for a resource.
|
|
288
|
-
* > + A resource can have one schedule only.
|
|
289
|
-
* > + You can have up to 135 active resources and an additional 135 deleted resources.
|
|
290
|
-
* > + Only users with the **Bookings Admin** [role](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin) can create a resource. You can override the role permissions by setting the `options.suppressAuth` parameter to `true`.
|
|
291
|
-
* <!--END:ONLY:VELO-->
|
|
292
|
-
*
|
|
293
|
-
* <!--ONLY:REST-->
|
|
294
|
-
* Use the following steps to create resources:
|
|
295
|
-
* - Create the resource using including schedule information.
|
|
296
|
-
* - If the resource uses the default business hours, get the business resource's schedule ID and include it in the `scheduleInfo.availability.linkedSchedules` array in the in the schedule parameters.
|
|
297
|
-
* - If the resource has its own custom working hours, create sessions of type `"WORKING_HOURS"`. Use the `scheduleId` of the new resource when creating the sessions. These session can be single sessions or recurring sessions. You can have both business hours and custom hours for the same resource schedule.
|
|
238
|
+
* The `createResource()` function returns a Promise that resolves to the created resource.
|
|
239
|
+
* Bookings resources are created with a schedule. The schedule and its sessions determine the resource's availability. Note that the schedule must contain a start date in the availability.start property. For resources that are available during the business's default hours, add the business's schedule as a linked schedule in the resource's schedule. For resources that have their own hours, create sessions with type `WORKING_HOURS` using the resource's schedule. You can use both individual and recurring sessions to define resource availability. You cannot use availability constraints for resource schedules.
|
|
298
240
|
*
|
|
299
|
-
* >**Notes:**
|
|
300
|
-
* > + A resource can have one schedule only.
|
|
301
|
-
* > + You can have up to 135 active resources and an additional 135 deleted resources.
|
|
302
|
-
* > + The `businessLocation.businessSchedule` object in the `schedule.location` object is not supported.
|
|
303
241
|
*
|
|
242
|
+
* When creating a resource using `createResource()`, include the resource's schedule information. Set the schedule information as follows:
|
|
243
|
+
* - If the resource uses the default business hours, get the business resource's schedule ID and include it in the `scheduleInfo.availability.linkedSchedules` array in the `scheduleInfo` parameter. The default hours can bee found in the Dashboard under **Settings** in the **Bookings** section, on the **Appointment hours** page.
|
|
244
|
+
* - If the resource has its own custom working hours, create the resource, then create sessions of type `WORKING_HOURS` using the [`createSession()`](wix-bookings-v2/sessions/createsession) function. Use the `scheduleId` returned from `createResource()` when creating the sessions. These session can be single sessions or recurring sessions.
|
|
245
|
+
* - You can have both default business hours and custom hours for the same resource schedule by combining the steps above.
|
|
304
246
|
*
|
|
305
247
|
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
*
|
|
248
|
+
* > **Notes:**
|
|
249
|
+
* - The Wix Bookings app does not show both default business hours and custom hours on the **Staff** page in the dashboard. If you've set up both custom and default business hours, only the default business hours will appear in the app, although both are working.
|
|
250
|
+
* - The Wix Bookings app does not show non-recurring `WORKING_HOURS` sessions in the resource calendar.
|
|
251
|
+
* - You can only add the business resource's schedule as a linked schedule for a resource.
|
|
252
|
+
* - A resource can have one schedule only.
|
|
253
|
+
* - You can have up to 135 active resources and an additional 135 deleted resources.
|
|
254
|
+
* - Only users with the **Bookings Admin** [role](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin) can create a resource.
|
|
309
255
|
*/
|
|
310
256
|
function create(payload) {
|
|
311
257
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_createResourceRequest, {
|
|
@@ -352,26 +298,14 @@ function create(payload) {
|
|
|
352
298
|
exports.create = create;
|
|
353
299
|
/**
|
|
354
300
|
* Updates a resource.
|
|
355
|
-
* <!--ONLY:VELO
|
|
356
|
-
* The `updateResource()` function returns a Promise that resolves when a resource is updated.
|
|
357
|
-
* Use this function to update all bookings resource information except for the resource's schedule. To update a resource's schedule use [`updateResourceSchedule()`](wix-bookings-backend/resource/updateresourceschedule).
|
|
358
301
|
*
|
|
359
|
-
* >**Notes:**
|
|
360
|
-
* > + When updating a resource you cannot change the system tags used by the Wix Bookings app. Tags used by the app have the values `"business"` and `"staff"`.
|
|
361
|
-
* > + Only users with the **Bookings Admin** [role](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin) can update a resource. You can override the role permissions by setting the `options.suppressAuth` parameter to `true`.
|
|
362
|
-
* <!--END:ONLY:VELO-->
|
|
363
|
-
* <!--ONLY:REST-->
|
|
364
|
-
* Use this endpoint to update all resource information except for the resource's schedule. To update a resource's schedule use
|
|
365
|
-
* the [Update Schedule](https://dev.wix.com/api/rest/wix-bookings/resources/update-schedule) endpoint.
|
|
366
302
|
*
|
|
367
|
-
*
|
|
368
|
-
* > + When updating a resource you cannot change the system tags used by the Wix Bookings app. Tags used by the app have the values `"business"` and `"staff"`.
|
|
369
|
-
* > + When updating a resource's schedule you cannot change the resource tag used by the Wix Bookings app. Tags used by the app have the values `"INDIVIDUAL"`, `"GROUP"`, and `"COURSE”`.
|
|
370
|
-
* > + The `businessLocation.businessSchedule` object in the `schedule.location` object is not supported.
|
|
303
|
+
* The `updateResource()` function returns a Promise that resolves when a resource is updated. Use this function to update all bookings resource information except for the resource's schedule. To update a resource's schedule use [`updateResourceSchedule()`](#updateresourceschedule).
|
|
371
304
|
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
305
|
+
*
|
|
306
|
+
* >**Notes:**
|
|
307
|
+
* - When updating a resource you cannot change the system tags used by the Wix Bookings app. Tags used by the app have the values `"business"` and `"staff"`.
|
|
308
|
+
* - Only users with the **Bookings Admin** [role](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin) can update a resource.
|
|
375
309
|
*/
|
|
376
310
|
function update(payload) {
|
|
377
311
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_updateResourceRequest, {
|
|
@@ -519,28 +453,19 @@ function updateSchedule(payload) {
|
|
|
519
453
|
exports.updateSchedule = updateSchedule;
|
|
520
454
|
/**
|
|
521
455
|
* Deletes a resource.
|
|
522
|
-
*
|
|
456
|
+
*
|
|
523
457
|
* The `deleteResource()` function returns a Promise that is resolved when a resource is deleted.
|
|
524
|
-
*
|
|
525
|
-
*
|
|
458
|
+
*
|
|
459
|
+
*
|
|
460
|
+
* Deleting a resource updates its status to `DELETED`.
|
|
526
461
|
*
|
|
527
462
|
* You cannot delete a resource if it has booked sessions.
|
|
528
463
|
*
|
|
529
|
-
* <!--ONLY:VELO
|
|
530
|
-
* >**Notes:**
|
|
531
|
-
* > + The Bookings app automatically creates a resource with a name and tag of value `"business"``. This resource is used for the business's schedule and working hours and cannot be deleted.
|
|
532
|
-
* > + You can have up to 135 active resources and an additional 135 deleted resources.
|
|
533
|
-
* > + Only users with the **Bookings Admin** [role](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin) can delete a resource. You can override the role permissions by setting the `options.suppressAuth` parameter to `true`.
|
|
534
|
-
* <!--END:ONLY:VELO-->
|
|
535
464
|
*
|
|
536
|
-
* <!--ONLY:REST-->
|
|
537
465
|
* >**Notes:**
|
|
538
|
-
*
|
|
539
|
-
*
|
|
540
|
-
*
|
|
541
|
-
* >**Permissions:**
|
|
542
|
-
* > This endpoint requires the Manage Bookings [permission scope](https://devforum.wix.com/kb/en/article/available-permissions).
|
|
543
|
-
* <!--END:ONLY:REST-->
|
|
466
|
+
* - The Bookings app automatically creates a resource with a name and tag of value `business`. This resource is used for the business's schedule and working hours and cannot be deleted.
|
|
467
|
+
* - You can have up to 135 active resources and an additional 135 deleted resources.
|
|
468
|
+
* - Only users with the **Bookings Admin** [role](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin) can delete a resource.
|
|
544
469
|
*/
|
|
545
470
|
function _delete(payload) {
|
|
546
471
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_deleteResourceRequest, {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bookings-catalog-v1-resource.http.js","sourceRoot":"","sources":["../../../src/bookings-catalog-v1-resource.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;
|
|
1
|
+
{"version":3,"file":"bookings-catalog-v1-resource.http.js","sourceRoot":"","sources":["../../../src/bookings-catalog-v1-resource.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAqBhD,MAAM,QAAQ,GAAG,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AACjD,MAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,6BAA6B;IACvC,SAAS,EAAE,6BAA6B;CACzC,CAAC;AACF,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE,2BAA2B;IAClC,GAAG,EAAE,2BAA2B;IAChC,SAAS,EAAE,WAAW;CACvB,CAAC;AACF,MAAM,aAAa,GAAG;IACpB,cAAc,EAAE,wBAAwB;IACxC,cAAc,EAAE,wBAAwB;IACxC,cAAc,EAAE,wBAAwB;CACzC,CAAC;AACF,MAAM,cAAc,GAAG;IACrB,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,WAAW;IACpB,SAAS,EAAE,WAAW;CACvB,CAAC;AACF,MAAM,sBAAsB,GAAG,EAAE,IAAI,EAAE,2BAA2B,EAAE,CAAC;AACrE,MAAM,sBAAsB,GAAG;IAC7B,QAAQ,EAAE,WAAW;IACrB,SAAS,EAAE,WAAW;CACvB,CAAC;AACF,MAAM,uBAAuB,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;AAC1D,MAAM,sBAAsB,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;AACzD,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,MAAM,GAAG,EAAE,iBAAiB,EAAE,2BAA2B,EA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GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,kCAAkC;YAC9C,MAAM,EAAE,QAAe;YACvB,SAAS,EACP,+EAA+E;YACjF,GAAG,EAAE,uEAAuE,CAC1E,EAAE,SAAS,EAAE,oBAAoB,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,CAChE;YACD,MAAM,EAAE,IAAA,iCAAiB,EAAC,cAAc,CAAC;YACzC,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;IAE5B,OAAO,SAAS,CAAC;AACnB,CAAC;AA/BD,0BA+BC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
-
import { Resource,
|
|
2
|
+
import { Resource, CreateResourceOptions, QueryResourcesOptions, UpdateResourceOptions, UpdateScheduleOptions } from './bookings-catalog-v1-resource.universal';
|
|
3
3
|
export declare const __metadata: {
|
|
4
4
|
PACKAGE_NAME: string;
|
|
5
5
|
};
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function update(httpClient: HttpClient): (_id: string | null, options?: UpdateOptions | undefined) => Promise<import("./bookings-catalog-v1-resource.universal").UpdateResourceResponse & import("./bookings-catalog-v1-resource.universal").UpdateResourceResponseNonNullableFields>;
|
|
6
|
+
export declare function queryResources(httpClient: HttpClient): (options?: QueryResourcesOptions | undefined) => Promise<import("./bookings-catalog-v1-resource.universal").QueryResourcesResponse & import("./bookings-catalog-v1-resource.universal").QueryResourcesResponseNonNullableFields>;
|
|
7
|
+
export declare function createResource(httpClient: HttpClient): (resource: Resource, options?: CreateResourceOptions | undefined) => Promise<import("./bookings-catalog-v1-resource.universal").CreateResourceResponse & import("./bookings-catalog-v1-resource.universal").CreateResourceResponseNonNullableFields>;
|
|
8
|
+
export declare function updateResource(httpClient: HttpClient): (_id: string | null, options?: UpdateResourceOptions | undefined) => Promise<import("./bookings-catalog-v1-resource.universal").UpdateResourceResponse & import("./bookings-catalog-v1-resource.universal").UpdateResourceResponseNonNullableFields>;
|
|
10
9
|
export declare function updateSchedule(httpClient: HttpClient): (resourceId: string | null, options?: UpdateScheduleOptions | undefined) => Promise<import("./bookings-catalog-v1-resource.universal").UpdateScheduleResponse & import("./bookings-catalog-v1-resource.universal").UpdateScheduleResponseNonNullableFields>;
|
|
11
|
-
export declare function
|
|
10
|
+
export declare function deleteResource(httpClient: HttpClient): (_id: string) => Promise<import("./bookings-catalog-v1-resource.universal").DeleteResourceResponse & import("./bookings-catalog-v1-resource.universal").DeleteResourceResponseNonNullableFields>;
|
|
12
11
|
export { Day, Transparency, RecurringIntervalType, LocationType, LocationStatus, LocationsLocationType, DayOfWeek, ApprovalStatus, ScheduleStatus, ConferenceType, ResourceStatus, SortOrder, Event, } from './bookings-catalog-v1-resource.universal';
|
|
13
|
-
export { Resource, Schedule, RecurringInterval, Interval, Frequency, LinkedSchedule, Location, Address, AddressStreetOneOf, StreetAddress, AddressLocation, Subdivision, LocationsLocation, LocationsAddress, LocationsStreetAddress, LocationsAddressLocation, BusinessSchedule, TimePeriod, SpecialHourPeriod, Rate, Price, Availability, AvailabilityConstraints, SplitInterval, Participant, ExternalCalendarOverrides, Version, ConferenceProvider, CalendarConference, BusinessLocation, ListResourcesRequest, Query, Sorting, Paging, ListResourcesResponse, QueryMetaData, PagingMetadataV2, Cursors, QueryResourcesRequest, QueryV2, QueryV2PagingMethodOneOf, CursorPaging, QueryResourcesResponse, CreateResourceRequest, CreateResourceResponse, ResourceNotification, BatchCreateResourceRequest, BatchCreateResourceResponse, UpdateResourceRequest, BatchRequest, CreateScheduleRequest, UpdateScheduleRequest, ParticipantNotification, CancelScheduleRequest, UpdateResourceResponse, BatchResponse, ResourceUpdateScheduleRequest, UpdateScheduleResponse, DeleteResourceRequest, DeleteResourceResponse, BatchDeleteResourceRequest, BatchDeleteResourceResponse, LinkResourceToUserRequest, LinkResourceToUserResponse, UnLinkResourceFromOwnerRequest, UnLinkResourceFromOwnerResponse,
|
|
12
|
+
export { Resource, Schedule, RecurringInterval, Interval, Frequency, LinkedSchedule, Location, Address, AddressStreetOneOf, StreetAddress, AddressLocation, Subdivision, LocationsLocation, LocationsAddress, LocationsStreetAddress, LocationsAddressLocation, BusinessSchedule, TimePeriod, SpecialHourPeriod, Rate, Price, Availability, AvailabilityConstraints, SplitInterval, Participant, ExternalCalendarOverrides, Version, ConferenceProvider, CalendarConference, BusinessLocation, ListResourcesRequest, Query, Sorting, Paging, ListResourcesResponse, QueryMetaData, PagingMetadataV2, Cursors, QueryResourcesRequest, QueryV2, QueryV2PagingMethodOneOf, CursorPaging, QueryResourcesResponse, CreateResourceRequest, CreateResourceResponse, ResourceNotification, BatchCreateResourceRequest, BatchCreateResourceResponse, UpdateResourceRequest, BatchRequest, CreateScheduleRequest, UpdateScheduleRequest, ParticipantNotification, CancelScheduleRequest, UpdateResourceResponse, BatchResponse, ResourceUpdateScheduleRequest, UpdateScheduleResponse, DeleteResourceRequest, DeleteResourceResponse, BatchDeleteResourceRequest, BatchDeleteResourceResponse, LinkResourceToUserRequest, LinkResourceToUserResponse, UnLinkResourceFromOwnerRequest, UnLinkResourceFromOwnerResponse, QueryResourcesResponseNonNullableFields, CreateResourceResponseNonNullableFields, UpdateResourceResponseNonNullableFields, UpdateScheduleResponseNonNullableFields, DeleteResourceResponseNonNullableFields, QueryResourcesOptions, CreateResourceOptions, UpdateResourceOptions, UpdateScheduleOptions, } from './bookings-catalog-v1-resource.universal';
|
|
@@ -1,44 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Event = exports.SortOrder = exports.ResourceStatus = exports.ConferenceType = exports.ScheduleStatus = exports.ApprovalStatus = exports.DayOfWeek = exports.LocationsLocationType = exports.LocationStatus = exports.LocationType = exports.RecurringIntervalType = exports.Transparency = exports.Day = exports.
|
|
3
|
+
exports.Event = exports.SortOrder = exports.ResourceStatus = exports.ConferenceType = exports.ScheduleStatus = exports.ApprovalStatus = exports.DayOfWeek = exports.LocationsLocationType = exports.LocationStatus = exports.LocationType = exports.RecurringIntervalType = exports.Transparency = exports.Day = exports.deleteResource = exports.updateSchedule = exports.updateResource = exports.createResource = exports.queryResources = exports.__metadata = void 0;
|
|
4
4
|
const bookings_catalog_v1_resource_universal_1 = require("./bookings-catalog-v1-resource.universal");
|
|
5
5
|
exports.__metadata = { PACKAGE_NAME: '@wix/bookings' };
|
|
6
|
-
function
|
|
7
|
-
return (options) => (0, bookings_catalog_v1_resource_universal_1.
|
|
6
|
+
function queryResources(httpClient) {
|
|
7
|
+
return (options) => (0, bookings_catalog_v1_resource_universal_1.queryResources)(options,
|
|
8
8
|
// @ts-ignore
|
|
9
9
|
{ httpClient });
|
|
10
10
|
}
|
|
11
|
-
exports.
|
|
12
|
-
function
|
|
13
|
-
return (options) => (0, bookings_catalog_v1_resource_universal_1.
|
|
11
|
+
exports.queryResources = queryResources;
|
|
12
|
+
function createResource(httpClient) {
|
|
13
|
+
return (resource, options) => (0, bookings_catalog_v1_resource_universal_1.createResource)(resource, options,
|
|
14
14
|
// @ts-ignore
|
|
15
15
|
{ httpClient });
|
|
16
16
|
}
|
|
17
|
-
exports.
|
|
18
|
-
function
|
|
19
|
-
return (
|
|
17
|
+
exports.createResource = createResource;
|
|
18
|
+
function updateResource(httpClient) {
|
|
19
|
+
return (_id, options) => (0, bookings_catalog_v1_resource_universal_1.updateResource)(_id, options,
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
{ httpClient });
|
|
22
22
|
}
|
|
23
|
-
exports.
|
|
24
|
-
function update(httpClient) {
|
|
25
|
-
return (_id, options) => (0, bookings_catalog_v1_resource_universal_1.update)(_id, options,
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
{ httpClient });
|
|
28
|
-
}
|
|
29
|
-
exports.update = update;
|
|
23
|
+
exports.updateResource = updateResource;
|
|
30
24
|
function updateSchedule(httpClient) {
|
|
31
25
|
return (resourceId, options) => (0, bookings_catalog_v1_resource_universal_1.updateSchedule)(resourceId, options,
|
|
32
26
|
// @ts-ignore
|
|
33
27
|
{ httpClient });
|
|
34
28
|
}
|
|
35
29
|
exports.updateSchedule = updateSchedule;
|
|
36
|
-
function
|
|
37
|
-
return (_id) => (0, bookings_catalog_v1_resource_universal_1.
|
|
30
|
+
function deleteResource(httpClient) {
|
|
31
|
+
return (_id) => (0, bookings_catalog_v1_resource_universal_1.deleteResource)(_id,
|
|
38
32
|
// @ts-ignore
|
|
39
33
|
{ httpClient });
|
|
40
34
|
}
|
|
41
|
-
exports.
|
|
35
|
+
exports.deleteResource = deleteResource;
|
|
42
36
|
var bookings_catalog_v1_resource_universal_2 = require("./bookings-catalog-v1-resource.universal");
|
|
43
37
|
Object.defineProperty(exports, "Day", { enumerable: true, get: function () { return bookings_catalog_v1_resource_universal_2.Day; } });
|
|
44
38
|
Object.defineProperty(exports, "Transparency", { enumerable: true, get: function () { return bookings_catalog_v1_resource_universal_2.Transparency; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bookings-catalog-v1-resource.public.js","sourceRoot":"","sources":["../../../src/bookings-catalog-v1-resource.public.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"bookings-catalog-v1-resource.public.js","sourceRoot":"","sources":["../../../src/bookings-catalog-v1-resource.public.ts"],"names":[],"mappings":";;;AACA,qGAWkD;AAErC,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAE5D,SAAgB,cAAc,CAAC,UAAsB;IACnD,OAAO,CAAC,OAA+B,EAAE,EAAE,CACzC,IAAA,uDAAuB,EACrB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,wCAOC;AAED,SAAgB,cAAc,CAAC,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