@wix/auto_sdk_bookings_services 1.0.68 → 1.0.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/build/cjs/{bookings-services-v2-service-services.universal-Cy9SqUQp.d.ts → bookings-services-v2-service-services.universal-DYRSxPXw.d.ts} +835 -2
  2. package/build/cjs/index.d.ts +58 -24
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +48 -0
  5. package/build/cjs/index.typings.js +2946 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -1
  8. package/build/es/{bookings-services-v2-service-services.universal-Cy9SqUQp.d.mts → bookings-services-v2-service-services.universal-DYRSxPXw.d.mts} +835 -2
  9. package/build/es/index.d.mts +58 -24
  10. package/build/es/index.mjs.map +1 -1
  11. package/build/es/index.typings.d.mts +48 -0
  12. package/build/es/index.typings.mjs +2875 -0
  13. package/build/es/index.typings.mjs.map +1 -0
  14. package/build/es/meta.d.mts +1 -1
  15. package/build/internal/cjs/{bookings-services-v2-service-services.universal-Cy9SqUQp.d.ts → bookings-services-v2-service-services.universal-DYRSxPXw.d.ts} +835 -2
  16. package/build/internal/cjs/index.d.ts +58 -24
  17. package/build/internal/cjs/index.js.map +1 -1
  18. package/build/internal/cjs/index.typings.d.ts +48 -0
  19. package/build/internal/cjs/index.typings.js +2946 -0
  20. package/build/internal/cjs/index.typings.js.map +1 -0
  21. package/build/internal/cjs/meta.d.ts +1 -1
  22. package/build/internal/es/{bookings-services-v2-service-services.universal-Cy9SqUQp.d.mts → bookings-services-v2-service-services.universal-DYRSxPXw.d.mts} +835 -2
  23. package/build/internal/es/index.d.mts +58 -24
  24. package/build/internal/es/index.mjs.map +1 -1
  25. package/build/internal/es/index.typings.d.mts +48 -0
  26. package/build/internal/es/index.typings.mjs +2875 -0
  27. package/build/internal/es/index.typings.mjs.map +1 -0
  28. package/build/internal/es/meta.d.mts +1 -1
  29. package/package.json +2 -2
