@wix/auto_sdk_restaurants_operations 1.0.99 → 1.0.101

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 (44) hide show
  1. package/build/cjs/index.d.ts +19 -19
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/index.typings.d.ts +22 -22
  4. package/build/cjs/index.typings.js.map +1 -1
  5. package/build/cjs/meta.d.ts +2 -2
  6. package/build/cjs/meta.js.map +1 -1
  7. package/build/es/index.d.mts +19 -19
  8. package/build/es/index.mjs.map +1 -1
  9. package/build/es/index.typings.d.mts +22 -22
  10. package/build/es/index.typings.mjs.map +1 -1
  11. package/build/es/meta.d.mts +2 -2
  12. package/build/es/meta.mjs.map +1 -1
  13. package/build/internal/cjs/index.d.ts +19 -19
  14. package/build/internal/cjs/index.typings.d.ts +22 -22
  15. package/build/internal/cjs/meta.d.ts +2 -2
  16. package/build/internal/es/index.d.mts +19 -19
  17. package/build/internal/es/index.typings.d.mts +22 -22
  18. package/build/internal/es/meta.d.mts +2 -2
  19. package/package.json +4 -11
  20. package/build/cjs/schemas.d.ts +0 -2137
  21. package/build/cjs/schemas.js +0 -3233
  22. package/build/cjs/schemas.js.map +0 -1
  23. package/build/es/schemas.d.mts +0 -2137
  24. package/build/es/schemas.mjs +0 -3155
  25. package/build/es/schemas.mjs.map +0 -1
  26. package/build/internal/cjs/index.js +0 -2598
  27. package/build/internal/cjs/index.js.map +0 -1
  28. package/build/internal/cjs/index.typings.js +0 -2315
  29. package/build/internal/cjs/index.typings.js.map +0 -1
  30. package/build/internal/cjs/meta.js +0 -1798
  31. package/build/internal/cjs/meta.js.map +0 -1
  32. package/build/internal/cjs/schemas.d.ts +0 -2137
  33. package/build/internal/cjs/schemas.js +0 -3233
  34. package/build/internal/cjs/schemas.js.map +0 -1
  35. package/build/internal/es/index.mjs +0 -2521
  36. package/build/internal/es/index.mjs.map +0 -1
  37. package/build/internal/es/index.typings.mjs +0 -2239
  38. package/build/internal/es/index.typings.mjs.map +0 -1
  39. package/build/internal/es/meta.mjs +0 -1721
  40. package/build/internal/es/meta.mjs.map +0 -1
  41. package/build/internal/es/schemas.d.mts +0 -2137
  42. package/build/internal/es/schemas.mjs +0 -3155
  43. package/build/internal/es/schemas.mjs.map +0 -1
  44. package/schemas/package.json +0 -3
