@wix/bookings 1.0.309 → 1.0.310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +5 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +5 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +5 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/src/bookings-availability-v1-slot-availability.meta.d.ts +1 -1
- package/build/cjs/src/bookings-availability-v1-slot-availability.meta.js +5 -1
- package/build/cjs/src/bookings-availability-v1-slot-availability.meta.js.map +1 -1
- package/build/cjs/src/bookings-availability-v1-slot-availability.public.d.ts +1 -1
- package/build/cjs/src/bookings-availability-v1-slot-availability.types.js +2 -2
- package/build/cjs/src/bookings-availability-v1-slot-availability.types.js.map +1 -1
- package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js +7 -3
- package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
- package/build/cjs/src/bookings-availability-v2-time-slot.meta.d.ts +1 -1
- package/build/cjs/src/bookings-availability-v2-time-slot.meta.js +5 -1
- package/build/cjs/src/bookings-availability-v2-time-slot.meta.js.map +1 -1
- package/build/cjs/src/bookings-availability-v2-time-slot.public.d.ts +3 -3
- package/build/cjs/src/bookings-availability-v2-time-slot.types.js +1 -1
- package/build/cjs/src/bookings-availability-v2-time-slot.types.js.map +1 -1
- package/build/cjs/src/bookings-availability-v2-time-slot.universal.js +6 -2
- package/build/cjs/src/bookings-availability-v2-time-slot.universal.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v1-session.meta.d.ts +1 -1
- package/build/cjs/src/bookings-calendar-v1-session.meta.js +5 -1
- package/build/cjs/src/bookings-calendar-v1-session.meta.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v1-session.public.d.ts +3 -3
- package/build/cjs/src/bookings-calendar-v1-session.types.js +12 -12
- package/build/cjs/src/bookings-calendar-v1-session.types.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v1-session.universal.js +17 -13
- package/build/cjs/src/bookings-calendar-v1-session.universal.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v2-external-calendar.meta.d.ts +1 -1
- package/build/cjs/src/bookings-calendar-v2-external-calendar.meta.js +5 -1
- package/build/cjs/src/bookings-calendar-v2-external-calendar.meta.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v2-external-calendar.public.d.ts +2 -2
- package/build/cjs/src/bookings-calendar-v2-external-calendar.types.js +19 -19
- package/build/cjs/src/bookings-calendar-v2-external-calendar.types.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v2-external-calendar.universal.js +24 -20
- package/build/cjs/src/bookings-calendar-v2-external-calendar.universal.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v2-session-feed-event.types.js +13 -13
- package/build/cjs/src/bookings-calendar-v2-session-feed-event.types.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v2-session-feed-event.universal.js +18 -14
- package/build/cjs/src/bookings-calendar-v2-session-feed-event.universal.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v2-session-view.meta.d.ts +1 -1
- package/build/cjs/src/bookings-calendar-v2-session-view.meta.js +5 -1
- package/build/cjs/src/bookings-calendar-v2-session-view.meta.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v2-session-view.types.js +13 -13
- package/build/cjs/src/bookings-calendar-v2-session-view.types.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v2-session-view.universal.js +18 -14
- package/build/cjs/src/bookings-calendar-v2-session-view.universal.js.map +1 -1
- package/build/cjs/src/bookings-catalog-v1-resource.http.js +600 -172
- package/build/cjs/src/bookings-catalog-v1-resource.http.js.map +1 -1
- package/build/cjs/src/bookings-catalog-v1-resource.meta.d.ts +1 -1
- package/build/cjs/src/bookings-catalog-v1-resource.meta.js +5 -1
- package/build/cjs/src/bookings-catalog-v1-resource.meta.js.map +1 -1
- package/build/cjs/src/bookings-catalog-v1-resource.public.d.ts +1 -1
- package/build/cjs/src/bookings-catalog-v1-resource.types.js +13 -13
- package/build/cjs/src/bookings-catalog-v1-resource.types.js.map +1 -1
- package/build/cjs/src/bookings-catalog-v1-resource.universal.js +18 -14
- package/build/cjs/src/bookings-catalog-v1-resource.universal.js.map +1 -1
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.meta.d.ts +1 -1
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.meta.js +5 -1
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.meta.js.map +1 -1
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.public.d.ts +1 -1
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.types.js +21 -21
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.types.js.map +1 -1
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.js +26 -22
- package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.js.map +1 -1
- package/build/cjs/src/bookings-reader-v2-extended-booking.meta.d.ts +1 -1
- package/build/cjs/src/bookings-reader-v2-extended-booking.meta.js +5 -1
- package/build/cjs/src/bookings-reader-v2-extended-booking.meta.js.map +1 -1
- package/build/cjs/src/bookings-reader-v2-extended-booking.public.d.ts +1 -1
- package/build/cjs/src/bookings-reader-v2-extended-booking.types.js +11 -11
- package/build/cjs/src/bookings-reader-v2-extended-booking.types.js.map +1 -1
- package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js +16 -12
- package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js.map +1 -1
- package/build/cjs/src/bookings-services-v2-service.meta.d.ts +1 -1
- package/build/cjs/src/bookings-services-v2-service.meta.js +5 -1
- package/build/cjs/src/bookings-services-v2-service.meta.js.map +1 -1
- package/build/cjs/src/bookings-services-v2-service.public.d.ts +2 -2
- package/build/cjs/src/bookings-services-v2-service.types.js +27 -27
- package/build/cjs/src/bookings-services-v2-service.types.js.map +1 -1
- package/build/cjs/src/bookings-services-v2-service.universal.js +32 -28
- package/build/cjs/src/bookings-services-v2-service.universal.js.map +1 -1
- package/build/cjs/src/bookings-v1-category.http.js +8 -37
- package/build/cjs/src/bookings-v1-category.http.js.map +1 -1
- package/build/cjs/src/bookings-v1-category.meta.d.ts +1 -1
- package/build/cjs/src/bookings-v1-category.meta.js +5 -1
- package/build/cjs/src/bookings-v1-category.meta.js.map +1 -1
- package/build/cjs/src/bookings-v1-category.public.d.ts +2 -2
- package/build/cjs/src/bookings-v1-category.types.js +2 -2
- package/build/cjs/src/bookings-v1-category.types.js.map +1 -1
- package/build/cjs/src/bookings-v1-category.universal.js +7 -3
- package/build/cjs/src/bookings-v1-category.universal.js.map +1 -1
- package/build/cjs/src/bookings-v2-attendance.meta.d.ts +1 -1
- package/build/cjs/src/bookings-v2-attendance.meta.js +5 -1
- package/build/cjs/src/bookings-v2-attendance.meta.js.map +1 -1
- package/build/cjs/src/bookings-v2-attendance.public.d.ts +1 -1
- package/build/cjs/src/bookings-v2-attendance.types.js +2 -2
- package/build/cjs/src/bookings-v2-attendance.types.js.map +1 -1
- package/build/cjs/src/bookings-v2-attendance.universal.js +7 -3
- package/build/cjs/src/bookings-v2-attendance.universal.js.map +1 -1
- package/build/cjs/src/bookings-v2-booking.meta.d.ts +1 -1
- package/build/cjs/src/bookings-v2-booking.meta.js +5 -1
- package/build/cjs/src/bookings-v2-booking.meta.js.map +1 -1
- package/build/cjs/src/bookings-v2-booking.public.d.ts +9 -9
- package/build/cjs/src/bookings-v2-booking.types.js +12 -12
- package/build/cjs/src/bookings-v2-booking.types.js.map +1 -1
- package/build/cjs/src/bookings-v2-booking.universal.js +17 -13
- package/build/cjs/src/bookings-v2-booking.universal.js.map +1 -1
- package/build/cjs/src/bookings-v2-price-info.meta.d.ts +1 -1
- package/build/cjs/src/bookings-v2-price-info.meta.js +5 -1
- package/build/cjs/src/bookings-v2-price-info.meta.js.map +1 -1
- package/build/cjs/src/bookings-v2-price-info.types.js +9 -9
- package/build/cjs/src/bookings-v2-price-info.types.js.map +1 -1
- package/build/cjs/src/bookings-v2-price-info.universal.js +14 -10
- package/build/cjs/src/bookings-v2-price-info.universal.js.map +1 -1
- package/build/es/src/bookings-availability-v1-slot-availability.meta.d.ts +1 -1
- package/build/es/src/bookings-availability-v1-slot-availability.public.d.ts +1 -1
- package/build/es/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
- package/build/es/src/bookings-availability-v2-time-slot.meta.d.ts +1 -1
- package/build/es/src/bookings-availability-v2-time-slot.public.d.ts +3 -3
- package/build/es/src/bookings-availability-v2-time-slot.universal.js.map +1 -1
- package/build/es/src/bookings-calendar-v1-session.meta.d.ts +1 -1
- package/build/es/src/bookings-calendar-v1-session.public.d.ts +3 -3
- package/build/es/src/bookings-calendar-v1-session.universal.js.map +1 -1
- package/build/es/src/bookings-calendar-v2-external-calendar.meta.d.ts +1 -1
- package/build/es/src/bookings-calendar-v2-external-calendar.public.d.ts +2 -2
- package/build/es/src/bookings-calendar-v2-external-calendar.universal.js.map +1 -1
- package/build/es/src/bookings-calendar-v2-session-feed-event.universal.js.map +1 -1
- package/build/es/src/bookings-calendar-v2-session-view.meta.d.ts +1 -1
- package/build/es/src/bookings-calendar-v2-session-view.universal.js.map +1 -1
- package/build/es/src/bookings-catalog-v1-resource.http.js +600 -172
- package/build/es/src/bookings-catalog-v1-resource.http.js.map +1 -1
- package/build/es/src/bookings-catalog-v1-resource.meta.d.ts +1 -1
- package/build/es/src/bookings-catalog-v1-resource.public.d.ts +1 -1
- package/build/es/src/bookings-catalog-v1-resource.universal.js.map +1 -1
- package/build/es/src/bookings-catalog-v1-service-options-and-variants.meta.d.ts +1 -1
- package/build/es/src/bookings-catalog-v1-service-options-and-variants.public.d.ts +1 -1
- package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.js.map +1 -1
- package/build/es/src/bookings-reader-v2-extended-booking.meta.d.ts +1 -1
- package/build/es/src/bookings-reader-v2-extended-booking.public.d.ts +1 -1
- package/build/es/src/bookings-reader-v2-extended-booking.universal.js.map +1 -1
- package/build/es/src/bookings-services-v2-service.meta.d.ts +1 -1
- package/build/es/src/bookings-services-v2-service.public.d.ts +2 -2
- package/build/es/src/bookings-services-v2-service.universal.js.map +1 -1
- package/build/es/src/bookings-v1-category.http.js +8 -37
- package/build/es/src/bookings-v1-category.http.js.map +1 -1
- package/build/es/src/bookings-v1-category.meta.d.ts +1 -1
- package/build/es/src/bookings-v1-category.public.d.ts +2 -2
- package/build/es/src/bookings-v1-category.universal.js.map +1 -1
- package/build/es/src/bookings-v2-attendance.meta.d.ts +1 -1
- package/build/es/src/bookings-v2-attendance.public.d.ts +1 -1
- package/build/es/src/bookings-v2-attendance.universal.js.map +1 -1
- package/build/es/src/bookings-v2-booking.meta.d.ts +1 -1
- package/build/es/src/bookings-v2-booking.public.d.ts +9 -9
- package/build/es/src/bookings-v2-booking.universal.js.map +1 -1
- package/build/es/src/bookings-v2-price-info.meta.d.ts +1 -1
- package/build/es/src/bookings-v2-price-info.universal.js.map +1 -1
- package/package.json +7 -3
|
@@ -1,82 +1,11 @@
|
|
|
1
1
|
import { toURLSearchParams } from '@wix/metro-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';
|
|
3
|
+
import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';
|
|
4
|
+
import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
|
|
5
|
+
import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
|
|
6
|
+
import { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';
|
|
7
|
+
import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
|
|
3
8
|
import { resolveUrl } from '@wix/metro-runtime';
|
|
4
|
-
const _address = { geocode: '_addressLocation' };
|
|
5
|
-
const _addressLocation = {
|
|
6
|
-
latitude: 'google.protobuf.DoubleValue',
|
|
7
|
-
longitude: 'google.protobuf.DoubleValue',
|
|
8
|
-
};
|
|
9
|
-
const _availability = {
|
|
10
|
-
start: 'google.protobuf.Timestamp',
|
|
11
|
-
end: 'google.protobuf.Timestamp',
|
|
12
|
-
locations: '_location',
|
|
13
|
-
};
|
|
14
|
-
const _batchRequest = {
|
|
15
|
-
createRequests: '_createScheduleRequest',
|
|
16
|
-
updateRequests: '_updateScheduleRequest',
|
|
17
|
-
cancelRequests: '_cancelScheduleRequest',
|
|
18
|
-
};
|
|
19
|
-
const _batchResponse = {
|
|
20
|
-
created: '_schedule',
|
|
21
|
-
updated: '_schedule',
|
|
22
|
-
cancelled: '_schedule',
|
|
23
|
-
};
|
|
24
|
-
const _cancelScheduleRequest = { from: 'google.protobuf.Timestamp' };
|
|
25
|
-
const _createResourceRequest = {
|
|
26
|
-
resource: '_resource',
|
|
27
|
-
schedules: '_schedule',
|
|
28
|
-
};
|
|
29
|
-
const _createResourceResponse = { resource: '_resource' };
|
|
30
|
-
const _createScheduleRequest = { schedule: '_schedule' };
|
|
31
|
-
const _deleteResourceRequest = {};
|
|
32
|
-
const _deleteResourceResponse = {};
|
|
33
|
-
const _image = { urlExpirationDate: 'google.protobuf.Timestamp' };
|
|
34
|
-
const _location = {
|
|
35
|
-
customAddress: '_address',
|
|
36
|
-
businessLocation: '_locationsLocation',
|
|
37
|
-
};
|
|
38
|
-
const _locationsAddress = { geocode: '_locationsAddressLocation' };
|
|
39
|
-
const _locationsAddressLocation = {
|
|
40
|
-
latitude: 'google.protobuf.DoubleValue',
|
|
41
|
-
longitude: 'google.protobuf.DoubleValue',
|
|
42
|
-
};
|
|
43
|
-
const _locationsLocation = { address: '_locationsAddress' };
|
|
44
|
-
const _recurringInterval = {
|
|
45
|
-
start: 'google.protobuf.Timestamp',
|
|
46
|
-
end: 'google.protobuf.Timestamp',
|
|
47
|
-
};
|
|
48
|
-
const _resource = {
|
|
49
|
-
images: '_image',
|
|
50
|
-
schedules: '_schedule',
|
|
51
|
-
eventsSchedule: '_schedule',
|
|
52
|
-
};
|
|
53
|
-
const _resourceUpdateScheduleRequest = {
|
|
54
|
-
fieldmask: 'google.protobuf.FieldMask',
|
|
55
|
-
schedule: '_schedule',
|
|
56
|
-
};
|
|
57
|
-
const _schedule = {
|
|
58
|
-
firstSessionStart: 'google.protobuf.Timestamp',
|
|
59
|
-
lastSessionEnd: 'google.protobuf.Timestamp',
|
|
60
|
-
created: 'google.protobuf.Timestamp',
|
|
61
|
-
updated: 'google.protobuf.Timestamp',
|
|
62
|
-
intervals: '_recurringInterval',
|
|
63
|
-
location: '_location',
|
|
64
|
-
availability: '_availability',
|
|
65
|
-
};
|
|
66
|
-
const _updateResourceRequest = {
|
|
67
|
-
fieldMask: 'google.protobuf.FieldMask',
|
|
68
|
-
resource: '_resource',
|
|
69
|
-
scheduleActions: '_batchRequest',
|
|
70
|
-
};
|
|
71
|
-
const _updateResourceResponse = {
|
|
72
|
-
resource: '_resource',
|
|
73
|
-
schedules: '_batchResponse',
|
|
74
|
-
};
|
|
75
|
-
const _updateScheduleRequest = {
|
|
76
|
-
fieldMask: 'google.protobuf.FieldMask',
|
|
77
|
-
schedule: '_schedule',
|
|
78
|
-
};
|
|
79
|
-
const _updateScheduleResponse = { schedule: '_schedule' };
|
|
80
9
|
function resolveComWixpressBookingsResourcesCoreApiV1ResourceResourcesServiceUrl(opts) {
|
|
81
10
|
const domainToMappings = {
|
|
82
11
|
'api._api_base_domain_': [
|
|
@@ -188,45 +117,198 @@ function resolveComWixpressBookingsResourcesCoreApiV1ResourceResourcesServiceUrl
|
|
|
188
117
|
* >- You can have up to 135 active resources and an additional 135 deleted resources.
|
|
189
118
|
*/
|
|
190
119
|
export function create(payload) {
|
|
191
|
-
const { toJSON: toReq, fromJSON: fromReq } = serializer(_createResourceRequest, {
|
|
192
|
-
_address,
|
|
193
|
-
_addressLocation,
|
|
194
|
-
_availability,
|
|
195
|
-
_image,
|
|
196
|
-
_location,
|
|
197
|
-
_locationsAddress,
|
|
198
|
-
_locationsAddressLocation,
|
|
199
|
-
_locationsLocation,
|
|
200
|
-
_recurringInterval,
|
|
201
|
-
_resource,
|
|
202
|
-
_schedule,
|
|
203
|
-
});
|
|
204
|
-
const { fromJSON: fromRes } = serializer(_createResourceResponse, {
|
|
205
|
-
_address,
|
|
206
|
-
_addressLocation,
|
|
207
|
-
_availability,
|
|
208
|
-
_image,
|
|
209
|
-
_location,
|
|
210
|
-
_locationsAddress,
|
|
211
|
-
_locationsAddressLocation,
|
|
212
|
-
_locationsLocation,
|
|
213
|
-
_recurringInterval,
|
|
214
|
-
_resource,
|
|
215
|
-
_schedule,
|
|
216
|
-
});
|
|
217
120
|
function __create({ host }) {
|
|
218
|
-
const serializedData =
|
|
121
|
+
const serializedData = transformPaths(payload, [
|
|
122
|
+
{
|
|
123
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
124
|
+
paths: [
|
|
125
|
+
{ path: 'resource.images.urlExpirationDate' },
|
|
126
|
+
{ path: 'resource.schedules.firstSessionStart' },
|
|
127
|
+
{ path: 'resource.schedules.lastSessionEnd' },
|
|
128
|
+
{ path: 'resource.schedules.created' },
|
|
129
|
+
{ path: 'resource.schedules.updated' },
|
|
130
|
+
{ path: 'resource.schedules.intervals.start' },
|
|
131
|
+
{ path: 'resource.schedules.intervals.end' },
|
|
132
|
+
{ path: 'resource.schedules.availability.start' },
|
|
133
|
+
{ path: 'resource.schedules.availability.end' },
|
|
134
|
+
{ path: 'resource.eventsSchedule.firstSessionStart' },
|
|
135
|
+
{ path: 'resource.eventsSchedule.lastSessionEnd' },
|
|
136
|
+
{ path: 'resource.eventsSchedule.created' },
|
|
137
|
+
{ path: 'resource.eventsSchedule.updated' },
|
|
138
|
+
{ path: 'resource.eventsSchedule.intervals.start' },
|
|
139
|
+
{ path: 'resource.eventsSchedule.intervals.end' },
|
|
140
|
+
{ path: 'resource.eventsSchedule.availability.start' },
|
|
141
|
+
{ path: 'resource.eventsSchedule.availability.end' },
|
|
142
|
+
{ path: 'schedules.firstSessionStart' },
|
|
143
|
+
{ path: 'schedules.lastSessionEnd' },
|
|
144
|
+
{ path: 'schedules.created' },
|
|
145
|
+
{ path: 'schedules.updated' },
|
|
146
|
+
{ path: 'schedules.intervals.start' },
|
|
147
|
+
{ path: 'schedules.intervals.end' },
|
|
148
|
+
{ path: 'schedules.availability.start' },
|
|
149
|
+
{ path: 'schedules.availability.end' },
|
|
150
|
+
],
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
154
|
+
paths: [
|
|
155
|
+
{
|
|
156
|
+
path: 'resource.schedules.location.customAddress.geocode.latitude',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
path: 'resource.schedules.location.customAddress.geocode.longitude',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
path: 'resource.schedules.location.businessLocation.address.geocode.latitude',
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
path: 'resource.schedules.location.businessLocation.address.geocode.longitude',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
path: 'resource.schedules.availability.locations.customAddress.geocode.latitude',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
path: 'resource.schedules.availability.locations.customAddress.geocode.longitude',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
path: 'resource.schedules.availability.locations.businessLocation.address.geocode.latitude',
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
path: 'resource.schedules.availability.locations.businessLocation.address.geocode.longitude',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
path: 'resource.eventsSchedule.location.customAddress.geocode.latitude',
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
path: 'resource.eventsSchedule.location.customAddress.geocode.longitude',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
path: 'resource.eventsSchedule.location.businessLocation.address.geocode.latitude',
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
path: 'resource.eventsSchedule.location.businessLocation.address.geocode.longitude',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
path: 'resource.eventsSchedule.availability.locations.customAddress.geocode.latitude',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
path: 'resource.eventsSchedule.availability.locations.customAddress.geocode.longitude',
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
path: 'resource.eventsSchedule.availability.locations.businessLocation.address.geocode.latitude',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
path: 'resource.eventsSchedule.availability.locations.businessLocation.address.geocode.longitude',
|
|
202
|
+
},
|
|
203
|
+
{ path: 'schedules.location.customAddress.geocode.latitude' },
|
|
204
|
+
{ path: 'schedules.location.customAddress.geocode.longitude' },
|
|
205
|
+
{
|
|
206
|
+
path: 'schedules.location.businessLocation.address.geocode.latitude',
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
path: 'schedules.location.businessLocation.address.geocode.longitude',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
path: 'schedules.availability.locations.customAddress.geocode.latitude',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
path: 'schedules.availability.locations.customAddress.geocode.longitude',
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
path: 'schedules.availability.locations.businessLocation.address.geocode.latitude',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
path: 'schedules.availability.locations.businessLocation.address.geocode.longitude',
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
},
|
|
225
|
+
]);
|
|
219
226
|
const metadata = {
|
|
220
227
|
entityFqdn: 'wix.bookings.catalog.v1.resource',
|
|
221
228
|
method: 'POST',
|
|
222
229
|
methodFqn: 'com.wixpress.bookings.resources.core.api.v1.resource.ResourcesService.Create',
|
|
223
230
|
url: resolveComWixpressBookingsResourcesCoreApiV1ResourceResourcesServiceUrl({ protoPath: '/v1/resources', data: serializedData, host }),
|
|
224
231
|
data: serializedData,
|
|
225
|
-
transformResponse:
|
|
232
|
+
transformResponse: (payload) => transformPaths(payload, [
|
|
233
|
+
{
|
|
234
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
235
|
+
paths: [
|
|
236
|
+
{ path: 'resource.images.urlExpirationDate' },
|
|
237
|
+
{ path: 'resource.schedules.firstSessionStart' },
|
|
238
|
+
{ path: 'resource.schedules.lastSessionEnd' },
|
|
239
|
+
{ path: 'resource.schedules.created' },
|
|
240
|
+
{ path: 'resource.schedules.updated' },
|
|
241
|
+
{ path: 'resource.schedules.intervals.start' },
|
|
242
|
+
{ path: 'resource.schedules.intervals.end' },
|
|
243
|
+
{ path: 'resource.schedules.availability.start' },
|
|
244
|
+
{ path: 'resource.schedules.availability.end' },
|
|
245
|
+
{ path: 'resource.eventsSchedule.firstSessionStart' },
|
|
246
|
+
{ path: 'resource.eventsSchedule.lastSessionEnd' },
|
|
247
|
+
{ path: 'resource.eventsSchedule.created' },
|
|
248
|
+
{ path: 'resource.eventsSchedule.updated' },
|
|
249
|
+
{ path: 'resource.eventsSchedule.intervals.start' },
|
|
250
|
+
{ path: 'resource.eventsSchedule.intervals.end' },
|
|
251
|
+
{ path: 'resource.eventsSchedule.availability.start' },
|
|
252
|
+
{ path: 'resource.eventsSchedule.availability.end' },
|
|
253
|
+
],
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
257
|
+
paths: [
|
|
258
|
+
{
|
|
259
|
+
path: 'resource.schedules.location.customAddress.geocode.latitude',
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
path: 'resource.schedules.location.customAddress.geocode.longitude',
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
path: 'resource.schedules.location.businessLocation.address.geocode.latitude',
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
path: 'resource.schedules.location.businessLocation.address.geocode.longitude',
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
path: 'resource.schedules.availability.locations.customAddress.geocode.latitude',
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
path: 'resource.schedules.availability.locations.customAddress.geocode.longitude',
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
path: 'resource.schedules.availability.locations.businessLocation.address.geocode.latitude',
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
path: 'resource.schedules.availability.locations.businessLocation.address.geocode.longitude',
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
path: 'resource.eventsSchedule.location.customAddress.geocode.latitude',
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
path: 'resource.eventsSchedule.location.customAddress.geocode.longitude',
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
path: 'resource.eventsSchedule.location.businessLocation.address.geocode.latitude',
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
path: 'resource.eventsSchedule.location.businessLocation.address.geocode.longitude',
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
path: 'resource.eventsSchedule.availability.locations.customAddress.geocode.latitude',
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
path: 'resource.eventsSchedule.availability.locations.customAddress.geocode.longitude',
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
path: 'resource.eventsSchedule.availability.locations.businessLocation.address.geocode.latitude',
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
path: 'resource.eventsSchedule.availability.locations.businessLocation.address.geocode.longitude',
|
|
305
|
+
},
|
|
306
|
+
],
|
|
307
|
+
},
|
|
308
|
+
]),
|
|
226
309
|
};
|
|
227
310
|
return metadata;
|
|
228
311
|
}
|
|
229
|
-
__create.fromReq = fromReq;
|
|
230
312
|
return __create;
|
|
231
313
|
}
|
|
232
314
|
/**
|
|
@@ -240,50 +322,342 @@ export function create(payload) {
|
|
|
240
322
|
* > 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"`.
|
|
241
323
|
*/
|
|
242
324
|
export function update(payload) {
|
|
243
|
-
const { toJSON: toReq, fromJSON: fromReq } = serializer(_updateResourceRequest, {
|
|
244
|
-
_address,
|
|
245
|
-
_addressLocation,
|
|
246
|
-
_availability,
|
|
247
|
-
_batchRequest,
|
|
248
|
-
_cancelScheduleRequest,
|
|
249
|
-
_createScheduleRequest,
|
|
250
|
-
_image,
|
|
251
|
-
_location,
|
|
252
|
-
_locationsAddress,
|
|
253
|
-
_locationsAddressLocation,
|
|
254
|
-
_locationsLocation,
|
|
255
|
-
_recurringInterval,
|
|
256
|
-
_resource,
|
|
257
|
-
_schedule,
|
|
258
|
-
_updateScheduleRequest,
|
|
259
|
-
});
|
|
260
|
-
const { fromJSON: fromRes } = serializer(_updateResourceResponse, {
|
|
261
|
-
_address,
|
|
262
|
-
_addressLocation,
|
|
263
|
-
_availability,
|
|
264
|
-
_batchResponse,
|
|
265
|
-
_image,
|
|
266
|
-
_location,
|
|
267
|
-
_locationsAddress,
|
|
268
|
-
_locationsAddressLocation,
|
|
269
|
-
_locationsLocation,
|
|
270
|
-
_recurringInterval,
|
|
271
|
-
_resource,
|
|
272
|
-
_schedule,
|
|
273
|
-
});
|
|
274
325
|
function __update({ host }) {
|
|
275
|
-
const serializedData =
|
|
326
|
+
const serializedData = transformPaths(payload, [
|
|
327
|
+
{
|
|
328
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
329
|
+
paths: [
|
|
330
|
+
{ path: 'fieldMask' },
|
|
331
|
+
{ path: 'scheduleActions.updateRequests.fieldMask' },
|
|
332
|
+
],
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
336
|
+
paths: [
|
|
337
|
+
{ path: 'resource.images.urlExpirationDate' },
|
|
338
|
+
{ path: 'resource.schedules.firstSessionStart' },
|
|
339
|
+
{ path: 'resource.schedules.lastSessionEnd' },
|
|
340
|
+
{ path: 'resource.schedules.created' },
|
|
341
|
+
{ path: 'resource.schedules.updated' },
|
|
342
|
+
{ path: 'resource.schedules.intervals.start' },
|
|
343
|
+
{ path: 'resource.schedules.intervals.end' },
|
|
344
|
+
{ path: 'resource.schedules.availability.start' },
|
|
345
|
+
{ path: 'resource.schedules.availability.end' },
|
|
346
|
+
{ path: 'resource.eventsSchedule.firstSessionStart' },
|
|
347
|
+
{ path: 'resource.eventsSchedule.lastSessionEnd' },
|
|
348
|
+
{ path: 'resource.eventsSchedule.created' },
|
|
349
|
+
{ path: 'resource.eventsSchedule.updated' },
|
|
350
|
+
{ path: 'resource.eventsSchedule.intervals.start' },
|
|
351
|
+
{ path: 'resource.eventsSchedule.intervals.end' },
|
|
352
|
+
{ path: 'resource.eventsSchedule.availability.start' },
|
|
353
|
+
{ path: 'resource.eventsSchedule.availability.end' },
|
|
354
|
+
{ path: 'scheduleActions.createRequests.schedule.firstSessionStart' },
|
|
355
|
+
{ path: 'scheduleActions.createRequests.schedule.lastSessionEnd' },
|
|
356
|
+
{ path: 'scheduleActions.createRequests.schedule.created' },
|
|
357
|
+
{ path: 'scheduleActions.createRequests.schedule.updated' },
|
|
358
|
+
{ path: 'scheduleActions.createRequests.schedule.intervals.start' },
|
|
359
|
+
{ path: 'scheduleActions.createRequests.schedule.intervals.end' },
|
|
360
|
+
{
|
|
361
|
+
path: 'scheduleActions.createRequests.schedule.availability.start',
|
|
362
|
+
},
|
|
363
|
+
{ path: 'scheduleActions.createRequests.schedule.availability.end' },
|
|
364
|
+
{ path: 'scheduleActions.updateRequests.schedule.firstSessionStart' },
|
|
365
|
+
{ path: 'scheduleActions.updateRequests.schedule.lastSessionEnd' },
|
|
366
|
+
{ path: 'scheduleActions.updateRequests.schedule.created' },
|
|
367
|
+
{ path: 'scheduleActions.updateRequests.schedule.updated' },
|
|
368
|
+
{ path: 'scheduleActions.updateRequests.schedule.intervals.start' },
|
|
369
|
+
{ path: 'scheduleActions.updateRequests.schedule.intervals.end' },
|
|
370
|
+
{
|
|
371
|
+
path: 'scheduleActions.updateRequests.schedule.availability.start',
|
|
372
|
+
},
|
|
373
|
+
{ path: 'scheduleActions.updateRequests.schedule.availability.end' },
|
|
374
|
+
{ path: 'scheduleActions.cancelRequests.from' },
|
|
375
|
+
],
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
379
|
+
paths: [
|
|
380
|
+
{
|
|
381
|
+
path: 'resource.schedules.location.customAddress.geocode.latitude',
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
path: 'resource.schedules.location.customAddress.geocode.longitude',
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
path: 'resource.schedules.location.businessLocation.address.geocode.latitude',
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
path: 'resource.schedules.location.businessLocation.address.geocode.longitude',
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
path: 'resource.schedules.availability.locations.customAddress.geocode.latitude',
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
path: 'resource.schedules.availability.locations.customAddress.geocode.longitude',
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
path: 'resource.schedules.availability.locations.businessLocation.address.geocode.latitude',
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
path: 'resource.schedules.availability.locations.businessLocation.address.geocode.longitude',
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
path: 'resource.eventsSchedule.location.customAddress.geocode.latitude',
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
path: 'resource.eventsSchedule.location.customAddress.geocode.longitude',
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
path: 'resource.eventsSchedule.location.businessLocation.address.geocode.latitude',
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
path: 'resource.eventsSchedule.location.businessLocation.address.geocode.longitude',
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
path: 'resource.eventsSchedule.availability.locations.customAddress.geocode.latitude',
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
path: 'resource.eventsSchedule.availability.locations.customAddress.geocode.longitude',
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
path: 'resource.eventsSchedule.availability.locations.businessLocation.address.geocode.latitude',
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
path: 'resource.eventsSchedule.availability.locations.businessLocation.address.geocode.longitude',
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
path: 'scheduleActions.createRequests.schedule.location.customAddress.geocode.latitude',
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
path: 'scheduleActions.createRequests.schedule.location.customAddress.geocode.longitude',
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
path: 'scheduleActions.createRequests.schedule.location.businessLocation.address.geocode.latitude',
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
path: 'scheduleActions.createRequests.schedule.location.businessLocation.address.geocode.longitude',
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
path: 'scheduleActions.createRequests.schedule.availability.locations.customAddress.geocode.latitude',
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
path: 'scheduleActions.createRequests.schedule.availability.locations.customAddress.geocode.longitude',
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
path: 'scheduleActions.createRequests.schedule.availability.locations.businessLocation.address.geocode.latitude',
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
path: 'scheduleActions.createRequests.schedule.availability.locations.businessLocation.address.geocode.longitude',
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
path: 'scheduleActions.updateRequests.schedule.location.customAddress.geocode.latitude',
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
path: 'scheduleActions.updateRequests.schedule.location.customAddress.geocode.longitude',
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
path: 'scheduleActions.updateRequests.schedule.location.businessLocation.address.geocode.latitude',
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
path: 'scheduleActions.updateRequests.schedule.location.businessLocation.address.geocode.longitude',
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
path: 'scheduleActions.updateRequests.schedule.availability.locations.customAddress.geocode.latitude',
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
path: 'scheduleActions.updateRequests.schedule.availability.locations.customAddress.geocode.longitude',
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
path: 'scheduleActions.updateRequests.schedule.availability.locations.businessLocation.address.geocode.latitude',
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
path: 'scheduleActions.updateRequests.schedule.availability.locations.businessLocation.address.geocode.longitude',
|
|
475
|
+
},
|
|
476
|
+
],
|
|
477
|
+
},
|
|
478
|
+
]);
|
|
276
479
|
const metadata = {
|
|
277
480
|
entityFqdn: 'wix.bookings.catalog.v1.resource',
|
|
278
481
|
method: 'PATCH',
|
|
279
482
|
methodFqn: 'com.wixpress.bookings.resources.core.api.v1.resource.ResourcesService.Update',
|
|
280
483
|
url: resolveComWixpressBookingsResourcesCoreApiV1ResourceResourcesServiceUrl({ protoPath: '/v1/resources/{resource.id}', data: serializedData, host }),
|
|
281
484
|
data: serializedData,
|
|
282
|
-
transformResponse:
|
|
485
|
+
transformResponse: (payload) => transformPaths(payload, [
|
|
486
|
+
{
|
|
487
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
488
|
+
paths: [
|
|
489
|
+
{ path: 'resource.images.urlExpirationDate' },
|
|
490
|
+
{ path: 'resource.schedules.firstSessionStart' },
|
|
491
|
+
{ path: 'resource.schedules.lastSessionEnd' },
|
|
492
|
+
{ path: 'resource.schedules.created' },
|
|
493
|
+
{ path: 'resource.schedules.updated' },
|
|
494
|
+
{ path: 'resource.schedules.intervals.start' },
|
|
495
|
+
{ path: 'resource.schedules.intervals.end' },
|
|
496
|
+
{ path: 'resource.schedules.availability.start' },
|
|
497
|
+
{ path: 'resource.schedules.availability.end' },
|
|
498
|
+
{ path: 'resource.eventsSchedule.firstSessionStart' },
|
|
499
|
+
{ path: 'resource.eventsSchedule.lastSessionEnd' },
|
|
500
|
+
{ path: 'resource.eventsSchedule.created' },
|
|
501
|
+
{ path: 'resource.eventsSchedule.updated' },
|
|
502
|
+
{ path: 'resource.eventsSchedule.intervals.start' },
|
|
503
|
+
{ path: 'resource.eventsSchedule.intervals.end' },
|
|
504
|
+
{ path: 'resource.eventsSchedule.availability.start' },
|
|
505
|
+
{ path: 'resource.eventsSchedule.availability.end' },
|
|
506
|
+
{ path: 'schedules.created.firstSessionStart' },
|
|
507
|
+
{ path: 'schedules.created.lastSessionEnd' },
|
|
508
|
+
{ path: 'schedules.created.created' },
|
|
509
|
+
{ path: 'schedules.created.updated' },
|
|
510
|
+
{ path: 'schedules.created.intervals.start' },
|
|
511
|
+
{ path: 'schedules.created.intervals.end' },
|
|
512
|
+
{ path: 'schedules.created.availability.start' },
|
|
513
|
+
{ path: 'schedules.created.availability.end' },
|
|
514
|
+
{ path: 'schedules.updated.firstSessionStart' },
|
|
515
|
+
{ path: 'schedules.updated.lastSessionEnd' },
|
|
516
|
+
{ path: 'schedules.updated.created' },
|
|
517
|
+
{ path: 'schedules.updated.updated' },
|
|
518
|
+
{ path: 'schedules.updated.intervals.start' },
|
|
519
|
+
{ path: 'schedules.updated.intervals.end' },
|
|
520
|
+
{ path: 'schedules.updated.availability.start' },
|
|
521
|
+
{ path: 'schedules.updated.availability.end' },
|
|
522
|
+
{ path: 'schedules.cancelled.firstSessionStart' },
|
|
523
|
+
{ path: 'schedules.cancelled.lastSessionEnd' },
|
|
524
|
+
{ path: 'schedules.cancelled.created' },
|
|
525
|
+
{ path: 'schedules.cancelled.updated' },
|
|
526
|
+
{ path: 'schedules.cancelled.intervals.start' },
|
|
527
|
+
{ path: 'schedules.cancelled.intervals.end' },
|
|
528
|
+
{ path: 'schedules.cancelled.availability.start' },
|
|
529
|
+
{ path: 'schedules.cancelled.availability.end' },
|
|
530
|
+
],
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
534
|
+
paths: [
|
|
535
|
+
{
|
|
536
|
+
path: 'resource.schedules.location.customAddress.geocode.latitude',
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
path: 'resource.schedules.location.customAddress.geocode.longitude',
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
path: 'resource.schedules.location.businessLocation.address.geocode.latitude',
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
path: 'resource.schedules.location.businessLocation.address.geocode.longitude',
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
path: 'resource.schedules.availability.locations.customAddress.geocode.latitude',
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
path: 'resource.schedules.availability.locations.customAddress.geocode.longitude',
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
path: 'resource.schedules.availability.locations.businessLocation.address.geocode.latitude',
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
path: 'resource.schedules.availability.locations.businessLocation.address.geocode.longitude',
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
path: 'resource.eventsSchedule.location.customAddress.geocode.latitude',
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
path: 'resource.eventsSchedule.location.customAddress.geocode.longitude',
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
path: 'resource.eventsSchedule.location.businessLocation.address.geocode.latitude',
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
path: 'resource.eventsSchedule.location.businessLocation.address.geocode.longitude',
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
path: 'resource.eventsSchedule.availability.locations.customAddress.geocode.latitude',
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
path: 'resource.eventsSchedule.availability.locations.customAddress.geocode.longitude',
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
path: 'resource.eventsSchedule.availability.locations.businessLocation.address.geocode.latitude',
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
path: 'resource.eventsSchedule.availability.locations.businessLocation.address.geocode.longitude',
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
path: 'schedules.created.location.customAddress.geocode.latitude',
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
path: 'schedules.created.location.customAddress.geocode.longitude',
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
path: 'schedules.created.location.businessLocation.address.geocode.latitude',
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
path: 'schedules.created.location.businessLocation.address.geocode.longitude',
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
path: 'schedules.created.availability.locations.customAddress.geocode.latitude',
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
path: 'schedules.created.availability.locations.customAddress.geocode.longitude',
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
path: 'schedules.created.availability.locations.businessLocation.address.geocode.latitude',
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
path: 'schedules.created.availability.locations.businessLocation.address.geocode.longitude',
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
path: 'schedules.updated.location.customAddress.geocode.latitude',
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
path: 'schedules.updated.location.customAddress.geocode.longitude',
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
path: 'schedules.updated.location.businessLocation.address.geocode.latitude',
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
path: 'schedules.updated.location.businessLocation.address.geocode.longitude',
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
path: 'schedules.updated.availability.locations.customAddress.geocode.latitude',
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
path: 'schedules.updated.availability.locations.customAddress.geocode.longitude',
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
path: 'schedules.updated.availability.locations.businessLocation.address.geocode.latitude',
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
path: 'schedules.updated.availability.locations.businessLocation.address.geocode.longitude',
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
path: 'schedules.cancelled.location.customAddress.geocode.latitude',
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
path: 'schedules.cancelled.location.customAddress.geocode.longitude',
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
path: 'schedules.cancelled.location.businessLocation.address.geocode.latitude',
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
path: 'schedules.cancelled.location.businessLocation.address.geocode.longitude',
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
path: 'schedules.cancelled.availability.locations.customAddress.geocode.latitude',
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
path: 'schedules.cancelled.availability.locations.customAddress.geocode.longitude',
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
path: 'schedules.cancelled.availability.locations.businessLocation.address.geocode.latitude',
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
path: 'schedules.cancelled.availability.locations.businessLocation.address.geocode.longitude',
|
|
654
|
+
},
|
|
655
|
+
],
|
|
656
|
+
},
|
|
657
|
+
]),
|
|
283
658
|
};
|
|
284
659
|
return metadata;
|
|
285
660
|
}
|
|
286
|
-
__update.fromReq = fromReq;
|
|
287
661
|
return __update;
|
|
288
662
|
}
|
|
289
663
|
/**
|
|
@@ -297,30 +671,51 @@ export function update(payload) {
|
|
|
297
671
|
* >- When updating a resource's schedule you cannot change the system tags used by the Wix Bookings app. Tags used by the app have the values `"INDIVIDUAL"`, `"GROUP"`, and `"COURSE"`.
|
|
298
672
|
*/
|
|
299
673
|
export function updateSchedule(payload) {
|
|
300
|
-
const { toJSON: toReq, fromJSON: fromReq } = serializer(_resourceUpdateScheduleRequest, {
|
|
301
|
-
_address,
|
|
302
|
-
_addressLocation,
|
|
303
|
-
_availability,
|
|
304
|
-
_location,
|
|
305
|
-
_locationsAddress,
|
|
306
|
-
_locationsAddressLocation,
|
|
307
|
-
_locationsLocation,
|
|
308
|
-
_recurringInterval,
|
|
309
|
-
_schedule,
|
|
310
|
-
});
|
|
311
|
-
const { fromJSON: fromRes } = serializer(_updateScheduleResponse, {
|
|
312
|
-
_address,
|
|
313
|
-
_addressLocation,
|
|
314
|
-
_availability,
|
|
315
|
-
_location,
|
|
316
|
-
_locationsAddress,
|
|
317
|
-
_locationsAddressLocation,
|
|
318
|
-
_locationsLocation,
|
|
319
|
-
_recurringInterval,
|
|
320
|
-
_schedule,
|
|
321
|
-
});
|
|
322
674
|
function __updateSchedule({ host }) {
|
|
323
|
-
const serializedData =
|
|
675
|
+
const serializedData = transformPaths(payload, [
|
|
676
|
+
{
|
|
677
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
678
|
+
paths: [{ path: 'fieldmask' }],
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
682
|
+
paths: [
|
|
683
|
+
{ path: 'schedule.firstSessionStart' },
|
|
684
|
+
{ path: 'schedule.lastSessionEnd' },
|
|
685
|
+
{ path: 'schedule.created' },
|
|
686
|
+
{ path: 'schedule.updated' },
|
|
687
|
+
{ path: 'schedule.intervals.start' },
|
|
688
|
+
{ path: 'schedule.intervals.end' },
|
|
689
|
+
{ path: 'schedule.availability.start' },
|
|
690
|
+
{ path: 'schedule.availability.end' },
|
|
691
|
+
],
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
695
|
+
paths: [
|
|
696
|
+
{ path: 'schedule.location.customAddress.geocode.latitude' },
|
|
697
|
+
{ path: 'schedule.location.customAddress.geocode.longitude' },
|
|
698
|
+
{
|
|
699
|
+
path: 'schedule.location.businessLocation.address.geocode.latitude',
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
path: 'schedule.location.businessLocation.address.geocode.longitude',
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
path: 'schedule.availability.locations.customAddress.geocode.latitude',
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
path: 'schedule.availability.locations.customAddress.geocode.longitude',
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
path: 'schedule.availability.locations.businessLocation.address.geocode.latitude',
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
path: 'schedule.availability.locations.businessLocation.address.geocode.longitude',
|
|
715
|
+
},
|
|
716
|
+
],
|
|
717
|
+
},
|
|
718
|
+
]);
|
|
324
719
|
const metadata = {
|
|
325
720
|
entityFqdn: 'wix.bookings.catalog.v1.resource',
|
|
326
721
|
method: 'PATCH',
|
|
@@ -331,11 +726,49 @@ export function updateSchedule(payload) {
|
|
|
331
726
|
host,
|
|
332
727
|
}),
|
|
333
728
|
data: serializedData,
|
|
334
|
-
transformResponse:
|
|
729
|
+
transformResponse: (payload) => transformPaths(payload, [
|
|
730
|
+
{
|
|
731
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
732
|
+
paths: [
|
|
733
|
+
{ path: 'schedule.firstSessionStart' },
|
|
734
|
+
{ path: 'schedule.lastSessionEnd' },
|
|
735
|
+
{ path: 'schedule.created' },
|
|
736
|
+
{ path: 'schedule.updated' },
|
|
737
|
+
{ path: 'schedule.intervals.start' },
|
|
738
|
+
{ path: 'schedule.intervals.end' },
|
|
739
|
+
{ path: 'schedule.availability.start' },
|
|
740
|
+
{ path: 'schedule.availability.end' },
|
|
741
|
+
],
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
745
|
+
paths: [
|
|
746
|
+
{ path: 'schedule.location.customAddress.geocode.latitude' },
|
|
747
|
+
{ path: 'schedule.location.customAddress.geocode.longitude' },
|
|
748
|
+
{
|
|
749
|
+
path: 'schedule.location.businessLocation.address.geocode.latitude',
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
path: 'schedule.location.businessLocation.address.geocode.longitude',
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
path: 'schedule.availability.locations.customAddress.geocode.latitude',
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
path: 'schedule.availability.locations.customAddress.geocode.longitude',
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
path: 'schedule.availability.locations.businessLocation.address.geocode.latitude',
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
path: 'schedule.availability.locations.businessLocation.address.geocode.longitude',
|
|
765
|
+
},
|
|
766
|
+
],
|
|
767
|
+
},
|
|
768
|
+
]),
|
|
335
769
|
};
|
|
336
770
|
return metadata;
|
|
337
771
|
}
|
|
338
|
-
__updateSchedule.fromReq = fromReq;
|
|
339
772
|
return __updateSchedule;
|
|
340
773
|
}
|
|
341
774
|
/**
|
|
@@ -354,21 +787,16 @@ export function updateSchedule(payload) {
|
|
|
354
787
|
* >- You can have up to 135 active resources and an additional 135 deleted resources.
|
|
355
788
|
*/
|
|
356
789
|
export function _delete(payload) {
|
|
357
|
-
const { toJSON: toReq, fromJSON: fromReq } = serializer(_deleteResourceRequest, {});
|
|
358
|
-
const { fromJSON: fromRes } = serializer(_deleteResourceResponse, {});
|
|
359
790
|
function ___delete({ host }) {
|
|
360
|
-
const serializedData = toReq(payload);
|
|
361
791
|
const metadata = {
|
|
362
792
|
entityFqdn: 'wix.bookings.catalog.v1.resource',
|
|
363
793
|
method: 'DELETE',
|
|
364
794
|
methodFqn: 'com.wixpress.bookings.resources.core.api.v1.resource.ResourcesService._delete',
|
|
365
|
-
url: resolveComWixpressBookingsResourcesCoreApiV1ResourceResourcesServiceUrl({ protoPath: '/v1/resources/{id}', data:
|
|
366
|
-
params: toURLSearchParams(
|
|
367
|
-
transformResponse: fromRes,
|
|
795
|
+
url: resolveComWixpressBookingsResourcesCoreApiV1ResourceResourcesServiceUrl({ protoPath: '/v1/resources/{id}', data: payload, host }),
|
|
796
|
+
params: toURLSearchParams(payload),
|
|
368
797
|
};
|
|
369
798
|
return metadata;
|
|
370
799
|
}
|
|
371
|
-
___delete.fromReq = fromReq;
|
|
372
800
|
return ___delete;
|
|
373
801
|
}
|
|
374
802
|
//# sourceMappingURL=bookings-catalog-v1-resource.http.js.map
|