@@ -0,0 +1,2946 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.typings.ts
21
+ var index_typings_exports = {};
22
+ __export(index_typings_exports, {
23
+ Action: () => Action,
24
+ AggregationType: () => AggregationType,
25
+ BenefitType: () => BenefitType,
26
+ CategoryNotificationEvent: () => CategoryNotificationEvent,
27
+ CloneErrors: () => CloneErrors,
28
+ CrudType: () => CrudType,
29
+ DayOfWeek: () => DayOfWeek,
30
+ Event: () => Event,
31
+ Interval: () => Interval,
32
+ InvalidSlugError: () => InvalidSlugError,
33
+ LocationType: () => LocationType,
34
+ MissingValues: () => MissingValues,
35
+ Mode: () => Mode,
36
+ NestedAggregationType: () => NestedAggregationType,
37
+ PlacementType: () => PlacementType,
38
+ RateType: () => RateType,
39
+ RequestedFields: () => RequestedFields,
40
+ ResolutionMethod: () => ResolutionMethod,
41
+ ScalarType: () => ScalarType,
42
+ ServiceType: () => ServiceType,
43
+ SortDirection: () => SortDirection,
44
+ SortOrder: () => SortOrder,
45
+ SortType: () => SortType,
46
+ Status: () => Status,
47
+ V2RequestedFields: () => V2RequestedFields,
48
+ WebhookIdentityType: () => WebhookIdentityType,
49
+ bulkCreateServices: () => bulkCreateServices2,
50
+ bulkDeleteServices: () => bulkDeleteServices2,
51
+ bulkDeleteServicesByFilter: () => bulkDeleteServicesByFilter2,
52
+ bulkUpdateServices: () => bulkUpdateServices2,
53
+ bulkUpdateServicesByFilter: () => bulkUpdateServicesByFilter2,
54
+ cloneService: () => cloneService2,
55
+ countServices: () => countServices2,
56
+ createService: () => createService2,
57
+ deleteService: () => deleteService2,
58
+ disablePricingPlansForService: () => disablePricingPlansForService2,
59
+ enablePricingPlansForService: () => enablePricingPlansForService2,
60
+ getService: () => getService2,
61
+ queryBookingForms: () => queryBookingForms2,
62
+ queryCategories: () => queryCategories2,
63
+ queryLocations: () => queryLocations2,
64
+ queryPolicies: () => queryPolicies2,
65
+ queryServices: () => queryServices2,
66
+ searchServices: () => searchServices2,
67
+ setCustomSlug: () => setCustomSlug2,
68
+ setServiceLocations: () => setServiceLocations2,
69
+ updateService: () => updateService2,
70
+ validateSlug: () => validateSlug2
71
+ });
72
+ module.exports = __toCommonJS(index_typings_exports);
73
+
74
+ // src/bookings-services-v2-service-services.universal.ts
75
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
76
+ var import_query_builder = require("@wix/sdk-runtime/query-builder");
77
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
78
+
79
+ // src/bookings-services-v2-service-services.http.ts
80
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
81
+ var import_float = require("@wix/sdk-runtime/transformations/float");
82
+ var import_float2 = require("@wix/sdk-runtime/transformations/float");
83
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
84
+ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
85
+ var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
86
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
87
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
88
+ function resolveWixBookingsServicesV2ServicesServiceUrl(opts) {
89
+ const domainToMappings = {
90
+ "*.dev.wix-code.com": [
91
+ {
92
+ srcPath: "/_api/services-2",
93
+ destPath: ""
94
+ },
95
+ {
96
+ srcPath: "/_api/bookings/v2/services",
97
+ destPath: "/v2/services"
98
+ }
99
+ ],
100
+ "www.wixapis.com": [
101
+ {
102
+ srcPath: "/_api/bookings/v2/services",
103
+ destPath: "/v2/services"
104
+ },
105
+ {
106
+ srcPath: "/bookings/v2/services",
107
+ destPath: "/v2/services"
108
+ },
109
+ {
110
+ srcPath: "/bookings/v2/bulk/services",
111
+ destPath: "/v2/bulk/services"
112
+ }
113
+ ],
114
+ "manage._base_domain_": [
115
+ {
116
+ srcPath: "/_api/bookings/v2/services",
117
+ destPath: "/v2/services"
118
+ },
119
+ {
120
+ srcPath: "/_api/bookings/v2/bulk/services",
121
+ destPath: "/v2/bulk/services"
122
+ }
123
+ ],
124
+ "editor._base_domain_": [
125
+ {
126
+ srcPath: "/_api/bookings/v2/services",
127
+ destPath: "/v2/services"
128
+ },
129
+ {
130
+ srcPath: "/_api/bookings/v2/bulk/services",
131
+ destPath: "/v2/bulk/services"
132
+ }
133
+ ],
134
+ "blocks._base_domain_": [
135
+ {
136
+ srcPath: "/_api/bookings/v2/services",
137
+ destPath: "/v2/services"
138
+ },
139
+ {
140
+ srcPath: "/_api/bookings/v2/bulk/services",
141
+ destPath: "/v2/bulk/services"
142
+ }
143
+ ],
144
+ "create.editorx": [
145
+ {
146
+ srcPath: "/_api/bookings/v2/services",
147
+ destPath: "/v2/services"
148
+ },
149
+ {
150
+ srcPath: "/_api/bookings/v2/bulk/services",
151
+ destPath: "/v2/bulk/services"
152
+ }
153
+ ],
154
+ _: [
155
+ {
156
+ srcPath: "/_api/bookings/v2/services",
157
+ destPath: "/v2/services"
158
+ }
159
+ ],
160
+ "www._base_domain_": [
161
+ {
162
+ srcPath: "/_api/bookings/v2/services",
163
+ destPath: "/v2/services"
164
+ }
165
+ ],
166
+ "bo._base_domain_": [
167
+ {
168
+ srcPath: "/_api/bookings/v2/services",
169
+ destPath: "/v2/services"
170
+ }
171
+ ],
172
+ "wixbo.ai": [
173
+ {
174
+ srcPath: "/_api/bookings/v2/services",
175
+ destPath: "/v2/services"
176
+ }
177
+ ],
178
+ "wix-bo.com": [
179
+ {
180
+ srcPath: "/_api/bookings/v2/services",
181
+ destPath: "/v2/services"
182
+ }
183
+ ],
184
+ "editor.wixapps.net": [
185
+ {
186
+ srcPath: "/_api/bookings/v2/services",
187
+ destPath: "/v2/services"
188
+ }
189
+ ],
190
+ "api._api_base_domain_": [
191
+ {
192
+ srcPath: "/services-2",
193
+ destPath: ""
194
+ }
195
+ ]
196
+ };
197
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
198
+ }
199
+ var PACKAGE_NAME = "@wix/auto_sdk_bookings_services";
200
+ function createService(payload) {
201
+ function __createService({ host }) {
202
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
203
+ {
204
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
205
+ paths: [
206
+ { path: "service.createdDate" },
207
+ { path: "service.updatedDate" },
208
+ { path: "service.media.items.image.urlExpirationDate" },
209
+ { path: "service.media.mainMedia.image.urlExpirationDate" },
210
+ { path: "service.media.coverMedia.image.urlExpirationDate" },
211
+ { path: "service.bookingPolicy.createdDate" },
212
+ { path: "service.bookingPolicy.updatedDate" },
213
+ { path: "service.schedule.firstSessionStart" },
214
+ { path: "service.schedule.lastSessionEnd" },
215
+ { path: "service.staffMembers.mainMedia.image.urlExpirationDate" },
216
+ {
217
+ path: "service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
218
+ },
219
+ { path: "service.supportedSlugs.createdDate" },
220
+ { path: "service.mainSlug.createdDate" }
221
+ ]
222
+ },
223
+ {
224
+ transformFn: import_float.transformSDKFloatToRESTFloat,
225
+ paths: [
226
+ { path: "service.locations.business.address.geocode.latitude" },
227
+ { path: "service.locations.business.address.geocode.longitude" },
228
+ { path: "service.locations.custom.address.geocode.latitude" },
229
+ { path: "service.locations.custom.address.geocode.longitude" },
230
+ { path: "service.locations.calculatedAddress.geocode.latitude" },
231
+ { path: "service.locations.calculatedAddress.geocode.longitude" }
232
+ ]
233
+ }
234
+ ]);
235
+ const metadata = {
236
+ entityFqdn: "wix.bookings.services.v2.service",
237
+ method: "POST",
238
+ methodFqn: "wix.bookings.services.v2.ServicesService.CreateService",
239
+ packageName: PACKAGE_NAME,
240
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
241
+ protoPath: "/v2/services",
242
+ data: serializedData,
243
+ host
244
+ }),
245
+ data: serializedData,
246
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
247
+ {
248
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
249
+ paths: [
250
+ { path: "service.createdDate" },
251
+ { path: "service.updatedDate" },
252
+ { path: "service.media.items.image.urlExpirationDate" },
253
+ { path: "service.media.mainMedia.image.urlExpirationDate" },
254
+ { path: "service.media.coverMedia.image.urlExpirationDate" },
255
+ { path: "service.bookingPolicy.createdDate" },
256
+ { path: "service.bookingPolicy.updatedDate" },
257
+ { path: "service.schedule.firstSessionStart" },
258
+ { path: "service.schedule.lastSessionEnd" },
259
+ {
260
+ path: "service.staffMembers.mainMedia.image.urlExpirationDate"
261
+ },
262
+ {
263
+ path: "service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
264
+ },
265
+ { path: "service.supportedSlugs.createdDate" },
266
+ { path: "service.mainSlug.createdDate" }
267
+ ]
268
+ },
269
+ {
270
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
271
+ paths: [
272
+ { path: "service.locations.business.address.geocode.latitude" },
273
+ { path: "service.locations.business.address.geocode.longitude" },
274
+ { path: "service.locations.custom.address.geocode.latitude" },
275
+ { path: "service.locations.custom.address.geocode.longitude" },
276
+ { path: "service.locations.calculatedAddress.geocode.latitude" },
277
+ { path: "service.locations.calculatedAddress.geocode.longitude" }
278
+ ]
279
+ }
280
+ ])
281
+ };
282
+ return metadata;
283
+ }
284
+ return __createService;
285
+ }
286
+ function bulkCreateServices(payload) {
287
+ function __bulkCreateServices({ host }) {
288
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
289
+ {
290
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
291
+ paths: [
292
+ { path: "services.createdDate" },
293
+ { path: "services.updatedDate" },
294
+ { path: "services.media.items.image.urlExpirationDate" },
295
+ { path: "services.media.mainMedia.image.urlExpirationDate" },
296
+ { path: "services.media.coverMedia.image.urlExpirationDate" },
297
+ { path: "services.bookingPolicy.createdDate" },
298
+ { path: "services.bookingPolicy.updatedDate" },
299
+ { path: "services.schedule.firstSessionStart" },
300
+ { path: "services.schedule.lastSessionEnd" },
301
+ { path: "services.staffMembers.mainMedia.image.urlExpirationDate" },
302
+ {
303
+ path: "services.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
304
+ },
305
+ { path: "services.supportedSlugs.createdDate" },
306
+ { path: "services.mainSlug.createdDate" }
307
+ ]
308
+ },
309
+ {
310
+ transformFn: import_float.transformSDKFloatToRESTFloat,
311
+ paths: [
312
+ { path: "services.locations.business.address.geocode.latitude" },
313
+ { path: "services.locations.business.address.geocode.longitude" },
314
+ { path: "services.locations.custom.address.geocode.latitude" },
315
+ { path: "services.locations.custom.address.geocode.longitude" },
316
+ { path: "services.locations.calculatedAddress.geocode.latitude" },
317
+ { path: "services.locations.calculatedAddress.geocode.longitude" }
318
+ ]
319
+ }
320
+ ]);
321
+ const metadata = {
322
+ entityFqdn: "wix.bookings.services.v2.service",
323
+ method: "POST",
324
+ methodFqn: "wix.bookings.services.v2.ServicesService.BulkCreateServices",
325
+ packageName: PACKAGE_NAME,
326
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
327
+ protoPath: "/v2/bulk/services/create",
328
+ data: serializedData,
329
+ host
330
+ }),
331
+ data: serializedData,
332
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
333
+ {
334
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
335
+ paths: [
336
+ { path: "results.item.createdDate" },
337
+ { path: "results.item.updatedDate" },
338
+ { path: "results.item.media.items.image.urlExpirationDate" },
339
+ { path: "results.item.media.mainMedia.image.urlExpirationDate" },
340
+ { path: "results.item.media.coverMedia.image.urlExpirationDate" },
341
+ { path: "results.item.bookingPolicy.createdDate" },
342
+ { path: "results.item.bookingPolicy.updatedDate" },
343
+ { path: "results.item.schedule.firstSessionStart" },
344
+ { path: "results.item.schedule.lastSessionEnd" },
345
+ {
346
+ path: "results.item.staffMembers.mainMedia.image.urlExpirationDate"
347
+ },
348
+ {
349
+ path: "results.item.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
350
+ },
351
+ { path: "results.item.supportedSlugs.createdDate" },
352
+ { path: "results.item.mainSlug.createdDate" }
353
+ ]
354
+ },
355
+ {
356
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
357
+ paths: [
358
+ {
359
+ path: "results.item.locations.business.address.geocode.latitude"
360
+ },
361
+ {
362
+ path: "results.item.locations.business.address.geocode.longitude"
363
+ },
364
+ {
365
+ path: "results.item.locations.custom.address.geocode.latitude"
366
+ },
367
+ {
368
+ path: "results.item.locations.custom.address.geocode.longitude"
369
+ },
370
+ {
371
+ path: "results.item.locations.calculatedAddress.geocode.latitude"
372
+ },
373
+ {
374
+ path: "results.item.locations.calculatedAddress.geocode.longitude"
375
+ }
376
+ ]
377
+ }
378
+ ])
379
+ };
380
+ return metadata;
381
+ }
382
+ return __bulkCreateServices;
383
+ }
384
+ function getService(payload) {
385
+ function __getService({ host }) {
386
+ const metadata = {
387
+ entityFqdn: "wix.bookings.services.v2.service",
388
+ method: "GET",
389
+ methodFqn: "wix.bookings.services.v2.ServicesService.GetService",
390
+ packageName: PACKAGE_NAME,
391
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
392
+ protoPath: "/v2/services/{serviceId}",
393
+ data: payload,
394
+ host
395
+ }),
396
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
397
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
398
+ {
399
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
400
+ paths: [
401
+ { path: "service.createdDate" },
402
+ { path: "service.updatedDate" },
403
+ { path: "service.media.items.image.urlExpirationDate" },
404
+ { path: "service.media.mainMedia.image.urlExpirationDate" },
405
+ { path: "service.media.coverMedia.image.urlExpirationDate" },
406
+ { path: "service.bookingPolicy.createdDate" },
407
+ { path: "service.bookingPolicy.updatedDate" },
408
+ { path: "service.schedule.firstSessionStart" },
409
+ { path: "service.schedule.lastSessionEnd" },
410
+ {
411
+ path: "service.staffMembers.mainMedia.image.urlExpirationDate"
412
+ },
413
+ {
414
+ path: "service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
415
+ },
416
+ { path: "service.supportedSlugs.createdDate" },
417
+ { path: "service.mainSlug.createdDate" }
418
+ ]
419
+ },
420
+ {
421
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
422
+ paths: [
423
+ { path: "service.locations.business.address.geocode.latitude" },
424
+ { path: "service.locations.business.address.geocode.longitude" },
425
+ { path: "service.locations.custom.address.geocode.latitude" },
426
+ { path: "service.locations.custom.address.geocode.longitude" },
427
+ { path: "service.locations.calculatedAddress.geocode.latitude" },
428
+ { path: "service.locations.calculatedAddress.geocode.longitude" }
429
+ ]
430
+ }
431
+ ])
432
+ };
433
+ return metadata;
434
+ }
435
+ return __getService;
436
+ }
437
+ function updateService(payload) {
438
+ function __updateService({ host }) {
439
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
440
+ {
441
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
442
+ paths: [{ path: "mask" }]
443
+ },
444
+ {
445
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
446
+ paths: [
447
+ { path: "service.createdDate" },
448
+ { path: "service.updatedDate" },
449
+ { path: "service.media.items.image.urlExpirationDate" },
450
+ { path: "service.media.mainMedia.image.urlExpirationDate" },
451
+ { path: "service.media.coverMedia.image.urlExpirationDate" },
452
+ { path: "service.bookingPolicy.createdDate" },
453
+ { path: "service.bookingPolicy.updatedDate" },
454
+ { path: "service.schedule.firstSessionStart" },
455
+ { path: "service.schedule.lastSessionEnd" },
456
+ { path: "service.staffMembers.mainMedia.image.urlExpirationDate" },
457
+ {
458
+ path: "service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
459
+ },
460
+ { path: "service.supportedSlugs.createdDate" },
461
+ { path: "service.mainSlug.createdDate" }
462
+ ]
463
+ },
464
+ {
465
+ transformFn: import_float.transformSDKFloatToRESTFloat,
466
+ paths: [
467
+ { path: "service.locations.business.address.geocode.latitude" },
468
+ { path: "service.locations.business.address.geocode.longitude" },
469
+ { path: "service.locations.custom.address.geocode.latitude" },
470
+ { path: "service.locations.custom.address.geocode.longitude" },
471
+ { path: "service.locations.calculatedAddress.geocode.latitude" },
472
+ { path: "service.locations.calculatedAddress.geocode.longitude" }
473
+ ]
474
+ }
475
+ ]);
476
+ const metadata = {
477
+ entityFqdn: "wix.bookings.services.v2.service",
478
+ method: "PATCH",
479
+ methodFqn: "wix.bookings.services.v2.ServicesService.UpdateService",
480
+ packageName: PACKAGE_NAME,
481
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
482
+ protoPath: "/v2/services/{service.id}",
483
+ data: serializedData,
484
+ host
485
+ }),
486
+ data: serializedData,
487
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
488
+ {
489
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
490
+ paths: [
491
+ { path: "service.createdDate" },
492
+ { path: "service.updatedDate" },
493
+ { path: "service.media.items.image.urlExpirationDate" },
494
+ { path: "service.media.mainMedia.image.urlExpirationDate" },
495
+ { path: "service.media.coverMedia.image.urlExpirationDate" },
496
+ { path: "service.bookingPolicy.createdDate" },
497
+ { path: "service.bookingPolicy.updatedDate" },
498
+ { path: "service.schedule.firstSessionStart" },
499
+ { path: "service.schedule.lastSessionEnd" },
500
+ {
501
+ path: "service.staffMembers.mainMedia.image.urlExpirationDate"
502
+ },
503
+ {
504
+ path: "service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
505
+ },
506
+ { path: "service.supportedSlugs.createdDate" },
507
+ { path: "service.mainSlug.createdDate" }
508
+ ]
509
+ },
510
+ {
511
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
512
+ paths: [
513
+ { path: "service.locations.business.address.geocode.latitude" },
514
+ { path: "service.locations.business.address.geocode.longitude" },
515
+ { path: "service.locations.custom.address.geocode.latitude" },
516
+ { path: "service.locations.custom.address.geocode.longitude" },
517
+ { path: "service.locations.calculatedAddress.geocode.latitude" },
518
+ { path: "service.locations.calculatedAddress.geocode.longitude" }
519
+ ]
520
+ }
521
+ ])
522
+ };
523
+ return metadata;
524
+ }
525
+ return __updateService;
526
+ }
527
+ function bulkUpdateServices(payload) {
528
+ function __bulkUpdateServices({ host }) {
529
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
530
+ {
531
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
532
+ paths: [{ path: "services.mask" }]
533
+ },
534
+ {
535
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
536
+ paths: [
537
+ { path: "services.service.createdDate" },
538
+ { path: "services.service.updatedDate" },
539
+ { path: "services.service.media.items.image.urlExpirationDate" },
540
+ { path: "services.service.media.mainMedia.image.urlExpirationDate" },
541
+ { path: "services.service.media.coverMedia.image.urlExpirationDate" },
542
+ { path: "services.service.bookingPolicy.createdDate" },
543
+ { path: "services.service.bookingPolicy.updatedDate" },
544
+ { path: "services.service.schedule.firstSessionStart" },
545
+ { path: "services.service.schedule.lastSessionEnd" },
546
+ {
547
+ path: "services.service.staffMembers.mainMedia.image.urlExpirationDate"
548
+ },
549
+ {
550
+ path: "services.service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
551
+ },
552
+ { path: "services.service.supportedSlugs.createdDate" },
553
+ { path: "services.service.mainSlug.createdDate" }
554
+ ]
555
+ },
556
+ {
557
+ transformFn: import_float.transformSDKFloatToRESTFloat,
558
+ paths: [
559
+ {
560
+ path: "services.service.locations.business.address.geocode.latitude"
561
+ },
562
+ {
563
+ path: "services.service.locations.business.address.geocode.longitude"
564
+ },
565
+ {
566
+ path: "services.service.locations.custom.address.geocode.latitude"
567
+ },
568
+ {
569
+ path: "services.service.locations.custom.address.geocode.longitude"
570
+ },
571
+ {
572
+ path: "services.service.locations.calculatedAddress.geocode.latitude"
573
+ },
574
+ {
575
+ path: "services.service.locations.calculatedAddress.geocode.longitude"
576
+ }
577
+ ]
578
+ }
579
+ ]);
580
+ const metadata = {
581
+ entityFqdn: "wix.bookings.services.v2.service",
582
+ method: "POST",
583
+ methodFqn: "wix.bookings.services.v2.ServicesService.BulkUpdateServices",
584
+ packageName: PACKAGE_NAME,
585
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
586
+ protoPath: "/v2/bulk/services/update",
587
+ data: serializedData,
588
+ host
589
+ }),
590
+ data: serializedData,
591
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
592
+ {
593
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
594
+ paths: [
595
+ { path: "results.item.createdDate" },
596
+ { path: "results.item.updatedDate" },
597
+ { path: "results.item.media.items.image.urlExpirationDate" },
598
+ { path: "results.item.media.mainMedia.image.urlExpirationDate" },
599
+ { path: "results.item.media.coverMedia.image.urlExpirationDate" },
600
+ { path: "results.item.bookingPolicy.createdDate" },
601
+ { path: "results.item.bookingPolicy.updatedDate" },
602
+ { path: "results.item.schedule.firstSessionStart" },
603
+ { path: "results.item.schedule.lastSessionEnd" },
604
+ {
605
+ path: "results.item.staffMembers.mainMedia.image.urlExpirationDate"
606
+ },
607
+ {
608
+ path: "results.item.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
609
+ },
610
+ { path: "results.item.supportedSlugs.createdDate" },
611
+ { path: "results.item.mainSlug.createdDate" }
612
+ ]
613
+ },
614
+ {
615
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
616
+ paths: [
617
+ {
618
+ path: "results.item.locations.business.address.geocode.latitude"
619
+ },
620
+ {
621
+ path: "results.item.locations.business.address.geocode.longitude"
622
+ },
623
+ {
624
+ path: "results.item.locations.custom.address.geocode.latitude"
625
+ },
626
+ {
627
+ path: "results.item.locations.custom.address.geocode.longitude"
628
+ },
629
+ {
630
+ path: "results.item.locations.calculatedAddress.geocode.latitude"
631
+ },
632
+ {
633
+ path: "results.item.locations.calculatedAddress.geocode.longitude"
634
+ }
635
+ ]
636
+ }
637
+ ])
638
+ };
639
+ return metadata;
640
+ }
641
+ return __bulkUpdateServices;
642
+ }
643
+ function bulkUpdateServicesByFilter(payload) {
644
+ function __bulkUpdateServicesByFilter({ host }) {
645
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
646
+ {
647
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
648
+ paths: [{ path: "mask" }]
649
+ },
650
+ {
651
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
652
+ paths: [
653
+ { path: "service.createdDate" },
654
+ { path: "service.updatedDate" },
655
+ { path: "service.media.items.image.urlExpirationDate" },
656
+ { path: "service.media.mainMedia.image.urlExpirationDate" },
657
+ { path: "service.media.coverMedia.image.urlExpirationDate" },
658
+ { path: "service.bookingPolicy.createdDate" },
659
+ { path: "service.bookingPolicy.updatedDate" },
660
+ { path: "service.schedule.firstSessionStart" },
661
+ { path: "service.schedule.lastSessionEnd" },
662
+ { path: "service.staffMembers.mainMedia.image.urlExpirationDate" },
663
+ {
664
+ path: "service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
665
+ },
666
+ { path: "service.supportedSlugs.createdDate" },
667
+ { path: "service.mainSlug.createdDate" }
668
+ ]
669
+ },
670
+ {
671
+ transformFn: import_float.transformSDKFloatToRESTFloat,
672
+ paths: [
673
+ { path: "service.locations.business.address.geocode.latitude" },
674
+ { path: "service.locations.business.address.geocode.longitude" },
675
+ { path: "service.locations.custom.address.geocode.latitude" },
676
+ { path: "service.locations.custom.address.geocode.longitude" },
677
+ { path: "service.locations.calculatedAddress.geocode.latitude" },
678
+ { path: "service.locations.calculatedAddress.geocode.longitude" }
679
+ ]
680
+ }
681
+ ]);
682
+ const metadata = {
683
+ entityFqdn: "wix.bookings.services.v2.service",
684
+ method: "POST",
685
+ methodFqn: "wix.bookings.services.v2.ServicesService.BulkUpdateServicesByFilter",
686
+ packageName: PACKAGE_NAME,
687
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
688
+ protoPath: "/v2/bulk/services/update-by-filter",
689
+ data: serializedData,
690
+ host
691
+ }),
692
+ data: serializedData
693
+ };
694
+ return metadata;
695
+ }
696
+ return __bulkUpdateServicesByFilter;
697
+ }
698
+ function deleteService(payload) {
699
+ function __deleteService({ host }) {
700
+ const metadata = {
701
+ entityFqdn: "wix.bookings.services.v2.service",
702
+ method: "DELETE",
703
+ methodFqn: "wix.bookings.services.v2.ServicesService.DeleteService",
704
+ packageName: PACKAGE_NAME,
705
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
706
+ protoPath: "/v2/services/{serviceId}",
707
+ data: payload,
708
+ host
709
+ }),
710
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
711
+ };
712
+ return metadata;
713
+ }
714
+ return __deleteService;
715
+ }
716
+ function bulkDeleteServices(payload) {
717
+ function __bulkDeleteServices({ host }) {
718
+ const metadata = {
719
+ entityFqdn: "wix.bookings.services.v2.service",
720
+ method: "POST",
721
+ methodFqn: "wix.bookings.services.v2.ServicesService.BulkDeleteServices",
722
+ packageName: PACKAGE_NAME,
723
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
724
+ protoPath: "/v2/bulk/services/delete",
725
+ data: payload,
726
+ host
727
+ }),
728
+ data: payload,
729
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
730
+ {
731
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
732
+ paths: [
733
+ { path: "results.item.createdDate" },
734
+ { path: "results.item.updatedDate" },
735
+ { path: "results.item.media.items.image.urlExpirationDate" },
736
+ { path: "results.item.media.mainMedia.image.urlExpirationDate" },
737
+ { path: "results.item.media.coverMedia.image.urlExpirationDate" },
738
+ { path: "results.item.bookingPolicy.createdDate" },
739
+ { path: "results.item.bookingPolicy.updatedDate" },
740
+ { path: "results.item.schedule.firstSessionStart" },
741
+ { path: "results.item.schedule.lastSessionEnd" },
742
+ {
743
+ path: "results.item.staffMembers.mainMedia.image.urlExpirationDate"
744
+ },
745
+ {
746
+ path: "results.item.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
747
+ },
748
+ { path: "results.item.supportedSlugs.createdDate" },
749
+ { path: "results.item.mainSlug.createdDate" }
750
+ ]
751
+ },
752
+ {
753
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
754
+ paths: [
755
+ {
756
+ path: "results.item.locations.business.address.geocode.latitude"
757
+ },
758
+ {
759
+ path: "results.item.locations.business.address.geocode.longitude"
760
+ },
761
+ {
762
+ path: "results.item.locations.custom.address.geocode.latitude"
763
+ },
764
+ {
765
+ path: "results.item.locations.custom.address.geocode.longitude"
766
+ },
767
+ {
768
+ path: "results.item.locations.calculatedAddress.geocode.latitude"
769
+ },
770
+ {
771
+ path: "results.item.locations.calculatedAddress.geocode.longitude"
772
+ }
773
+ ]
774
+ }
775
+ ])
776
+ };
777
+ return metadata;
778
+ }
779
+ return __bulkDeleteServices;
780
+ }
781
+ function bulkDeleteServicesByFilter(payload) {
782
+ function __bulkDeleteServicesByFilter({ host }) {
783
+ const metadata = {
784
+ entityFqdn: "wix.bookings.services.v2.service",
785
+ method: "POST",
786
+ methodFqn: "wix.bookings.services.v2.ServicesService.BulkDeleteServicesByFilter",
787
+ packageName: PACKAGE_NAME,
788
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
789
+ protoPath: "/v2/bulk/services/delete-by-filter",
790
+ data: payload,
791
+ host
792
+ }),
793
+ data: payload
794
+ };
795
+ return metadata;
796
+ }
797
+ return __bulkDeleteServicesByFilter;
798
+ }
799
+ function queryServices(payload) {
800
+ function __queryServices({ host }) {
801
+ const metadata = {
802
+ entityFqdn: "wix.bookings.services.v2.service",
803
+ method: "POST",
804
+ methodFqn: "wix.bookings.services.v2.ServicesService.QueryServices",
805
+ packageName: PACKAGE_NAME,
806
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
807
+ protoPath: "/v2/services/query",
808
+ data: payload,
809
+ host
810
+ }),
811
+ data: payload,
812
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
813
+ {
814
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
815
+ paths: [
816
+ { path: "services.createdDate" },
817
+ { path: "services.updatedDate" },
818
+ { path: "services.media.items.image.urlExpirationDate" },
819
+ { path: "services.media.mainMedia.image.urlExpirationDate" },
820
+ { path: "services.media.coverMedia.image.urlExpirationDate" },
821
+ { path: "services.bookingPolicy.createdDate" },
822
+ { path: "services.bookingPolicy.updatedDate" },
823
+ { path: "services.schedule.firstSessionStart" },
824
+ { path: "services.schedule.lastSessionEnd" },
825
+ {
826
+ path: "services.staffMembers.mainMedia.image.urlExpirationDate"
827
+ },
828
+ {
829
+ path: "services.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
830
+ },
831
+ { path: "services.supportedSlugs.createdDate" },
832
+ { path: "services.mainSlug.createdDate" }
833
+ ]
834
+ },
835
+ {
836
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
837
+ paths: [
838
+ { path: "services.locations.business.address.geocode.latitude" },
839
+ { path: "services.locations.business.address.geocode.longitude" },
840
+ { path: "services.locations.custom.address.geocode.latitude" },
841
+ { path: "services.locations.custom.address.geocode.longitude" },
842
+ { path: "services.locations.calculatedAddress.geocode.latitude" },
843
+ {
844
+ path: "services.locations.calculatedAddress.geocode.longitude"
845
+ }
846
+ ]
847
+ }
848
+ ])
849
+ };
850
+ return metadata;
851
+ }
852
+ return __queryServices;
853
+ }
854
+ function searchServices(payload) {
855
+ function __searchServices({ host }) {
856
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
857
+ {
858
+ transformFn: import_float.transformSDKFloatToRESTFloat,
859
+ paths: [
860
+ { path: "search.aggregations.range.buckets.from" },
861
+ { path: "search.aggregations.range.buckets.to" },
862
+ {
863
+ path: "search.aggregations.nested.nestedAggregations.range.buckets.from"
864
+ },
865
+ {
866
+ path: "search.aggregations.nested.nestedAggregations.range.buckets.to"
867
+ }
868
+ ]
869
+ }
870
+ ]);
871
+ const metadata = {
872
+ entityFqdn: "wix.bookings.services.v2.service",
873
+ method: "POST",
874
+ methodFqn: "wix.bookings.services.v2.ServicesService.SearchServices",
875
+ packageName: PACKAGE_NAME,
876
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
877
+ protoPath: "/v2/services/search",
878
+ data: serializedData,
879
+ host
880
+ }),
881
+ data: serializedData,
882
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
883
+ {
884
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
885
+ paths: [
886
+ { path: "services.createdDate" },
887
+ { path: "services.updatedDate" },
888
+ { path: "services.media.items.image.urlExpirationDate" },
889
+ { path: "services.media.mainMedia.image.urlExpirationDate" },
890
+ { path: "services.media.coverMedia.image.urlExpirationDate" },
891
+ { path: "services.bookingPolicy.createdDate" },
892
+ { path: "services.bookingPolicy.updatedDate" },
893
+ { path: "services.schedule.firstSessionStart" },
894
+ { path: "services.schedule.lastSessionEnd" },
895
+ {
896
+ path: "services.staffMembers.mainMedia.image.urlExpirationDate"
897
+ },
898
+ {
899
+ path: "services.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
900
+ },
901
+ { path: "services.supportedSlugs.createdDate" },
902
+ { path: "services.mainSlug.createdDate" }
903
+ ]
904
+ },
905
+ {
906
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
907
+ paths: [
908
+ { path: "services.locations.business.address.geocode.latitude" },
909
+ { path: "services.locations.business.address.geocode.longitude" },
910
+ { path: "services.locations.custom.address.geocode.latitude" },
911
+ { path: "services.locations.custom.address.geocode.longitude" },
912
+ { path: "services.locations.calculatedAddress.geocode.latitude" },
913
+ {
914
+ path: "services.locations.calculatedAddress.geocode.longitude"
915
+ },
916
+ { path: "aggregationData.results.ranges.results.from" },
917
+ { path: "aggregationData.results.ranges.results.to" },
918
+ {
919
+ path: "aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from"
920
+ },
921
+ {
922
+ path: "aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to"
923
+ },
924
+ {
925
+ path: "aggregationData.results.nested.results.results.*.range.from"
926
+ },
927
+ {
928
+ path: "aggregationData.results.nested.results.results.*.range.to"
929
+ },
930
+ { path: "aggregationData.results.scalar.value" },
931
+ {
932
+ path: "aggregationData.results.groupedByValue.results.nestedResults.scalar.value"
933
+ },
934
+ {
935
+ path: "aggregationData.results.nested.results.results.*.scalar.value"
936
+ }
937
+ ]
938
+ }
939
+ ])
940
+ };
941
+ return metadata;
942
+ }
943
+ return __searchServices;
944
+ }
945
+ function queryPolicies(payload) {
946
+ function __queryPolicies({ host }) {
947
+ const metadata = {
948
+ entityFqdn: "wix.bookings.services.v2.service",
949
+ method: "POST",
950
+ methodFqn: "wix.bookings.services.v2.ServicesService.QueryPolicies",
951
+ packageName: PACKAGE_NAME,
952
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
953
+ protoPath: "/v2/services/policies/query",
954
+ data: payload,
955
+ host
956
+ }),
957
+ data: payload,
958
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
959
+ {
960
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
961
+ paths: [
962
+ { path: "bookingPolicies.bookingPolicy.createdDate" },
963
+ { path: "bookingPolicies.bookingPolicy.updatedDate" },
964
+ { path: "bookingPolicies.services.createdDate" },
965
+ { path: "bookingPolicies.services.updatedDate" },
966
+ {
967
+ path: "bookingPolicies.services.media.items.image.urlExpirationDate"
968
+ },
969
+ {
970
+ path: "bookingPolicies.services.media.mainMedia.image.urlExpirationDate"
971
+ },
972
+ {
973
+ path: "bookingPolicies.services.media.coverMedia.image.urlExpirationDate"
974
+ },
975
+ { path: "bookingPolicies.services.bookingPolicy.createdDate" },
976
+ { path: "bookingPolicies.services.bookingPolicy.updatedDate" },
977
+ { path: "bookingPolicies.services.schedule.firstSessionStart" },
978
+ { path: "bookingPolicies.services.schedule.lastSessionEnd" },
979
+ {
980
+ path: "bookingPolicies.services.staffMembers.mainMedia.image.urlExpirationDate"
981
+ },
982
+ {
983
+ path: "bookingPolicies.services.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
984
+ },
985
+ { path: "bookingPolicies.services.supportedSlugs.createdDate" },
986
+ { path: "bookingPolicies.services.mainSlug.createdDate" },
987
+ { path: "bookingPolicies.connectedServices.createdDate" },
988
+ { path: "bookingPolicies.connectedServices.updatedDate" },
989
+ {
990
+ path: "bookingPolicies.connectedServices.media.items.image.urlExpirationDate"
991
+ },
992
+ {
993
+ path: "bookingPolicies.connectedServices.media.mainMedia.image.urlExpirationDate"
994
+ },
995
+ {
996
+ path: "bookingPolicies.connectedServices.media.coverMedia.image.urlExpirationDate"
997
+ },
998
+ {
999
+ path: "bookingPolicies.connectedServices.bookingPolicy.createdDate"
1000
+ },
1001
+ {
1002
+ path: "bookingPolicies.connectedServices.bookingPolicy.updatedDate"
1003
+ },
1004
+ {
1005
+ path: "bookingPolicies.connectedServices.schedule.firstSessionStart"
1006
+ },
1007
+ {
1008
+ path: "bookingPolicies.connectedServices.schedule.lastSessionEnd"
1009
+ },
1010
+ {
1011
+ path: "bookingPolicies.connectedServices.staffMembers.mainMedia.image.urlExpirationDate"
1012
+ },
1013
+ {
1014
+ path: "bookingPolicies.connectedServices.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
1015
+ },
1016
+ {
1017
+ path: "bookingPolicies.connectedServices.supportedSlugs.createdDate"
1018
+ },
1019
+ {
1020
+ path: "bookingPolicies.connectedServices.mainSlug.createdDate"
1021
+ }
1022
+ ]
1023
+ },
1024
+ {
1025
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
1026
+ paths: [
1027
+ {
1028
+ path: "bookingPolicies.services.locations.business.address.geocode.latitude"
1029
+ },
1030
+ {
1031
+ path: "bookingPolicies.services.locations.business.address.geocode.longitude"
1032
+ },
1033
+ {
1034
+ path: "bookingPolicies.services.locations.custom.address.geocode.latitude"
1035
+ },
1036
+ {
1037
+ path: "bookingPolicies.services.locations.custom.address.geocode.longitude"
1038
+ },
1039
+ {
1040
+ path: "bookingPolicies.services.locations.calculatedAddress.geocode.latitude"
1041
+ },
1042
+ {
1043
+ path: "bookingPolicies.services.locations.calculatedAddress.geocode.longitude"
1044
+ },
1045
+ {
1046
+ path: "bookingPolicies.connectedServices.locations.business.address.geocode.latitude"
1047
+ },
1048
+ {
1049
+ path: "bookingPolicies.connectedServices.locations.business.address.geocode.longitude"
1050
+ },
1051
+ {
1052
+ path: "bookingPolicies.connectedServices.locations.custom.address.geocode.latitude"
1053
+ },
1054
+ {
1055
+ path: "bookingPolicies.connectedServices.locations.custom.address.geocode.longitude"
1056
+ },
1057
+ {
1058
+ path: "bookingPolicies.connectedServices.locations.calculatedAddress.geocode.latitude"
1059
+ },
1060
+ {
1061
+ path: "bookingPolicies.connectedServices.locations.calculatedAddress.geocode.longitude"
1062
+ }
1063
+ ]
1064
+ }
1065
+ ])
1066
+ };
1067
+ return metadata;
1068
+ }
1069
+ return __queryPolicies;
1070
+ }
1071
+ function queryBookingForms(payload) {
1072
+ function __queryBookingForms({ host }) {
1073
+ const metadata = {
1074
+ entityFqdn: "wix.bookings.services.v2.service",
1075
+ method: "POST",
1076
+ methodFqn: "wix.bookings.services.v2.ServicesService.QueryBookingForms",
1077
+ packageName: PACKAGE_NAME,
1078
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
1079
+ protoPath: "/v2/services/booking-forms/query",
1080
+ data: payload,
1081
+ host
1082
+ }),
1083
+ data: payload
1084
+ };
1085
+ return metadata;
1086
+ }
1087
+ return __queryBookingForms;
1088
+ }
1089
+ function countServices(payload) {
1090
+ function __countServices({ host }) {
1091
+ const metadata = {
1092
+ entityFqdn: "wix.bookings.services.v2.service",
1093
+ method: "POST",
1094
+ methodFqn: "wix.bookings.services.v2.ServicesService.CountServices",
1095
+ packageName: PACKAGE_NAME,
1096
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
1097
+ protoPath: "/v2/services/count",
1098
+ data: payload,
1099
+ host
1100
+ }),
1101
+ data: payload
1102
+ };
1103
+ return metadata;
1104
+ }
1105
+ return __countServices;
1106
+ }
1107
+ function queryLocations(payload) {
1108
+ function __queryLocations({ host }) {
1109
+ const metadata = {
1110
+ entityFqdn: "wix.bookings.services.v2.service",
1111
+ method: "POST",
1112
+ methodFqn: "wix.bookings.services.v2.ServicesService.QueryLocations",
1113
+ packageName: PACKAGE_NAME,
1114
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
1115
+ protoPath: "/v2/services/locations/query",
1116
+ data: payload,
1117
+ host
1118
+ }),
1119
+ data: payload,
1120
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1121
+ {
1122
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
1123
+ paths: [
1124
+ {
1125
+ path: "businessLocations.locations.business.address.geocode.latitude"
1126
+ },
1127
+ {
1128
+ path: "businessLocations.locations.business.address.geocode.longitude"
1129
+ },
1130
+ {
1131
+ path: "businessLocations.locations.custom.address.geocode.latitude"
1132
+ },
1133
+ {
1134
+ path: "businessLocations.locations.custom.address.geocode.longitude"
1135
+ },
1136
+ {
1137
+ path: "businessLocations.locations.calculatedAddress.geocode.latitude"
1138
+ },
1139
+ {
1140
+ path: "businessLocations.locations.calculatedAddress.geocode.longitude"
1141
+ }
1142
+ ]
1143
+ }
1144
+ ])
1145
+ };
1146
+ return metadata;
1147
+ }
1148
+ return __queryLocations;
1149
+ }
1150
+ function queryCategories(payload) {
1151
+ function __queryCategories({ host }) {
1152
+ const metadata = {
1153
+ entityFqdn: "wix.bookings.services.v2.service",
1154
+ method: "POST",
1155
+ methodFqn: "wix.bookings.services.v2.ServicesService.QueryCategories",
1156
+ packageName: PACKAGE_NAME,
1157
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
1158
+ protoPath: "/v2/services/categories/query",
1159
+ data: payload,
1160
+ host
1161
+ }),
1162
+ data: payload
1163
+ };
1164
+ return metadata;
1165
+ }
1166
+ return __queryCategories;
1167
+ }
1168
+ function setServiceLocations(payload) {
1169
+ function __setServiceLocations({ host }) {
1170
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
1171
+ {
1172
+ transformFn: import_float.transformSDKFloatToRESTFloat,
1173
+ paths: [
1174
+ { path: "locations.business.address.geocode.latitude" },
1175
+ { path: "locations.business.address.geocode.longitude" },
1176
+ { path: "locations.custom.address.geocode.latitude" },
1177
+ { path: "locations.custom.address.geocode.longitude" },
1178
+ { path: "locations.calculatedAddress.geocode.latitude" },
1179
+ { path: "locations.calculatedAddress.geocode.longitude" },
1180
+ {
1181
+ path: "removedLocationSessionsAction.moveToLocationOptions.newLocation.business.address.geocode.latitude"
1182
+ },
1183
+ {
1184
+ path: "removedLocationSessionsAction.moveToLocationOptions.newLocation.business.address.geocode.longitude"
1185
+ },
1186
+ {
1187
+ path: "removedLocationSessionsAction.moveToLocationOptions.newLocation.custom.address.geocode.latitude"
1188
+ },
1189
+ {
1190
+ path: "removedLocationSessionsAction.moveToLocationOptions.newLocation.custom.address.geocode.longitude"
1191
+ },
1192
+ {
1193
+ path: "removedLocationSessionsAction.moveToLocationOptions.newLocation.calculatedAddress.geocode.latitude"
1194
+ },
1195
+ {
1196
+ path: "removedLocationSessionsAction.moveToLocationOptions.newLocation.calculatedAddress.geocode.longitude"
1197
+ }
1198
+ ]
1199
+ }
1200
+ ]);
1201
+ const metadata = {
1202
+ entityFqdn: "wix.bookings.services.v2.service",
1203
+ method: "POST",
1204
+ methodFqn: "wix.bookings.services.v2.ServicesService.SetServiceLocations",
1205
+ packageName: PACKAGE_NAME,
1206
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
1207
+ protoPath: "/v2/services/{serviceId}/locations",
1208
+ data: serializedData,
1209
+ host
1210
+ }),
1211
+ data: serializedData,
1212
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1213
+ {
1214
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1215
+ paths: [
1216
+ { path: "service.createdDate" },
1217
+ { path: "service.updatedDate" },
1218
+ { path: "service.media.items.image.urlExpirationDate" },
1219
+ { path: "service.media.mainMedia.image.urlExpirationDate" },
1220
+ { path: "service.media.coverMedia.image.urlExpirationDate" },
1221
+ { path: "service.bookingPolicy.createdDate" },
1222
+ { path: "service.bookingPolicy.updatedDate" },
1223
+ { path: "service.schedule.firstSessionStart" },
1224
+ { path: "service.schedule.lastSessionEnd" },
1225
+ {
1226
+ path: "service.staffMembers.mainMedia.image.urlExpirationDate"
1227
+ },
1228
+ {
1229
+ path: "service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
1230
+ },
1231
+ { path: "service.supportedSlugs.createdDate" },
1232
+ { path: "service.mainSlug.createdDate" }
1233
+ ]
1234
+ },
1235
+ {
1236
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
1237
+ paths: [
1238
+ { path: "service.locations.business.address.geocode.latitude" },
1239
+ { path: "service.locations.business.address.geocode.longitude" },
1240
+ { path: "service.locations.custom.address.geocode.latitude" },
1241
+ { path: "service.locations.custom.address.geocode.longitude" },
1242
+ { path: "service.locations.calculatedAddress.geocode.latitude" },
1243
+ { path: "service.locations.calculatedAddress.geocode.longitude" }
1244
+ ]
1245
+ }
1246
+ ])
1247
+ };
1248
+ return metadata;
1249
+ }
1250
+ return __setServiceLocations;
1251
+ }
1252
+ function enablePricingPlansForService(payload) {
1253
+ function __enablePricingPlansForService({ host }) {
1254
+ const metadata = {
1255
+ entityFqdn: "wix.bookings.services.v2.service",
1256
+ method: "POST",
1257
+ methodFqn: "wix.bookings.services.v2.ServicesService.EnablePricingPlansForService",
1258
+ packageName: PACKAGE_NAME,
1259
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
1260
+ protoPath: "/v2/services/{serviceId}/pricing-plans/add",
1261
+ data: payload,
1262
+ host
1263
+ }),
1264
+ data: payload,
1265
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1266
+ {
1267
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1268
+ paths: [
1269
+ { path: "service.createdDate" },
1270
+ { path: "service.updatedDate" },
1271
+ { path: "service.media.items.image.urlExpirationDate" },
1272
+ { path: "service.media.mainMedia.image.urlExpirationDate" },
1273
+ { path: "service.media.coverMedia.image.urlExpirationDate" },
1274
+ { path: "service.bookingPolicy.createdDate" },
1275
+ { path: "service.bookingPolicy.updatedDate" },
1276
+ { path: "service.schedule.firstSessionStart" },
1277
+ { path: "service.schedule.lastSessionEnd" },
1278
+ {
1279
+ path: "service.staffMembers.mainMedia.image.urlExpirationDate"
1280
+ },
1281
+ {
1282
+ path: "service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
1283
+ },
1284
+ { path: "service.supportedSlugs.createdDate" },
1285
+ { path: "service.mainSlug.createdDate" }
1286
+ ]
1287
+ },
1288
+ {
1289
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
1290
+ paths: [
1291
+ { path: "service.locations.business.address.geocode.latitude" },
1292
+ { path: "service.locations.business.address.geocode.longitude" },
1293
+ { path: "service.locations.custom.address.geocode.latitude" },
1294
+ { path: "service.locations.custom.address.geocode.longitude" },
1295
+ { path: "service.locations.calculatedAddress.geocode.latitude" },
1296
+ { path: "service.locations.calculatedAddress.geocode.longitude" }
1297
+ ]
1298
+ }
1299
+ ])
1300
+ };
1301
+ return metadata;
1302
+ }
1303
+ return __enablePricingPlansForService;
1304
+ }
1305
+ function disablePricingPlansForService(payload) {
1306
+ function __disablePricingPlansForService({ host }) {
1307
+ const metadata = {
1308
+ entityFqdn: "wix.bookings.services.v2.service",
1309
+ method: "POST",
1310
+ methodFqn: "wix.bookings.services.v2.ServicesService.DisablePricingPlansForService",
1311
+ packageName: PACKAGE_NAME,
1312
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
1313
+ protoPath: "/v2/services/{serviceId}/pricing-plans/remove",
1314
+ data: payload,
1315
+ host
1316
+ }),
1317
+ data: payload,
1318
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1319
+ {
1320
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1321
+ paths: [
1322
+ { path: "service.createdDate" },
1323
+ { path: "service.updatedDate" },
1324
+ { path: "service.media.items.image.urlExpirationDate" },
1325
+ { path: "service.media.mainMedia.image.urlExpirationDate" },
1326
+ { path: "service.media.coverMedia.image.urlExpirationDate" },
1327
+ { path: "service.bookingPolicy.createdDate" },
1328
+ { path: "service.bookingPolicy.updatedDate" },
1329
+ { path: "service.schedule.firstSessionStart" },
1330
+ { path: "service.schedule.lastSessionEnd" },
1331
+ {
1332
+ path: "service.staffMembers.mainMedia.image.urlExpirationDate"
1333
+ },
1334
+ {
1335
+ path: "service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
1336
+ },
1337
+ { path: "service.supportedSlugs.createdDate" },
1338
+ { path: "service.mainSlug.createdDate" }
1339
+ ]
1340
+ },
1341
+ {
1342
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
1343
+ paths: [
1344
+ { path: "service.locations.business.address.geocode.latitude" },
1345
+ { path: "service.locations.business.address.geocode.longitude" },
1346
+ { path: "service.locations.custom.address.geocode.latitude" },
1347
+ { path: "service.locations.custom.address.geocode.longitude" },
1348
+ { path: "service.locations.calculatedAddress.geocode.latitude" },
1349
+ { path: "service.locations.calculatedAddress.geocode.longitude" }
1350
+ ]
1351
+ }
1352
+ ])
1353
+ };
1354
+ return metadata;
1355
+ }
1356
+ return __disablePricingPlansForService;
1357
+ }
1358
+ function setCustomSlug(payload) {
1359
+ function __setCustomSlug({ host }) {
1360
+ const metadata = {
1361
+ entityFqdn: "wix.bookings.services.v2.service",
1362
+ method: "POST",
1363
+ methodFqn: "wix.bookings.services.v2.ServicesService.SetCustomSlug",
1364
+ packageName: PACKAGE_NAME,
1365
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
1366
+ protoPath: "/v2/services/{serviceId}/slugs/custom",
1367
+ data: payload,
1368
+ host
1369
+ }),
1370
+ data: payload,
1371
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1372
+ {
1373
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1374
+ paths: [
1375
+ { path: "slug.createdDate" },
1376
+ { path: "service.createdDate" },
1377
+ { path: "service.updatedDate" },
1378
+ { path: "service.media.items.image.urlExpirationDate" },
1379
+ { path: "service.media.mainMedia.image.urlExpirationDate" },
1380
+ { path: "service.media.coverMedia.image.urlExpirationDate" },
1381
+ { path: "service.bookingPolicy.createdDate" },
1382
+ { path: "service.bookingPolicy.updatedDate" },
1383
+ { path: "service.schedule.firstSessionStart" },
1384
+ { path: "service.schedule.lastSessionEnd" },
1385
+ {
1386
+ path: "service.staffMembers.mainMedia.image.urlExpirationDate"
1387
+ },
1388
+ {
1389
+ path: "service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
1390
+ },
1391
+ { path: "service.supportedSlugs.createdDate" },
1392
+ { path: "service.mainSlug.createdDate" }
1393
+ ]
1394
+ },
1395
+ {
1396
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
1397
+ paths: [
1398
+ { path: "service.locations.business.address.geocode.latitude" },
1399
+ { path: "service.locations.business.address.geocode.longitude" },
1400
+ { path: "service.locations.custom.address.geocode.latitude" },
1401
+ { path: "service.locations.custom.address.geocode.longitude" },
1402
+ { path: "service.locations.calculatedAddress.geocode.latitude" },
1403
+ { path: "service.locations.calculatedAddress.geocode.longitude" }
1404
+ ]
1405
+ }
1406
+ ])
1407
+ };
1408
+ return metadata;
1409
+ }
1410
+ return __setCustomSlug;
1411
+ }
1412
+ function validateSlug(payload) {
1413
+ function __validateSlug({ host }) {
1414
+ const metadata = {
1415
+ entityFqdn: "wix.bookings.services.v2.service",
1416
+ method: "POST",
1417
+ methodFqn: "wix.bookings.services.v2.ServicesService.ValidateSlug",
1418
+ packageName: PACKAGE_NAME,
1419
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
1420
+ protoPath: "/v2/services/slugs/validate",
1421
+ data: payload,
1422
+ host
1423
+ }),
1424
+ data: payload
1425
+ };
1426
+ return metadata;
1427
+ }
1428
+ return __validateSlug;
1429
+ }
1430
+ function cloneService(payload) {
1431
+ function __cloneService({ host }) {
1432
+ const metadata = {
1433
+ entityFqdn: "wix.bookings.services.v2.service",
1434
+ method: "POST",
1435
+ methodFqn: "wix.bookings.services.v2.ServicesService.CloneService",
1436
+ packageName: PACKAGE_NAME,
1437
+ url: resolveWixBookingsServicesV2ServicesServiceUrl({
1438
+ protoPath: "/v2/services/clone",
1439
+ data: payload,
1440
+ host
1441
+ }),
1442
+ data: payload,
1443
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1444
+ {
1445
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1446
+ paths: [
1447
+ { path: "service.createdDate" },
1448
+ { path: "service.updatedDate" },
1449
+ { path: "service.media.items.image.urlExpirationDate" },
1450
+ { path: "service.media.mainMedia.image.urlExpirationDate" },
1451
+ { path: "service.media.coverMedia.image.urlExpirationDate" },
1452
+ { path: "service.bookingPolicy.createdDate" },
1453
+ { path: "service.bookingPolicy.updatedDate" },
1454
+ { path: "service.schedule.firstSessionStart" },
1455
+ { path: "service.schedule.lastSessionEnd" },
1456
+ {
1457
+ path: "service.staffMembers.mainMedia.image.urlExpirationDate"
1458
+ },
1459
+ {
1460
+ path: "service.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate"
1461
+ },
1462
+ { path: "service.supportedSlugs.createdDate" },
1463
+ { path: "service.mainSlug.createdDate" }
1464
+ ]
1465
+ },
1466
+ {
1467
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
1468
+ paths: [
1469
+ { path: "service.locations.business.address.geocode.latitude" },
1470
+ { path: "service.locations.business.address.geocode.longitude" },
1471
+ { path: "service.locations.custom.address.geocode.latitude" },
1472
+ { path: "service.locations.custom.address.geocode.longitude" },
1473
+ { path: "service.locations.calculatedAddress.geocode.latitude" },
1474
+ { path: "service.locations.calculatedAddress.geocode.longitude" }
1475
+ ]
1476
+ }
1477
+ ])
1478
+ };
1479
+ return metadata;
1480
+ }
1481
+ return __cloneService;
1482
+ }
1483
+
1484
+ // src/bookings-services-v2-service-services.universal.ts
1485
+ var import_address = require("@wix/sdk-runtime/transformations/address");
1486
+ var import_address2 = require("@wix/sdk-runtime/transformations/address");
1487
+ var import_image = require("@wix/sdk-runtime/transformations/image");
1488
+ var import_image2 = require("@wix/sdk-runtime/transformations/image");
1489
+ var import_page_url_v2 = require("@wix/sdk-runtime/transformations/page-url-v2");
1490
+ var import_page_url_v22 = require("@wix/sdk-runtime/transformations/page-url-v2");
1491
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
1492
+ var ServiceType = /* @__PURE__ */ ((ServiceType2) => {
1493
+ ServiceType2["APPOINTMENT"] = "APPOINTMENT";
1494
+ ServiceType2["CLASS"] = "CLASS";
1495
+ ServiceType2["COURSE"] = "COURSE";
1496
+ return ServiceType2;
1497
+ })(ServiceType || {});
1498
+ var RateType = /* @__PURE__ */ ((RateType2) => {
1499
+ RateType2["UNKNOWN_RATE_TYPE"] = "UNKNOWN_RATE_TYPE";
1500
+ RateType2["FIXED"] = "FIXED";
1501
+ RateType2["CUSTOM"] = "CUSTOM";
1502
+ RateType2["VARIED"] = "VARIED";
1503
+ RateType2["NO_FEE"] = "NO_FEE";
1504
+ return RateType2;
1505
+ })(RateType || {});
1506
+ var LocationType = /* @__PURE__ */ ((LocationType2) => {
1507
+ LocationType2["UNKNOWN_LOCATION_TYPE"] = "UNKNOWN_LOCATION_TYPE";
1508
+ LocationType2["CUSTOM"] = "CUSTOM";
1509
+ LocationType2["BUSINESS"] = "BUSINESS";
1510
+ LocationType2["CUSTOMER"] = "CUSTOMER";
1511
+ return LocationType2;
1512
+ })(LocationType || {});
1513
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1514
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
1515
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
1516
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
1517
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
1518
+ WebhookIdentityType2["APP"] = "APP";
1519
+ return WebhookIdentityType2;
1520
+ })(WebhookIdentityType || {});
1521
+ var V2RequestedFields = /* @__PURE__ */ ((V2RequestedFields2) => {
1522
+ V2RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
1523
+ V2RequestedFields2["STAFF_MEMBER_DETAILS"] = "STAFF_MEMBER_DETAILS";
1524
+ V2RequestedFields2["RESOURCE_TYPE_DETAILS"] = "RESOURCE_TYPE_DETAILS";
1525
+ return V2RequestedFields2;
1526
+ })(V2RequestedFields || {});
1527
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
1528
+ SortOrder2["ASC"] = "ASC";
1529
+ SortOrder2["DESC"] = "DESC";
1530
+ return SortOrder2;
1531
+ })(SortOrder || {});
1532
+ var SortType = /* @__PURE__ */ ((SortType2) => {
1533
+ SortType2["COUNT"] = "COUNT";
1534
+ SortType2["VALUE"] = "VALUE";
1535
+ return SortType2;
1536
+ })(SortType || {});
1537
+ var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
1538
+ SortDirection2["DESC"] = "DESC";
1539
+ SortDirection2["ASC"] = "ASC";
1540
+ return SortDirection2;
1541
+ })(SortDirection || {});
1542
+ var MissingValues = /* @__PURE__ */ ((MissingValues2) => {
1543
+ MissingValues2["EXCLUDE"] = "EXCLUDE";
1544
+ MissingValues2["INCLUDE"] = "INCLUDE";
1545
+ return MissingValues2;
1546
+ })(MissingValues || {});
1547
+ var ScalarType = /* @__PURE__ */ ((ScalarType2) => {
1548
+ ScalarType2["UNKNOWN_SCALAR_TYPE"] = "UNKNOWN_SCALAR_TYPE";
1549
+ ScalarType2["COUNT_DISTINCT"] = "COUNT_DISTINCT";
1550
+ ScalarType2["MIN"] = "MIN";
1551
+ ScalarType2["MAX"] = "MAX";
1552
+ return ScalarType2;
1553
+ })(ScalarType || {});
1554
+ var NestedAggregationType = /* @__PURE__ */ ((NestedAggregationType2) => {
1555
+ NestedAggregationType2["UNKNOWN_AGGREGATION_TYPE"] = "UNKNOWN_AGGREGATION_TYPE";
1556
+ NestedAggregationType2["VALUE"] = "VALUE";
1557
+ NestedAggregationType2["RANGE"] = "RANGE";
1558
+ NestedAggregationType2["SCALAR"] = "SCALAR";
1559
+ NestedAggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
1560
+ return NestedAggregationType2;
1561
+ })(NestedAggregationType || {});
1562
+ var Interval = /* @__PURE__ */ ((Interval2) => {
1563
+ Interval2["UNKNOWN_INTERVAL"] = "UNKNOWN_INTERVAL";
1564
+ Interval2["YEAR"] = "YEAR";
1565
+ Interval2["MONTH"] = "MONTH";
1566
+ Interval2["WEEK"] = "WEEK";
1567
+ Interval2["DAY"] = "DAY";
1568
+ Interval2["HOUR"] = "HOUR";
1569
+ Interval2["MINUTE"] = "MINUTE";
1570
+ Interval2["SECOND"] = "SECOND";
1571
+ return Interval2;
1572
+ })(Interval || {});
1573
+ var AggregationType = /* @__PURE__ */ ((AggregationType2) => {
1574
+ AggregationType2["UNKNOWN_AGGREGATION_TYPE"] = "UNKNOWN_AGGREGATION_TYPE";
1575
+ AggregationType2["VALUE"] = "VALUE";
1576
+ AggregationType2["RANGE"] = "RANGE";
1577
+ AggregationType2["SCALAR"] = "SCALAR";
1578
+ AggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
1579
+ AggregationType2["NESTED"] = "NESTED";
1580
+ return AggregationType2;
1581
+ })(AggregationType || {});
1582
+ var Mode = /* @__PURE__ */ ((Mode2) => {
1583
+ Mode2["OR"] = "OR";
1584
+ Mode2["AND"] = "AND";
1585
+ return Mode2;
1586
+ })(Mode || {});
1587
+ var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
1588
+ RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
1589
+ RequestedFields2["DEFAULT_BOOKING_FORM"] = "DEFAULT_BOOKING_FORM";
1590
+ return RequestedFields2;
1591
+ })(RequestedFields || {});
1592
+ var Action = /* @__PURE__ */ ((Action2) => {
1593
+ Action2["UNKNOWN_ACTION_TYPE"] = "UNKNOWN_ACTION_TYPE";
1594
+ Action2["KEEP_AT_CURRENT_LOCATION"] = "KEEP_AT_CURRENT_LOCATION";
1595
+ Action2["MOVE_TO_LOCATION"] = "MOVE_TO_LOCATION";
1596
+ Action2["DELETE"] = "DELETE";
1597
+ return Action2;
1598
+ })(Action || {});
1599
+ var InvalidSlugError = /* @__PURE__ */ ((InvalidSlugError2) => {
1600
+ InvalidSlugError2["UNKNOWN_SLUG_ERROR"] = "UNKNOWN_SLUG_ERROR";
1601
+ InvalidSlugError2["SLUG_CONTAINS_ILLEGAL_CHARACTERS"] = "SLUG_CONTAINS_ILLEGAL_CHARACTERS";
1602
+ InvalidSlugError2["SLUG_ALREADY_EXISTS"] = "SLUG_ALREADY_EXISTS";
1603
+ return InvalidSlugError2;
1604
+ })(InvalidSlugError || {});
1605
+ var CloneErrors = /* @__PURE__ */ ((CloneErrors2) => {
1606
+ CloneErrors2["OPTIONS_AND_VARIANTS"] = "OPTIONS_AND_VARIANTS";
1607
+ CloneErrors2["FORM"] = "FORM";
1608
+ return CloneErrors2;
1609
+ })(CloneErrors || {});
1610
+ var Status = /* @__PURE__ */ ((Status2) => {
1611
+ Status2["CREATED"] = "CREATED";
1612
+ Status2["DELETED"] = "DELETED";
1613
+ return Status2;
1614
+ })(Status || {});
1615
+ var CategoryNotificationEvent = /* @__PURE__ */ ((CategoryNotificationEvent2) => {
1616
+ CategoryNotificationEvent2["Updated"] = "Updated";
1617
+ CategoryNotificationEvent2["Deleted"] = "Deleted";
1618
+ CategoryNotificationEvent2["Created"] = "Created";
1619
+ return CategoryNotificationEvent2;
1620
+ })(CategoryNotificationEvent || {});
1621
+ var BenefitType = /* @__PURE__ */ ((BenefitType2) => {
1622
+ BenefitType2["UNDEFINED"] = "UNDEFINED";
1623
+ BenefitType2["LIMITED"] = "LIMITED";
1624
+ BenefitType2["UNLIMITED"] = "UNLIMITED";
1625
+ return BenefitType2;
1626
+ })(BenefitType || {});
1627
+ var Event = /* @__PURE__ */ ((Event2) => {
1628
+ Event2["Updated"] = "Updated";
1629
+ Event2["Deleted"] = "Deleted";
1630
+ Event2["Created"] = "Created";
1631
+ return Event2;
1632
+ })(Event || {});
1633
+ var CrudType = /* @__PURE__ */ ((CrudType2) => {
1634
+ CrudType2["INVALID_CRUD_TYPE"] = "INVALID_CRUD_TYPE";
1635
+ CrudType2["CREATE"] = "CREATE";
1636
+ CrudType2["UPDATE"] = "UPDATE";
1637
+ CrudType2["DELETE"] = "DELETE";
1638
+ CrudType2["CREATE_OR_UPDATE"] = "CREATE_OR_UPDATE";
1639
+ return CrudType2;
1640
+ })(CrudType || {});
1641
+ var PlacementType = /* @__PURE__ */ ((PlacementType2) => {
1642
+ PlacementType2["BEFORE"] = "BEFORE";
1643
+ PlacementType2["AFTER"] = "AFTER";
1644
+ PlacementType2["REPLACE"] = "REPLACE";
1645
+ return PlacementType2;
1646
+ })(PlacementType || {});
1647
+ var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
1648
+ DayOfWeek2["MONDAY"] = "MONDAY";
1649
+ DayOfWeek2["TUESDAY"] = "TUESDAY";
1650
+ DayOfWeek2["WEDNESDAY"] = "WEDNESDAY";
1651
+ DayOfWeek2["THURSDAY"] = "THURSDAY";
1652
+ DayOfWeek2["FRIDAY"] = "FRIDAY";
1653
+ DayOfWeek2["SATURDAY"] = "SATURDAY";
1654
+ DayOfWeek2["SUNDAY"] = "SUNDAY";
1655
+ return DayOfWeek2;
1656
+ })(DayOfWeek || {});
1657
+ var ResolutionMethod = /* @__PURE__ */ ((ResolutionMethod2) => {
1658
+ ResolutionMethod2["QUERY_PARAM"] = "QUERY_PARAM";
1659
+ ResolutionMethod2["SUBDOMAIN"] = "SUBDOMAIN";
1660
+ ResolutionMethod2["SUBDIRECTORY"] = "SUBDIRECTORY";
1661
+ return ResolutionMethod2;
1662
+ })(ResolutionMethod || {});
1663
+ async function createService2(service) {
1664
+ const { httpClient, sideEffects } = arguments[1];
1665
+ const payload = (0, import_transform_paths2.transformPaths)(
1666
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ service }),
1667
+ [
1668
+ {
1669
+ transformFn: import_image.transformSDKImageToRESTImage,
1670
+ paths: [
1671
+ { path: "service.media.items.image" },
1672
+ { path: "service.media.mainMedia.image" },
1673
+ { path: "service.media.coverMedia.image" },
1674
+ { path: "service.staffMembers.mainMedia.image" },
1675
+ { path: "service.staffMemberDetails.staffMembers.mainMedia.image" }
1676
+ ]
1677
+ },
1678
+ {
1679
+ transformFn: import_address.transformSDKAddressToRESTAddress,
1680
+ paths: [
1681
+ { path: "service.locations.calculatedAddress" },
1682
+ { path: "service.locations.business.address" },
1683
+ { path: "service.locations.custom.address" }
1684
+ ]
1685
+ },
1686
+ {
1687
+ transformFn: import_page_url_v2.transformSDKPageURLV2ToRESTPageURLV2,
1688
+ paths: [
1689
+ { path: "service.urls.servicePage" },
1690
+ { path: "service.urls.bookingPage" },
1691
+ { path: "service.urls.calendarPage" }
1692
+ ]
1693
+ }
1694
+ ]
1695
+ );
1696
+ const reqOpts = createService(payload);
1697
+ sideEffects?.onSiteCall?.();
1698
+ try {
1699
+ const result = await httpClient.request(reqOpts);
1700
+ sideEffects?.onSuccess?.(result);
1701
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1702
+ (0, import_transform_paths2.transformPaths)(result.data, [
1703
+ {
1704
+ transformFn: import_image2.transformRESTImageToSDKImage,
1705
+ paths: [
1706
+ { path: "service.media.items.image" },
1707
+ { path: "service.media.mainMedia.image" },
1708
+ { path: "service.media.coverMedia.image" },
1709
+ { path: "service.staffMembers.mainMedia.image" },
1710
+ { path: "service.staffMemberDetails.staffMembers.mainMedia.image" }
1711
+ ]
1712
+ },
1713
+ {
1714
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1715
+ paths: [
1716
+ { path: "service.locations.calculatedAddress" },
1717
+ { path: "service.locations.business.address" },
1718
+ { path: "service.locations.custom.address" }
1719
+ ]
1720
+ },
1721
+ {
1722
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1723
+ paths: [
1724
+ { path: "service.urls.servicePage" },
1725
+ { path: "service.urls.bookingPage" },
1726
+ { path: "service.urls.calendarPage" }
1727
+ ]
1728
+ }
1729
+ ])
1730
+ )?.service;
1731
+ } catch (err) {
1732
+ const transformedError = (0, import_transform_error.transformError)(
1733
+ err,
1734
+ {
1735
+ spreadPathsToArguments: {},
1736
+ explicitPathsToArguments: { service: "$[0]" },
1737
+ singleArgumentUnchanged: false
1738
+ },
1739
+ ["service"]
1740
+ );
1741
+ sideEffects?.onError?.(err);
1742
+ throw transformedError;
1743
+ }
1744
+ }
1745
+ async function bulkCreateServices2(services, options) {
1746
+ const { httpClient, sideEffects } = arguments[2];
1747
+ const payload = (0, import_transform_paths2.transformPaths)(
1748
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1749
+ services,
1750
+ returnEntity: options?.returnEntity
1751
+ }),
1752
+ [
1753
+ {
1754
+ transformFn: import_image.transformSDKImageToRESTImage,
1755
+ paths: [
1756
+ { path: "services.media.items.image" },
1757
+ { path: "services.media.mainMedia.image" },
1758
+ { path: "services.media.coverMedia.image" },
1759
+ { path: "services.staffMembers.mainMedia.image" },
1760
+ { path: "services.staffMemberDetails.staffMembers.mainMedia.image" }
1761
+ ]
1762
+ },
1763
+ {
1764
+ transformFn: import_address.transformSDKAddressToRESTAddress,
1765
+ paths: [
1766
+ { path: "services.locations.calculatedAddress" },
1767
+ { path: "services.locations.business.address" },
1768
+ { path: "services.locations.custom.address" }
1769
+ ]
1770
+ },
1771
+ {
1772
+ transformFn: import_page_url_v2.transformSDKPageURLV2ToRESTPageURLV2,
1773
+ paths: [
1774
+ { path: "services.urls.servicePage" },
1775
+ { path: "services.urls.bookingPage" },
1776
+ { path: "services.urls.calendarPage" }
1777
+ ]
1778
+ }
1779
+ ]
1780
+ );
1781
+ const reqOpts = bulkCreateServices(payload);
1782
+ sideEffects?.onSiteCall?.();
1783
+ try {
1784
+ const result = await httpClient.request(reqOpts);
1785
+ sideEffects?.onSuccess?.(result);
1786
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1787
+ (0, import_transform_paths2.transformPaths)(result.data, [
1788
+ {
1789
+ transformFn: import_image2.transformRESTImageToSDKImage,
1790
+ paths: [
1791
+ { path: "results.item.media.items.image" },
1792
+ { path: "results.item.media.mainMedia.image" },
1793
+ { path: "results.item.media.coverMedia.image" },
1794
+ { path: "results.item.staffMembers.mainMedia.image" },
1795
+ {
1796
+ path: "results.item.staffMemberDetails.staffMembers.mainMedia.image"
1797
+ }
1798
+ ]
1799
+ },
1800
+ {
1801
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1802
+ paths: [
1803
+ { path: "results.item.locations.calculatedAddress" },
1804
+ { path: "results.item.locations.business.address" },
1805
+ { path: "results.item.locations.custom.address" }
1806
+ ]
1807
+ },
1808
+ {
1809
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1810
+ paths: [
1811
+ { path: "results.item.urls.servicePage" },
1812
+ { path: "results.item.urls.bookingPage" },
1813
+ { path: "results.item.urls.calendarPage" }
1814
+ ]
1815
+ }
1816
+ ])
1817
+ );
1818
+ } catch (err) {
1819
+ const transformedError = (0, import_transform_error.transformError)(
1820
+ err,
1821
+ {
1822
+ spreadPathsToArguments: {},
1823
+ explicitPathsToArguments: {
1824
+ services: "$[0]",
1825
+ returnEntity: "$[1].returnEntity"
1826
+ },
1827
+ singleArgumentUnchanged: false
1828
+ },
1829
+ ["services", "options"]
1830
+ );
1831
+ sideEffects?.onError?.(err);
1832
+ throw transformedError;
1833
+ }
1834
+ }
1835
+ async function getService2(serviceId) {
1836
+ const { httpClient, sideEffects } = arguments[1];
1837
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1838
+ serviceId
1839
+ });
1840
+ const reqOpts = getService(payload);
1841
+ sideEffects?.onSiteCall?.();
1842
+ try {
1843
+ const result = await httpClient.request(reqOpts);
1844
+ sideEffects?.onSuccess?.(result);
1845
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1846
+ (0, import_transform_paths2.transformPaths)(result.data, [
1847
+ {
1848
+ transformFn: import_image2.transformRESTImageToSDKImage,
1849
+ paths: [
1850
+ { path: "service.media.items.image" },
1851
+ { path: "service.media.mainMedia.image" },
1852
+ { path: "service.media.coverMedia.image" },
1853
+ { path: "service.staffMembers.mainMedia.image" },
1854
+ { path: "service.staffMemberDetails.staffMembers.mainMedia.image" }
1855
+ ]
1856
+ },
1857
+ {
1858
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1859
+ paths: [
1860
+ { path: "service.locations.calculatedAddress" },
1861
+ { path: "service.locations.business.address" },
1862
+ { path: "service.locations.custom.address" }
1863
+ ]
1864
+ },
1865
+ {
1866
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1867
+ paths: [
1868
+ { path: "service.urls.servicePage" },
1869
+ { path: "service.urls.bookingPage" },
1870
+ { path: "service.urls.calendarPage" }
1871
+ ]
1872
+ }
1873
+ ])
1874
+ )?.service;
1875
+ } catch (err) {
1876
+ const transformedError = (0, import_transform_error.transformError)(
1877
+ err,
1878
+ {
1879
+ spreadPathsToArguments: {},
1880
+ explicitPathsToArguments: { serviceId: "$[0]" },
1881
+ singleArgumentUnchanged: false
1882
+ },
1883
+ ["serviceId"]
1884
+ );
1885
+ sideEffects?.onError?.(err);
1886
+ throw transformedError;
1887
+ }
1888
+ }
1889
+ async function updateService2(_id, service) {
1890
+ const { httpClient, sideEffects } = arguments[2];
1891
+ const payload = (0, import_transform_paths2.transformPaths)(
1892
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ service: { ...service, id: _id } }),
1893
+ [
1894
+ {
1895
+ transformFn: import_image.transformSDKImageToRESTImage,
1896
+ paths: [
1897
+ { path: "service.media.items.image" },
1898
+ { path: "service.media.mainMedia.image" },
1899
+ { path: "service.media.coverMedia.image" },
1900
+ { path: "service.staffMembers.mainMedia.image" },
1901
+ { path: "service.staffMemberDetails.staffMembers.mainMedia.image" }
1902
+ ]
1903
+ },
1904
+ {
1905
+ transformFn: import_address.transformSDKAddressToRESTAddress,
1906
+ paths: [
1907
+ { path: "service.locations.calculatedAddress" },
1908
+ { path: "service.locations.business.address" },
1909
+ { path: "service.locations.custom.address" }
1910
+ ]
1911
+ },
1912
+ {
1913
+ transformFn: import_page_url_v2.transformSDKPageURLV2ToRESTPageURLV2,
1914
+ paths: [
1915
+ { path: "service.urls.servicePage" },
1916
+ { path: "service.urls.bookingPage" },
1917
+ { path: "service.urls.calendarPage" }
1918
+ ]
1919
+ }
1920
+ ]
1921
+ );
1922
+ const reqOpts = updateService(payload);
1923
+ sideEffects?.onSiteCall?.();
1924
+ try {
1925
+ const result = await httpClient.request(reqOpts);
1926
+ sideEffects?.onSuccess?.(result);
1927
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1928
+ (0, import_transform_paths2.transformPaths)(result.data, [
1929
+ {
1930
+ transformFn: import_image2.transformRESTImageToSDKImage,
1931
+ paths: [
1932
+ { path: "service.media.items.image" },
1933
+ { path: "service.media.mainMedia.image" },
1934
+ { path: "service.media.coverMedia.image" },
1935
+ { path: "service.staffMembers.mainMedia.image" },
1936
+ { path: "service.staffMemberDetails.staffMembers.mainMedia.image" }
1937
+ ]
1938
+ },
1939
+ {
1940
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1941
+ paths: [
1942
+ { path: "service.locations.calculatedAddress" },
1943
+ { path: "service.locations.business.address" },
1944
+ { path: "service.locations.custom.address" }
1945
+ ]
1946
+ },
1947
+ {
1948
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1949
+ paths: [
1950
+ { path: "service.urls.servicePage" },
1951
+ { path: "service.urls.bookingPage" },
1952
+ { path: "service.urls.calendarPage" }
1953
+ ]
1954
+ }
1955
+ ])
1956
+ )?.service;
1957
+ } catch (err) {
1958
+ const transformedError = (0, import_transform_error.transformError)(
1959
+ err,
1960
+ {
1961
+ spreadPathsToArguments: { service: "$[1]" },
1962
+ explicitPathsToArguments: { "service.id": "$[0]" },
1963
+ singleArgumentUnchanged: false
1964
+ },
1965
+ ["_id", "service"]
1966
+ );
1967
+ sideEffects?.onError?.(err);
1968
+ throw transformedError;
1969
+ }
1970
+ }
1971
+ async function bulkUpdateServices2(options) {
1972
+ const { httpClient, sideEffects } = arguments[1];
1973
+ const payload = (0, import_transform_paths2.transformPaths)(
1974
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1975
+ services: options?.services,
1976
+ returnEntity: options?.returnEntity
1977
+ }),
1978
+ [
1979
+ {
1980
+ transformFn: import_image.transformSDKImageToRESTImage,
1981
+ paths: [
1982
+ { path: "services.service.media.items.image" },
1983
+ { path: "services.service.media.mainMedia.image" },
1984
+ { path: "services.service.media.coverMedia.image" },
1985
+ { path: "services.service.staffMembers.mainMedia.image" },
1986
+ {
1987
+ path: "services.service.staffMemberDetails.staffMembers.mainMedia.image"
1988
+ }
1989
+ ]
1990
+ },
1991
+ {
1992
+ transformFn: import_address.transformSDKAddressToRESTAddress,
1993
+ paths: [
1994
+ { path: "services.service.locations.calculatedAddress" },
1995
+ { path: "services.service.locations.business.address" },
1996
+ { path: "services.service.locations.custom.address" }
1997
+ ]
1998
+ },
1999
+ {
2000
+ transformFn: import_page_url_v2.transformSDKPageURLV2ToRESTPageURLV2,
2001
+ paths: [
2002
+ { path: "services.service.urls.servicePage" },
2003
+ { path: "services.service.urls.bookingPage" },
2004
+ { path: "services.service.urls.calendarPage" }
2005
+ ]
2006
+ }
2007
+ ]
2008
+ );
2009
+ const reqOpts = bulkUpdateServices(payload);
2010
+ sideEffects?.onSiteCall?.();
2011
+ try {
2012
+ const result = await httpClient.request(reqOpts);
2013
+ sideEffects?.onSuccess?.(result);
2014
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
2015
+ (0, import_transform_paths2.transformPaths)(result.data, [
2016
+ {
2017
+ transformFn: import_image2.transformRESTImageToSDKImage,
2018
+ paths: [
2019
+ { path: "results.item.media.items.image" },
2020
+ { path: "results.item.media.mainMedia.image" },
2021
+ { path: "results.item.media.coverMedia.image" },
2022
+ { path: "results.item.staffMembers.mainMedia.image" },
2023
+ {
2024
+ path: "results.item.staffMemberDetails.staffMembers.mainMedia.image"
2025
+ }
2026
+ ]
2027
+ },
2028
+ {
2029
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
2030
+ paths: [
2031
+ { path: "results.item.locations.calculatedAddress" },
2032
+ { path: "results.item.locations.business.address" },
2033
+ { path: "results.item.locations.custom.address" }
2034
+ ]
2035
+ },
2036
+ {
2037
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
2038
+ paths: [
2039
+ { path: "results.item.urls.servicePage" },
2040
+ { path: "results.item.urls.bookingPage" },
2041
+ { path: "results.item.urls.calendarPage" }
2042
+ ]
2043
+ }
2044
+ ])
2045
+ );
2046
+ } catch (err) {
2047
+ const transformedError = (0, import_transform_error.transformError)(
2048
+ err,
2049
+ {
2050
+ spreadPathsToArguments: {},
2051
+ explicitPathsToArguments: {
2052
+ services: "$[0].services",
2053
+ returnEntity: "$[0].returnEntity"
2054
+ },
2055
+ singleArgumentUnchanged: false
2056
+ },
2057
+ ["options"]
2058
+ );
2059
+ sideEffects?.onError?.(err);
2060
+ throw transformedError;
2061
+ }
2062
+ }
2063
+ async function bulkUpdateServicesByFilter2(filter, options) {
2064
+ const { httpClient, sideEffects } = arguments[2];
2065
+ const payload = (0, import_transform_paths2.transformPaths)(
2066
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2067
+ filter,
2068
+ service: options?.service
2069
+ }),
2070
+ [
2071
+ {
2072
+ transformFn: import_image.transformSDKImageToRESTImage,
2073
+ paths: [
2074
+ { path: "service.media.items.image" },
2075
+ { path: "service.media.mainMedia.image" },
2076
+ { path: "service.media.coverMedia.image" },
2077
+ { path: "service.staffMembers.mainMedia.image" },
2078
+ { path: "service.staffMemberDetails.staffMembers.mainMedia.image" }
2079
+ ]
2080
+ },
2081
+ {
2082
+ transformFn: import_address.transformSDKAddressToRESTAddress,
2083
+ paths: [
2084
+ { path: "service.locations.calculatedAddress" },
2085
+ { path: "service.locations.business.address" },
2086
+ { path: "service.locations.custom.address" }
2087
+ ]
2088
+ },
2089
+ {
2090
+ transformFn: import_page_url_v2.transformSDKPageURLV2ToRESTPageURLV2,
2091
+ paths: [
2092
+ { path: "service.urls.servicePage" },
2093
+ { path: "service.urls.bookingPage" },
2094
+ { path: "service.urls.calendarPage" }
2095
+ ]
2096
+ }
2097
+ ]
2098
+ );
2099
+ const reqOpts = bulkUpdateServicesByFilter(payload);
2100
+ sideEffects?.onSiteCall?.();
2101
+ try {
2102
+ const result = await httpClient.request(reqOpts);
2103
+ sideEffects?.onSuccess?.(result);
2104
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2105
+ } catch (err) {
2106
+ const transformedError = (0, import_transform_error.transformError)(
2107
+ err,
2108
+ {
2109
+ spreadPathsToArguments: {},
2110
+ explicitPathsToArguments: { filter: "$[0]", service: "$[1].service" },
2111
+ singleArgumentUnchanged: false
2112
+ },
2113
+ ["filter", "options"]
2114
+ );
2115
+ sideEffects?.onError?.(err);
2116
+ throw transformedError;
2117
+ }
2118
+ }
2119
+ async function deleteService2(serviceId, options) {
2120
+ const { httpClient, sideEffects } = arguments[2];
2121
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2122
+ serviceId,
2123
+ preserveFutureSessionsWithParticipants: options?.preserveFutureSessionsWithParticipants,
2124
+ participantNotification: options?.participantNotification
2125
+ });
2126
+ const reqOpts = deleteService(payload);
2127
+ sideEffects?.onSiteCall?.();
2128
+ try {
2129
+ const result = await httpClient.request(reqOpts);
2130
+ sideEffects?.onSuccess?.(result);
2131
+ } catch (err) {
2132
+ const transformedError = (0, import_transform_error.transformError)(
2133
+ err,
2134
+ {
2135
+ spreadPathsToArguments: {},
2136
+ explicitPathsToArguments: {
2137
+ serviceId: "$[0]",
2138
+ preserveFutureSessionsWithParticipants: "$[1].preserveFutureSessionsWithParticipants",
2139
+ participantNotification: "$[1].participantNotification"
2140
+ },
2141
+ singleArgumentUnchanged: false
2142
+ },
2143
+ ["serviceId", "options"]
2144
+ );
2145
+ sideEffects?.onError?.(err);
2146
+ throw transformedError;
2147
+ }
2148
+ }
2149
+ async function bulkDeleteServices2(ids, options) {
2150
+ const { httpClient, sideEffects } = arguments[2];
2151
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2152
+ ids,
2153
+ preserveFutureSessionsWithParticipants: options?.preserveFutureSessionsWithParticipants,
2154
+ participantNotification: options?.participantNotification
2155
+ });
2156
+ const reqOpts = bulkDeleteServices(payload);
2157
+ sideEffects?.onSiteCall?.();
2158
+ try {
2159
+ const result = await httpClient.request(reqOpts);
2160
+ sideEffects?.onSuccess?.(result);
2161
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
2162
+ (0, import_transform_paths2.transformPaths)(result.data, [
2163
+ {
2164
+ transformFn: import_image2.transformRESTImageToSDKImage,
2165
+ paths: [
2166
+ { path: "results.item.media.items.image" },
2167
+ { path: "results.item.media.mainMedia.image" },
2168
+ { path: "results.item.media.coverMedia.image" },
2169
+ { path: "results.item.staffMembers.mainMedia.image" },
2170
+ {
2171
+ path: "results.item.staffMemberDetails.staffMembers.mainMedia.image"
2172
+ }
2173
+ ]
2174
+ },
2175
+ {
2176
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
2177
+ paths: [
2178
+ { path: "results.item.locations.calculatedAddress" },
2179
+ { path: "results.item.locations.business.address" },
2180
+ { path: "results.item.locations.custom.address" }
2181
+ ]
2182
+ },
2183
+ {
2184
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
2185
+ paths: [
2186
+ { path: "results.item.urls.servicePage" },
2187
+ { path: "results.item.urls.bookingPage" },
2188
+ { path: "results.item.urls.calendarPage" }
2189
+ ]
2190
+ }
2191
+ ])
2192
+ );
2193
+ } catch (err) {
2194
+ const transformedError = (0, import_transform_error.transformError)(
2195
+ err,
2196
+ {
2197
+ spreadPathsToArguments: {},
2198
+ explicitPathsToArguments: {
2199
+ ids: "$[0]",
2200
+ preserveFutureSessionsWithParticipants: "$[1].preserveFutureSessionsWithParticipants",
2201
+ participantNotification: "$[1].participantNotification"
2202
+ },
2203
+ singleArgumentUnchanged: false
2204
+ },
2205
+ ["ids", "options"]
2206
+ );
2207
+ sideEffects?.onError?.(err);
2208
+ throw transformedError;
2209
+ }
2210
+ }
2211
+ async function bulkDeleteServicesByFilter2(filter, options) {
2212
+ const { httpClient, sideEffects } = arguments[2];
2213
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2214
+ filter,
2215
+ preserveFutureSessionsWithParticipants: options?.preserveFutureSessionsWithParticipants,
2216
+ participantNotification: options?.participantNotification
2217
+ });
2218
+ const reqOpts = bulkDeleteServicesByFilter(payload);
2219
+ sideEffects?.onSiteCall?.();
2220
+ try {
2221
+ const result = await httpClient.request(reqOpts);
2222
+ sideEffects?.onSuccess?.(result);
2223
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2224
+ } catch (err) {
2225
+ const transformedError = (0, import_transform_error.transformError)(
2226
+ err,
2227
+ {
2228
+ spreadPathsToArguments: {},
2229
+ explicitPathsToArguments: {
2230
+ filter: "$[0]",
2231
+ preserveFutureSessionsWithParticipants: "$[1].preserveFutureSessionsWithParticipants",
2232
+ participantNotification: "$[1].participantNotification"
2233
+ },
2234
+ singleArgumentUnchanged: false
2235
+ },
2236
+ ["filter", "options"]
2237
+ );
2238
+ sideEffects?.onError?.(err);
2239
+ throw transformedError;
2240
+ }
2241
+ }
2242
+ function queryServices2() {
2243
+ const { httpClient, sideEffects } = arguments[0];
2244
+ return (0, import_query_builder.queryBuilder)({
2245
+ func: async (payload) => {
2246
+ const reqOpts = queryServices(payload);
2247
+ sideEffects?.onSiteCall?.();
2248
+ try {
2249
+ const result = await httpClient.request(reqOpts);
2250
+ sideEffects?.onSuccess?.(result);
2251
+ return result;
2252
+ } catch (err) {
2253
+ sideEffects?.onError?.(err);
2254
+ throw err;
2255
+ }
2256
+ },
2257
+ requestTransformer: (query) => {
2258
+ const args = [query, {}];
2259
+ return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2260
+ ...args?.[1],
2261
+ query: args?.[0]
2262
+ });
2263
+ },
2264
+ responseTransformer: ({ data }) => {
2265
+ const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
2266
+ (0, import_transform_paths2.transformPaths)(data, [
2267
+ {
2268
+ transformFn: import_image2.transformRESTImageToSDKImage,
2269
+ paths: [
2270
+ { path: "services.media.items.image" },
2271
+ { path: "services.media.mainMedia.image" },
2272
+ { path: "services.media.coverMedia.image" },
2273
+ { path: "services.staffMembers.mainMedia.image" },
2274
+ {
2275
+ path: "services.staffMemberDetails.staffMembers.mainMedia.image"
2276
+ }
2277
+ ]
2278
+ },
2279
+ {
2280
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
2281
+ paths: [
2282
+ { path: "services.locations.calculatedAddress" },
2283
+ { path: "services.locations.business.address" },
2284
+ { path: "services.locations.custom.address" }
2285
+ ]
2286
+ },
2287
+ {
2288
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
2289
+ paths: [
2290
+ { path: "services.urls.servicePage" },
2291
+ { path: "services.urls.bookingPage" },
2292
+ { path: "services.urls.calendarPage" }
2293
+ ]
2294
+ }
2295
+ ])
2296
+ );
2297
+ return {
2298
+ items: transformedData?.services,
2299
+ pagingMetadata: transformedData?.pagingMetadata
2300
+ };
2301
+ },
2302
+ errorTransformer: (err) => {
2303
+ const transformedError = (0, import_transform_error.transformError)(err, {
2304
+ spreadPathsToArguments: {},
2305
+ explicitPathsToArguments: { query: "$[0]" },
2306
+ singleArgumentUnchanged: false
2307
+ });
2308
+ throw transformedError;
2309
+ },
2310
+ pagingMethod: "OFFSET",
2311
+ transformationPaths: {}
2312
+ });
2313
+ }
2314
+ async function searchServices2(search) {
2315
+ const { httpClient, sideEffects } = arguments[1];
2316
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ search });
2317
+ const reqOpts = searchServices(payload);
2318
+ sideEffects?.onSiteCall?.();
2319
+ try {
2320
+ const result = await httpClient.request(reqOpts);
2321
+ sideEffects?.onSuccess?.(result);
2322
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
2323
+ (0, import_transform_paths2.transformPaths)(result.data, [
2324
+ {
2325
+ transformFn: import_image2.transformRESTImageToSDKImage,
2326
+ paths: [
2327
+ { path: "services.media.items.image" },
2328
+ { path: "services.media.mainMedia.image" },
2329
+ { path: "services.media.coverMedia.image" },
2330
+ { path: "services.staffMembers.mainMedia.image" },
2331
+ {
2332
+ path: "services.staffMemberDetails.staffMembers.mainMedia.image"
2333
+ }
2334
+ ]
2335
+ },
2336
+ {
2337
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
2338
+ paths: [
2339
+ { path: "services.locations.calculatedAddress" },
2340
+ { path: "services.locations.business.address" },
2341
+ { path: "services.locations.custom.address" }
2342
+ ]
2343
+ },
2344
+ {
2345
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
2346
+ paths: [
2347
+ { path: "services.urls.servicePage" },
2348
+ { path: "services.urls.bookingPage" },
2349
+ { path: "services.urls.calendarPage" }
2350
+ ]
2351
+ }
2352
+ ])
2353
+ );
2354
+ } catch (err) {
2355
+ const transformedError = (0, import_transform_error.transformError)(
2356
+ err,
2357
+ {
2358
+ spreadPathsToArguments: {},
2359
+ explicitPathsToArguments: { search: "$[0]" },
2360
+ singleArgumentUnchanged: false
2361
+ },
2362
+ ["search"]
2363
+ );
2364
+ sideEffects?.onError?.(err);
2365
+ throw transformedError;
2366
+ }
2367
+ }
2368
+ async function queryPolicies2(query) {
2369
+ const { httpClient, sideEffects } = arguments[1];
2370
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
2371
+ const reqOpts = queryPolicies(payload);
2372
+ sideEffects?.onSiteCall?.();
2373
+ try {
2374
+ const result = await httpClient.request(reqOpts);
2375
+ sideEffects?.onSuccess?.(result);
2376
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
2377
+ (0, import_transform_paths2.transformPaths)(result.data, [
2378
+ {
2379
+ transformFn: import_image2.transformRESTImageToSDKImage,
2380
+ paths: [
2381
+ { path: "bookingPolicies.services.media.items.image" },
2382
+ { path: "bookingPolicies.services.media.mainMedia.image" },
2383
+ { path: "bookingPolicies.services.media.coverMedia.image" },
2384
+ { path: "bookingPolicies.services.staffMembers.mainMedia.image" },
2385
+ {
2386
+ path: "bookingPolicies.services.staffMemberDetails.staffMembers.mainMedia.image"
2387
+ },
2388
+ { path: "bookingPolicies.connectedServices.media.items.image" },
2389
+ { path: "bookingPolicies.connectedServices.media.mainMedia.image" },
2390
+ {
2391
+ path: "bookingPolicies.connectedServices.media.coverMedia.image"
2392
+ },
2393
+ {
2394
+ path: "bookingPolicies.connectedServices.staffMembers.mainMedia.image"
2395
+ },
2396
+ {
2397
+ path: "bookingPolicies.connectedServices.staffMemberDetails.staffMembers.mainMedia.image"
2398
+ }
2399
+ ]
2400
+ },
2401
+ {
2402
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
2403
+ paths: [
2404
+ { path: "bookingPolicies.services.locations.calculatedAddress" },
2405
+ { path: "bookingPolicies.services.locations.business.address" },
2406
+ { path: "bookingPolicies.services.locations.custom.address" },
2407
+ {
2408
+ path: "bookingPolicies.connectedServices.locations.calculatedAddress"
2409
+ },
2410
+ {
2411
+ path: "bookingPolicies.connectedServices.locations.business.address"
2412
+ },
2413
+ {
2414
+ path: "bookingPolicies.connectedServices.locations.custom.address"
2415
+ }
2416
+ ]
2417
+ },
2418
+ {
2419
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
2420
+ paths: [
2421
+ { path: "bookingPolicies.services.urls.servicePage" },
2422
+ { path: "bookingPolicies.services.urls.bookingPage" },
2423
+ { path: "bookingPolicies.services.urls.calendarPage" },
2424
+ { path: "bookingPolicies.connectedServices.urls.servicePage" },
2425
+ { path: "bookingPolicies.connectedServices.urls.bookingPage" },
2426
+ { path: "bookingPolicies.connectedServices.urls.calendarPage" }
2427
+ ]
2428
+ }
2429
+ ])
2430
+ );
2431
+ } catch (err) {
2432
+ const transformedError = (0, import_transform_error.transformError)(
2433
+ err,
2434
+ {
2435
+ spreadPathsToArguments: {},
2436
+ explicitPathsToArguments: { query: "$[0]" },
2437
+ singleArgumentUnchanged: false
2438
+ },
2439
+ ["query"]
2440
+ );
2441
+ sideEffects?.onError?.(err);
2442
+ throw transformedError;
2443
+ }
2444
+ }
2445
+ async function queryBookingForms2(query, options) {
2446
+ const { httpClient, sideEffects } = arguments[2];
2447
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2448
+ query,
2449
+ conditionalFields: options?.conditionalFields
2450
+ });
2451
+ const reqOpts = queryBookingForms(payload);
2452
+ sideEffects?.onSiteCall?.();
2453
+ try {
2454
+ const result = await httpClient.request(reqOpts);
2455
+ sideEffects?.onSuccess?.(result);
2456
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2457
+ } catch (err) {
2458
+ const transformedError = (0, import_transform_error.transformError)(
2459
+ err,
2460
+ {
2461
+ spreadPathsToArguments: {},
2462
+ explicitPathsToArguments: {
2463
+ query: "$[0]",
2464
+ conditionalFields: "$[1].conditionalFields"
2465
+ },
2466
+ singleArgumentUnchanged: false
2467
+ },
2468
+ ["query", "options"]
2469
+ );
2470
+ sideEffects?.onError?.(err);
2471
+ throw transformedError;
2472
+ }
2473
+ }
2474
+ async function countServices2(options) {
2475
+ const { httpClient, sideEffects } = arguments[1];
2476
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2477
+ filter: options?.filter
2478
+ });
2479
+ const reqOpts = countServices(payload);
2480
+ sideEffects?.onSiteCall?.();
2481
+ try {
2482
+ const result = await httpClient.request(reqOpts);
2483
+ sideEffects?.onSuccess?.(result);
2484
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2485
+ } catch (err) {
2486
+ const transformedError = (0, import_transform_error.transformError)(
2487
+ err,
2488
+ {
2489
+ spreadPathsToArguments: {},
2490
+ explicitPathsToArguments: { filter: "$[0].filter" },
2491
+ singleArgumentUnchanged: false
2492
+ },
2493
+ ["options"]
2494
+ );
2495
+ sideEffects?.onError?.(err);
2496
+ throw transformedError;
2497
+ }
2498
+ }
2499
+ async function queryLocations2(options) {
2500
+ const { httpClient, sideEffects } = arguments[1];
2501
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2502
+ filter: options?.filter
2503
+ });
2504
+ const reqOpts = queryLocations(payload);
2505
+ sideEffects?.onSiteCall?.();
2506
+ try {
2507
+ const result = await httpClient.request(reqOpts);
2508
+ sideEffects?.onSuccess?.(result);
2509
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
2510
+ (0, import_transform_paths2.transformPaths)(result.data, [
2511
+ {
2512
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
2513
+ paths: [
2514
+ { path: "businessLocations.locations.calculatedAddress" },
2515
+ { path: "businessLocations.locations.business.address" },
2516
+ { path: "businessLocations.locations.custom.address" }
2517
+ ]
2518
+ }
2519
+ ])
2520
+ );
2521
+ } catch (err) {
2522
+ const transformedError = (0, import_transform_error.transformError)(
2523
+ err,
2524
+ {
2525
+ spreadPathsToArguments: {},
2526
+ explicitPathsToArguments: { filter: "$[0].filter" },
2527
+ singleArgumentUnchanged: false
2528
+ },
2529
+ ["options"]
2530
+ );
2531
+ sideEffects?.onError?.(err);
2532
+ throw transformedError;
2533
+ }
2534
+ }
2535
+ async function queryCategories2(options) {
2536
+ const { httpClient, sideEffects } = arguments[1];
2537
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2538
+ filter: options?.filter
2539
+ });
2540
+ const reqOpts = queryCategories(payload);
2541
+ sideEffects?.onSiteCall?.();
2542
+ try {
2543
+ const result = await httpClient.request(reqOpts);
2544
+ sideEffects?.onSuccess?.(result);
2545
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2546
+ } catch (err) {
2547
+ const transformedError = (0, import_transform_error.transformError)(
2548
+ err,
2549
+ {
2550
+ spreadPathsToArguments: {},
2551
+ explicitPathsToArguments: { filter: "$[0].filter" },
2552
+ singleArgumentUnchanged: false
2553
+ },
2554
+ ["options"]
2555
+ );
2556
+ sideEffects?.onError?.(err);
2557
+ throw transformedError;
2558
+ }
2559
+ }
2560
+ async function setServiceLocations2(serviceId, locations, options) {
2561
+ const { httpClient, sideEffects } = arguments[3];
2562
+ const payload = (0, import_transform_paths2.transformPaths)(
2563
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2564
+ serviceId,
2565
+ locations,
2566
+ removedLocationSessionsAction: options?.removedLocationSessionsAction,
2567
+ participantNotification: options?.participantNotification
2568
+ }),
2569
+ [
2570
+ {
2571
+ transformFn: import_address.transformSDKAddressToRESTAddress,
2572
+ paths: [
2573
+ { path: "locations.calculatedAddress" },
2574
+ { path: "locations.business.address" },
2575
+ { path: "locations.custom.address" },
2576
+ {
2577
+ path: "removedLocationSessionsAction.moveToLocationOptions.newLocation.calculatedAddress"
2578
+ },
2579
+ {
2580
+ path: "removedLocationSessionsAction.moveToLocationOptions.newLocation.business.address"
2581
+ },
2582
+ {
2583
+ path: "removedLocationSessionsAction.moveToLocationOptions.newLocation.custom.address"
2584
+ }
2585
+ ]
2586
+ }
2587
+ ]
2588
+ );
2589
+ const reqOpts = setServiceLocations(payload);
2590
+ sideEffects?.onSiteCall?.();
2591
+ try {
2592
+ const result = await httpClient.request(reqOpts);
2593
+ sideEffects?.onSuccess?.(result);
2594
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
2595
+ (0, import_transform_paths2.transformPaths)(result.data, [
2596
+ {
2597
+ transformFn: import_image2.transformRESTImageToSDKImage,
2598
+ paths: [
2599
+ { path: "service.media.items.image" },
2600
+ { path: "service.media.mainMedia.image" },
2601
+ { path: "service.media.coverMedia.image" },
2602
+ { path: "service.staffMembers.mainMedia.image" },
2603
+ { path: "service.staffMemberDetails.staffMembers.mainMedia.image" }
2604
+ ]
2605
+ },
2606
+ {
2607
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
2608
+ paths: [
2609
+ { path: "service.locations.calculatedAddress" },
2610
+ { path: "service.locations.business.address" },
2611
+ { path: "service.locations.custom.address" }
2612
+ ]
2613
+ },
2614
+ {
2615
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
2616
+ paths: [
2617
+ { path: "service.urls.servicePage" },
2618
+ { path: "service.urls.bookingPage" },
2619
+ { path: "service.urls.calendarPage" }
2620
+ ]
2621
+ }
2622
+ ])
2623
+ );
2624
+ } catch (err) {
2625
+ const transformedError = (0, import_transform_error.transformError)(
2626
+ err,
2627
+ {
2628
+ spreadPathsToArguments: {},
2629
+ explicitPathsToArguments: {
2630
+ serviceId: "$[0]",
2631
+ locations: "$[1]",
2632
+ removedLocationSessionsAction: "$[2].removedLocationSessionsAction",
2633
+ participantNotification: "$[2].participantNotification"
2634
+ },
2635
+ singleArgumentUnchanged: false
2636
+ },
2637
+ ["serviceId", "locations", "options"]
2638
+ );
2639
+ sideEffects?.onError?.(err);
2640
+ throw transformedError;
2641
+ }
2642
+ }
2643
+ async function enablePricingPlansForService2(serviceId, pricingPlanIds) {
2644
+ const { httpClient, sideEffects } = arguments[2];
2645
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2646
+ serviceId,
2647
+ pricingPlanIds
2648
+ });
2649
+ const reqOpts = enablePricingPlansForService(
2650
+ payload
2651
+ );
2652
+ sideEffects?.onSiteCall?.();
2653
+ try {
2654
+ const result = await httpClient.request(reqOpts);
2655
+ sideEffects?.onSuccess?.(result);
2656
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
2657
+ (0, import_transform_paths2.transformPaths)(result.data, [
2658
+ {
2659
+ transformFn: import_image2.transformRESTImageToSDKImage,
2660
+ paths: [
2661
+ { path: "service.media.items.image" },
2662
+ { path: "service.media.mainMedia.image" },
2663
+ { path: "service.media.coverMedia.image" },
2664
+ { path: "service.staffMembers.mainMedia.image" },
2665
+ { path: "service.staffMemberDetails.staffMembers.mainMedia.image" }
2666
+ ]
2667
+ },
2668
+ {
2669
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
2670
+ paths: [
2671
+ { path: "service.locations.calculatedAddress" },
2672
+ { path: "service.locations.business.address" },
2673
+ { path: "service.locations.custom.address" }
2674
+ ]
2675
+ },
2676
+ {
2677
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
2678
+ paths: [
2679
+ { path: "service.urls.servicePage" },
2680
+ { path: "service.urls.bookingPage" },
2681
+ { path: "service.urls.calendarPage" }
2682
+ ]
2683
+ }
2684
+ ])
2685
+ );
2686
+ } catch (err) {
2687
+ const transformedError = (0, import_transform_error.transformError)(
2688
+ err,
2689
+ {
2690
+ spreadPathsToArguments: {},
2691
+ explicitPathsToArguments: { serviceId: "$[0]", pricingPlanIds: "$[1]" },
2692
+ singleArgumentUnchanged: false
2693
+ },
2694
+ ["serviceId", "pricingPlanIds"]
2695
+ );
2696
+ sideEffects?.onError?.(err);
2697
+ throw transformedError;
2698
+ }
2699
+ }
2700
+ async function disablePricingPlansForService2(serviceId, options) {
2701
+ const { httpClient, sideEffects } = arguments[2];
2702
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2703
+ serviceId,
2704
+ pricingPlanIds: options?.pricingPlanIds
2705
+ });
2706
+ const reqOpts = disablePricingPlansForService(
2707
+ payload
2708
+ );
2709
+ sideEffects?.onSiteCall?.();
2710
+ try {
2711
+ const result = await httpClient.request(reqOpts);
2712
+ sideEffects?.onSuccess?.(result);
2713
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
2714
+ (0, import_transform_paths2.transformPaths)(result.data, [
2715
+ {
2716
+ transformFn: import_image2.transformRESTImageToSDKImage,
2717
+ paths: [
2718
+ { path: "service.media.items.image" },
2719
+ { path: "service.media.mainMedia.image" },
2720
+ { path: "service.media.coverMedia.image" },
2721
+ { path: "service.staffMembers.mainMedia.image" },
2722
+ { path: "service.staffMemberDetails.staffMembers.mainMedia.image" }
2723
+ ]
2724
+ },
2725
+ {
2726
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
2727
+ paths: [
2728
+ { path: "service.locations.calculatedAddress" },
2729
+ { path: "service.locations.business.address" },
2730
+ { path: "service.locations.custom.address" }
2731
+ ]
2732
+ },
2733
+ {
2734
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
2735
+ paths: [
2736
+ { path: "service.urls.servicePage" },
2737
+ { path: "service.urls.bookingPage" },
2738
+ { path: "service.urls.calendarPage" }
2739
+ ]
2740
+ }
2741
+ ])
2742
+ );
2743
+ } catch (err) {
2744
+ const transformedError = (0, import_transform_error.transformError)(
2745
+ err,
2746
+ {
2747
+ spreadPathsToArguments: {},
2748
+ explicitPathsToArguments: {
2749
+ serviceId: "$[0]",
2750
+ pricingPlanIds: "$[1].pricingPlanIds"
2751
+ },
2752
+ singleArgumentUnchanged: false
2753
+ },
2754
+ ["serviceId", "options"]
2755
+ );
2756
+ sideEffects?.onError?.(err);
2757
+ throw transformedError;
2758
+ }
2759
+ }
2760
+ async function setCustomSlug2(serviceId, options) {
2761
+ const { httpClient, sideEffects } = arguments[2];
2762
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2763
+ serviceId,
2764
+ slug: options?.slug
2765
+ });
2766
+ const reqOpts = setCustomSlug(payload);
2767
+ sideEffects?.onSiteCall?.();
2768
+ try {
2769
+ const result = await httpClient.request(reqOpts);
2770
+ sideEffects?.onSuccess?.(result);
2771
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
2772
+ (0, import_transform_paths2.transformPaths)(result.data, [
2773
+ {
2774
+ transformFn: import_image2.transformRESTImageToSDKImage,
2775
+ paths: [
2776
+ { path: "service.media.items.image" },
2777
+ { path: "service.media.mainMedia.image" },
2778
+ { path: "service.media.coverMedia.image" },
2779
+ { path: "service.staffMembers.mainMedia.image" },
2780
+ { path: "service.staffMemberDetails.staffMembers.mainMedia.image" }
2781
+ ]
2782
+ },
2783
+ {
2784
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
2785
+ paths: [
2786
+ { path: "service.locations.calculatedAddress" },
2787
+ { path: "service.locations.business.address" },
2788
+ { path: "service.locations.custom.address" }
2789
+ ]
2790
+ },
2791
+ {
2792
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
2793
+ paths: [
2794
+ { path: "service.urls.servicePage" },
2795
+ { path: "service.urls.bookingPage" },
2796
+ { path: "service.urls.calendarPage" }
2797
+ ]
2798
+ }
2799
+ ])
2800
+ );
2801
+ } catch (err) {
2802
+ const transformedError = (0, import_transform_error.transformError)(
2803
+ err,
2804
+ {
2805
+ spreadPathsToArguments: {},
2806
+ explicitPathsToArguments: { serviceId: "$[0]", slug: "$[1].slug" },
2807
+ singleArgumentUnchanged: false
2808
+ },
2809
+ ["serviceId", "options"]
2810
+ );
2811
+ sideEffects?.onError?.(err);
2812
+ throw transformedError;
2813
+ }
2814
+ }
2815
+ async function validateSlug2(serviceId, options) {
2816
+ const { httpClient, sideEffects } = arguments[2];
2817
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2818
+ serviceId,
2819
+ slug: options?.slug
2820
+ });
2821
+ const reqOpts = validateSlug(payload);
2822
+ sideEffects?.onSiteCall?.();
2823
+ try {
2824
+ const result = await httpClient.request(reqOpts);
2825
+ sideEffects?.onSuccess?.(result);
2826
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2827
+ } catch (err) {
2828
+ const transformedError = (0, import_transform_error.transformError)(
2829
+ err,
2830
+ {
2831
+ spreadPathsToArguments: {},
2832
+ explicitPathsToArguments: { serviceId: "$[0]", slug: "$[1].slug" },
2833
+ singleArgumentUnchanged: false
2834
+ },
2835
+ ["serviceId", "options"]
2836
+ );
2837
+ sideEffects?.onError?.(err);
2838
+ throw transformedError;
2839
+ }
2840
+ }
2841
+ async function cloneService2(sourceServiceId) {
2842
+ const { httpClient, sideEffects } = arguments[1];
2843
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2844
+ sourceServiceId
2845
+ });
2846
+ const reqOpts = cloneService(payload);
2847
+ sideEffects?.onSiteCall?.();
2848
+ try {
2849
+ const result = await httpClient.request(reqOpts);
2850
+ sideEffects?.onSuccess?.(result);
2851
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
2852
+ (0, import_transform_paths2.transformPaths)(result.data, [
2853
+ {
2854
+ transformFn: import_image2.transformRESTImageToSDKImage,
2855
+ paths: [
2856
+ { path: "service.media.items.image" },
2857
+ { path: "service.media.mainMedia.image" },
2858
+ { path: "service.media.coverMedia.image" },
2859
+ { path: "service.staffMembers.mainMedia.image" },
2860
+ { path: "service.staffMemberDetails.staffMembers.mainMedia.image" }
2861
+ ]
2862
+ },
2863
+ {
2864
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
2865
+ paths: [
2866
+ { path: "service.locations.calculatedAddress" },
2867
+ { path: "service.locations.business.address" },
2868
+ { path: "service.locations.custom.address" }
2869
+ ]
2870
+ },
2871
+ {
2872
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
2873
+ paths: [
2874
+ { path: "service.urls.servicePage" },
2875
+ { path: "service.urls.bookingPage" },
2876
+ { path: "service.urls.calendarPage" }
2877
+ ]
2878
+ }
2879
+ ])
2880
+ );
2881
+ } catch (err) {
2882
+ const transformedError = (0, import_transform_error.transformError)(
2883
+ err,
2884
+ {
2885
+ spreadPathsToArguments: {},
2886
+ explicitPathsToArguments: { sourceServiceId: "$[0]" },
2887
+ singleArgumentUnchanged: false
2888
+ },
2889
+ ["sourceServiceId"]
2890
+ );
2891
+ sideEffects?.onError?.(err);
2892
+ throw transformedError;
2893
+ }
2894
+ }
2895
+ // Annotate the CommonJS export names for ESM import in node:
2896
+ 0 && (module.exports = {
2897
+ Action,
2898
+ AggregationType,
2899
+ BenefitType,
2900
+ CategoryNotificationEvent,
2901
+ CloneErrors,
2902
+ CrudType,
2903
+ DayOfWeek,
2904
+ Event,
2905
+ Interval,
2906
+ InvalidSlugError,
2907
+ LocationType,
2908
+ MissingValues,
2909
+ Mode,
2910
+ NestedAggregationType,
2911
+ PlacementType,
2912
+ RateType,
2913
+ RequestedFields,
2914
+ ResolutionMethod,
2915
+ ScalarType,
2916
+ ServiceType,
2917
+ SortDirection,
2918
+ SortOrder,
2919
+ SortType,
2920
+ Status,
2921
+ V2RequestedFields,
2922
+ WebhookIdentityType,
2923
+ bulkCreateServices,
2924
+ bulkDeleteServices,
2925
+ bulkDeleteServicesByFilter,
2926
+ bulkUpdateServices,
2927
+ bulkUpdateServicesByFilter,
2928
+ cloneService,
2929
+ countServices,
2930
+ createService,
2931
+ deleteService,
2932
+ disablePricingPlansForService,
2933
+ enablePricingPlansForService,
2934
+ getService,
2935
+ queryBookingForms,
2936
+ queryCategories,
2937
+ queryLocations,
2938
+ queryPolicies,
2939
+ queryServices,
2940
+ searchServices,
2941
+ setCustomSlug,
2942
+ setServiceLocations,
2943
+ updateService,
2944
+ validateSlug
2945
+ });
2946
+ //# sourceMappingURL=index.typings.js.map