@@ -1,2521 +0,0 @@
1
- // src/restaurants-operations-v1-operation-operations.public.ts
2
- import { renameKeysFromRESTResponseToSDKResponse as renameKeysFromRESTResponseToSDKResponse2 } from "@wix/sdk-runtime/rename-all-nested-keys";
3
- import { transformRESTAddressToSDKAddress as transformRESTAddressToSDKAddress2 } from "@wix/sdk-runtime/transformations/address";
4
- import { transformRESTTimestampToSDKTimestamp as transformRESTTimestampToSDKTimestamp2 } from "@wix/sdk-runtime/transformations/timestamp";
5
- import { transformPaths as transformPaths3 } from "@wix/sdk-runtime/transformations/transform-paths";
6
- import { EventDefinition } from "@wix/sdk-types";
7
-
8
- // src/restaurants-operations-v1-operation-operations.universal.ts
9
- import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
10
- import { queryBuilder } from "@wix/sdk-runtime/query-builder";
11
- import {
12
- renameKeysFromSDKRequestToRESTRequest,
13
- renameKeysFromRESTResponseToSDKResponse
14
- } from "@wix/sdk-runtime/rename-all-nested-keys";
15
-
16
- // src/restaurants-operations-v1-operation-operations.http.ts
17
- import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
18
- import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
19
- import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
20
- import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
21
- import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
22
- import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
23
- import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
24
- import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
25
- function resolveWixRestaurantsOperationsV1OperationsServiceUrl(opts) {
26
- const domainToMappings = {
27
- "manage._base_domain_": [
28
- {
29
- srcPath: "/_api/restaurants-operations/v1",
30
- destPath: "/v1"
31
- }
32
- ],
33
- "www._base_domain_": [
34
- {
35
- srcPath: "/_api/restaurants-operations/v1",
36
- destPath: "/v1"
37
- }
38
- ],
39
- "editor.wixapps.net": [
40
- {
41
- srcPath: "/_api/restaurants-operations/v1",
42
- destPath: "/v1"
43
- }
44
- ],
45
- "*.dev.wix-code.com": [
46
- {
47
- srcPath: "/_api/restaurants-operations/v1",
48
- destPath: "/v1"
49
- }
50
- ],
51
- "www.wixapis.com": [
52
- {
53
- srcPath: "/restaurants-operations/v1",
54
- destPath: "/v1"
55
- },
56
- {
57
- srcPath: "/restaurants/operations/v1/operations",
58
- destPath: "/v1/operations"
59
- }
60
- ],
61
- _: [
62
- {
63
- srcPath: "/_api/restaurants-operations/v1",
64
- destPath: "/v1"
65
- }
66
- ],
67
- _base_domain_: [
68
- {
69
- srcPath: "/_api/restaurants-operations/v1",
70
- destPath: "/v1"
71
- }
72
- ],
73
- "editor._base_domain_": [
74
- {
75
- srcPath: "/_api/restaurants-operations/v1",
76
- destPath: "/v1"
77
- }
78
- ],
79
- "blocks._base_domain_": [
80
- {
81
- srcPath: "/_api/restaurants-operations/v1",
82
- destPath: "/v1"
83
- }
84
- ],
85
- "create.editorx": [
86
- {
87
- srcPath: "/_api/restaurants-operations/v1",
88
- destPath: "/v1"
89
- }
90
- ],
91
- "users._base_domain_": [
92
- {
93
- srcPath: "/_api/restaurants-operations/v1",
94
- destPath: "/v1"
95
- }
96
- ],
97
- "api._api_base_domain_": [
98
- {
99
- srcPath: "/restaurants-operations",
100
- destPath: ""
101
- }
102
- ],
103
- "apps._base_domain_": [
104
- {
105
- srcPath: "/_api/restaurants-operations",
106
- destPath: ""
107
- }
108
- ]
109
- };
110
- return resolveUrl(Object.assign(opts, { domainToMappings }));
111
- }
112
- function resolveWixRestaurantsOperationPacingV1OperationPacingServiceUrl(opts) {
113
- const domainToMappings = {
114
- _: [
115
- {
116
- srcPath: "/_api/rest-operation-pacing",
117
- destPath: ""
118
- }
119
- ],
120
- "manage._base_domain_": [
121
- {
122
- srcPath: "/_api/rest-operation-pacing",
123
- destPath: ""
124
- }
125
- ],
126
- "editor._base_domain_": [
127
- {
128
- srcPath: "/_api/rest-operation-pacing",
129
- destPath: ""
130
- }
131
- ],
132
- "blocks._base_domain_": [
133
- {
134
- srcPath: "/_api/rest-operation-pacing",
135
- destPath: ""
136
- }
137
- ],
138
- "create.editorx": [
139
- {
140
- srcPath: "/_api/rest-operation-pacing",
141
- destPath: ""
142
- }
143
- ],
144
- "www.wixapis.com": [
145
- {
146
- srcPath: "/_api/rest-operation-pacing",
147
- destPath: ""
148
- }
149
- ],
150
- "*.dev.wix-code.com": [
151
- {
152
- srcPath: "/_api/rest-operation-pacing",
153
- destPath: ""
154
- }
155
- ]
156
- };
157
- return resolveUrl(Object.assign(opts, { domainToMappings }));
158
- }
159
- var PACKAGE_NAME = "@wix/auto_sdk_restaurants_operations";
160
- function listBlockedPeriods(payload) {
161
- function __listBlockedPeriods({ host }) {
162
- const serializedData = transformPaths(payload, [
163
- {
164
- transformFn: transformSDKTimestampToRESTTimestamp,
165
- paths: [{ path: "from" }, { path: "until" }]
166
- }
167
- ]);
168
- const metadata = {
169
- entityFqdn: "wix.restaurants.operations.v1.operation",
170
- method: "GET",
171
- methodFqn: "wix.restaurants.operation.pacing.v1.OperationPacingService.ListBlockedPeriods",
172
- packageName: PACKAGE_NAME,
173
- migrationOptions: {
174
- optInTransformResponse: true
175
- },
176
- url: resolveWixRestaurantsOperationPacingV1OperationPacingServiceUrl({
177
- protoPath: "/v1/operation-pacing/blocked-periods",
178
- data: serializedData,
179
- host
180
- }),
181
- params: toURLSearchParams(serializedData),
182
- transformResponse: (payload2) => transformPaths(payload2, [
183
- {
184
- transformFn: transformRESTTimestampToSDKTimestamp,
185
- paths: [
186
- { path: "blockPeriods.from" },
187
- { path: "blockPeriods.until" }
188
- ]
189
- }
190
- ])
191
- };
192
- return metadata;
193
- }
194
- return __listBlockedPeriods;
195
- }
196
- function getOperation(payload) {
197
- function __getOperation({ host }) {
198
- const metadata = {
199
- entityFqdn: "wix.restaurants.operations.v1.operation",
200
- method: "GET",
201
- methodFqn: "wix.restaurants.operations.v1.OperationsService.GetOperation",
202
- packageName: PACKAGE_NAME,
203
- migrationOptions: {
204
- optInTransformResponse: true
205
- },
206
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
207
- protoPath: "/v1/operations/{operationId}",
208
- data: payload,
209
- host
210
- }),
211
- params: toURLSearchParams(payload),
212
- transformResponse: (payload2) => transformPaths(payload2, [
213
- {
214
- transformFn: transformRESTTimestampToSDKTimestamp,
215
- paths: [
216
- { path: "operation.createdDate" },
217
- { path: "operation.updatedDate" },
218
- { path: "operation.pausedUntilOptions.time" }
219
- ]
220
- },
221
- {
222
- transformFn: transformRESTFloatToSDKFloat,
223
- paths: [
224
- {
225
- path: "operation.businessLocationDetails.address.geocode.latitude"
226
- },
227
- {
228
- path: "operation.businessLocationDetails.address.geocode.longitude"
229
- }
230
- ]
231
- }
232
- ])
233
- };
234
- return metadata;
235
- }
236
- return __getOperation;
237
- }
238
- function updateOperation(payload) {
239
- function __updateOperation({ host }) {
240
- const serializedData = transformPaths(payload, [
241
- {
242
- transformFn: transformSDKFieldMaskToRESTFieldMask,
243
- paths: [{ path: "mask" }]
244
- },
245
- {
246
- transformFn: transformSDKTimestampToRESTTimestamp,
247
- paths: [
248
- { path: "operation.createdDate" },
249
- { path: "operation.updatedDate" },
250
- { path: "operation.pausedUntilOptions.time" }
251
- ]
252
- },
253
- {
254
- transformFn: transformSDKFloatToRESTFloat,
255
- paths: [
256
- {
257
- path: "operation.businessLocationDetails.address.geocode.latitude"
258
- },
259
- {
260
- path: "operation.businessLocationDetails.address.geocode.longitude"
261
- }
262
- ]
263
- }
264
- ]);
265
- const metadata = {
266
- entityFqdn: "wix.restaurants.operations.v1.operation",
267
- method: "PATCH",
268
- methodFqn: "wix.restaurants.operations.v1.OperationsService.UpdateOperation",
269
- packageName: PACKAGE_NAME,
270
- migrationOptions: {
271
- optInTransformResponse: true
272
- },
273
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
274
- protoPath: "/v1/operations/{operation.id}",
275
- data: serializedData,
276
- host
277
- }),
278
- data: serializedData,
279
- transformResponse: (payload2) => transformPaths(payload2, [
280
- {
281
- transformFn: transformRESTTimestampToSDKTimestamp,
282
- paths: [
283
- { path: "operation.createdDate" },
284
- { path: "operation.updatedDate" },
285
- { path: "operation.pausedUntilOptions.time" }
286
- ]
287
- },
288
- {
289
- transformFn: transformRESTFloatToSDKFloat,
290
- paths: [
291
- {
292
- path: "operation.businessLocationDetails.address.geocode.latitude"
293
- },
294
- {
295
- path: "operation.businessLocationDetails.address.geocode.longitude"
296
- }
297
- ]
298
- }
299
- ])
300
- };
301
- return metadata;
302
- }
303
- return __updateOperation;
304
- }
305
- function deleteOperation(payload) {
306
- function __deleteOperation({ host }) {
307
- const metadata = {
308
- entityFqdn: "wix.restaurants.operations.v1.operation",
309
- method: "DELETE",
310
- methodFqn: "wix.restaurants.operations.v1.OperationsService.DeleteOperation",
311
- packageName: PACKAGE_NAME,
312
- migrationOptions: {
313
- optInTransformResponse: true
314
- },
315
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
316
- protoPath: "/v1/operations/{operationId}",
317
- data: payload,
318
- host
319
- }),
320
- params: toURLSearchParams(payload)
321
- };
322
- return metadata;
323
- }
324
- return __deleteOperation;
325
- }
326
- function queryOperation(payload) {
327
- function __queryOperation({ host }) {
328
- const metadata = {
329
- entityFqdn: "wix.restaurants.operations.v1.operation",
330
- method: "POST",
331
- methodFqn: "wix.restaurants.operations.v1.OperationsService.QueryOperation",
332
- packageName: PACKAGE_NAME,
333
- migrationOptions: {
334
- optInTransformResponse: true
335
- },
336
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
337
- protoPath: "/v1/operations/query",
338
- data: payload,
339
- host
340
- }),
341
- data: payload,
342
- transformResponse: (payload2) => transformPaths(payload2, [
343
- {
344
- transformFn: transformRESTTimestampToSDKTimestamp,
345
- paths: [
346
- { path: "operations.createdDate" },
347
- { path: "operations.updatedDate" },
348
- { path: "operations.pausedUntilOptions.time" }
349
- ]
350
- },
351
- {
352
- transformFn: transformRESTFloatToSDKFloat,
353
- paths: [
354
- {
355
- path: "operations.businessLocationDetails.address.geocode.latitude"
356
- },
357
- {
358
- path: "operations.businessLocationDetails.address.geocode.longitude"
359
- }
360
- ]
361
- }
362
- ])
363
- };
364
- return metadata;
365
- }
366
- return __queryOperation;
367
- }
368
- function listOperations(payload) {
369
- function __listOperations({ host }) {
370
- const metadata = {
371
- entityFqdn: "wix.restaurants.operations.v1.operation",
372
- method: "GET",
373
- methodFqn: "wix.restaurants.operations.v1.OperationsService.ListOperations",
374
- packageName: PACKAGE_NAME,
375
- migrationOptions: {
376
- optInTransformResponse: true
377
- },
378
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
379
- protoPath: "/v1/operations",
380
- data: payload,
381
- host
382
- }),
383
- params: toURLSearchParams(payload),
384
- transformResponse: (payload2) => transformPaths(payload2, [
385
- {
386
- transformFn: transformRESTTimestampToSDKTimestamp,
387
- paths: [
388
- { path: "operations.createdDate" },
389
- { path: "operations.updatedDate" },
390
- { path: "operations.pausedUntilOptions.time" }
391
- ]
392
- },
393
- {
394
- transformFn: transformRESTFloatToSDKFloat,
395
- paths: [
396
- {
397
- path: "operations.businessLocationDetails.address.geocode.latitude"
398
- },
399
- {
400
- path: "operations.businessLocationDetails.address.geocode.longitude"
401
- }
402
- ]
403
- }
404
- ])
405
- };
406
- return metadata;
407
- }
408
- return __listOperations;
409
- }
410
- function listAvailableFulfillmentOptions(payload) {
411
- function __listAvailableFulfillmentOptions({ host }) {
412
- const serializedData = transformPaths(payload, [
413
- {
414
- transformFn: transformSDKFloatToRESTFloat,
415
- paths: [
416
- { path: "deliveryAddress.geocode.latitude" },
417
- { path: "deliveryAddress.geocode.longitude" }
418
- ]
419
- }
420
- ]);
421
- const metadata = {
422
- entityFqdn: "wix.restaurants.operations.v1.operation",
423
- method: "GET",
424
- methodFqn: "wix.restaurants.operations.v1.OperationsService.ListAvailableFulfillmentOptions",
425
- packageName: PACKAGE_NAME,
426
- migrationOptions: {
427
- optInTransformResponse: true
428
- },
429
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
430
- protoPath: "/v1/operations/{operationId}/available-fulfillment-options",
431
- data: serializedData,
432
- host
433
- }),
434
- params: toURLSearchParams(serializedData),
435
- transformResponse: (payload2) => transformPaths(payload2, [
436
- {
437
- transformFn: transformRESTFloatToSDKFloat,
438
- paths: [
439
- {
440
- path: "fulfillmentOptions.pickupOptions.address.geocode.latitude"
441
- },
442
- {
443
- path: "fulfillmentOptions.pickupOptions.address.geocode.longitude"
444
- },
445
- {
446
- path: "fulfillmentOptions.dineInOptions.address.geocode.latitude"
447
- },
448
- {
449
- path: "fulfillmentOptions.dineInOptions.address.geocode.longitude"
450
- }
451
- ]
452
- },
453
- {
454
- transformFn: transformRESTTimestampToSDKTimestamp,
455
- paths: [
456
- { path: "fulfillmentOptions.availability.startTime" },
457
- { path: "fulfillmentOptions.availability.endTime" },
458
- { path: "fulfillmentOptions.availability.exceptions.startTime" },
459
- { path: "fulfillmentOptions.availability.exceptions.endTime" }
460
- ]
461
- }
462
- ])
463
- };
464
- return metadata;
465
- }
466
- return __listAvailableFulfillmentOptions;
467
- }
468
- function listFirstAvailableTimeSlotForFulfillmentTypes(payload) {
469
- function __listFirstAvailableTimeSlotForFulfillmentTypes({ host }) {
470
- const serializedData = transformPaths(payload, [
471
- {
472
- transformFn: transformSDKFloatToRESTFloat,
473
- paths: [
474
- { path: "deliveryAddress.geocode.latitude" },
475
- { path: "deliveryAddress.geocode.longitude" }
476
- ]
477
- }
478
- ]);
479
- const metadata = {
480
- entityFqdn: "wix.restaurants.operations.v1.operation",
481
- method: "GET",
482
- methodFqn: "wix.restaurants.operations.v1.OperationsService.ListFirstAvailableTimeSlotForFulfillmentTypes",
483
- packageName: PACKAGE_NAME,
484
- migrationOptions: {
485
- optInTransformResponse: true
486
- },
487
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
488
- protoPath: "/v1/operations/{operationId}/first-available-time-slot-for-fulfillment-types",
489
- data: serializedData,
490
- host
491
- }),
492
- params: toURLSearchParams(serializedData),
493
- transformResponse: (payload2) => transformPaths(payload2, [
494
- {
495
- transformFn: transformRESTTimestampToSDKTimestamp,
496
- paths: [
497
- { path: "timeSlots.startTime" },
498
- { path: "timeSlots.endTime" }
499
- ]
500
- },
501
- {
502
- transformFn: transformRESTFloatToSDKFloat,
503
- paths: [
504
- { path: "timeSlots.fulfillmentAddress.address.geocode.latitude" },
505
- {
506
- path: "timeSlots.fulfillmentAddress.address.geocode.longitude"
507
- }
508
- ]
509
- }
510
- ])
511
- };
512
- return metadata;
513
- }
514
- return __listFirstAvailableTimeSlotForFulfillmentTypes;
515
- }
516
- function calculateFirstAvailableTimeSlotPerFulfillmentType(payload) {
517
- function __calculateFirstAvailableTimeSlotPerFulfillmentType({ host }) {
518
- const serializedData = transformPaths(payload, [
519
- {
520
- transformFn: transformSDKFloatToRESTFloat,
521
- paths: [
522
- { path: "deliveryAddress.geocode.latitude" },
523
- { path: "deliveryAddress.geocode.longitude" }
524
- ]
525
- }
526
- ]);
527
- const metadata = {
528
- entityFqdn: "wix.restaurants.operations.v1.operation",
529
- method: "GET",
530
- methodFqn: "wix.restaurants.operations.v1.OperationsService.CalculateFirstAvailableTimeSlotPerFulfillmentType",
531
- packageName: PACKAGE_NAME,
532
- migrationOptions: {
533
- optInTransformResponse: true
534
- },
535
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
536
- protoPath: "/v1/operations/{operationId}/first-available-time-slot-per-fulfillment-type",
537
- data: serializedData,
538
- host
539
- }),
540
- params: toURLSearchParams(serializedData),
541
- transformResponse: (payload2) => transformPaths(payload2, [
542
- {
543
- transformFn: transformRESTTimestampToSDKTimestamp,
544
- paths: [
545
- { path: "timeslotsPerFulfillmentType.timeSlot.startTime" },
546
- { path: "timeslotsPerFulfillmentType.timeSlot.endTime" }
547
- ]
548
- },
549
- {
550
- transformFn: transformRESTFloatToSDKFloat,
551
- paths: [
552
- {
553
- path: "timeslotsPerFulfillmentType.fulfillmentInfo.address.geocode.latitude"
554
- },
555
- {
556
- path: "timeslotsPerFulfillmentType.fulfillmentInfo.address.geocode.longitude"
557
- }
558
- ]
559
- }
560
- ])
561
- };
562
- return metadata;
563
- }
564
- return __calculateFirstAvailableTimeSlotPerFulfillmentType;
565
- }
566
- function listFirstAvailableTimeSlotsForOperations(payload) {
567
- function __listFirstAvailableTimeSlotsForOperations({ host }) {
568
- const serializedData = transformPaths(payload, [
569
- {
570
- transformFn: transformSDKFloatToRESTFloat,
571
- paths: [
572
- { path: "deliveryAddress.geocode.latitude" },
573
- { path: "deliveryAddress.geocode.longitude" }
574
- ]
575
- }
576
- ]);
577
- const metadata = {
578
- entityFqdn: "wix.restaurants.operations.v1.operation",
579
- method: "POST",
580
- methodFqn: "wix.restaurants.operations.v1.OperationsService.ListFirstAvailableTimeSlotsForOperations",
581
- packageName: PACKAGE_NAME,
582
- migrationOptions: {
583
- optInTransformResponse: true
584
- },
585
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
586
- protoPath: "/v1/operations/first-available-time-slots-for-operations",
587
- data: serializedData,
588
- host
589
- }),
590
- data: serializedData,
591
- transformResponse: (payload2) => transformPaths(payload2, [
592
- {
593
- transformFn: transformRESTTimestampToSDKTimestamp,
594
- paths: [
595
- { path: "timeSlots.timeSlots.startTime" },
596
- { path: "timeSlots.timeSlots.endTime" }
597
- ]
598
- },
599
- {
600
- transformFn: transformRESTFloatToSDKFloat,
601
- paths: [
602
- {
603
- path: "timeSlots.timeSlots.fulfillmentAddress.address.geocode.latitude"
604
- },
605
- {
606
- path: "timeSlots.timeSlots.fulfillmentAddress.address.geocode.longitude"
607
- }
608
- ]
609
- }
610
- ])
611
- };
612
- return metadata;
613
- }
614
- return __listFirstAvailableTimeSlotsForOperations;
615
- }
616
- function calculateFirstAvailableTimeSlotsPerOperation(payload) {
617
- function __calculateFirstAvailableTimeSlotsPerOperation({ host }) {
618
- const serializedData = transformPaths(payload, [
619
- {
620
- transformFn: transformSDKFloatToRESTFloat,
621
- paths: [
622
- { path: "deliveryAddress.geocode.latitude" },
623
- { path: "deliveryAddress.geocode.longitude" }
624
- ]
625
- }
626
- ]);
627
- const metadata = {
628
- entityFqdn: "wix.restaurants.operations.v1.operation",
629
- method: "POST",
630
- methodFqn: "wix.restaurants.operations.v1.OperationsService.CalculateFirstAvailableTimeSlotsPerOperation",
631
- packageName: PACKAGE_NAME,
632
- migrationOptions: {
633
- optInTransformResponse: true
634
- },
635
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
636
- protoPath: "/v1/operations/first-available-time-slots-per-operations",
637
- data: serializedData,
638
- host
639
- }),
640
- data: serializedData,
641
- transformResponse: (payload2) => transformPaths(payload2, [
642
- {
643
- transformFn: transformRESTTimestampToSDKTimestamp,
644
- paths: [
645
- {
646
- path: "timeSlotsPerOperation.timeslotsPerFulfillmentType.timeSlot.startTime"
647
- },
648
- {
649
- path: "timeSlotsPerOperation.timeslotsPerFulfillmentType.timeSlot.endTime"
650
- }
651
- ]
652
- },
653
- {
654
- transformFn: transformRESTFloatToSDKFloat,
655
- paths: [
656
- {
657
- path: "timeSlotsPerOperation.timeslotsPerFulfillmentType.fulfillmentInfo.address.geocode.latitude"
658
- },
659
- {
660
- path: "timeSlotsPerOperation.timeslotsPerFulfillmentType.fulfillmentInfo.address.geocode.longitude"
661
- }
662
- ]
663
- }
664
- ])
665
- };
666
- return metadata;
667
- }
668
- return __calculateFirstAvailableTimeSlotsPerOperation;
669
- }
670
- function listFirstAvailableTimeSlotsForMenus(payload) {
671
- function __listFirstAvailableTimeSlotsForMenus({ host }) {
672
- const serializedData = transformPaths(payload, [
673
- {
674
- transformFn: transformSDKFloatToRESTFloat,
675
- paths: [
676
- { path: "deliveryAddress.geocode.latitude" },
677
- { path: "deliveryAddress.geocode.longitude" }
678
- ]
679
- }
680
- ]);
681
- const metadata = {
682
- entityFqdn: "wix.restaurants.operations.v1.operation",
683
- method: "GET",
684
- methodFqn: "wix.restaurants.operations.v1.OperationsService.ListFirstAvailableTimeSlotsForMenus",
685
- packageName: PACKAGE_NAME,
686
- migrationOptions: {
687
- optInTransformResponse: true
688
- },
689
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
690
- protoPath: "/v1/operations/{operationId}/first-available-time-slots-for-menus",
691
- data: serializedData,
692
- host
693
- }),
694
- params: toURLSearchParams(serializedData),
695
- transformResponse: (payload2) => transformPaths(payload2, [
696
- {
697
- transformFn: transformRESTTimestampToSDKTimestamp,
698
- paths: [
699
- {
700
- path: "timeSlotsPerMenu.timeslotsPerFulfillmentType.startTime"
701
- },
702
- { path: "timeSlotsPerMenu.timeslotsPerFulfillmentType.endTime" }
703
- ]
704
- },
705
- {
706
- transformFn: transformRESTFloatToSDKFloat,
707
- paths: [
708
- {
709
- path: "timeSlotsPerMenu.timeslotsPerFulfillmentType.fulfillmentAddress.address.geocode.latitude"
710
- },
711
- {
712
- path: "timeSlotsPerMenu.timeslotsPerFulfillmentType.fulfillmentAddress.address.geocode.longitude"
713
- }
714
- ]
715
- }
716
- ])
717
- };
718
- return metadata;
719
- }
720
- return __listFirstAvailableTimeSlotsForMenus;
721
- }
722
- function calculateFirstAvailableTimeSlotsPerMenu(payload) {
723
- function __calculateFirstAvailableTimeSlotsPerMenu({ host }) {
724
- const serializedData = transformPaths(payload, [
725
- {
726
- transformFn: transformSDKFloatToRESTFloat,
727
- paths: [
728
- { path: "deliveryAddress.geocode.latitude" },
729
- { path: "deliveryAddress.geocode.longitude" }
730
- ]
731
- }
732
- ]);
733
- const metadata = {
734
- entityFqdn: "wix.restaurants.operations.v1.operation",
735
- method: "GET",
736
- methodFqn: "wix.restaurants.operations.v1.OperationsService.CalculateFirstAvailableTimeSlotsPerMenu",
737
- packageName: PACKAGE_NAME,
738
- migrationOptions: {
739
- optInTransformResponse: true
740
- },
741
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
742
- protoPath: "/v1/operations/{operationId}/first-available-time-slots-per-menus",
743
- data: serializedData,
744
- host
745
- }),
746
- params: toURLSearchParams(serializedData),
747
- transformResponse: (payload2) => transformPaths(payload2, [
748
- {
749
- transformFn: transformRESTTimestampToSDKTimestamp,
750
- paths: [
751
- {
752
- path: "timeSlotsPerMenu.timeslotsPerFulfillmentType.timeSlot.startTime"
753
- },
754
- {
755
- path: "timeSlotsPerMenu.timeslotsPerFulfillmentType.timeSlot.endTime"
756
- }
757
- ]
758
- },
759
- {
760
- transformFn: transformRESTFloatToSDKFloat,
761
- paths: [
762
- {
763
- path: "timeSlotsPerMenu.timeslotsPerFulfillmentType.fulfillmentInfo.address.geocode.latitude"
764
- },
765
- {
766
- path: "timeSlotsPerMenu.timeslotsPerFulfillmentType.fulfillmentInfo.address.geocode.longitude"
767
- }
768
- ]
769
- }
770
- ])
771
- };
772
- return metadata;
773
- }
774
- return __calculateFirstAvailableTimeSlotsPerMenu;
775
- }
776
- function calculateFirstAvailableTimeSlotsForItem(payload) {
777
- function __calculateFirstAvailableTimeSlotsForItem({ host }) {
778
- const serializedData = transformPaths(payload, [
779
- {
780
- transformFn: transformSDKFloatToRESTFloat,
781
- paths: [
782
- { path: "deliveryAddress.geocode.latitude" },
783
- { path: "deliveryAddress.geocode.longitude" }
784
- ]
785
- }
786
- ]);
787
- const metadata = {
788
- entityFqdn: "wix.restaurants.operations.v1.operation",
789
- method: "GET",
790
- methodFqn: "wix.restaurants.operations.v1.OperationsService.CalculateFirstAvailableTimeSlotsForItem",
791
- packageName: PACKAGE_NAME,
792
- migrationOptions: {
793
- optInTransformResponse: true
794
- },
795
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
796
- protoPath: "/v1/operations/{operationId}/first-available-time-slots-per-item",
797
- data: serializedData,
798
- host
799
- }),
800
- params: toURLSearchParams(serializedData),
801
- transformResponse: (payload2) => transformPaths(payload2, [
802
- {
803
- transformFn: transformRESTTimestampToSDKTimestamp,
804
- paths: [
805
- { path: "timeslotsPerFulfillmentType.timeSlot.startTime" },
806
- { path: "timeslotsPerFulfillmentType.timeSlot.endTime" }
807
- ]
808
- },
809
- {
810
- transformFn: transformRESTFloatToSDKFloat,
811
- paths: [
812
- {
813
- path: "timeslotsPerFulfillmentType.fulfillmentInfo.address.geocode.latitude"
814
- },
815
- {
816
- path: "timeslotsPerFulfillmentType.fulfillmentInfo.address.geocode.longitude"
817
- }
818
- ]
819
- }
820
- ])
821
- };
822
- return metadata;
823
- }
824
- return __calculateFirstAvailableTimeSlotsForItem;
825
- }
826
- function listAvailableTimeSlotsForDate(payload) {
827
- function __listAvailableTimeSlotsForDate({ host }) {
828
- const serializedData = transformPaths(payload, [
829
- {
830
- transformFn: transformSDKFloatToRESTFloat,
831
- paths: [
832
- { path: "deliveryAddress.geocode.latitude" },
833
- { path: "deliveryAddress.geocode.longitude" }
834
- ]
835
- }
836
- ]);
837
- const metadata = {
838
- entityFqdn: "wix.restaurants.operations.v1.operation",
839
- method: "GET",
840
- methodFqn: "wix.restaurants.operations.v1.OperationsService.ListAvailableTimeSlotsForDate",
841
- packageName: PACKAGE_NAME,
842
- migrationOptions: {
843
- optInTransformResponse: true
844
- },
845
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
846
- protoPath: "/v1/operations/{operationId}/available-time-slots-for-date",
847
- data: serializedData,
848
- host
849
- }),
850
- params: toURLSearchParams(serializedData),
851
- transformResponse: (payload2) => transformPaths(payload2, [
852
- {
853
- transformFn: transformRESTTimestampToSDKTimestamp,
854
- paths: [
855
- { path: "timeSlots.startTime" },
856
- { path: "timeSlots.endTime" }
857
- ]
858
- },
859
- {
860
- transformFn: transformRESTFloatToSDKFloat,
861
- paths: [
862
- { path: "timeSlots.fulfillmentAddress.address.geocode.latitude" },
863
- {
864
- path: "timeSlots.fulfillmentAddress.address.geocode.longitude"
865
- }
866
- ]
867
- }
868
- ])
869
- };
870
- return metadata;
871
- }
872
- return __listAvailableTimeSlotsForDate;
873
- }
874
- function calculateAvailableTimeSlotsForDate(payload) {
875
- function __calculateAvailableTimeSlotsForDate({ host }) {
876
- const serializedData = transformPaths(payload, [
877
- {
878
- transformFn: transformSDKFloatToRESTFloat,
879
- paths: [
880
- { path: "deliveryAddress.geocode.latitude" },
881
- { path: "deliveryAddress.geocode.longitude" }
882
- ]
883
- }
884
- ]);
885
- const metadata = {
886
- entityFqdn: "wix.restaurants.operations.v1.operation",
887
- method: "GET",
888
- methodFqn: "wix.restaurants.operations.v1.OperationsService.CalculateAvailableTimeSlotsForDate",
889
- packageName: PACKAGE_NAME,
890
- migrationOptions: {
891
- optInTransformResponse: true
892
- },
893
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
894
- protoPath: "/v1/operations/{operationId}/available-time-slots-per-date",
895
- data: serializedData,
896
- host
897
- }),
898
- params: toURLSearchParams(serializedData),
899
- transformResponse: (payload2) => transformPaths(payload2, [
900
- {
901
- transformFn: transformRESTTimestampToSDKTimestamp,
902
- paths: [
903
- { path: "timeslotsPerFulfillmentType.timeSlot.startTime" },
904
- { path: "timeslotsPerFulfillmentType.timeSlot.endTime" }
905
- ]
906
- },
907
- {
908
- transformFn: transformRESTFloatToSDKFloat,
909
- paths: [
910
- {
911
- path: "timeslotsPerFulfillmentType.fulfillmentInfo.address.geocode.latitude"
912
- },
913
- {
914
- path: "timeslotsPerFulfillmentType.fulfillmentInfo.address.geocode.longitude"
915
- }
916
- ]
917
- }
918
- ])
919
- };
920
- return metadata;
921
- }
922
- return __calculateAvailableTimeSlotsForDate;
923
- }
924
- function listAvailableDatesInRange(payload) {
925
- function __listAvailableDatesInRange({ host }) {
926
- const serializedData = transformPaths(payload, [
927
- {
928
- transformFn: transformSDKFloatToRESTFloat,
929
- paths: [
930
- { path: "deliveryAddress.geocode.latitude" },
931
- { path: "deliveryAddress.geocode.longitude" }
932
- ]
933
- }
934
- ]);
935
- const metadata = {
936
- entityFqdn: "wix.restaurants.operations.v1.operation",
937
- method: "GET",
938
- methodFqn: "wix.restaurants.operations.v1.OperationsService.ListAvailableDatesInRange",
939
- packageName: PACKAGE_NAME,
940
- migrationOptions: {
941
- optInTransformResponse: true
942
- },
943
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
944
- protoPath: "/v1/operations/{operationId}/available-dates-in-range",
945
- data: serializedData,
946
- host
947
- }),
948
- params: toURLSearchParams(serializedData)
949
- };
950
- return metadata;
951
- }
952
- return __listAvailableDatesInRange;
953
- }
954
- function calculateAvailableDatesInRange(payload) {
955
- function __calculateAvailableDatesInRange({ host }) {
956
- const serializedData = transformPaths(payload, [
957
- {
958
- transformFn: transformSDKFloatToRESTFloat,
959
- paths: [
960
- { path: "deliveryAddress.geocode.latitude" },
961
- { path: "deliveryAddress.geocode.longitude" }
962
- ]
963
- }
964
- ]);
965
- const metadata = {
966
- entityFqdn: "wix.restaurants.operations.v1.operation",
967
- method: "GET",
968
- methodFqn: "wix.restaurants.operations.v1.OperationsService.CalculateAvailableDatesInRange",
969
- packageName: PACKAGE_NAME,
970
- migrationOptions: {
971
- optInTransformResponse: true
972
- },
973
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
974
- protoPath: "/v1/operations/{operationId}/available-dates",
975
- data: serializedData,
976
- host
977
- }),
978
- params: toURLSearchParams(serializedData)
979
- };
980
- return metadata;
981
- }
982
- return __calculateAvailableDatesInRange;
983
- }
984
- function validateOperationAddress(payload) {
985
- function __validateOperationAddress({ host }) {
986
- const metadata = {
987
- entityFqdn: "wix.restaurants.operations.v1.operation",
988
- method: "GET",
989
- methodFqn: "wix.restaurants.operations.v1.OperationsService.ValidateOperationAddress",
990
- packageName: PACKAGE_NAME,
991
- migrationOptions: {
992
- optInTransformResponse: true
993
- },
994
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
995
- protoPath: "/v1/operations/{operationId}/validate-address",
996
- data: payload,
997
- host
998
- }),
999
- params: toURLSearchParams(payload)
1000
- };
1001
- return metadata;
1002
- }
1003
- return __validateOperationAddress;
1004
- }
1005
- function bulkUpdateOperationTags(payload) {
1006
- function __bulkUpdateOperationTags({ host }) {
1007
- const metadata = {
1008
- entityFqdn: "wix.restaurants.operations.v1.operation",
1009
- method: "POST",
1010
- methodFqn: "wix.restaurants.operations.v1.OperationsService.BulkUpdateOperationTags",
1011
- packageName: PACKAGE_NAME,
1012
- migrationOptions: {
1013
- optInTransformResponse: true
1014
- },
1015
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
1016
- protoPath: "/v1/bulk/operations/update-tags",
1017
- data: payload,
1018
- host
1019
- }),
1020
- data: payload
1021
- };
1022
- return metadata;
1023
- }
1024
- return __bulkUpdateOperationTags;
1025
- }
1026
- function bulkUpdateOperationTagsByFilter(payload) {
1027
- function __bulkUpdateOperationTagsByFilter({ host }) {
1028
- const metadata = {
1029
- entityFqdn: "wix.restaurants.operations.v1.operation",
1030
- method: "POST",
1031
- methodFqn: "wix.restaurants.operations.v1.OperationsService.BulkUpdateOperationTagsByFilter",
1032
- packageName: PACKAGE_NAME,
1033
- migrationOptions: {
1034
- optInTransformResponse: true
1035
- },
1036
- url: resolveWixRestaurantsOperationsV1OperationsServiceUrl({
1037
- protoPath: "/v1/bulk/operations/update-tags-by-filter",
1038
- data: payload,
1039
- host
1040
- }),
1041
- data: payload
1042
- };
1043
- return metadata;
1044
- }
1045
- return __bulkUpdateOperationTagsByFilter;
1046
- }
1047
-
1048
- // src/restaurants-operations-v1-operation-operations.universal.ts
1049
- import { transformSDKAddressToRESTAddress } from "@wix/sdk-runtime/transformations/address";
1050
- import { transformRESTAddressToSDKAddress } from "@wix/sdk-runtime/transformations/address";
1051
- import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
1052
- import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
1053
- var SchedulingType = /* @__PURE__ */ ((SchedulingType2) => {
1054
- SchedulingType2["ASAP"] = "ASAP";
1055
- SchedulingType2["PREORDER"] = "PREORDER";
1056
- return SchedulingType2;
1057
- })(SchedulingType || {});
1058
- var PreparationTimeType = /* @__PURE__ */ ((PreparationTimeType2) => {
1059
- PreparationTimeType2["MAX"] = "MAX";
1060
- PreparationTimeType2["RANGE"] = "RANGE";
1061
- return PreparationTimeType2;
1062
- })(PreparationTimeType || {});
1063
- var TimeUnit = /* @__PURE__ */ ((TimeUnit2) => {
1064
- TimeUnit2["MINUTES"] = "MINUTES";
1065
- TimeUnit2["HOURS"] = "HOURS";
1066
- TimeUnit2["DAYS"] = "DAYS";
1067
- return TimeUnit2;
1068
- })(TimeUnit || {});
1069
- var AsapPreorderType = /* @__PURE__ */ ((AsapPreorderType2) => {
1070
- AsapPreorderType2["NO_PREORDER"] = "NO_PREORDER";
1071
- AsapPreorderType2["BUSINESS_DAYS_PREORDER"] = "BUSINESS_DAYS_PREORDER";
1072
- return AsapPreorderType2;
1073
- })(AsapPreorderType || {});
1074
- var AsapPacingWindowType = /* @__PURE__ */ ((AsapPacingWindowType2) => {
1075
- AsapPacingWindowType2["FIXED_15_MINUTE"] = "FIXED_15_MINUTE";
1076
- return AsapPacingWindowType2;
1077
- })(AsapPacingWindowType || {});
1078
- var ActivationType = /* @__PURE__ */ ((ActivationType2) => {
1079
- ActivationType2["ALWAYS_ACTIVE"] = "ALWAYS_ACTIVE";
1080
- ActivationType2["SCHEDULE"] = "SCHEDULE";
1081
- return ActivationType2;
1082
- })(ActivationType || {});
1083
- var EntitiesDayOfWeek = /* @__PURE__ */ ((EntitiesDayOfWeek2) => {
1084
- EntitiesDayOfWeek2["MON"] = "MON";
1085
- EntitiesDayOfWeek2["TUE"] = "TUE";
1086
- EntitiesDayOfWeek2["WED"] = "WED";
1087
- EntitiesDayOfWeek2["THU"] = "THU";
1088
- EntitiesDayOfWeek2["FRI"] = "FRI";
1089
- EntitiesDayOfWeek2["SAT"] = "SAT";
1090
- EntitiesDayOfWeek2["SUN"] = "SUN";
1091
- return EntitiesDayOfWeek2;
1092
- })(EntitiesDayOfWeek || {});
1093
- var MethodType = /* @__PURE__ */ ((MethodType2) => {
1094
- MethodType2["TIME_BOUNDED"] = "TIME_BOUNDED";
1095
- MethodType2["WEEKLY_SCHEDULE"] = "WEEKLY_SCHEDULE";
1096
- return MethodType2;
1097
- })(MethodType || {});
1098
- var FulfillmentTimesType = /* @__PURE__ */ ((FulfillmentTimesType2) => {
1099
- FulfillmentTimesType2["TIME_WINDOWS"] = "TIME_WINDOWS";
1100
- return FulfillmentTimesType2;
1101
- })(FulfillmentTimesType || {});
1102
- var PreorderPacingWindowType = /* @__PURE__ */ ((PreorderPacingWindowType2) => {
1103
- PreorderPacingWindowType2["DAILY"] = "DAILY";
1104
- return PreorderPacingWindowType2;
1105
- })(PreorderPacingWindowType || {});
1106
- var OnlineOrderingStatusType = /* @__PURE__ */ ((OnlineOrderingStatusType2) => {
1107
- OnlineOrderingStatusType2["UNDEFINED_ONLINE_ORDERING_STATUS"] = "UNDEFINED_ONLINE_ORDERING_STATUS";
1108
- OnlineOrderingStatusType2["ENABLED"] = "ENABLED";
1109
- OnlineOrderingStatusType2["DISABLED"] = "DISABLED";
1110
- OnlineOrderingStatusType2["PAUSED_UNTIL"] = "PAUSED_UNTIL";
1111
- return OnlineOrderingStatusType2;
1112
- })(OnlineOrderingStatusType || {});
1113
- var FulfillmentType = /* @__PURE__ */ ((FulfillmentType2) => {
1114
- FulfillmentType2["PICKUP"] = "PICKUP";
1115
- FulfillmentType2["DELIVERY"] = "DELIVERY";
1116
- FulfillmentType2["DINE_IN"] = "DINE_IN";
1117
- return FulfillmentType2;
1118
- })(FulfillmentType || {});
1119
- var PreparationTimePreparationTimeType = /* @__PURE__ */ ((PreparationTimePreparationTimeType2) => {
1120
- PreparationTimePreparationTimeType2["MAX_TIME"] = "MAX_TIME";
1121
- PreparationTimePreparationTimeType2["TIME_RANGE"] = "TIME_RANGE";
1122
- return PreparationTimePreparationTimeType2;
1123
- })(PreparationTimePreparationTimeType || {});
1124
- var AsapFutureHandlingType = /* @__PURE__ */ ((AsapFutureHandlingType2) => {
1125
- AsapFutureHandlingType2["NO_FUTURE_HANDLING"] = "NO_FUTURE_HANDLING";
1126
- AsapFutureHandlingType2["BUSINESS_DAYS_AHEAD_HANDLING"] = "BUSINESS_DAYS_AHEAD_HANDLING";
1127
- return AsapFutureHandlingType2;
1128
- })(AsapFutureHandlingType || {});
1129
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
1130
- SortOrder2["ASC"] = "ASC";
1131
- SortOrder2["DESC"] = "DESC";
1132
- return SortOrder2;
1133
- })(SortOrder || {});
1134
- var SubdivisionType = /* @__PURE__ */ ((SubdivisionType2) => {
1135
- SubdivisionType2["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
1136
- SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
1137
- SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
1138
- SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
1139
- SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
1140
- SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
1141
- SubdivisionType2["COUNTRY"] = "COUNTRY";
1142
- return SubdivisionType2;
1143
- })(SubdivisionType || {});
1144
- var FulfillmentTimeType = /* @__PURE__ */ ((FulfillmentTimeType2) => {
1145
- FulfillmentTimeType2["UNDEFINED_FULFILLMENT_TIME"] = "UNDEFINED_FULFILLMENT_TIME";
1146
- FulfillmentTimeType2["MAX_TIME"] = "MAX_TIME";
1147
- FulfillmentTimeType2["DURATION_RANGE"] = "DURATION_RANGE";
1148
- return FulfillmentTimeType2;
1149
- })(FulfillmentTimeType || {});
1150
- var FulfillmentTimesDisplayType = /* @__PURE__ */ ((FulfillmentTimesDisplayType2) => {
1151
- FulfillmentTimesDisplayType2["UNDEFINED_FULFILLMENT_TIMES_DISPLAY"] = "UNDEFINED_FULFILLMENT_TIMES_DISPLAY";
1152
- FulfillmentTimesDisplayType2["TIME_WINDOWS"] = "TIME_WINDOWS";
1153
- return FulfillmentTimesDisplayType2;
1154
- })(FulfillmentTimesDisplayType || {});
1155
- var TimeSlotStatus = /* @__PURE__ */ ((TimeSlotStatus2) => {
1156
- TimeSlotStatus2["AVAILABLE"] = "AVAILABLE";
1157
- TimeSlotStatus2["BLOCKED"] = "BLOCKED";
1158
- return TimeSlotStatus2;
1159
- })(TimeSlotStatus || {});
1160
- var OrderSchedulingType = /* @__PURE__ */ ((OrderSchedulingType2) => {
1161
- OrderSchedulingType2["ASAP"] = "ASAP";
1162
- OrderSchedulingType2["PREORDER"] = "PREORDER";
1163
- return OrderSchedulingType2;
1164
- })(OrderSchedulingType || {});
1165
- var TimeSlotForFulfillmentTimeSlotStatus = /* @__PURE__ */ ((TimeSlotForFulfillmentTimeSlotStatus2) => {
1166
- TimeSlotForFulfillmentTimeSlotStatus2["AVAILABLE"] = "AVAILABLE";
1167
- TimeSlotForFulfillmentTimeSlotStatus2["BLOCKED"] = "BLOCKED";
1168
- return TimeSlotForFulfillmentTimeSlotStatus2;
1169
- })(TimeSlotForFulfillmentTimeSlotStatus || {});
1170
- var ViolationType = /* @__PURE__ */ ((ViolationType2) => {
1171
- ViolationType2["UNKNOWN"] = "UNKNOWN";
1172
- ViolationType2["NO_ADDRESS"] = "NO_ADDRESS";
1173
- ViolationType2["MISSING_FORMATTED_ADDRESS"] = "MISSING_FORMATTED_ADDRESS";
1174
- ViolationType2["INVALID_GEOCODE"] = "INVALID_GEOCODE";
1175
- ViolationType2["MISSING_COUNTRY"] = "MISSING_COUNTRY";
1176
- ViolationType2["MISSING_SUBDIVISION"] = "MISSING_SUBDIVISION";
1177
- return ViolationType2;
1178
- })(ViolationType || {});
1179
- var PlacementType = /* @__PURE__ */ ((PlacementType2) => {
1180
- PlacementType2["BEFORE"] = "BEFORE";
1181
- PlacementType2["AFTER"] = "AFTER";
1182
- PlacementType2["REPLACE"] = "REPLACE";
1183
- return PlacementType2;
1184
- })(PlacementType || {});
1185
- var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
1186
- DayOfWeek2["MONDAY"] = "MONDAY";
1187
- DayOfWeek2["TUESDAY"] = "TUESDAY";
1188
- DayOfWeek2["WEDNESDAY"] = "WEDNESDAY";
1189
- DayOfWeek2["THURSDAY"] = "THURSDAY";
1190
- DayOfWeek2["FRIDAY"] = "FRIDAY";
1191
- DayOfWeek2["SATURDAY"] = "SATURDAY";
1192
- DayOfWeek2["SUNDAY"] = "SUNDAY";
1193
- return DayOfWeek2;
1194
- })(DayOfWeek || {});
1195
- var ResolutionMethod = /* @__PURE__ */ ((ResolutionMethod2) => {
1196
- ResolutionMethod2["QUERY_PARAM"] = "QUERY_PARAM";
1197
- ResolutionMethod2["SUBDOMAIN"] = "SUBDOMAIN";
1198
- ResolutionMethod2["SUBDIRECTORY"] = "SUBDIRECTORY";
1199
- return ResolutionMethod2;
1200
- })(ResolutionMethod || {});
1201
- var State = /* @__PURE__ */ ((State2) => {
1202
- State2["UNKNOWN"] = "UNKNOWN";
1203
- State2["ENABLED"] = "ENABLED";
1204
- State2["DISABLED"] = "DISABLED";
1205
- State2["PENDING"] = "PENDING";
1206
- State2["DEMO"] = "DEMO";
1207
- return State2;
1208
- })(State || {});
1209
- var SiteCreatedContext = /* @__PURE__ */ ((SiteCreatedContext2) => {
1210
- SiteCreatedContext2["OTHER"] = "OTHER";
1211
- SiteCreatedContext2["FROM_TEMPLATE"] = "FROM_TEMPLATE";
1212
- SiteCreatedContext2["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
1213
- SiteCreatedContext2["DUPLICATE"] = "DUPLICATE";
1214
- SiteCreatedContext2["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
1215
- SiteCreatedContext2["FLASH"] = "FLASH";
1216
- return SiteCreatedContext2;
1217
- })(SiteCreatedContext || {});
1218
- var Namespace = /* @__PURE__ */ ((Namespace2) => {
1219
- Namespace2["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
1220
- Namespace2["WIX"] = "WIX";
1221
- Namespace2["SHOUT_OUT"] = "SHOUT_OUT";
1222
- Namespace2["ALBUMS"] = "ALBUMS";
1223
- Namespace2["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
1224
- Namespace2["HOTELS"] = "HOTELS";
1225
- Namespace2["CLUBS"] = "CLUBS";
1226
- Namespace2["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
1227
- Namespace2["DEV_SITE"] = "DEV_SITE";
1228
- Namespace2["LOGOS"] = "LOGOS";
1229
- Namespace2["VIDEO_MAKER"] = "VIDEO_MAKER";
1230
- Namespace2["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
1231
- Namespace2["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
1232
- Namespace2["HTML_DRAFT"] = "HTML_DRAFT";
1233
- Namespace2["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
1234
- Namespace2["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
1235
- Namespace2["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
1236
- Namespace2["ANYWHERE"] = "ANYWHERE";
1237
- Namespace2["HEADLESS"] = "HEADLESS";
1238
- Namespace2["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
1239
- Namespace2["RISE"] = "RISE";
1240
- Namespace2["BRANDED_FIRST"] = "BRANDED_FIRST";
1241
- Namespace2["NOWNIA"] = "NOWNIA";
1242
- Namespace2["UGC_TEMPLATE"] = "UGC_TEMPLATE";
1243
- Namespace2["CODUX"] = "CODUX";
1244
- Namespace2["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
1245
- Namespace2["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
1246
- Namespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
1247
- Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
1248
- Namespace2["MIMIR"] = "MIMIR";
1249
- Namespace2["TWINS"] = "TWINS";
1250
- Namespace2["NANO"] = "NANO";
1251
- Namespace2["BASE44"] = "BASE44";
1252
- Namespace2["CHANNELS"] = "CHANNELS";
1253
- Namespace2["NAUTILUS"] = "NAUTILUS";
1254
- Namespace2["SYMPHONY"] = "SYMPHONY";
1255
- Namespace2["NAUTILUS_APPS"] = "NAUTILUS_APPS";
1256
- Namespace2["VIBU"] = "VIBU";
1257
- Namespace2["ENTERPRISE_BRAND_KIT"] = "ENTERPRISE_BRAND_KIT";
1258
- Namespace2["DEV_CENTER_DEV_SITE"] = "DEV_CENTER_DEV_SITE";
1259
- return Namespace2;
1260
- })(Namespace || {});
1261
- var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
1262
- DeleteStatus2["UNKNOWN"] = "UNKNOWN";
1263
- DeleteStatus2["TRASH"] = "TRASH";
1264
- DeleteStatus2["DELETED"] = "DELETED";
1265
- DeleteStatus2["PENDING_PURGE"] = "PENDING_PURGE";
1266
- DeleteStatus2["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
1267
- return DeleteStatus2;
1268
- })(DeleteStatus || {});
1269
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1270
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
1271
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
1272
- WebhookIdentityType2["MEMBER"] = "MEMBER";
1273
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
1274
- WebhookIdentityType2["APP"] = "APP";
1275
- return WebhookIdentityType2;
1276
- })(WebhookIdentityType || {});
1277
- async function listBlockedPeriods2(operationId, options) {
1278
- const { httpClient, sideEffects } = arguments[2];
1279
- const payload = renameKeysFromSDKRequestToRESTRequest({
1280
- operationId,
1281
- from: options?.from,
1282
- until: options?.until
1283
- });
1284
- const reqOpts = listBlockedPeriods(payload);
1285
- sideEffects?.onSiteCall?.();
1286
- try {
1287
- const result = await httpClient.request(reqOpts);
1288
- sideEffects?.onSuccess?.(result);
1289
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1290
- } catch (err) {
1291
- const transformedError = sdkTransformError(
1292
- err,
1293
- {
1294
- spreadPathsToArguments: {},
1295
- explicitPathsToArguments: {
1296
- operationId: "$[0]",
1297
- from: "$[1].from",
1298
- until: "$[1].until"
1299
- },
1300
- singleArgumentUnchanged: false
1301
- },
1302
- ["operationId", "options"]
1303
- );
1304
- sideEffects?.onError?.(err);
1305
- throw transformedError;
1306
- }
1307
- }
1308
- async function getOperation2(operationId) {
1309
- const { httpClient, sideEffects } = arguments[1];
1310
- const payload = renameKeysFromSDKRequestToRESTRequest({
1311
- operationId
1312
- });
1313
- const reqOpts = getOperation(payload);
1314
- sideEffects?.onSiteCall?.();
1315
- try {
1316
- const result = await httpClient.request(reqOpts);
1317
- sideEffects?.onSuccess?.(result);
1318
- return renameKeysFromRESTResponseToSDKResponse(
1319
- transformPaths2(result.data, [
1320
- {
1321
- transformFn: transformRESTAddressToSDKAddress,
1322
- paths: [{ path: "operation.businessLocationDetails.address" }]
1323
- }
1324
- ])
1325
- )?.operation;
1326
- } catch (err) {
1327
- const transformedError = sdkTransformError(
1328
- err,
1329
- {
1330
- spreadPathsToArguments: {},
1331
- explicitPathsToArguments: { operationId: "$[0]" },
1332
- singleArgumentUnchanged: false
1333
- },
1334
- ["operationId"]
1335
- );
1336
- sideEffects?.onError?.(err);
1337
- throw transformedError;
1338
- }
1339
- }
1340
- async function updateOperation2(_id, operation) {
1341
- const { httpClient, sideEffects } = arguments[2];
1342
- const payload = transformPaths2(
1343
- renameKeysFromSDKRequestToRESTRequest({
1344
- operation: { ...operation, id: _id }
1345
- }),
1346
- [
1347
- {
1348
- transformFn: transformSDKAddressToRESTAddress,
1349
- paths: [{ path: "operation.businessLocationDetails.address" }]
1350
- }
1351
- ]
1352
- );
1353
- const reqOpts = updateOperation(payload);
1354
- sideEffects?.onSiteCall?.();
1355
- try {
1356
- const result = await httpClient.request(reqOpts);
1357
- sideEffects?.onSuccess?.(result);
1358
- return renameKeysFromRESTResponseToSDKResponse(
1359
- transformPaths2(result.data, [
1360
- {
1361
- transformFn: transformRESTAddressToSDKAddress,
1362
- paths: [{ path: "operation.businessLocationDetails.address" }]
1363
- }
1364
- ])
1365
- )?.operation;
1366
- } catch (err) {
1367
- const transformedError = sdkTransformError(
1368
- err,
1369
- {
1370
- spreadPathsToArguments: { operation: "$[1]" },
1371
- explicitPathsToArguments: { "operation.id": "$[0]" },
1372
- singleArgumentUnchanged: false
1373
- },
1374
- ["_id", "operation"]
1375
- );
1376
- sideEffects?.onError?.(err);
1377
- throw transformedError;
1378
- }
1379
- }
1380
- async function deleteOperation2(operationId) {
1381
- const { httpClient, sideEffects } = arguments[1];
1382
- const payload = renameKeysFromSDKRequestToRESTRequest({
1383
- operationId
1384
- });
1385
- const reqOpts = deleteOperation(payload);
1386
- sideEffects?.onSiteCall?.();
1387
- try {
1388
- const result = await httpClient.request(reqOpts);
1389
- sideEffects?.onSuccess?.(result);
1390
- } catch (err) {
1391
- const transformedError = sdkTransformError(
1392
- err,
1393
- {
1394
- spreadPathsToArguments: {},
1395
- explicitPathsToArguments: { operationId: "$[0]" },
1396
- singleArgumentUnchanged: false
1397
- },
1398
- ["operationId"]
1399
- );
1400
- sideEffects?.onError?.(err);
1401
- throw transformedError;
1402
- }
1403
- }
1404
- function queryOperation2() {
1405
- const { httpClient, sideEffects } = arguments[0];
1406
- return queryBuilder({
1407
- func: async (payload) => {
1408
- const reqOpts = queryOperation(payload);
1409
- sideEffects?.onSiteCall?.();
1410
- try {
1411
- const result = await httpClient.request(reqOpts);
1412
- sideEffects?.onSuccess?.(result);
1413
- return result;
1414
- } catch (err) {
1415
- sideEffects?.onError?.(err);
1416
- throw err;
1417
- }
1418
- },
1419
- requestTransformer: (query) => {
1420
- const args = [query, {}];
1421
- return renameKeysFromSDKRequestToRESTRequest({
1422
- ...args?.[1],
1423
- query: args?.[0]
1424
- });
1425
- },
1426
- responseTransformer: ({ data }) => {
1427
- const transformedData = renameKeysFromRESTResponseToSDKResponse(
1428
- transformPaths2(data, [
1429
- {
1430
- transformFn: transformRESTAddressToSDKAddress,
1431
- paths: [{ path: "operations.businessLocationDetails.address" }]
1432
- }
1433
- ])
1434
- );
1435
- return {
1436
- items: transformedData?.operations,
1437
- pagingMetadata: transformedData?.pagingMetadata
1438
- };
1439
- },
1440
- errorTransformer: (err) => {
1441
- const transformedError = sdkTransformError(err, {
1442
- spreadPathsToArguments: {},
1443
- explicitPathsToArguments: { query: "$[0]" },
1444
- singleArgumentUnchanged: false
1445
- });
1446
- throw transformedError;
1447
- },
1448
- pagingMethod: "CURSOR",
1449
- transformationPaths: {}
1450
- });
1451
- }
1452
- async function typedQueryOperation(query) {
1453
- const { httpClient, sideEffects } = arguments[1];
1454
- const payload = renameKeysFromSDKRequestToRESTRequest({ query });
1455
- const reqOpts = queryOperation(payload);
1456
- sideEffects?.onSiteCall?.();
1457
- try {
1458
- const result = await httpClient.request(reqOpts);
1459
- sideEffects?.onSuccess?.(result);
1460
- return renameKeysFromRESTResponseToSDKResponse(
1461
- transformPaths2(result.data, [
1462
- {
1463
- transformFn: transformRESTAddressToSDKAddress,
1464
- paths: [{ path: "operations.businessLocationDetails.address" }]
1465
- }
1466
- ])
1467
- );
1468
- } catch (err) {
1469
- const transformedError = sdkTransformError(
1470
- err,
1471
- {
1472
- spreadPathsToArguments: {},
1473
- explicitPathsToArguments: { query: "$[0]" },
1474
- singleArgumentUnchanged: false
1475
- },
1476
- ["query"]
1477
- );
1478
- sideEffects?.onError?.(err);
1479
- throw transformedError;
1480
- }
1481
- }
1482
- var utils = {
1483
- query: /* @__PURE__ */ createQueryUtils()
1484
- };
1485
- async function listOperations2() {
1486
- const { httpClient, sideEffects } = arguments[0];
1487
- const payload = renameKeysFromSDKRequestToRESTRequest({});
1488
- const reqOpts = listOperations(payload);
1489
- sideEffects?.onSiteCall?.();
1490
- try {
1491
- const result = await httpClient.request(reqOpts);
1492
- sideEffects?.onSuccess?.(result);
1493
- return renameKeysFromRESTResponseToSDKResponse(
1494
- transformPaths2(result.data, [
1495
- {
1496
- transformFn: transformRESTAddressToSDKAddress,
1497
- paths: [{ path: "operations.businessLocationDetails.address" }]
1498
- }
1499
- ])
1500
- );
1501
- } catch (err) {
1502
- const transformedError = sdkTransformError(
1503
- err,
1504
- {
1505
- spreadPathsToArguments: {},
1506
- explicitPathsToArguments: {},
1507
- singleArgumentUnchanged: false
1508
- },
1509
- []
1510
- );
1511
- sideEffects?.onError?.(err);
1512
- throw transformedError;
1513
- }
1514
- }
1515
- async function listAvailableFulfillmentOptions2(operationId, options) {
1516
- const { httpClient, sideEffects } = arguments[2];
1517
- const payload = transformPaths2(
1518
- renameKeysFromSDKRequestToRESTRequest({
1519
- operationId,
1520
- deliveryAddress: options?.deliveryAddress
1521
- }),
1522
- [
1523
- {
1524
- transformFn: transformSDKAddressToRESTAddress,
1525
- paths: [{ path: "deliveryAddress" }]
1526
- }
1527
- ]
1528
- );
1529
- const reqOpts = listAvailableFulfillmentOptions(
1530
- payload
1531
- );
1532
- sideEffects?.onSiteCall?.();
1533
- try {
1534
- const result = await httpClient.request(reqOpts);
1535
- sideEffects?.onSuccess?.(result);
1536
- return renameKeysFromRESTResponseToSDKResponse(
1537
- transformPaths2(result.data, [
1538
- {
1539
- transformFn: transformRESTAddressToSDKAddress,
1540
- paths: [
1541
- { path: "fulfillmentOptions.pickupOptions.address" },
1542
- { path: "fulfillmentOptions.dineInOptions.address" }
1543
- ]
1544
- }
1545
- ])
1546
- );
1547
- } catch (err) {
1548
- const transformedError = sdkTransformError(
1549
- err,
1550
- {
1551
- spreadPathsToArguments: {},
1552
- explicitPathsToArguments: {
1553
- operationId: "$[0]",
1554
- deliveryAddress: "$[1].deliveryAddress"
1555
- },
1556
- singleArgumentUnchanged: false
1557
- },
1558
- ["operationId", "options"]
1559
- );
1560
- sideEffects?.onError?.(err);
1561
- throw transformedError;
1562
- }
1563
- }
1564
- async function listFirstAvailableTimeSlotForFulfillmentTypes2(operationId, options) {
1565
- const { httpClient, sideEffects } = arguments[2];
1566
- const payload = transformPaths2(
1567
- renameKeysFromSDKRequestToRESTRequest({
1568
- operationId,
1569
- deliveryAddress: options?.deliveryAddress
1570
- }),
1571
- [
1572
- {
1573
- transformFn: transformSDKAddressToRESTAddress,
1574
- paths: [{ path: "deliveryAddress" }]
1575
- }
1576
- ]
1577
- );
1578
- const reqOpts = listFirstAvailableTimeSlotForFulfillmentTypes(
1579
- payload
1580
- );
1581
- sideEffects?.onSiteCall?.();
1582
- try {
1583
- const result = await httpClient.request(reqOpts);
1584
- sideEffects?.onSuccess?.(result);
1585
- return renameKeysFromRESTResponseToSDKResponse(
1586
- transformPaths2(result.data, [
1587
- {
1588
- transformFn: transformRESTAddressToSDKAddress,
1589
- paths: [{ path: "timeSlots.fulfillmentAddress.address" }]
1590
- }
1591
- ])
1592
- );
1593
- } catch (err) {
1594
- const transformedError = sdkTransformError(
1595
- err,
1596
- {
1597
- spreadPathsToArguments: {},
1598
- explicitPathsToArguments: {
1599
- operationId: "$[0]",
1600
- deliveryAddress: "$[1].deliveryAddress"
1601
- },
1602
- singleArgumentUnchanged: false
1603
- },
1604
- ["operationId", "options"]
1605
- );
1606
- sideEffects?.onError?.(err);
1607
- throw transformedError;
1608
- }
1609
- }
1610
- async function calculateFirstAvailableTimeSlotPerFulfillmentType2(operationId, options) {
1611
- const { httpClient, sideEffects } = arguments[2];
1612
- const payload = transformPaths2(
1613
- renameKeysFromSDKRequestToRESTRequest({
1614
- operationId,
1615
- deliveryAddress: options?.deliveryAddress
1616
- }),
1617
- [
1618
- {
1619
- transformFn: transformSDKAddressToRESTAddress,
1620
- paths: [{ path: "deliveryAddress" }]
1621
- }
1622
- ]
1623
- );
1624
- const reqOpts = calculateFirstAvailableTimeSlotPerFulfillmentType(
1625
- payload
1626
- );
1627
- sideEffects?.onSiteCall?.();
1628
- try {
1629
- const result = await httpClient.request(reqOpts);
1630
- sideEffects?.onSuccess?.(result);
1631
- return renameKeysFromRESTResponseToSDKResponse(
1632
- transformPaths2(result.data, [
1633
- {
1634
- transformFn: transformRESTAddressToSDKAddress,
1635
- paths: [
1636
- { path: "timeslotsPerFulfillmentType.fulfillmentInfo.address" }
1637
- ]
1638
- }
1639
- ])
1640
- );
1641
- } catch (err) {
1642
- const transformedError = sdkTransformError(
1643
- err,
1644
- {
1645
- spreadPathsToArguments: {},
1646
- explicitPathsToArguments: {
1647
- operationId: "$[0]",
1648
- deliveryAddress: "$[1].deliveryAddress"
1649
- },
1650
- singleArgumentUnchanged: false
1651
- },
1652
- ["operationId", "options"]
1653
- );
1654
- sideEffects?.onError?.(err);
1655
- throw transformedError;
1656
- }
1657
- }
1658
- async function listFirstAvailableTimeSlotsForOperations2(operationIds, options) {
1659
- const { httpClient, sideEffects } = arguments[2];
1660
- const payload = transformPaths2(
1661
- renameKeysFromSDKRequestToRESTRequest({
1662
- operationIds,
1663
- deliveryAddress: options?.deliveryAddress
1664
- }),
1665
- [
1666
- {
1667
- transformFn: transformSDKAddressToRESTAddress,
1668
- paths: [{ path: "deliveryAddress" }]
1669
- }
1670
- ]
1671
- );
1672
- const reqOpts = listFirstAvailableTimeSlotsForOperations(
1673
- payload
1674
- );
1675
- sideEffects?.onSiteCall?.();
1676
- try {
1677
- const result = await httpClient.request(reqOpts);
1678
- sideEffects?.onSuccess?.(result);
1679
- return renameKeysFromRESTResponseToSDKResponse(
1680
- transformPaths2(result.data, [
1681
- {
1682
- transformFn: transformRESTAddressToSDKAddress,
1683
- paths: [{ path: "timeSlots.timeSlots.fulfillmentAddress.address" }]
1684
- }
1685
- ])
1686
- );
1687
- } catch (err) {
1688
- const transformedError = sdkTransformError(
1689
- err,
1690
- {
1691
- spreadPathsToArguments: {},
1692
- explicitPathsToArguments: {
1693
- operationIds: "$[0]",
1694
- deliveryAddress: "$[1].deliveryAddress"
1695
- },
1696
- singleArgumentUnchanged: false
1697
- },
1698
- ["operationIds", "options"]
1699
- );
1700
- sideEffects?.onError?.(err);
1701
- throw transformedError;
1702
- }
1703
- }
1704
- async function calculateFirstAvailableTimeSlotsPerOperation2(operationIds, options) {
1705
- const { httpClient, sideEffects } = arguments[2];
1706
- const payload = transformPaths2(
1707
- renameKeysFromSDKRequestToRESTRequest({
1708
- operationIds,
1709
- deliveryAddress: options?.deliveryAddress
1710
- }),
1711
- [
1712
- {
1713
- transformFn: transformSDKAddressToRESTAddress,
1714
- paths: [{ path: "deliveryAddress" }]
1715
- }
1716
- ]
1717
- );
1718
- const reqOpts = calculateFirstAvailableTimeSlotsPerOperation(
1719
- payload
1720
- );
1721
- sideEffects?.onSiteCall?.();
1722
- try {
1723
- const result = await httpClient.request(reqOpts);
1724
- sideEffects?.onSuccess?.(result);
1725
- return renameKeysFromRESTResponseToSDKResponse(
1726
- transformPaths2(result.data, [
1727
- {
1728
- transformFn: transformRESTAddressToSDKAddress,
1729
- paths: [
1730
- {
1731
- path: "timeSlotsPerOperation.timeslotsPerFulfillmentType.fulfillmentInfo.address"
1732
- }
1733
- ]
1734
- }
1735
- ])
1736
- );
1737
- } catch (err) {
1738
- const transformedError = sdkTransformError(
1739
- err,
1740
- {
1741
- spreadPathsToArguments: {},
1742
- explicitPathsToArguments: {
1743
- operationIds: "$[0]",
1744
- deliveryAddress: "$[1].deliveryAddress"
1745
- },
1746
- singleArgumentUnchanged: false
1747
- },
1748
- ["operationIds", "options"]
1749
- );
1750
- sideEffects?.onError?.(err);
1751
- throw transformedError;
1752
- }
1753
- }
1754
- async function listFirstAvailableTimeSlotsForMenus2(operationId, options) {
1755
- const { httpClient, sideEffects } = arguments[2];
1756
- const payload = transformPaths2(
1757
- renameKeysFromSDKRequestToRESTRequest({
1758
- operationId,
1759
- deliveryAddress: options?.deliveryAddress,
1760
- cursorPaging: options?.cursorPaging
1761
- }),
1762
- [
1763
- {
1764
- transformFn: transformSDKAddressToRESTAddress,
1765
- paths: [{ path: "deliveryAddress" }]
1766
- }
1767
- ]
1768
- );
1769
- const reqOpts = listFirstAvailableTimeSlotsForMenus(
1770
- payload
1771
- );
1772
- sideEffects?.onSiteCall?.();
1773
- try {
1774
- const result = await httpClient.request(reqOpts);
1775
- sideEffects?.onSuccess?.(result);
1776
- return renameKeysFromRESTResponseToSDKResponse(
1777
- transformPaths2(result.data, [
1778
- {
1779
- transformFn: transformRESTAddressToSDKAddress,
1780
- paths: [
1781
- {
1782
- path: "timeSlotsPerMenu.timeslotsPerFulfillmentType.fulfillmentAddress.address"
1783
- }
1784
- ]
1785
- }
1786
- ])
1787
- );
1788
- } catch (err) {
1789
- const transformedError = sdkTransformError(
1790
- err,
1791
- {
1792
- spreadPathsToArguments: {},
1793
- explicitPathsToArguments: {
1794
- operationId: "$[0]",
1795
- deliveryAddress: "$[1].deliveryAddress",
1796
- cursorPaging: "$[1].cursorPaging"
1797
- },
1798
- singleArgumentUnchanged: false
1799
- },
1800
- ["operationId", "options"]
1801
- );
1802
- sideEffects?.onError?.(err);
1803
- throw transformedError;
1804
- }
1805
- }
1806
- async function calculateFirstAvailableTimeSlotsPerMenu2(operationId, options) {
1807
- const { httpClient, sideEffects } = arguments[2];
1808
- const payload = transformPaths2(
1809
- renameKeysFromSDKRequestToRESTRequest({
1810
- operationId,
1811
- deliveryAddress: options?.deliveryAddress,
1812
- cursorPaging: options?.cursorPaging,
1813
- onlyOnlineOrderingEnabled: options?.onlyOnlineOrderingEnabled
1814
- }),
1815
- [
1816
- {
1817
- transformFn: transformSDKAddressToRESTAddress,
1818
- paths: [{ path: "deliveryAddress" }]
1819
- }
1820
- ]
1821
- );
1822
- const reqOpts = calculateFirstAvailableTimeSlotsPerMenu(
1823
- payload
1824
- );
1825
- sideEffects?.onSiteCall?.();
1826
- try {
1827
- const result = await httpClient.request(reqOpts);
1828
- sideEffects?.onSuccess?.(result);
1829
- return renameKeysFromRESTResponseToSDKResponse(
1830
- transformPaths2(result.data, [
1831
- {
1832
- transformFn: transformRESTAddressToSDKAddress,
1833
- paths: [
1834
- {
1835
- path: "timeSlotsPerMenu.timeslotsPerFulfillmentType.fulfillmentInfo.address"
1836
- }
1837
- ]
1838
- }
1839
- ])
1840
- );
1841
- } catch (err) {
1842
- const transformedError = sdkTransformError(
1843
- err,
1844
- {
1845
- spreadPathsToArguments: {},
1846
- explicitPathsToArguments: {
1847
- operationId: "$[0]",
1848
- deliveryAddress: "$[1].deliveryAddress",
1849
- cursorPaging: "$[1].cursorPaging",
1850
- onlyOnlineOrderingEnabled: "$[1].onlyOnlineOrderingEnabled"
1851
- },
1852
- singleArgumentUnchanged: false
1853
- },
1854
- ["operationId", "options"]
1855
- );
1856
- sideEffects?.onError?.(err);
1857
- throw transformedError;
1858
- }
1859
- }
1860
- async function calculateFirstAvailableTimeSlotsForItem2(operationId, menuId, options) {
1861
- const { httpClient, sideEffects } = arguments[3];
1862
- const payload = transformPaths2(
1863
- renameKeysFromSDKRequestToRESTRequest({
1864
- operationId,
1865
- menuId,
1866
- sectionId: options?.sectionId,
1867
- itemId: options?.itemId,
1868
- deliveryAddress: options?.deliveryAddress
1869
- }),
1870
- [
1871
- {
1872
- transformFn: transformSDKAddressToRESTAddress,
1873
- paths: [{ path: "deliveryAddress" }]
1874
- }
1875
- ]
1876
- );
1877
- const reqOpts = calculateFirstAvailableTimeSlotsForItem(
1878
- payload
1879
- );
1880
- sideEffects?.onSiteCall?.();
1881
- try {
1882
- const result = await httpClient.request(reqOpts);
1883
- sideEffects?.onSuccess?.(result);
1884
- return renameKeysFromRESTResponseToSDKResponse(
1885
- transformPaths2(result.data, [
1886
- {
1887
- transformFn: transformRESTAddressToSDKAddress,
1888
- paths: [
1889
- { path: "timeslotsPerFulfillmentType.fulfillmentInfo.address" }
1890
- ]
1891
- }
1892
- ])
1893
- );
1894
- } catch (err) {
1895
- const transformedError = sdkTransformError(
1896
- err,
1897
- {
1898
- spreadPathsToArguments: {},
1899
- explicitPathsToArguments: {
1900
- operationId: "$[0]",
1901
- menuId: "$[1]",
1902
- sectionId: "$[2].sectionId",
1903
- itemId: "$[2].itemId",
1904
- deliveryAddress: "$[2].deliveryAddress"
1905
- },
1906
- singleArgumentUnchanged: false
1907
- },
1908
- ["operationId", "menuId", "options"]
1909
- );
1910
- sideEffects?.onError?.(err);
1911
- throw transformedError;
1912
- }
1913
- }
1914
- async function listAvailableTimeSlotsForDate2(operationId, options) {
1915
- const { httpClient, sideEffects } = arguments[2];
1916
- const payload = transformPaths2(
1917
- renameKeysFromSDKRequestToRESTRequest({
1918
- operationId,
1919
- deliveryAddress: options?.deliveryAddress,
1920
- date: options?.date
1921
- }),
1922
- [
1923
- {
1924
- transformFn: transformSDKAddressToRESTAddress,
1925
- paths: [{ path: "deliveryAddress" }]
1926
- }
1927
- ]
1928
- );
1929
- const reqOpts = listAvailableTimeSlotsForDate(
1930
- payload
1931
- );
1932
- sideEffects?.onSiteCall?.();
1933
- try {
1934
- const result = await httpClient.request(reqOpts);
1935
- sideEffects?.onSuccess?.(result);
1936
- return renameKeysFromRESTResponseToSDKResponse(
1937
- transformPaths2(result.data, [
1938
- {
1939
- transformFn: transformRESTAddressToSDKAddress,
1940
- paths: [{ path: "timeSlots.fulfillmentAddress.address" }]
1941
- }
1942
- ])
1943
- );
1944
- } catch (err) {
1945
- const transformedError = sdkTransformError(
1946
- err,
1947
- {
1948
- spreadPathsToArguments: {},
1949
- explicitPathsToArguments: {
1950
- operationId: "$[0]",
1951
- deliveryAddress: "$[1].deliveryAddress",
1952
- date: "$[1].date"
1953
- },
1954
- singleArgumentUnchanged: false
1955
- },
1956
- ["operationId", "options"]
1957
- );
1958
- sideEffects?.onError?.(err);
1959
- throw transformedError;
1960
- }
1961
- }
1962
- async function calculateAvailableTimeSlotsForDate2(operationId, options) {
1963
- const { httpClient, sideEffects } = arguments[2];
1964
- const payload = transformPaths2(
1965
- renameKeysFromSDKRequestToRESTRequest({
1966
- operationId,
1967
- deliveryAddress: options?.deliveryAddress,
1968
- date: options?.date
1969
- }),
1970
- [
1971
- {
1972
- transformFn: transformSDKAddressToRESTAddress,
1973
- paths: [{ path: "deliveryAddress" }]
1974
- }
1975
- ]
1976
- );
1977
- const reqOpts = calculateAvailableTimeSlotsForDate(
1978
- payload
1979
- );
1980
- sideEffects?.onSiteCall?.();
1981
- try {
1982
- const result = await httpClient.request(reqOpts);
1983
- sideEffects?.onSuccess?.(result);
1984
- return renameKeysFromRESTResponseToSDKResponse(
1985
- transformPaths2(result.data, [
1986
- {
1987
- transformFn: transformRESTAddressToSDKAddress,
1988
- paths: [
1989
- { path: "timeslotsPerFulfillmentType.fulfillmentInfo.address" }
1990
- ]
1991
- }
1992
- ])
1993
- );
1994
- } catch (err) {
1995
- const transformedError = sdkTransformError(
1996
- err,
1997
- {
1998
- spreadPathsToArguments: {},
1999
- explicitPathsToArguments: {
2000
- operationId: "$[0]",
2001
- deliveryAddress: "$[1].deliveryAddress",
2002
- date: "$[1].date"
2003
- },
2004
- singleArgumentUnchanged: false
2005
- },
2006
- ["operationId", "options"]
2007
- );
2008
- sideEffects?.onError?.(err);
2009
- throw transformedError;
2010
- }
2011
- }
2012
- async function listAvailableDatesInRange2(operationId, options) {
2013
- const { httpClient, sideEffects } = arguments[2];
2014
- const payload = transformPaths2(
2015
- renameKeysFromSDKRequestToRESTRequest({
2016
- operationId,
2017
- deliveryAddress: options?.deliveryAddress,
2018
- from: options?.from,
2019
- until: options?.until
2020
- }),
2021
- [
2022
- {
2023
- transformFn: transformSDKAddressToRESTAddress,
2024
- paths: [{ path: "deliveryAddress" }]
2025
- }
2026
- ]
2027
- );
2028
- const reqOpts = listAvailableDatesInRange(
2029
- payload
2030
- );
2031
- sideEffects?.onSiteCall?.();
2032
- try {
2033
- const result = await httpClient.request(reqOpts);
2034
- sideEffects?.onSuccess?.(result);
2035
- return renameKeysFromRESTResponseToSDKResponse(result.data);
2036
- } catch (err) {
2037
- const transformedError = sdkTransformError(
2038
- err,
2039
- {
2040
- spreadPathsToArguments: {},
2041
- explicitPathsToArguments: {
2042
- operationId: "$[0]",
2043
- deliveryAddress: "$[1].deliveryAddress",
2044
- from: "$[1].from",
2045
- until: "$[1].until"
2046
- },
2047
- singleArgumentUnchanged: false
2048
- },
2049
- ["operationId", "options"]
2050
- );
2051
- sideEffects?.onError?.(err);
2052
- throw transformedError;
2053
- }
2054
- }
2055
- async function calculateAvailableDatesInRange2(operationId, options) {
2056
- const { httpClient, sideEffects } = arguments[2];
2057
- const payload = transformPaths2(
2058
- renameKeysFromSDKRequestToRESTRequest({
2059
- operationId,
2060
- deliveryAddress: options?.deliveryAddress,
2061
- from: options?.from,
2062
- until: options?.until
2063
- }),
2064
- [
2065
- {
2066
- transformFn: transformSDKAddressToRESTAddress,
2067
- paths: [{ path: "deliveryAddress" }]
2068
- }
2069
- ]
2070
- );
2071
- const reqOpts = calculateAvailableDatesInRange(
2072
- payload
2073
- );
2074
- sideEffects?.onSiteCall?.();
2075
- try {
2076
- const result = await httpClient.request(reqOpts);
2077
- sideEffects?.onSuccess?.(result);
2078
- return renameKeysFromRESTResponseToSDKResponse(result.data);
2079
- } catch (err) {
2080
- const transformedError = sdkTransformError(
2081
- err,
2082
- {
2083
- spreadPathsToArguments: {},
2084
- explicitPathsToArguments: {
2085
- operationId: "$[0]",
2086
- deliveryAddress: "$[1].deliveryAddress",
2087
- from: "$[1].from",
2088
- until: "$[1].until"
2089
- },
2090
- singleArgumentUnchanged: false
2091
- },
2092
- ["operationId", "options"]
2093
- );
2094
- sideEffects?.onError?.(err);
2095
- throw transformedError;
2096
- }
2097
- }
2098
- async function validateOperationAddress2(operationId) {
2099
- const { httpClient, sideEffects } = arguments[1];
2100
- const payload = renameKeysFromSDKRequestToRESTRequest({
2101
- operationId
2102
- });
2103
- const reqOpts = validateOperationAddress(
2104
- payload
2105
- );
2106
- sideEffects?.onSiteCall?.();
2107
- try {
2108
- const result = await httpClient.request(reqOpts);
2109
- sideEffects?.onSuccess?.(result);
2110
- return renameKeysFromRESTResponseToSDKResponse(result.data);
2111
- } catch (err) {
2112
- const transformedError = sdkTransformError(
2113
- err,
2114
- {
2115
- spreadPathsToArguments: {},
2116
- explicitPathsToArguments: { operationId: "$[0]" },
2117
- singleArgumentUnchanged: false
2118
- },
2119
- ["operationId"]
2120
- );
2121
- sideEffects?.onError?.(err);
2122
- throw transformedError;
2123
- }
2124
- }
2125
- async function bulkUpdateOperationTags2(operationIds, options) {
2126
- const { httpClient, sideEffects } = arguments[2];
2127
- const payload = renameKeysFromSDKRequestToRESTRequest({
2128
- operationIds,
2129
- assignTags: options?.assignTags,
2130
- unassignTags: options?.unassignTags
2131
- });
2132
- const reqOpts = bulkUpdateOperationTags(
2133
- payload
2134
- );
2135
- sideEffects?.onSiteCall?.();
2136
- try {
2137
- const result = await httpClient.request(reqOpts);
2138
- sideEffects?.onSuccess?.(result);
2139
- return renameKeysFromRESTResponseToSDKResponse(result.data);
2140
- } catch (err) {
2141
- const transformedError = sdkTransformError(
2142
- err,
2143
- {
2144
- spreadPathsToArguments: {},
2145
- explicitPathsToArguments: {
2146
- operationIds: "$[0]",
2147
- assignTags: "$[1].assignTags",
2148
- unassignTags: "$[1].unassignTags"
2149
- },
2150
- singleArgumentUnchanged: false
2151
- },
2152
- ["operationIds", "options"]
2153
- );
2154
- sideEffects?.onError?.(err);
2155
- throw transformedError;
2156
- }
2157
- }
2158
- async function bulkUpdateOperationTagsByFilter2(filter, options) {
2159
- const { httpClient, sideEffects } = arguments[2];
2160
- const payload = renameKeysFromSDKRequestToRESTRequest({
2161
- filter,
2162
- assignTags: options?.assignTags,
2163
- unassignTags: options?.unassignTags
2164
- });
2165
- const reqOpts = bulkUpdateOperationTagsByFilter(
2166
- payload
2167
- );
2168
- sideEffects?.onSiteCall?.();
2169
- try {
2170
- const result = await httpClient.request(reqOpts);
2171
- sideEffects?.onSuccess?.(result);
2172
- return renameKeysFromRESTResponseToSDKResponse(result.data);
2173
- } catch (err) {
2174
- const transformedError = sdkTransformError(
2175
- err,
2176
- {
2177
- spreadPathsToArguments: {},
2178
- explicitPathsToArguments: {
2179
- filter: "$[0]",
2180
- assignTags: "$[1].assignTags",
2181
- unassignTags: "$[1].unassignTags"
2182
- },
2183
- singleArgumentUnchanged: false
2184
- },
2185
- ["filter", "options"]
2186
- );
2187
- sideEffects?.onError?.(err);
2188
- throw transformedError;
2189
- }
2190
- }
2191
-
2192
- // src/restaurants-operations-v1-operation-operations.public.ts
2193
- function listBlockedPeriods3(httpClient) {
2194
- return (operationId, options) => listBlockedPeriods2(
2195
- operationId,
2196
- options,
2197
- // @ts-ignore
2198
- { httpClient }
2199
- );
2200
- }
2201
- function getOperation3(httpClient) {
2202
- return (operationId) => getOperation2(
2203
- operationId,
2204
- // @ts-ignore
2205
- { httpClient }
2206
- );
2207
- }
2208
- function updateOperation3(httpClient) {
2209
- return (_id, operation) => updateOperation2(
2210
- _id,
2211
- operation,
2212
- // @ts-ignore
2213
- { httpClient }
2214
- );
2215
- }
2216
- function deleteOperation3(httpClient) {
2217
- return (operationId) => deleteOperation2(
2218
- operationId,
2219
- // @ts-ignore
2220
- { httpClient }
2221
- );
2222
- }
2223
- function queryOperation3(httpClient) {
2224
- return () => queryOperation2(
2225
- // @ts-ignore
2226
- { httpClient }
2227
- );
2228
- }
2229
- function typedQueryOperation2(httpClient) {
2230
- return (query) => typedQueryOperation(
2231
- query,
2232
- // @ts-ignore
2233
- { httpClient }
2234
- );
2235
- }
2236
- function listOperations3(httpClient) {
2237
- return () => listOperations2(
2238
- // @ts-ignore
2239
- { httpClient }
2240
- );
2241
- }
2242
- function listAvailableFulfillmentOptions3(httpClient) {
2243
- return (operationId, options) => listAvailableFulfillmentOptions2(
2244
- operationId,
2245
- options,
2246
- // @ts-ignore
2247
- { httpClient }
2248
- );
2249
- }
2250
- function listFirstAvailableTimeSlotForFulfillmentTypes3(httpClient) {
2251
- return (operationId, options) => listFirstAvailableTimeSlotForFulfillmentTypes2(
2252
- operationId,
2253
- options,
2254
- // @ts-ignore
2255
- { httpClient }
2256
- );
2257
- }
2258
- function calculateFirstAvailableTimeSlotPerFulfillmentType3(httpClient) {
2259
- return (operationId, options) => calculateFirstAvailableTimeSlotPerFulfillmentType2(
2260
- operationId,
2261
- options,
2262
- // @ts-ignore
2263
- { httpClient }
2264
- );
2265
- }
2266
- function listFirstAvailableTimeSlotsForOperations3(httpClient) {
2267
- return (operationIds, options) => listFirstAvailableTimeSlotsForOperations2(
2268
- operationIds,
2269
- options,
2270
- // @ts-ignore
2271
- { httpClient }
2272
- );
2273
- }
2274
- function calculateFirstAvailableTimeSlotsPerOperation3(httpClient) {
2275
- return (operationIds, options) => calculateFirstAvailableTimeSlotsPerOperation2(
2276
- operationIds,
2277
- options,
2278
- // @ts-ignore
2279
- { httpClient }
2280
- );
2281
- }
2282
- function listFirstAvailableTimeSlotsForMenus3(httpClient) {
2283
- return (operationId, options) => listFirstAvailableTimeSlotsForMenus2(
2284
- operationId,
2285
- options,
2286
- // @ts-ignore
2287
- { httpClient }
2288
- );
2289
- }
2290
- function calculateFirstAvailableTimeSlotsPerMenu3(httpClient) {
2291
- return (operationId, options) => calculateFirstAvailableTimeSlotsPerMenu2(
2292
- operationId,
2293
- options,
2294
- // @ts-ignore
2295
- { httpClient }
2296
- );
2297
- }
2298
- function calculateFirstAvailableTimeSlotsForItem3(httpClient) {
2299
- return (operationId, menuId, options) => calculateFirstAvailableTimeSlotsForItem2(
2300
- operationId,
2301
- menuId,
2302
- options,
2303
- // @ts-ignore
2304
- { httpClient }
2305
- );
2306
- }
2307
- function listAvailableTimeSlotsForDate3(httpClient) {
2308
- return (operationId, options) => listAvailableTimeSlotsForDate2(
2309
- operationId,
2310
- options,
2311
- // @ts-ignore
2312
- { httpClient }
2313
- );
2314
- }
2315
- function calculateAvailableTimeSlotsForDate3(httpClient) {
2316
- return (operationId, options) => calculateAvailableTimeSlotsForDate2(
2317
- operationId,
2318
- options,
2319
- // @ts-ignore
2320
- { httpClient }
2321
- );
2322
- }
2323
- function listAvailableDatesInRange3(httpClient) {
2324
- return (operationId, options) => listAvailableDatesInRange2(
2325
- operationId,
2326
- options,
2327
- // @ts-ignore
2328
- { httpClient }
2329
- );
2330
- }
2331
- function calculateAvailableDatesInRange3(httpClient) {
2332
- return (operationId, options) => calculateAvailableDatesInRange2(
2333
- operationId,
2334
- options,
2335
- // @ts-ignore
2336
- { httpClient }
2337
- );
2338
- }
2339
- function validateOperationAddress3(httpClient) {
2340
- return (operationId) => validateOperationAddress2(
2341
- operationId,
2342
- // @ts-ignore
2343
- { httpClient }
2344
- );
2345
- }
2346
- function bulkUpdateOperationTags3(httpClient) {
2347
- return (operationIds, options) => bulkUpdateOperationTags2(
2348
- operationIds,
2349
- options,
2350
- // @ts-ignore
2351
- { httpClient }
2352
- );
2353
- }
2354
- function bulkUpdateOperationTagsByFilter3(httpClient) {
2355
- return (filter, options) => bulkUpdateOperationTagsByFilter2(
2356
- filter,
2357
- options,
2358
- // @ts-ignore
2359
- { httpClient }
2360
- );
2361
- }
2362
- var onOperationDeleted = /* @__PURE__ */ EventDefinition(
2363
- "wix.restaurants.operations.v1.operation_deleted",
2364
- true,
2365
- (event) => renameKeysFromRESTResponseToSDKResponse2(
2366
- transformPaths3(event, [
2367
- {
2368
- transformFn: transformRESTTimestampToSDKTimestamp2,
2369
- paths: [
2370
- { path: "entity.createdDate" },
2371
- { path: "entity.updatedDate" },
2372
- { path: "entity.pausedUntilOptions.time" },
2373
- { path: "metadata.eventTime" }
2374
- ]
2375
- },
2376
- {
2377
- transformFn: transformRESTAddressToSDKAddress2,
2378
- paths: [{ path: "entity.businessLocationDetails.address" }]
2379
- }
2380
- ])
2381
- )
2382
- )();
2383
- var onOperationUpdated = /* @__PURE__ */ EventDefinition(
2384
- "wix.restaurants.operations.v1.operation_updated",
2385
- true,
2386
- (event) => renameKeysFromRESTResponseToSDKResponse2(
2387
- transformPaths3(event, [
2388
- {
2389
- transformFn: transformRESTTimestampToSDKTimestamp2,
2390
- paths: [
2391
- { path: "entity.createdDate" },
2392
- { path: "entity.updatedDate" },
2393
- { path: "entity.pausedUntilOptions.time" },
2394
- { path: "metadata.eventTime" },
2395
- { path: "modifiedFields.createdDate" },
2396
- { path: "modifiedFields.updatedDate" },
2397
- { path: "modifiedFields.pausedUntilOptions.time" }
2398
- ]
2399
- },
2400
- {
2401
- transformFn: transformRESTAddressToSDKAddress2,
2402
- paths: [
2403
- { path: "entity.businessLocationDetails.address" },
2404
- { path: "modifiedFields.businessLocationDetails.address" }
2405
- ]
2406
- }
2407
- ])
2408
- )
2409
- )();
2410
-
2411
- // src/restaurants-operations-v1-operation-operations.context.ts
2412
- import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
2413
- import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
2414
- import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
2415
- function customQueryOperation(httpClient) {
2416
- const router = /* @__PURE__ */ createQueryOverloadRouter({
2417
- builderQueryFunction: () => queryOperation3(httpClient)(),
2418
- typedQueryFunction: (query) => typedQueryOperation2(httpClient)(query),
2419
- hasOptionsParameter: false
2420
- });
2421
- function overloadedQuery(query) {
2422
- return router(...arguments);
2423
- }
2424
- return overloadedQuery;
2425
- }
2426
- var listBlockedPeriods4 = /* @__PURE__ */ createRESTModule(listBlockedPeriods3);
2427
- var getOperation4 = /* @__PURE__ */ createRESTModule(getOperation3);
2428
- var updateOperation4 = /* @__PURE__ */ createRESTModule(updateOperation3);
2429
- var deleteOperation4 = /* @__PURE__ */ createRESTModule(deleteOperation3);
2430
- var listOperations4 = /* @__PURE__ */ createRESTModule(listOperations3);
2431
- var listAvailableFulfillmentOptions4 = /* @__PURE__ */ createRESTModule(listAvailableFulfillmentOptions3);
2432
- var listFirstAvailableTimeSlotForFulfillmentTypes4 = /* @__PURE__ */ createRESTModule(
2433
- listFirstAvailableTimeSlotForFulfillmentTypes3
2434
- );
2435
- var calculateFirstAvailableTimeSlotPerFulfillmentType4 = /* @__PURE__ */ createRESTModule(
2436
- calculateFirstAvailableTimeSlotPerFulfillmentType3
2437
- );
2438
- var listFirstAvailableTimeSlotsForOperations4 = /* @__PURE__ */ createRESTModule(
2439
- listFirstAvailableTimeSlotsForOperations3
2440
- );
2441
- var calculateFirstAvailableTimeSlotsPerOperation4 = /* @__PURE__ */ createRESTModule(
2442
- calculateFirstAvailableTimeSlotsPerOperation3
2443
- );
2444
- var listFirstAvailableTimeSlotsForMenus4 = /* @__PURE__ */ createRESTModule(listFirstAvailableTimeSlotsForMenus3);
2445
- var calculateFirstAvailableTimeSlotsPerMenu4 = /* @__PURE__ */ createRESTModule(
2446
- calculateFirstAvailableTimeSlotsPerMenu3
2447
- );
2448
- var calculateFirstAvailableTimeSlotsForItem4 = /* @__PURE__ */ createRESTModule(
2449
- calculateFirstAvailableTimeSlotsForItem3
2450
- );
2451
- var listAvailableTimeSlotsForDate4 = /* @__PURE__ */ createRESTModule(listAvailableTimeSlotsForDate3);
2452
- var calculateAvailableTimeSlotsForDate4 = /* @__PURE__ */ createRESTModule(calculateAvailableTimeSlotsForDate3);
2453
- var listAvailableDatesInRange4 = /* @__PURE__ */ createRESTModule(listAvailableDatesInRange3);
2454
- var calculateAvailableDatesInRange4 = /* @__PURE__ */ createRESTModule(calculateAvailableDatesInRange3);
2455
- var validateOperationAddress4 = /* @__PURE__ */ createRESTModule(validateOperationAddress3);
2456
- var bulkUpdateOperationTags4 = /* @__PURE__ */ createRESTModule(bulkUpdateOperationTags3);
2457
- var bulkUpdateOperationTagsByFilter4 = /* @__PURE__ */ createRESTModule(bulkUpdateOperationTagsByFilter3);
2458
- var queryOperation4 = /* @__PURE__ */ createRESTModule(customQueryOperation);
2459
- var onOperationDeleted2 = /* @__PURE__ */ createEventModule(
2460
- onOperationDeleted
2461
- );
2462
- var onOperationUpdated2 = /* @__PURE__ */ createEventModule(
2463
- onOperationUpdated
2464
- );
2465
- export {
2466
- ActivationType,
2467
- AsapFutureHandlingType,
2468
- AsapPacingWindowType,
2469
- AsapPreorderType,
2470
- DayOfWeek,
2471
- DeleteStatus,
2472
- EntitiesDayOfWeek,
2473
- FulfillmentTimeType,
2474
- FulfillmentTimesDisplayType,
2475
- FulfillmentTimesType,
2476
- FulfillmentType,
2477
- MethodType,
2478
- Namespace,
2479
- OnlineOrderingStatusType,
2480
- OrderSchedulingType,
2481
- PlacementType,
2482
- PreorderPacingWindowType,
2483
- PreparationTimePreparationTimeType,
2484
- PreparationTimeType,
2485
- ResolutionMethod,
2486
- SchedulingType,
2487
- SiteCreatedContext,
2488
- SortOrder,
2489
- State,
2490
- SubdivisionType,
2491
- TimeSlotForFulfillmentTimeSlotStatus,
2492
- TimeSlotStatus,
2493
- TimeUnit,
2494
- ViolationType,
2495
- WebhookIdentityType,
2496
- bulkUpdateOperationTags4 as bulkUpdateOperationTags,
2497
- bulkUpdateOperationTagsByFilter4 as bulkUpdateOperationTagsByFilter,
2498
- calculateAvailableDatesInRange4 as calculateAvailableDatesInRange,
2499
- calculateAvailableTimeSlotsForDate4 as calculateAvailableTimeSlotsForDate,
2500
- calculateFirstAvailableTimeSlotPerFulfillmentType4 as calculateFirstAvailableTimeSlotPerFulfillmentType,
2501
- calculateFirstAvailableTimeSlotsForItem4 as calculateFirstAvailableTimeSlotsForItem,
2502
- calculateFirstAvailableTimeSlotsPerMenu4 as calculateFirstAvailableTimeSlotsPerMenu,
2503
- calculateFirstAvailableTimeSlotsPerOperation4 as calculateFirstAvailableTimeSlotsPerOperation,
2504
- deleteOperation4 as deleteOperation,
2505
- getOperation4 as getOperation,
2506
- listAvailableDatesInRange4 as listAvailableDatesInRange,
2507
- listAvailableFulfillmentOptions4 as listAvailableFulfillmentOptions,
2508
- listAvailableTimeSlotsForDate4 as listAvailableTimeSlotsForDate,
2509
- listBlockedPeriods4 as listBlockedPeriods,
2510
- listFirstAvailableTimeSlotForFulfillmentTypes4 as listFirstAvailableTimeSlotForFulfillmentTypes,
2511
- listFirstAvailableTimeSlotsForMenus4 as listFirstAvailableTimeSlotsForMenus,
2512
- listFirstAvailableTimeSlotsForOperations4 as listFirstAvailableTimeSlotsForOperations,
2513
- listOperations4 as listOperations,
2514
- onOperationDeleted2 as onOperationDeleted,
2515
- onOperationUpdated2 as onOperationUpdated,
2516
- queryOperation4 as queryOperation,
2517
- updateOperation4 as updateOperation,
2518
- utils,
2519
- validateOperationAddress4 as validateOperationAddress
2520
- };
2521
- //# sourceMappingURL=index.mjs.map