@wix/auto_sdk_gbp_locations 1.0.0

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 (52) hide show
  1. package/build/cjs/index.d.ts +913 -0
  2. package/build/cjs/index.js +3088 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +6699 -0
  5. package/build/cjs/index.typings.js +2726 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +5220 -0
  8. package/build/cjs/meta.js +2274 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/schemas.d.ts +11094 -0
  11. package/build/cjs/schemas.js +15256 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +913 -0
  14. package/build/es/index.mjs +3002 -0
  15. package/build/es/index.mjs.map +1 -0
  16. package/build/es/index.typings.d.mts +6699 -0
  17. package/build/es/index.typings.mjs +2639 -0
  18. package/build/es/index.typings.mjs.map +1 -0
  19. package/build/es/meta.d.mts +5220 -0
  20. package/build/es/meta.mjs +2186 -0
  21. package/build/es/meta.mjs.map +1 -0
  22. package/build/es/package.json +3 -0
  23. package/build/es/schemas.d.mts +11094 -0
  24. package/build/es/schemas.mjs +15144 -0
  25. package/build/es/schemas.mjs.map +1 -0
  26. package/build/internal/cjs/index.d.ts +933 -0
  27. package/build/internal/cjs/index.js +3088 -0
  28. package/build/internal/cjs/index.js.map +1 -0
  29. package/build/internal/cjs/index.typings.d.ts +6724 -0
  30. package/build/internal/cjs/index.typings.js +2726 -0
  31. package/build/internal/cjs/index.typings.js.map +1 -0
  32. package/build/internal/cjs/meta.d.ts +5267 -0
  33. package/build/internal/cjs/meta.js +2274 -0
  34. package/build/internal/cjs/meta.js.map +1 -0
  35. package/build/internal/cjs/schemas.d.ts +11094 -0
  36. package/build/internal/cjs/schemas.js +15256 -0
  37. package/build/internal/cjs/schemas.js.map +1 -0
  38. package/build/internal/es/index.d.mts +933 -0
  39. package/build/internal/es/index.mjs +3002 -0
  40. package/build/internal/es/index.mjs.map +1 -0
  41. package/build/internal/es/index.typings.d.mts +6724 -0
  42. package/build/internal/es/index.typings.mjs +2639 -0
  43. package/build/internal/es/index.typings.mjs.map +1 -0
  44. package/build/internal/es/meta.d.mts +5267 -0
  45. package/build/internal/es/meta.mjs +2186 -0
  46. package/build/internal/es/meta.mjs.map +1 -0
  47. package/build/internal/es/schemas.d.mts +11094 -0
  48. package/build/internal/es/schemas.mjs +15144 -0
  49. package/build/internal/es/schemas.mjs.map +1 -0
  50. package/meta/package.json +3 -0
  51. package/package.json +61 -0
  52. package/schemas/package.json +3 -0
@@ -0,0 +1,2639 @@
1
+ // src/gbp-location-v1-gbplocation-locations.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import { queryBuilder } from "@wix/sdk-runtime/query-builder";
4
+ import {
5
+ renameKeysFromSDKRequestToRESTRequest,
6
+ renameKeysFromRESTResponseToSDKResponse
7
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
8
+
9
+ // src/gbp-location-v1-gbplocation-locations.http.ts
10
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
11
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
12
+ import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
13
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
14
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
15
+ import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
16
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
17
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
18
+ function resolveWixGbpLocationV1GbpLocationsServiceUrl(opts) {
19
+ const domainToMappings = {
20
+ "bo._base_domain_": [
21
+ {
22
+ srcPath: "/_api/gbp-location-service",
23
+ destPath: ""
24
+ }
25
+ ],
26
+ "wixbo.ai": [
27
+ {
28
+ srcPath: "/_api/gbp-location-service",
29
+ destPath: ""
30
+ }
31
+ ],
32
+ "wix-bo.com": [
33
+ {
34
+ srcPath: "/_api/gbp-location-service",
35
+ destPath: ""
36
+ }
37
+ ],
38
+ "manage._base_domain_": [
39
+ {
40
+ srcPath: "/_api/gbp-location-service",
41
+ destPath: ""
42
+ }
43
+ ],
44
+ "www.wixapis.com": [
45
+ {
46
+ srcPath: "/gbp/v1/accounts",
47
+ destPath: "/v1/accounts"
48
+ },
49
+ {
50
+ srcPath: "/gbp/v1/address-schema",
51
+ destPath: "/v1/address-schema"
52
+ },
53
+ {
54
+ srcPath: "/gbp/v1/attribute-metadata",
55
+ destPath: "/v1/attribute-metadata"
56
+ },
57
+ {
58
+ srcPath: "/gbp/v1/bulk",
59
+ destPath: "/v1/bulk"
60
+ },
61
+ {
62
+ srcPath: "/gbp/v1/establishments",
63
+ destPath: "/v1/establishments"
64
+ },
65
+ {
66
+ srcPath: "/gbp/v1/google-locations",
67
+ destPath: "/v1/google-locations"
68
+ },
69
+ {
70
+ srcPath: "/gbp/v1/locations",
71
+ destPath: "/v1/locations"
72
+ },
73
+ {
74
+ srcPath: "/gbp/v1/regions",
75
+ destPath: "/v1/regions"
76
+ },
77
+ {
78
+ srcPath: "/gbp/v1/categories",
79
+ destPath: "/v1/categories"
80
+ },
81
+ {
82
+ srcPath: "/gbp/location/v1/categories",
83
+ destPath: "/v1/categories"
84
+ },
85
+ {
86
+ srcPath: "/gbp/location/v1/accounts",
87
+ destPath: "/v1/accounts"
88
+ },
89
+ {
90
+ srcPath: "/gbp/location/v1/address-schema",
91
+ destPath: "/v1/address-schema"
92
+ },
93
+ {
94
+ srcPath: "/gbp/location/v1/attribute-metadata",
95
+ destPath: "/v1/attribute-metadata"
96
+ },
97
+ {
98
+ srcPath: "/gbp/location/v1/bulk",
99
+ destPath: "/v1/bulk"
100
+ },
101
+ {
102
+ srcPath: "/gbp/location/v1/establishments",
103
+ destPath: "/v1/establishments"
104
+ },
105
+ {
106
+ srcPath: "/gbp/location/v1/google-locations",
107
+ destPath: "/v1/google-locations"
108
+ },
109
+ {
110
+ srcPath: "/gbp/location/v1/locations",
111
+ destPath: "/v1/locations"
112
+ },
113
+ {
114
+ srcPath: "/gbp/location/v1/regions",
115
+ destPath: "/v1/regions"
116
+ }
117
+ ],
118
+ "www._base_domain_": [
119
+ {
120
+ srcPath: "/gbp/location/v1/locations",
121
+ destPath: "/v1/locations"
122
+ }
123
+ ]
124
+ };
125
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
126
+ }
127
+ var PACKAGE_NAME = "@wix/auto_sdk_gbp_locations";
128
+ function getGbpLocation(payload) {
129
+ function __getGbpLocation({ host }) {
130
+ const metadata = {
131
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
132
+ method: "GET",
133
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.GetGBPLocation",
134
+ packageName: PACKAGE_NAME,
135
+ migrationOptions: {
136
+ optInTransformResponse: true
137
+ },
138
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
139
+ protoPath: "/v1/locations/{locationId}",
140
+ data: payload,
141
+ host
142
+ }),
143
+ params: toURLSearchParams(payload),
144
+ transformResponse: (payload2) => transformPaths(payload2, [
145
+ {
146
+ transformFn: transformRESTTimestampToSDKTimestamp,
147
+ paths: [
148
+ { path: "gbplocation.createdDate" },
149
+ { path: "gbplocation.updatedDate" }
150
+ ]
151
+ }
152
+ ])
153
+ };
154
+ return metadata;
155
+ }
156
+ return __getGbpLocation;
157
+ }
158
+ function queryGbpLocations(payload) {
159
+ function __queryGbpLocations({ host }) {
160
+ const metadata = {
161
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
162
+ method: "GET",
163
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.QueryGBPLocations",
164
+ packageName: PACKAGE_NAME,
165
+ migrationOptions: {
166
+ optInTransformResponse: true
167
+ },
168
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
169
+ protoPath: "/v1/locations/query",
170
+ data: payload,
171
+ host
172
+ }),
173
+ params: toURLSearchParams(payload, true),
174
+ transformResponse: (payload2) => transformPaths(payload2, [
175
+ {
176
+ transformFn: transformRESTTimestampToSDKTimestamp,
177
+ paths: [
178
+ { path: "locations.createdDate" },
179
+ { path: "locations.updatedDate" }
180
+ ]
181
+ }
182
+ ]),
183
+ fallback: [
184
+ {
185
+ method: "POST",
186
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
187
+ protoPath: "/v1/locations/query",
188
+ data: payload,
189
+ host
190
+ }),
191
+ data: payload
192
+ }
193
+ ]
194
+ };
195
+ return metadata;
196
+ }
197
+ return __queryGbpLocations;
198
+ }
199
+ function queryGoogleLocations(payload) {
200
+ function __queryGoogleLocations({ host }) {
201
+ const metadata = {
202
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
203
+ method: "GET",
204
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.QueryGoogleLocations",
205
+ packageName: PACKAGE_NAME,
206
+ migrationOptions: {
207
+ optInTransformResponse: true
208
+ },
209
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
210
+ protoPath: "/v1/locations/query-with-google",
211
+ data: payload,
212
+ host
213
+ }),
214
+ params: toURLSearchParams(payload, true),
215
+ transformResponse: (payload2) => transformPaths(payload2, [
216
+ {
217
+ transformFn: transformRESTFloatToSDKFloat,
218
+ paths: [
219
+ { path: "locations.googleLocation.latLng.latitude" },
220
+ { path: "locations.googleLocation.latLng.longitude" }
221
+ ]
222
+ },
223
+ {
224
+ transformFn: transformRESTTimestampToSDKTimestamp,
225
+ paths: [
226
+ { path: "locations.location.createdDate" },
227
+ { path: "locations.location.updatedDate" }
228
+ ]
229
+ }
230
+ ]),
231
+ fallback: [
232
+ {
233
+ method: "POST",
234
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
235
+ protoPath: "/v1/locations/query-with-google",
236
+ data: payload,
237
+ host
238
+ }),
239
+ data: payload
240
+ }
241
+ ]
242
+ };
243
+ return metadata;
244
+ }
245
+ return __queryGoogleLocations;
246
+ }
247
+ function getGoogleLocation(payload) {
248
+ function __getGoogleLocation({ host }) {
249
+ const metadata = {
250
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
251
+ method: "GET",
252
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.GetGoogleLocation",
253
+ packageName: PACKAGE_NAME,
254
+ migrationOptions: {
255
+ optInTransformResponse: true
256
+ },
257
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
258
+ protoPath: "/v1/locations/google/{locationId}",
259
+ data: payload,
260
+ host
261
+ }),
262
+ params: toURLSearchParams(payload),
263
+ transformResponse: (payload2) => transformPaths(payload2, [
264
+ {
265
+ transformFn: transformRESTFloatToSDKFloat,
266
+ paths: [
267
+ { path: "location.googleLocation.latLng.latitude" },
268
+ { path: "location.googleLocation.latLng.longitude" }
269
+ ]
270
+ },
271
+ {
272
+ transformFn: transformRESTTimestampToSDKTimestamp,
273
+ paths: [
274
+ { path: "location.location.createdDate" },
275
+ { path: "location.location.updatedDate" }
276
+ ]
277
+ }
278
+ ])
279
+ };
280
+ return metadata;
281
+ }
282
+ return __getGoogleLocation;
283
+ }
284
+ function createLocation(payload) {
285
+ function __createLocation({ host }) {
286
+ const serializedData = transformPaths(payload, [
287
+ {
288
+ transformFn: transformSDKTimestampToRESTTimestamp,
289
+ paths: [
290
+ { path: "location.createdDate" },
291
+ { path: "location.updatedDate" }
292
+ ]
293
+ }
294
+ ]);
295
+ const metadata = {
296
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
297
+ method: "POST",
298
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.CreateLocation",
299
+ packageName: PACKAGE_NAME,
300
+ migrationOptions: {
301
+ optInTransformResponse: true
302
+ },
303
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
304
+ protoPath: "/v1/locations",
305
+ data: serializedData,
306
+ host
307
+ }),
308
+ data: serializedData,
309
+ transformResponse: (payload2) => transformPaths(payload2, [
310
+ {
311
+ transformFn: transformRESTTimestampToSDKTimestamp,
312
+ paths: [
313
+ { path: "location.createdDate" },
314
+ { path: "location.updatedDate" }
315
+ ]
316
+ }
317
+ ])
318
+ };
319
+ return metadata;
320
+ }
321
+ return __createLocation;
322
+ }
323
+ function updateLocation(payload) {
324
+ function __updateLocation({ host }) {
325
+ const serializedData = transformPaths(payload, [
326
+ {
327
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
328
+ paths: [{ path: "fieldMask" }]
329
+ },
330
+ {
331
+ transformFn: transformSDKTimestampToRESTTimestamp,
332
+ paths: [
333
+ { path: "location.createdDate" },
334
+ { path: "location.updatedDate" }
335
+ ]
336
+ }
337
+ ]);
338
+ const metadata = {
339
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
340
+ method: "PATCH",
341
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.UpdateLocation",
342
+ packageName: PACKAGE_NAME,
343
+ migrationOptions: {
344
+ optInTransformResponse: true
345
+ },
346
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
347
+ protoPath: "/v1/locations/{location.id}",
348
+ data: serializedData,
349
+ host
350
+ }),
351
+ data: serializedData,
352
+ transformResponse: (payload2) => transformPaths(payload2, [
353
+ {
354
+ transformFn: transformRESTTimestampToSDKTimestamp,
355
+ paths: [
356
+ { path: "location.createdDate" },
357
+ { path: "location.updatedDate" }
358
+ ]
359
+ }
360
+ ])
361
+ };
362
+ return metadata;
363
+ }
364
+ return __updateLocation;
365
+ }
366
+ function deleteLocation(payload) {
367
+ function __deleteLocation({ host }) {
368
+ const metadata = {
369
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
370
+ method: "DELETE",
371
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.DeleteLocation",
372
+ packageName: PACKAGE_NAME,
373
+ migrationOptions: {
374
+ optInTransformResponse: true
375
+ },
376
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
377
+ protoPath: "/v1/locations/{locationId}",
378
+ data: payload,
379
+ host
380
+ }),
381
+ params: toURLSearchParams(payload)
382
+ };
383
+ return metadata;
384
+ }
385
+ return __deleteLocation;
386
+ }
387
+ function createGoogleLocation(payload) {
388
+ function __createGoogleLocation({ host }) {
389
+ const serializedData = transformPaths(payload, [
390
+ {
391
+ transformFn: transformSDKFloatToRESTFloat,
392
+ paths: [
393
+ { path: "location.latLng.latitude" },
394
+ { path: "location.latLng.longitude" }
395
+ ]
396
+ }
397
+ ]);
398
+ const metadata = {
399
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
400
+ method: "POST",
401
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.CreateGoogleLocation",
402
+ packageName: PACKAGE_NAME,
403
+ migrationOptions: {
404
+ optInTransformResponse: true
405
+ },
406
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
407
+ protoPath: "/v1/locations/google",
408
+ data: serializedData,
409
+ host
410
+ }),
411
+ data: serializedData,
412
+ transformResponse: (payload2) => transformPaths(payload2, [
413
+ {
414
+ transformFn: transformRESTTimestampToSDKTimestamp,
415
+ paths: [
416
+ { path: "location.createdDate" },
417
+ { path: "location.updatedDate" }
418
+ ]
419
+ }
420
+ ])
421
+ };
422
+ return metadata;
423
+ }
424
+ return __createGoogleLocation;
425
+ }
426
+ function deleteGoogleLocation(payload) {
427
+ function __deleteGoogleLocation({ host }) {
428
+ const metadata = {
429
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
430
+ method: "DELETE",
431
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.DeleteGoogleLocation",
432
+ packageName: PACKAGE_NAME,
433
+ migrationOptions: {
434
+ optInTransformResponse: true
435
+ },
436
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
437
+ protoPath: "/v1/locations/google/{locationId}",
438
+ data: payload,
439
+ host
440
+ }),
441
+ params: toURLSearchParams(payload)
442
+ };
443
+ return metadata;
444
+ }
445
+ return __deleteGoogleLocation;
446
+ }
447
+ function updateGoogleLocation(payload) {
448
+ function __updateGoogleLocation({ host }) {
449
+ const serializedData = transformPaths(payload, [
450
+ {
451
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
452
+ paths: [{ path: "fieldMask" }]
453
+ },
454
+ {
455
+ transformFn: transformSDKFloatToRESTFloat,
456
+ paths: [
457
+ { path: "location.latLng.latitude" },
458
+ { path: "location.latLng.longitude" }
459
+ ]
460
+ }
461
+ ]);
462
+ const metadata = {
463
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
464
+ method: "PATCH",
465
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.UpdateGoogleLocation",
466
+ packageName: PACKAGE_NAME,
467
+ migrationOptions: {
468
+ optInTransformResponse: true
469
+ },
470
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
471
+ protoPath: "/v1/locations/{locationId}/google",
472
+ data: serializedData,
473
+ host
474
+ }),
475
+ data: serializedData,
476
+ transformResponse: (payload2) => transformPaths(payload2, [
477
+ {
478
+ transformFn: transformRESTFloatToSDKFloat,
479
+ paths: [
480
+ { path: "location.latLng.latitude" },
481
+ { path: "location.latLng.longitude" }
482
+ ]
483
+ }
484
+ ])
485
+ };
486
+ return metadata;
487
+ }
488
+ return __updateGoogleLocation;
489
+ }
490
+ function bulkCreateLocations(payload) {
491
+ function __bulkCreateLocations({ host }) {
492
+ const serializedData = transformPaths(payload, [
493
+ {
494
+ transformFn: transformSDKTimestampToRESTTimestamp,
495
+ paths: [
496
+ { path: "locations.createdDate" },
497
+ { path: "locations.updatedDate" }
498
+ ]
499
+ }
500
+ ]);
501
+ const metadata = {
502
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
503
+ method: "POST",
504
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.BulkCreateLocations",
505
+ packageName: PACKAGE_NAME,
506
+ migrationOptions: {
507
+ optInTransformResponse: true
508
+ },
509
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
510
+ protoPath: "/v1/bulk/locations/create",
511
+ data: serializedData,
512
+ host
513
+ }),
514
+ data: serializedData,
515
+ transformResponse: (payload2) => transformPaths(payload2, [
516
+ {
517
+ transformFn: transformRESTTimestampToSDKTimestamp,
518
+ paths: [
519
+ { path: "results.item.createdDate" },
520
+ { path: "results.item.updatedDate" }
521
+ ]
522
+ }
523
+ ])
524
+ };
525
+ return metadata;
526
+ }
527
+ return __bulkCreateLocations;
528
+ }
529
+ function bulkDeleteLocations(payload) {
530
+ function __bulkDeleteLocations({ host }) {
531
+ const metadata = {
532
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
533
+ method: "POST",
534
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.BulkDeleteLocations",
535
+ packageName: PACKAGE_NAME,
536
+ migrationOptions: {
537
+ optInTransformResponse: true
538
+ },
539
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
540
+ protoPath: "/v1/bulk/locations/delete",
541
+ data: payload,
542
+ host
543
+ }),
544
+ data: payload
545
+ };
546
+ return metadata;
547
+ }
548
+ return __bulkDeleteLocations;
549
+ }
550
+ function listGbpAccounts(payload) {
551
+ function __listGbpAccounts({ host }) {
552
+ const metadata = {
553
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
554
+ method: "GET",
555
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.ListGbpAccounts",
556
+ packageName: PACKAGE_NAME,
557
+ migrationOptions: {
558
+ optInTransformResponse: true
559
+ },
560
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
561
+ protoPath: "/v1/accounts",
562
+ data: payload,
563
+ host
564
+ }),
565
+ params: toURLSearchParams(payload)
566
+ };
567
+ return metadata;
568
+ }
569
+ return __listGbpAccounts;
570
+ }
571
+ function listUnimportedLocations(payload) {
572
+ function __listUnimportedLocations({ host }) {
573
+ const metadata = {
574
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
575
+ method: "GET",
576
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.ListUnimportedLocations",
577
+ packageName: PACKAGE_NAME,
578
+ migrationOptions: {
579
+ optInTransformResponse: true
580
+ },
581
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
582
+ protoPath: "/v1/accounts/{accountId}/locations/unimported",
583
+ data: payload,
584
+ host
585
+ }),
586
+ params: toURLSearchParams(payload)
587
+ };
588
+ return metadata;
589
+ }
590
+ return __listUnimportedLocations;
591
+ }
592
+ function listReviews(payload) {
593
+ function __listReviews({ host }) {
594
+ const metadata = {
595
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
596
+ method: "GET",
597
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.ListReviews",
598
+ packageName: PACKAGE_NAME,
599
+ migrationOptions: {
600
+ optInTransformResponse: true
601
+ },
602
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
603
+ protoPath: "/v1/locations/{locationId}/reviews",
604
+ data: payload,
605
+ host
606
+ }),
607
+ params: toURLSearchParams(payload),
608
+ transformResponse: (payload2) => transformPaths(payload2, [
609
+ {
610
+ transformFn: transformRESTFloatToSDKFloat,
611
+ paths: [{ path: "metrics.averageRating" }]
612
+ }
613
+ ])
614
+ };
615
+ return metadata;
616
+ }
617
+ return __listReviews;
618
+ }
619
+ function putReviewReply(payload) {
620
+ function __putReviewReply({ host }) {
621
+ const metadata = {
622
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
623
+ method: "PUT",
624
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.PutReviewReply",
625
+ packageName: PACKAGE_NAME,
626
+ migrationOptions: {
627
+ optInTransformResponse: true
628
+ },
629
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
630
+ protoPath: "/v1/locations/{locationId}/reviews/{reviewId}/reply",
631
+ data: payload,
632
+ host
633
+ }),
634
+ data: payload
635
+ };
636
+ return metadata;
637
+ }
638
+ return __putReviewReply;
639
+ }
640
+ function deleteReviewReply(payload) {
641
+ function __deleteReviewReply({ host }) {
642
+ const metadata = {
643
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
644
+ method: "DELETE",
645
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.DeleteReviewReply",
646
+ packageName: PACKAGE_NAME,
647
+ migrationOptions: {
648
+ optInTransformResponse: true
649
+ },
650
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
651
+ protoPath: "/v1/locations/{locationId}/reviews/{reviewId}/reply",
652
+ data: payload,
653
+ host
654
+ }),
655
+ params: toURLSearchParams(payload)
656
+ };
657
+ return metadata;
658
+ }
659
+ return __deleteReviewReply;
660
+ }
661
+ function listMedia(payload) {
662
+ function __listMedia({ host }) {
663
+ const metadata = {
664
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
665
+ method: "GET",
666
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.ListMedia",
667
+ packageName: PACKAGE_NAME,
668
+ migrationOptions: {
669
+ optInTransformResponse: true
670
+ },
671
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
672
+ protoPath: "/v1/locations/{locationId}/media",
673
+ data: payload,
674
+ host
675
+ }),
676
+ params: toURLSearchParams(payload)
677
+ };
678
+ return metadata;
679
+ }
680
+ return __listMedia;
681
+ }
682
+ function createMedia(payload) {
683
+ function __createMedia({ host }) {
684
+ const metadata = {
685
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
686
+ method: "POST",
687
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.CreateMedia",
688
+ packageName: PACKAGE_NAME,
689
+ migrationOptions: {
690
+ optInTransformResponse: true
691
+ },
692
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
693
+ protoPath: "/v1/locations/{locationId}/media",
694
+ data: payload,
695
+ host
696
+ }),
697
+ data: payload
698
+ };
699
+ return metadata;
700
+ }
701
+ return __createMedia;
702
+ }
703
+ function deleteMedia(payload) {
704
+ function __deleteMedia({ host }) {
705
+ const metadata = {
706
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
707
+ method: "DELETE",
708
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.DeleteMedia",
709
+ packageName: PACKAGE_NAME,
710
+ migrationOptions: {
711
+ optInTransformResponse: true
712
+ },
713
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
714
+ protoPath: "/v1/locations/{locationId}/media/{mediaKey}",
715
+ data: payload,
716
+ host
717
+ }),
718
+ params: toURLSearchParams(payload)
719
+ };
720
+ return metadata;
721
+ }
722
+ return __deleteMedia;
723
+ }
724
+ function updateLocationFoodMenus(payload) {
725
+ function __updateLocationFoodMenus({ host }) {
726
+ const metadata = {
727
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
728
+ method: "PATCH",
729
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.UpdateLocationFoodMenus",
730
+ packageName: PACKAGE_NAME,
731
+ migrationOptions: {
732
+ optInTransformResponse: true
733
+ },
734
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
735
+ protoPath: "/v1/locations/{locationId}/food-menus",
736
+ data: payload,
737
+ host
738
+ }),
739
+ data: payload
740
+ };
741
+ return metadata;
742
+ }
743
+ return __updateLocationFoodMenus;
744
+ }
745
+ function updateLocationAttributes(payload) {
746
+ function __updateLocationAttributes({ host }) {
747
+ const metadata = {
748
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
749
+ method: "PATCH",
750
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.UpdateLocationAttributes",
751
+ packageName: PACKAGE_NAME,
752
+ migrationOptions: {
753
+ optInTransformResponse: true
754
+ },
755
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
756
+ protoPath: "/v1/locations/{locationId}/attributes",
757
+ data: payload,
758
+ host
759
+ }),
760
+ data: payload
761
+ };
762
+ return metadata;
763
+ }
764
+ return __updateLocationAttributes;
765
+ }
766
+ function getLocationAttributes(payload) {
767
+ function __getLocationAttributes({ host }) {
768
+ const metadata = {
769
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
770
+ method: "GET",
771
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.GetLocationAttributes",
772
+ packageName: PACKAGE_NAME,
773
+ migrationOptions: {
774
+ optInTransformResponse: true
775
+ },
776
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
777
+ protoPath: "/v1/locations/{locationId}/attributes",
778
+ data: payload,
779
+ host
780
+ }),
781
+ params: toURLSearchParams(payload)
782
+ };
783
+ return metadata;
784
+ }
785
+ return __getLocationAttributes;
786
+ }
787
+ function getLocationLodging(payload) {
788
+ function __getLocationLodging({ host }) {
789
+ const metadata = {
790
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
791
+ method: "GET",
792
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.GetLocationLodging",
793
+ packageName: PACKAGE_NAME,
794
+ migrationOptions: {
795
+ optInTransformResponse: true
796
+ },
797
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
798
+ protoPath: "/v1/locations/{locationId}/lodging",
799
+ data: payload,
800
+ host
801
+ }),
802
+ params: toURLSearchParams(payload),
803
+ transformResponse: (payload2) => transformPaths(payload2, [
804
+ {
805
+ transformFn: transformRESTFloatToSDKFloat,
806
+ paths: [
807
+ {
808
+ path: "lodging.allUnits.totalLivingAreas.layout.livingAreaSqMeters"
809
+ },
810
+ { path: "lodging.commonLivingArea.layout.livingAreaSqMeters" },
811
+ {
812
+ path: "lodging.guestUnits.features.totalLivingAreas.layout.livingAreaSqMeters"
813
+ },
814
+ {
815
+ path: "lodging.someUnits.totalLivingAreas.layout.livingAreaSqMeters"
816
+ }
817
+ ]
818
+ },
819
+ {
820
+ transformFn: transformRESTTimestampToSDKTimestamp,
821
+ paths: [{ path: "lodging.metadata.updateTime" }]
822
+ }
823
+ ])
824
+ };
825
+ return metadata;
826
+ }
827
+ return __getLocationLodging;
828
+ }
829
+ function updateLocationLodging(payload) {
830
+ function __updateLocationLodging({ host }) {
831
+ const serializedData = transformPaths(payload, [
832
+ {
833
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
834
+ paths: [{ path: "fieldMask" }]
835
+ },
836
+ {
837
+ transformFn: transformSDKFloatToRESTFloat,
838
+ paths: [
839
+ {
840
+ path: "lodging.allUnits.totalLivingAreas.layout.livingAreaSqMeters"
841
+ },
842
+ { path: "lodging.commonLivingArea.layout.livingAreaSqMeters" },
843
+ {
844
+ path: "lodging.guestUnits.features.totalLivingAreas.layout.livingAreaSqMeters"
845
+ },
846
+ {
847
+ path: "lodging.someUnits.totalLivingAreas.layout.livingAreaSqMeters"
848
+ }
849
+ ]
850
+ },
851
+ {
852
+ transformFn: transformSDKTimestampToRESTTimestamp,
853
+ paths: [{ path: "lodging.metadata.updateTime" }]
854
+ }
855
+ ]);
856
+ const metadata = {
857
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
858
+ method: "PATCH",
859
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.UpdateLocationLodging",
860
+ packageName: PACKAGE_NAME,
861
+ migrationOptions: {
862
+ optInTransformResponse: true
863
+ },
864
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
865
+ protoPath: "/v1/locations/{locationId}/lodging",
866
+ data: serializedData,
867
+ host
868
+ }),
869
+ data: serializedData,
870
+ transformResponse: (payload2) => transformPaths(payload2, [
871
+ {
872
+ transformFn: transformRESTFloatToSDKFloat,
873
+ paths: [
874
+ {
875
+ path: "lodging.allUnits.totalLivingAreas.layout.livingAreaSqMeters"
876
+ },
877
+ { path: "lodging.commonLivingArea.layout.livingAreaSqMeters" },
878
+ {
879
+ path: "lodging.guestUnits.features.totalLivingAreas.layout.livingAreaSqMeters"
880
+ },
881
+ {
882
+ path: "lodging.someUnits.totalLivingAreas.layout.livingAreaSqMeters"
883
+ }
884
+ ]
885
+ },
886
+ {
887
+ transformFn: transformRESTTimestampToSDKTimestamp,
888
+ paths: [{ path: "lodging.metadata.updateTime" }]
889
+ }
890
+ ])
891
+ };
892
+ return metadata;
893
+ }
894
+ return __updateLocationLodging;
895
+ }
896
+ function listAttributeMetadata(payload) {
897
+ function __listAttributeMetadata({ host }) {
898
+ const metadata = {
899
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
900
+ method: "GET",
901
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.ListAttributeMetadata",
902
+ packageName: PACKAGE_NAME,
903
+ migrationOptions: {
904
+ optInTransformResponse: true
905
+ },
906
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
907
+ protoPath: "/v1/attribute-metadata",
908
+ data: payload,
909
+ host
910
+ }),
911
+ params: toURLSearchParams(payload),
912
+ transformResponse: (payload2) => transformPaths(payload2, [
913
+ {
914
+ transformFn: transformRESTFloatToSDKFloat,
915
+ paths: [{ path: "attributeMetadata.valueMetadata.numberValue" }]
916
+ }
917
+ ])
918
+ };
919
+ return metadata;
920
+ }
921
+ return __listAttributeMetadata;
922
+ }
923
+ function listCategories(payload) {
924
+ function __listCategories({ host }) {
925
+ const metadata = {
926
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
927
+ method: "GET",
928
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.ListCategories",
929
+ packageName: PACKAGE_NAME,
930
+ migrationOptions: {
931
+ optInTransformResponse: true
932
+ },
933
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
934
+ protoPath: "/v1/categories",
935
+ data: payload,
936
+ host
937
+ }),
938
+ params: toURLSearchParams(payload)
939
+ };
940
+ return metadata;
941
+ }
942
+ return __listCategories;
943
+ }
944
+ function getVerificationOptions(payload) {
945
+ function __getVerificationOptions({ host }) {
946
+ const metadata = {
947
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
948
+ method: "POST",
949
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.GetVerificationOptions",
950
+ packageName: PACKAGE_NAME,
951
+ migrationOptions: {
952
+ optInTransformResponse: true
953
+ },
954
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
955
+ protoPath: "/v1/locations/{locationId}:getVerificationOptions",
956
+ data: payload,
957
+ host
958
+ }),
959
+ data: payload
960
+ };
961
+ return metadata;
962
+ }
963
+ return __getVerificationOptions;
964
+ }
965
+ function startVerification(payload) {
966
+ function __startVerification({ host }) {
967
+ const metadata = {
968
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
969
+ method: "POST",
970
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.StartVerification",
971
+ packageName: PACKAGE_NAME,
972
+ migrationOptions: {
973
+ optInTransformResponse: true
974
+ },
975
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
976
+ protoPath: "/v1/locations/{locationId}:startVerification",
977
+ data: payload,
978
+ host
979
+ }),
980
+ data: payload
981
+ };
982
+ return metadata;
983
+ }
984
+ return __startVerification;
985
+ }
986
+ function completeVerification(payload) {
987
+ function __completeVerification({ host }) {
988
+ const metadata = {
989
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
990
+ method: "POST",
991
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.CompleteVerification",
992
+ packageName: PACKAGE_NAME,
993
+ migrationOptions: {
994
+ optInTransformResponse: true
995
+ },
996
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
997
+ protoPath: "/v1/locations/{locationId}:completeVerification",
998
+ data: payload,
999
+ host
1000
+ }),
1001
+ data: payload
1002
+ };
1003
+ return metadata;
1004
+ }
1005
+ return __completeVerification;
1006
+ }
1007
+ function getVoiceOfMerchant(payload) {
1008
+ function __getVoiceOfMerchant({ host }) {
1009
+ const metadata = {
1010
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
1011
+ method: "GET",
1012
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.GetVoiceOfMerchant",
1013
+ packageName: PACKAGE_NAME,
1014
+ migrationOptions: {
1015
+ optInTransformResponse: true
1016
+ },
1017
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
1018
+ protoPath: "/v1/locations/{locationId}/voice-of-merchant",
1019
+ data: payload,
1020
+ host
1021
+ }),
1022
+ params: toURLSearchParams(payload)
1023
+ };
1024
+ return metadata;
1025
+ }
1026
+ return __getVoiceOfMerchant;
1027
+ }
1028
+ function getLocationInsights(payload) {
1029
+ function __getLocationInsights({ host }) {
1030
+ const serializedData = transformPaths(payload, [
1031
+ {
1032
+ transformFn: transformSDKTimestampToRESTTimestamp,
1033
+ paths: [{ path: "timeRange.startDate" }, { path: "timeRange.endDate" }]
1034
+ }
1035
+ ]);
1036
+ const metadata = {
1037
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
1038
+ method: "GET",
1039
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.GetLocationInsights",
1040
+ packageName: PACKAGE_NAME,
1041
+ migrationOptions: {
1042
+ optInTransformResponse: true
1043
+ },
1044
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
1045
+ protoPath: "/v1/locations/{locationId}/insights",
1046
+ data: serializedData,
1047
+ host
1048
+ }),
1049
+ params: toURLSearchParams(serializedData),
1050
+ transformResponse: (payload2) => transformPaths(payload2, [
1051
+ {
1052
+ transformFn: transformRESTTimestampToSDKTimestamp,
1053
+ paths: [{ path: "metrics.dailyValues.date" }]
1054
+ }
1055
+ ])
1056
+ };
1057
+ return metadata;
1058
+ }
1059
+ return __getLocationInsights;
1060
+ }
1061
+ function listSearchKeywordImpressions(payload) {
1062
+ function __listSearchKeywordImpressions({ host }) {
1063
+ const metadata = {
1064
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
1065
+ method: "GET",
1066
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.ListSearchKeywordImpressions",
1067
+ packageName: PACKAGE_NAME,
1068
+ migrationOptions: {
1069
+ optInTransformResponse: true
1070
+ },
1071
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
1072
+ protoPath: "/v1/locations/{locationId}/search-keyword-impressions",
1073
+ data: payload,
1074
+ host
1075
+ }),
1076
+ params: toURLSearchParams(payload)
1077
+ };
1078
+ return metadata;
1079
+ }
1080
+ return __listSearchKeywordImpressions;
1081
+ }
1082
+ function inviteAdminToLocation(payload) {
1083
+ function __inviteAdminToLocation({ host }) {
1084
+ const metadata = {
1085
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
1086
+ method: "POST",
1087
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.InviteAdminToLocation",
1088
+ packageName: PACKAGE_NAME,
1089
+ migrationOptions: {
1090
+ optInTransformResponse: true
1091
+ },
1092
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
1093
+ protoPath: "/v1/locations/{locationId}/invite-admin",
1094
+ data: payload,
1095
+ host
1096
+ }),
1097
+ data: payload
1098
+ };
1099
+ return metadata;
1100
+ }
1101
+ return __inviteAdminToLocation;
1102
+ }
1103
+ function getLocationAdmins(payload) {
1104
+ function __getLocationAdmins({ host }) {
1105
+ const metadata = {
1106
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
1107
+ method: "GET",
1108
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.GetLocationAdmins",
1109
+ packageName: PACKAGE_NAME,
1110
+ migrationOptions: {
1111
+ optInTransformResponse: true
1112
+ },
1113
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
1114
+ protoPath: "/v1/locations/{locationId}/admins",
1115
+ data: payload,
1116
+ host
1117
+ }),
1118
+ params: toURLSearchParams(payload)
1119
+ };
1120
+ return metadata;
1121
+ }
1122
+ return __getLocationAdmins;
1123
+ }
1124
+ function getAddressSchemaByCountryCode(payload) {
1125
+ function __getAddressSchemaByCountryCode({ host }) {
1126
+ const metadata = {
1127
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
1128
+ method: "GET",
1129
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.GetAddressSchemaByCountryCode",
1130
+ packageName: PACKAGE_NAME,
1131
+ migrationOptions: {
1132
+ optInTransformResponse: true
1133
+ },
1134
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
1135
+ protoPath: "/v1/address-schema/{countryCode}",
1136
+ data: payload,
1137
+ host
1138
+ }),
1139
+ params: toURLSearchParams(payload)
1140
+ };
1141
+ return metadata;
1142
+ }
1143
+ return __getAddressSchemaByCountryCode;
1144
+ }
1145
+ function suggestRegions(payload) {
1146
+ function __suggestRegions({ host }) {
1147
+ const metadata = {
1148
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
1149
+ method: "POST",
1150
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.SuggestRegions",
1151
+ packageName: PACKAGE_NAME,
1152
+ migrationOptions: {
1153
+ optInTransformResponse: true
1154
+ },
1155
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
1156
+ protoPath: "/v1/regions/suggest",
1157
+ data: payload,
1158
+ host
1159
+ }),
1160
+ data: payload
1161
+ };
1162
+ return metadata;
1163
+ }
1164
+ return __suggestRegions;
1165
+ }
1166
+ function suggestEstablishments(payload) {
1167
+ function __suggestEstablishments({ host }) {
1168
+ const metadata = {
1169
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
1170
+ method: "POST",
1171
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.SuggestEstablishments",
1172
+ packageName: PACKAGE_NAME,
1173
+ migrationOptions: {
1174
+ optInTransformResponse: true
1175
+ },
1176
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
1177
+ protoPath: "/v1/establishments/suggest",
1178
+ data: payload,
1179
+ host
1180
+ }),
1181
+ data: payload
1182
+ };
1183
+ return metadata;
1184
+ }
1185
+ return __suggestEstablishments;
1186
+ }
1187
+ function searchGoogleLocations(payload) {
1188
+ function __searchGoogleLocations({ host }) {
1189
+ const serializedData = transformPaths(payload, [
1190
+ {
1191
+ transformFn: transformSDKFloatToRESTFloat,
1192
+ paths: [
1193
+ { path: "location.latLng.latitude" },
1194
+ { path: "location.latLng.longitude" }
1195
+ ]
1196
+ }
1197
+ ]);
1198
+ const metadata = {
1199
+ entityFqdn: "wix.gbp.location.v1.gbplocation",
1200
+ method: "POST",
1201
+ methodFqn: "wix.gbp.location.v1.GbpLocationsService.SearchGoogleLocations",
1202
+ packageName: PACKAGE_NAME,
1203
+ migrationOptions: {
1204
+ optInTransformResponse: true
1205
+ },
1206
+ url: resolveWixGbpLocationV1GbpLocationsServiceUrl({
1207
+ protoPath: "/v1/google-locations/search",
1208
+ data: serializedData,
1209
+ host
1210
+ }),
1211
+ data: serializedData,
1212
+ transformResponse: (payload2) => transformPaths(payload2, [
1213
+ {
1214
+ transformFn: transformRESTFloatToSDKFloat,
1215
+ paths: [
1216
+ { path: "matches.location.latLng.latitude" },
1217
+ { path: "matches.location.latLng.longitude" }
1218
+ ]
1219
+ }
1220
+ ])
1221
+ };
1222
+ return metadata;
1223
+ }
1224
+ return __searchGoogleLocations;
1225
+ }
1226
+
1227
+ // src/gbp-location-v1-gbplocation-locations.universal.ts
1228
+ import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
1229
+ import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
1230
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
1231
+ SortOrder2["ASC"] = "ASC";
1232
+ SortOrder2["DESC"] = "DESC";
1233
+ return SortOrder2;
1234
+ })(SortOrder || {});
1235
+ var BusinessType = /* @__PURE__ */ ((BusinessType2) => {
1236
+ BusinessType2["CUSTOMER_LOCATION_ONLY"] = "CUSTOMER_LOCATION_ONLY";
1237
+ BusinessType2["CUSTOMER_AND_BUSINESS_LOCATION"] = "CUSTOMER_AND_BUSINESS_LOCATION";
1238
+ return BusinessType2;
1239
+ })(BusinessType || {});
1240
+ var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
1241
+ DayOfWeek2["MONDAY"] = "MONDAY";
1242
+ DayOfWeek2["TUESDAY"] = "TUESDAY";
1243
+ DayOfWeek2["WEDNESDAY"] = "WEDNESDAY";
1244
+ DayOfWeek2["THURSDAY"] = "THURSDAY";
1245
+ DayOfWeek2["FRIDAY"] = "FRIDAY";
1246
+ DayOfWeek2["SATURDAY"] = "SATURDAY";
1247
+ DayOfWeek2["SUNDAY"] = "SUNDAY";
1248
+ return DayOfWeek2;
1249
+ })(DayOfWeek || {});
1250
+ var Status = /* @__PURE__ */ ((Status2) => {
1251
+ Status2["OPEN"] = "OPEN";
1252
+ Status2["CLOSED_PERMANENTLY"] = "CLOSED_PERMANENTLY";
1253
+ Status2["CLOSED_TEMPORARILY"] = "CLOSED_TEMPORARILY";
1254
+ return Status2;
1255
+ })(Status || {});
1256
+ var State = /* @__PURE__ */ ((State2) => {
1257
+ State2["WAIT_FOR_VOICE_OF_MERCHANT"] = "WAIT_FOR_VOICE_OF_MERCHANT";
1258
+ State2["RESOLVE_OWNERSHIP_CONFLICT"] = "RESOLVE_OWNERSHIP_CONFLICT";
1259
+ State2["COMPLY_WITH_GUIDELINES"] = "COMPLY_WITH_GUIDELINES";
1260
+ State2["VERIFY"] = "VERIFY";
1261
+ return State2;
1262
+ })(State || {});
1263
+ var RecommendationReason = /* @__PURE__ */ ((RecommendationReason2) => {
1264
+ RecommendationReason2["BUSINESS_LOCATION_SUSPENDED"] = "BUSINESS_LOCATION_SUSPENDED";
1265
+ RecommendationReason2["BUSINESS_LOCATION_DISABLED"] = "BUSINESS_LOCATION_DISABLED";
1266
+ return RecommendationReason2;
1267
+ })(RecommendationReason || {});
1268
+ var ReviewSortOrder = /* @__PURE__ */ ((ReviewSortOrder2) => {
1269
+ ReviewSortOrder2["NEWEST"] = "NEWEST";
1270
+ ReviewSortOrder2["HIGHEST_RATING"] = "HIGHEST_RATING";
1271
+ ReviewSortOrder2["LOWEST_RATING"] = "LOWEST_RATING";
1272
+ return ReviewSortOrder2;
1273
+ })(ReviewSortOrder || {});
1274
+ var MediaFormat = /* @__PURE__ */ ((MediaFormat2) => {
1275
+ MediaFormat2["PHOTO"] = "PHOTO";
1276
+ MediaFormat2["VIDEO"] = "VIDEO";
1277
+ return MediaFormat2;
1278
+ })(MediaFormat || {});
1279
+ var MediaCategory = /* @__PURE__ */ ((MediaCategory2) => {
1280
+ MediaCategory2["COVER"] = "COVER";
1281
+ MediaCategory2["PROFILE"] = "PROFILE";
1282
+ MediaCategory2["LOGO"] = "LOGO";
1283
+ MediaCategory2["EXTERIOR"] = "EXTERIOR";
1284
+ MediaCategory2["INTERIOR"] = "INTERIOR";
1285
+ MediaCategory2["PRODUCT"] = "PRODUCT";
1286
+ MediaCategory2["AT_WORK"] = "AT_WORK";
1287
+ MediaCategory2["FOOD_AND_DRINK"] = "FOOD_AND_DRINK";
1288
+ MediaCategory2["MENU"] = "MENU";
1289
+ MediaCategory2["COMMON_AREA"] = "COMMON_AREA";
1290
+ MediaCategory2["ROOMS"] = "ROOMS";
1291
+ MediaCategory2["TEAMS"] = "TEAMS";
1292
+ MediaCategory2["ADDITIONAL"] = "ADDITIONAL";
1293
+ return MediaCategory2;
1294
+ })(MediaCategory || {});
1295
+ var AmenityException = /* @__PURE__ */ ((AmenityException2) => {
1296
+ AmenityException2["UNDER_CONSTRUCTION"] = "UNDER_CONSTRUCTION";
1297
+ AmenityException2["DEPENDENT_ON_SEASON"] = "DEPENDENT_ON_SEASON";
1298
+ AmenityException2["DEPENDENT_ON_DAY_OF_WEEK"] = "DEPENDENT_ON_DAY_OF_WEEK";
1299
+ return AmenityException2;
1300
+ })(AmenityException || {});
1301
+ var EcoCertificate = /* @__PURE__ */ ((EcoCertificate2) => {
1302
+ EcoCertificate2["ISO14001"] = "ISO14001";
1303
+ EcoCertificate2["ISO50001"] = "ISO50001";
1304
+ EcoCertificate2["ASIAN_ECOTOURISM"] = "ASIAN_ECOTOURISM";
1305
+ EcoCertificate2["BIOSPHERE_RESPOSNIBLE_TOURISM"] = "BIOSPHERE_RESPOSNIBLE_TOURISM";
1306
+ EcoCertificate2["BUREAU_VERITAS"] = "BUREAU_VERITAS";
1307
+ EcoCertificate2["CONTROL_UNION"] = "CONTROL_UNION";
1308
+ EcoCertificate2["EARTHCHECK"] = "EARTHCHECK";
1309
+ EcoCertificate2["ECO_CERTIFICATION_MALTA"] = "ECO_CERTIFICATION_MALTA";
1310
+ EcoCertificate2["ECOTOURISM_AUSTRALIAS_ECO"] = "ECOTOURISM_AUSTRALIAS_ECO";
1311
+ EcoCertificate2["GREAT_GREEN_DEAL"] = "GREAT_GREEN_DEAL";
1312
+ EcoCertificate2["GREEN_GLOBE"] = "GREEN_GLOBE";
1313
+ EcoCertificate2["GREEN_GROWTH2050"] = "GREEN_GROWTH2050";
1314
+ EcoCertificate2["GREEN_KEY"] = "GREEN_KEY";
1315
+ EcoCertificate2["GREEN_KEY_ECO_RATING"] = "GREEN_KEY_ECO_RATING";
1316
+ EcoCertificate2["GREEN_SEAL"] = "GREEN_SEAL";
1317
+ EcoCertificate2["GREEN_STAR"] = "GREEN_STAR";
1318
+ EcoCertificate2["GREEN_TOURISM_ACTIVE"] = "GREEN_TOURISM_ACTIVE";
1319
+ EcoCertificate2["HILTON_LIGHTSTAY"] = "HILTON_LIGHTSTAY";
1320
+ EcoCertificate2["HOSTELLING_INTERNATIONALS_QUALITY_AND_SUSTAINABILITY"] = "HOSTELLING_INTERNATIONALS_QUALITY_AND_SUSTAINABILITY";
1321
+ EcoCertificate2["HOTELES_MAS_VERDES"] = "HOTELES_MAS_VERDES";
1322
+ EcoCertificate2["NORDIC_SWAN_ECOLABEL"] = "NORDIC_SWAN_ECOLABEL";
1323
+ EcoCertificate2["PREFERRED_BY_NATURE_SUSTAINABLE_TOURISM"] = "PREFERRED_BY_NATURE_SUSTAINABLE_TOURISM";
1324
+ EcoCertificate2["SUSTAINABLE_TRAVEL_IRELAND"] = "SUSTAINABLE_TRAVEL_IRELAND";
1325
+ EcoCertificate2["TOF_TIGERS_INITITIVES_PUG"] = "TOF_TIGERS_INITITIVES_PUG";
1326
+ EcoCertificate2["TRAVELIFE"] = "TRAVELIFE";
1327
+ EcoCertificate2["UNITED_CERTIFICATION_SYSTEMS_LIMITED"] = "UNITED_CERTIFICATION_SYSTEMS_LIMITED";
1328
+ EcoCertificate2["VIREO_SRL"] = "VIREO_SRL";
1329
+ return EcoCertificate2;
1330
+ })(EcoCertificate || {});
1331
+ var UnitTier = /* @__PURE__ */ ((UnitTier2) => {
1332
+ UnitTier2["STANDARD_UNIT"] = "STANDARD_UNIT";
1333
+ UnitTier2["DELUXE_UNIT"] = "DELUXE_UNIT";
1334
+ return UnitTier2;
1335
+ })(UnitTier || {});
1336
+ var BreeamCertification = /* @__PURE__ */ ((BreeamCertification2) => {
1337
+ BreeamCertification2["NO_BREEAM_CERTIFICATION"] = "NO_BREEAM_CERTIFICATION";
1338
+ BreeamCertification2["BREEAM_PASS"] = "BREEAM_PASS";
1339
+ BreeamCertification2["BREEAM_GOOD"] = "BREEAM_GOOD";
1340
+ BreeamCertification2["BREEAM_VERY_GOOD"] = "BREEAM_VERY_GOOD";
1341
+ BreeamCertification2["BREEAM_EXCELLENT"] = "BREEAM_EXCELLENT";
1342
+ BreeamCertification2["BREEAM_OUTSTANDING"] = "BREEAM_OUTSTANDING";
1343
+ return BreeamCertification2;
1344
+ })(BreeamCertification || {});
1345
+ var LeedCertification = /* @__PURE__ */ ((LeedCertification2) => {
1346
+ LeedCertification2["NO_LEED_CERTIFICATION"] = "NO_LEED_CERTIFICATION";
1347
+ LeedCertification2["LEED_CERTIFIED"] = "LEED_CERTIFIED";
1348
+ LeedCertification2["LEED_SILVER"] = "LEED_SILVER";
1349
+ LeedCertification2["LEED_GOLD"] = "LEED_GOLD";
1350
+ LeedCertification2["LEED_PLATINUM"] = "LEED_PLATINUM";
1351
+ return LeedCertification2;
1352
+ })(LeedCertification || {});
1353
+ var AttributeValueType = /* @__PURE__ */ ((AttributeValueType2) => {
1354
+ AttributeValueType2["BOOL"] = "BOOL";
1355
+ AttributeValueType2["ENUM"] = "ENUM";
1356
+ AttributeValueType2["URL"] = "URL";
1357
+ AttributeValueType2["REPEATED_ENUM"] = "REPEATED_ENUM";
1358
+ return AttributeValueType2;
1359
+ })(AttributeValueType || {});
1360
+ var CategoryView = /* @__PURE__ */ ((CategoryView2) => {
1361
+ CategoryView2["BASIC"] = "BASIC";
1362
+ CategoryView2["FULL"] = "FULL";
1363
+ return CategoryView2;
1364
+ })(CategoryView || {});
1365
+ var VerificationMethod = /* @__PURE__ */ ((VerificationMethod2) => {
1366
+ VerificationMethod2["ADDRESS"] = "ADDRESS";
1367
+ VerificationMethod2["EMAIL"] = "EMAIL";
1368
+ VerificationMethod2["PHONE_CALL"] = "PHONE_CALL";
1369
+ VerificationMethod2["SMS"] = "SMS";
1370
+ VerificationMethod2["AUTO"] = "AUTO";
1371
+ return VerificationMethod2;
1372
+ })(VerificationMethod || {});
1373
+ var VerificationState = /* @__PURE__ */ ((VerificationState2) => {
1374
+ VerificationState2["UNVERIFIED"] = "UNVERIFIED";
1375
+ VerificationState2["PENDING_VERIFICATION"] = "PENDING_VERIFICATION";
1376
+ VerificationState2["VERIFIED"] = "VERIFIED";
1377
+ return VerificationState2;
1378
+ })(VerificationState || {});
1379
+ var DailyMetric = /* @__PURE__ */ ((DailyMetric2) => {
1380
+ DailyMetric2["BUSINESS_IMPRESSIONS_DESKTOP_MAPS"] = "BUSINESS_IMPRESSIONS_DESKTOP_MAPS";
1381
+ DailyMetric2["BUSINESS_IMPRESSIONS_DESKTOP_SEARCH"] = "BUSINESS_IMPRESSIONS_DESKTOP_SEARCH";
1382
+ DailyMetric2["BUSINESS_IMPRESSIONS_MOBILE_MAPS"] = "BUSINESS_IMPRESSIONS_MOBILE_MAPS";
1383
+ DailyMetric2["BUSINESS_IMPRESSIONS_MOBILE_SEARCH"] = "BUSINESS_IMPRESSIONS_MOBILE_SEARCH";
1384
+ DailyMetric2["BUSINESS_CONVERSATIONS"] = "BUSINESS_CONVERSATIONS";
1385
+ DailyMetric2["BUSINESS_DIRECTION_REQUESTS"] = "BUSINESS_DIRECTION_REQUESTS";
1386
+ DailyMetric2["CALL_CLICKS"] = "CALL_CLICKS";
1387
+ DailyMetric2["WEBSITE_CLICKS"] = "WEBSITE_CLICKS";
1388
+ DailyMetric2["BUSINESS_BOOKINGS"] = "BUSINESS_BOOKINGS";
1389
+ DailyMetric2["BUSINESS_FOOD_ORDERS"] = "BUSINESS_FOOD_ORDERS";
1390
+ DailyMetric2["BUSINESS_FOOD_MENU_CLICKS"] = "BUSINESS_FOOD_MENU_CLICKS";
1391
+ return DailyMetric2;
1392
+ })(DailyMetric || {});
1393
+ var Role = /* @__PURE__ */ ((Role2) => {
1394
+ Role2["UNKNOWN"] = "UNKNOWN";
1395
+ Role2["ADMIN_ROLE_UNSPECIFIED"] = "ADMIN_ROLE_UNSPECIFIED";
1396
+ Role2["MANAGER"] = "MANAGER";
1397
+ Role2["OWNER"] = "OWNER";
1398
+ Role2["PRIMARY_OWNER"] = "PRIMARY_OWNER";
1399
+ Role2["SITE_MANAGER"] = "SITE_MANAGER";
1400
+ return Role2;
1401
+ })(Role || {});
1402
+ var AddressFieldType = /* @__PURE__ */ ((AddressFieldType2) => {
1403
+ AddressFieldType2["NAME"] = "NAME";
1404
+ AddressFieldType2["ORGANIZATION"] = "ORGANIZATION";
1405
+ AddressFieldType2["STREET_ADDRESS"] = "STREET_ADDRESS";
1406
+ AddressFieldType2["DEPENDENT_LOCALITY"] = "DEPENDENT_LOCALITY";
1407
+ AddressFieldType2["LOCALITY"] = "LOCALITY";
1408
+ AddressFieldType2["ADMIN_AREA"] = "ADMIN_AREA";
1409
+ AddressFieldType2["POSTAL_CODE"] = "POSTAL_CODE";
1410
+ AddressFieldType2["SORTING_CODE"] = "SORTING_CODE";
1411
+ return AddressFieldType2;
1412
+ })(AddressFieldType || {});
1413
+ var MatchStatus = /* @__PURE__ */ ((MatchStatus2) => {
1414
+ MatchStatus2["CLAIMABLE"] = "CLAIMABLE";
1415
+ MatchStatus2["OWNED_ELSEWHERE"] = "OWNED_ELSEWHERE";
1416
+ return MatchStatus2;
1417
+ })(MatchStatus || {});
1418
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1419
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
1420
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
1421
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
1422
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
1423
+ WebhookIdentityType2["APP"] = "APP";
1424
+ return WebhookIdentityType2;
1425
+ })(WebhookIdentityType || {});
1426
+ async function getGbpLocation2(locationId) {
1427
+ const { httpClient, sideEffects } = arguments[1];
1428
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1429
+ locationId
1430
+ });
1431
+ const reqOpts = getGbpLocation(payload);
1432
+ sideEffects?.onSiteCall?.();
1433
+ try {
1434
+ const result = await httpClient.request(reqOpts);
1435
+ sideEffects?.onSuccess?.(result);
1436
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.gbplocation;
1437
+ } catch (err) {
1438
+ const transformedError = sdkTransformError(
1439
+ err,
1440
+ {
1441
+ spreadPathsToArguments: {},
1442
+ explicitPathsToArguments: { locationId: "$[0]" },
1443
+ singleArgumentUnchanged: false
1444
+ },
1445
+ ["locationId"]
1446
+ );
1447
+ sideEffects?.onError?.(err);
1448
+ throw transformedError;
1449
+ }
1450
+ }
1451
+ function queryGbpLocations2() {
1452
+ const { httpClient, sideEffects } = arguments[0];
1453
+ return queryBuilder({
1454
+ func: async (payload) => {
1455
+ const reqOpts = queryGbpLocations(payload);
1456
+ sideEffects?.onSiteCall?.();
1457
+ try {
1458
+ const result = await httpClient.request(reqOpts);
1459
+ sideEffects?.onSuccess?.(result);
1460
+ return result;
1461
+ } catch (err) {
1462
+ sideEffects?.onError?.(err);
1463
+ throw err;
1464
+ }
1465
+ },
1466
+ requestTransformer: (query) => {
1467
+ const args = [query, {}];
1468
+ return renameKeysFromSDKRequestToRESTRequest({
1469
+ ...args?.[1],
1470
+ query: args?.[0]
1471
+ });
1472
+ },
1473
+ responseTransformer: ({
1474
+ data
1475
+ }) => {
1476
+ const transformedData = renameKeysFromRESTResponseToSDKResponse(
1477
+ transformPaths2(data, [])
1478
+ );
1479
+ return {
1480
+ items: transformedData?.locations,
1481
+ pagingMetadata: transformedData?.pagingMetadata
1482
+ };
1483
+ },
1484
+ errorTransformer: (err) => {
1485
+ const transformedError = sdkTransformError(err, {
1486
+ spreadPathsToArguments: {},
1487
+ explicitPathsToArguments: { query: "$[0]" },
1488
+ singleArgumentUnchanged: false
1489
+ });
1490
+ throw transformedError;
1491
+ },
1492
+ pagingMethod: "CURSOR",
1493
+ transformationPaths: {}
1494
+ });
1495
+ }
1496
+ async function typedQueryGbpLocations(query) {
1497
+ const { httpClient, sideEffects } = arguments[1];
1498
+ const payload = renameKeysFromSDKRequestToRESTRequest({ query });
1499
+ const reqOpts = queryGbpLocations(payload);
1500
+ sideEffects?.onSiteCall?.();
1501
+ try {
1502
+ const result = await httpClient.request(reqOpts);
1503
+ sideEffects?.onSuccess?.(result);
1504
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1505
+ } catch (err) {
1506
+ const transformedError = sdkTransformError(
1507
+ err,
1508
+ {
1509
+ spreadPathsToArguments: {},
1510
+ explicitPathsToArguments: { query: "$[0]" },
1511
+ singleArgumentUnchanged: false
1512
+ },
1513
+ ["query"]
1514
+ );
1515
+ sideEffects?.onError?.(err);
1516
+ throw transformedError;
1517
+ }
1518
+ }
1519
+ var utils = {
1520
+ query: /* @__PURE__ */ createQueryUtils()
1521
+ };
1522
+ async function queryGoogleLocations2(options) {
1523
+ const { httpClient, sideEffects } = arguments[1];
1524
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1525
+ query: options?.query
1526
+ });
1527
+ const reqOpts = queryGoogleLocations(payload);
1528
+ sideEffects?.onSiteCall?.();
1529
+ try {
1530
+ const result = await httpClient.request(reqOpts);
1531
+ sideEffects?.onSuccess?.(result);
1532
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1533
+ } catch (err) {
1534
+ const transformedError = sdkTransformError(
1535
+ err,
1536
+ {
1537
+ spreadPathsToArguments: {},
1538
+ explicitPathsToArguments: { query: "$[0].query" },
1539
+ singleArgumentUnchanged: false
1540
+ },
1541
+ ["options"]
1542
+ );
1543
+ sideEffects?.onError?.(err);
1544
+ throw transformedError;
1545
+ }
1546
+ }
1547
+ async function getGoogleLocation2(locationId) {
1548
+ const { httpClient, sideEffects } = arguments[1];
1549
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1550
+ locationId
1551
+ });
1552
+ const reqOpts = getGoogleLocation(payload);
1553
+ sideEffects?.onSiteCall?.();
1554
+ try {
1555
+ const result = await httpClient.request(reqOpts);
1556
+ sideEffects?.onSuccess?.(result);
1557
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1558
+ } catch (err) {
1559
+ const transformedError = sdkTransformError(
1560
+ err,
1561
+ {
1562
+ spreadPathsToArguments: {},
1563
+ explicitPathsToArguments: { locationId: "$[0]" },
1564
+ singleArgumentUnchanged: false
1565
+ },
1566
+ ["locationId"]
1567
+ );
1568
+ sideEffects?.onError?.(err);
1569
+ throw transformedError;
1570
+ }
1571
+ }
1572
+ async function createLocation2(location) {
1573
+ const { httpClient, sideEffects } = arguments[1];
1574
+ const payload = renameKeysFromSDKRequestToRESTRequest({ location });
1575
+ const reqOpts = createLocation(payload);
1576
+ sideEffects?.onSiteCall?.();
1577
+ try {
1578
+ const result = await httpClient.request(reqOpts);
1579
+ sideEffects?.onSuccess?.(result);
1580
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.location;
1581
+ } catch (err) {
1582
+ const transformedError = sdkTransformError(
1583
+ err,
1584
+ {
1585
+ spreadPathsToArguments: {},
1586
+ explicitPathsToArguments: { location: "$[0]" },
1587
+ singleArgumentUnchanged: false
1588
+ },
1589
+ ["location"]
1590
+ );
1591
+ sideEffects?.onError?.(err);
1592
+ throw transformedError;
1593
+ }
1594
+ }
1595
+ async function updateLocation2(_id, location) {
1596
+ const { httpClient, sideEffects } = arguments[2];
1597
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1598
+ location: { ...location, id: _id }
1599
+ });
1600
+ const reqOpts = updateLocation(payload);
1601
+ sideEffects?.onSiteCall?.();
1602
+ try {
1603
+ const result = await httpClient.request(reqOpts);
1604
+ sideEffects?.onSuccess?.(result);
1605
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.location;
1606
+ } catch (err) {
1607
+ const transformedError = sdkTransformError(
1608
+ err,
1609
+ {
1610
+ spreadPathsToArguments: { location: "$[1]" },
1611
+ explicitPathsToArguments: { "location.id": "$[0]" },
1612
+ singleArgumentUnchanged: false
1613
+ },
1614
+ ["_id", "location"]
1615
+ );
1616
+ sideEffects?.onError?.(err);
1617
+ throw transformedError;
1618
+ }
1619
+ }
1620
+ async function deleteLocation2(locationId) {
1621
+ const { httpClient, sideEffects } = arguments[1];
1622
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1623
+ locationId
1624
+ });
1625
+ const reqOpts = deleteLocation(payload);
1626
+ sideEffects?.onSiteCall?.();
1627
+ try {
1628
+ const result = await httpClient.request(reqOpts);
1629
+ sideEffects?.onSuccess?.(result);
1630
+ } catch (err) {
1631
+ const transformedError = sdkTransformError(
1632
+ err,
1633
+ {
1634
+ spreadPathsToArguments: {},
1635
+ explicitPathsToArguments: { locationId: "$[0]" },
1636
+ singleArgumentUnchanged: false
1637
+ },
1638
+ ["locationId"]
1639
+ );
1640
+ sideEffects?.onError?.(err);
1641
+ throw transformedError;
1642
+ }
1643
+ }
1644
+ async function createGoogleLocation2(accountId, options) {
1645
+ const { httpClient, sideEffects } = arguments[2];
1646
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1647
+ accountId,
1648
+ location: options?.location,
1649
+ validateOnly: options?.validateOnly
1650
+ });
1651
+ const reqOpts = createGoogleLocation(payload);
1652
+ sideEffects?.onSiteCall?.();
1653
+ try {
1654
+ const result = await httpClient.request(reqOpts);
1655
+ sideEffects?.onSuccess?.(result);
1656
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1657
+ } catch (err) {
1658
+ const transformedError = sdkTransformError(
1659
+ err,
1660
+ {
1661
+ spreadPathsToArguments: {},
1662
+ explicitPathsToArguments: {
1663
+ accountId: "$[0]",
1664
+ location: "$[1].location",
1665
+ validateOnly: "$[1].validateOnly"
1666
+ },
1667
+ singleArgumentUnchanged: false
1668
+ },
1669
+ ["accountId", "options"]
1670
+ );
1671
+ sideEffects?.onError?.(err);
1672
+ throw transformedError;
1673
+ }
1674
+ }
1675
+ async function deleteGoogleLocation2(locationId) {
1676
+ const { httpClient, sideEffects } = arguments[1];
1677
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1678
+ locationId
1679
+ });
1680
+ const reqOpts = deleteGoogleLocation(payload);
1681
+ sideEffects?.onSiteCall?.();
1682
+ try {
1683
+ const result = await httpClient.request(reqOpts);
1684
+ sideEffects?.onSuccess?.(result);
1685
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1686
+ } catch (err) {
1687
+ const transformedError = sdkTransformError(
1688
+ err,
1689
+ {
1690
+ spreadPathsToArguments: {},
1691
+ explicitPathsToArguments: { locationId: "$[0]" },
1692
+ singleArgumentUnchanged: false
1693
+ },
1694
+ ["locationId"]
1695
+ );
1696
+ sideEffects?.onError?.(err);
1697
+ throw transformedError;
1698
+ }
1699
+ }
1700
+ async function updateGoogleLocation2(locationId, location, options) {
1701
+ const { httpClient, sideEffects } = arguments[3];
1702
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1703
+ locationId,
1704
+ location,
1705
+ fieldMask: options?.fieldMask
1706
+ });
1707
+ const reqOpts = updateGoogleLocation(payload);
1708
+ sideEffects?.onSiteCall?.();
1709
+ try {
1710
+ const result = await httpClient.request(reqOpts);
1711
+ sideEffects?.onSuccess?.(result);
1712
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1713
+ } catch (err) {
1714
+ const transformedError = sdkTransformError(
1715
+ err,
1716
+ {
1717
+ spreadPathsToArguments: {},
1718
+ explicitPathsToArguments: {
1719
+ locationId: "$[0]",
1720
+ location: "$[1]",
1721
+ fieldMask: "$[2].fieldMask"
1722
+ },
1723
+ singleArgumentUnchanged: false
1724
+ },
1725
+ ["locationId", "location", "options"]
1726
+ );
1727
+ sideEffects?.onError?.(err);
1728
+ throw transformedError;
1729
+ }
1730
+ }
1731
+ async function bulkCreateLocations2(locations, options) {
1732
+ const { httpClient, sideEffects } = arguments[2];
1733
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1734
+ locations,
1735
+ returnEntity: options?.returnEntity
1736
+ });
1737
+ const reqOpts = bulkCreateLocations(payload);
1738
+ sideEffects?.onSiteCall?.();
1739
+ try {
1740
+ const result = await httpClient.request(reqOpts);
1741
+ sideEffects?.onSuccess?.(result);
1742
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1743
+ } catch (err) {
1744
+ const transformedError = sdkTransformError(
1745
+ err,
1746
+ {
1747
+ spreadPathsToArguments: {},
1748
+ explicitPathsToArguments: {
1749
+ locations: "$[0]",
1750
+ returnEntity: "$[1].returnEntity"
1751
+ },
1752
+ singleArgumentUnchanged: false
1753
+ },
1754
+ ["locations", "options"]
1755
+ );
1756
+ sideEffects?.onError?.(err);
1757
+ throw transformedError;
1758
+ }
1759
+ }
1760
+ async function bulkDeleteLocations2(locationIds) {
1761
+ const { httpClient, sideEffects } = arguments[1];
1762
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1763
+ locationIds
1764
+ });
1765
+ const reqOpts = bulkDeleteLocations(payload);
1766
+ sideEffects?.onSiteCall?.();
1767
+ try {
1768
+ const result = await httpClient.request(reqOpts);
1769
+ sideEffects?.onSuccess?.(result);
1770
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1771
+ } catch (err) {
1772
+ const transformedError = sdkTransformError(
1773
+ err,
1774
+ {
1775
+ spreadPathsToArguments: {},
1776
+ explicitPathsToArguments: { locationIds: "$[0]" },
1777
+ singleArgumentUnchanged: false
1778
+ },
1779
+ ["locationIds"]
1780
+ );
1781
+ sideEffects?.onError?.(err);
1782
+ throw transformedError;
1783
+ }
1784
+ }
1785
+ async function listGbpAccounts2(options) {
1786
+ const { httpClient, sideEffects } = arguments[1];
1787
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1788
+ paging: options?.paging
1789
+ });
1790
+ const reqOpts = listGbpAccounts(payload);
1791
+ sideEffects?.onSiteCall?.();
1792
+ try {
1793
+ const result = await httpClient.request(reqOpts);
1794
+ sideEffects?.onSuccess?.(result);
1795
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1796
+ } catch (err) {
1797
+ const transformedError = sdkTransformError(
1798
+ err,
1799
+ {
1800
+ spreadPathsToArguments: {},
1801
+ explicitPathsToArguments: { paging: "$[0].paging" },
1802
+ singleArgumentUnchanged: false
1803
+ },
1804
+ ["options"]
1805
+ );
1806
+ sideEffects?.onError?.(err);
1807
+ throw transformedError;
1808
+ }
1809
+ }
1810
+ async function listUnimportedLocations2(accountId, options) {
1811
+ const { httpClient, sideEffects } = arguments[2];
1812
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1813
+ accountId,
1814
+ paging: options?.paging
1815
+ });
1816
+ const reqOpts = listUnimportedLocations(payload);
1817
+ sideEffects?.onSiteCall?.();
1818
+ try {
1819
+ const result = await httpClient.request(reqOpts);
1820
+ sideEffects?.onSuccess?.(result);
1821
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1822
+ } catch (err) {
1823
+ const transformedError = sdkTransformError(
1824
+ err,
1825
+ {
1826
+ spreadPathsToArguments: {},
1827
+ explicitPathsToArguments: { accountId: "$[0]", paging: "$[1].paging" },
1828
+ singleArgumentUnchanged: false
1829
+ },
1830
+ ["accountId", "options"]
1831
+ );
1832
+ sideEffects?.onError?.(err);
1833
+ throw transformedError;
1834
+ }
1835
+ }
1836
+ async function listReviews2(locationId, options) {
1837
+ const { httpClient, sideEffects } = arguments[2];
1838
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1839
+ locationId,
1840
+ orderBy: options?.orderBy,
1841
+ paging: options?.paging
1842
+ });
1843
+ const reqOpts = listReviews(payload);
1844
+ sideEffects?.onSiteCall?.();
1845
+ try {
1846
+ const result = await httpClient.request(reqOpts);
1847
+ sideEffects?.onSuccess?.(result);
1848
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1849
+ } catch (err) {
1850
+ const transformedError = sdkTransformError(
1851
+ err,
1852
+ {
1853
+ spreadPathsToArguments: {},
1854
+ explicitPathsToArguments: {
1855
+ locationId: "$[0]",
1856
+ orderBy: "$[1].orderBy",
1857
+ paging: "$[1].paging"
1858
+ },
1859
+ singleArgumentUnchanged: false
1860
+ },
1861
+ ["locationId", "options"]
1862
+ );
1863
+ sideEffects?.onError?.(err);
1864
+ throw transformedError;
1865
+ }
1866
+ }
1867
+ async function putReviewReply2(identifiers, text) {
1868
+ const { httpClient, sideEffects } = arguments[2];
1869
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1870
+ locationId: identifiers?.locationId,
1871
+ reviewId: identifiers?.reviewId,
1872
+ text
1873
+ });
1874
+ const reqOpts = putReviewReply(payload);
1875
+ sideEffects?.onSiteCall?.();
1876
+ try {
1877
+ const result = await httpClient.request(reqOpts);
1878
+ sideEffects?.onSuccess?.(result);
1879
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1880
+ } catch (err) {
1881
+ const transformedError = sdkTransformError(
1882
+ err,
1883
+ {
1884
+ spreadPathsToArguments: {},
1885
+ explicitPathsToArguments: {
1886
+ locationId: "$[0].locationId",
1887
+ reviewId: "$[0].reviewId",
1888
+ text: "$[1]"
1889
+ },
1890
+ singleArgumentUnchanged: false
1891
+ },
1892
+ ["identifiers", "text"]
1893
+ );
1894
+ sideEffects?.onError?.(err);
1895
+ throw transformedError;
1896
+ }
1897
+ }
1898
+ async function deleteReviewReply2(identifiers) {
1899
+ const { httpClient, sideEffects } = arguments[1];
1900
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1901
+ locationId: identifiers?.locationId,
1902
+ reviewId: identifiers?.reviewId
1903
+ });
1904
+ const reqOpts = deleteReviewReply(payload);
1905
+ sideEffects?.onSiteCall?.();
1906
+ try {
1907
+ const result = await httpClient.request(reqOpts);
1908
+ sideEffects?.onSuccess?.(result);
1909
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1910
+ } catch (err) {
1911
+ const transformedError = sdkTransformError(
1912
+ err,
1913
+ {
1914
+ spreadPathsToArguments: {},
1915
+ explicitPathsToArguments: {
1916
+ locationId: "$[0].locationId",
1917
+ reviewId: "$[0].reviewId"
1918
+ },
1919
+ singleArgumentUnchanged: false
1920
+ },
1921
+ ["identifiers"]
1922
+ );
1923
+ sideEffects?.onError?.(err);
1924
+ throw transformedError;
1925
+ }
1926
+ }
1927
+ async function listMedia2(locationId, options) {
1928
+ const { httpClient, sideEffects } = arguments[2];
1929
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1930
+ locationId,
1931
+ paging: options?.paging
1932
+ });
1933
+ const reqOpts = listMedia(payload);
1934
+ sideEffects?.onSiteCall?.();
1935
+ try {
1936
+ const result = await httpClient.request(reqOpts);
1937
+ sideEffects?.onSuccess?.(result);
1938
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1939
+ } catch (err) {
1940
+ const transformedError = sdkTransformError(
1941
+ err,
1942
+ {
1943
+ spreadPathsToArguments: {},
1944
+ explicitPathsToArguments: { locationId: "$[0]", paging: "$[1].paging" },
1945
+ singleArgumentUnchanged: false
1946
+ },
1947
+ ["locationId", "options"]
1948
+ );
1949
+ sideEffects?.onError?.(err);
1950
+ throw transformedError;
1951
+ }
1952
+ }
1953
+ async function createMedia2(locationId, sourceUrl, options) {
1954
+ const { httpClient, sideEffects } = arguments[3];
1955
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1956
+ locationId,
1957
+ sourceUrl,
1958
+ category: options?.category,
1959
+ format: options?.format
1960
+ });
1961
+ const reqOpts = createMedia(payload);
1962
+ sideEffects?.onSiteCall?.();
1963
+ try {
1964
+ const result = await httpClient.request(reqOpts);
1965
+ sideEffects?.onSuccess?.(result);
1966
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1967
+ } catch (err) {
1968
+ const transformedError = sdkTransformError(
1969
+ err,
1970
+ {
1971
+ spreadPathsToArguments: {},
1972
+ explicitPathsToArguments: {
1973
+ locationId: "$[0]",
1974
+ sourceUrl: "$[1]",
1975
+ category: "$[2].category",
1976
+ format: "$[2].format"
1977
+ },
1978
+ singleArgumentUnchanged: false
1979
+ },
1980
+ ["locationId", "sourceUrl", "options"]
1981
+ );
1982
+ sideEffects?.onError?.(err);
1983
+ throw transformedError;
1984
+ }
1985
+ }
1986
+ async function deleteMedia2(identifiers) {
1987
+ const { httpClient, sideEffects } = arguments[1];
1988
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1989
+ locationId: identifiers?.locationId,
1990
+ mediaKey: identifiers?.mediaKey
1991
+ });
1992
+ const reqOpts = deleteMedia(payload);
1993
+ sideEffects?.onSiteCall?.();
1994
+ try {
1995
+ const result = await httpClient.request(reqOpts);
1996
+ sideEffects?.onSuccess?.(result);
1997
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1998
+ } catch (err) {
1999
+ const transformedError = sdkTransformError(
2000
+ err,
2001
+ {
2002
+ spreadPathsToArguments: {},
2003
+ explicitPathsToArguments: {
2004
+ locationId: "$[0].locationId",
2005
+ mediaKey: "$[0].mediaKey"
2006
+ },
2007
+ singleArgumentUnchanged: false
2008
+ },
2009
+ ["identifiers"]
2010
+ );
2011
+ sideEffects?.onError?.(err);
2012
+ throw transformedError;
2013
+ }
2014
+ }
2015
+ async function updateLocationFoodMenus2(locationId, options) {
2016
+ const { httpClient, sideEffects } = arguments[2];
2017
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2018
+ locationId,
2019
+ menuIds: options?.menuIds
2020
+ });
2021
+ const reqOpts = updateLocationFoodMenus(payload);
2022
+ sideEffects?.onSiteCall?.();
2023
+ try {
2024
+ const result = await httpClient.request(reqOpts);
2025
+ sideEffects?.onSuccess?.(result);
2026
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2027
+ } catch (err) {
2028
+ const transformedError = sdkTransformError(
2029
+ err,
2030
+ {
2031
+ spreadPathsToArguments: {},
2032
+ explicitPathsToArguments: {
2033
+ locationId: "$[0]",
2034
+ menuIds: "$[1].menuIds"
2035
+ },
2036
+ singleArgumentUnchanged: false
2037
+ },
2038
+ ["locationId", "options"]
2039
+ );
2040
+ sideEffects?.onError?.(err);
2041
+ throw transformedError;
2042
+ }
2043
+ }
2044
+ async function updateLocationAttributes2(locationId, attributes) {
2045
+ const { httpClient, sideEffects } = arguments[2];
2046
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2047
+ locationId,
2048
+ attributes
2049
+ });
2050
+ const reqOpts = updateLocationAttributes(payload);
2051
+ sideEffects?.onSiteCall?.();
2052
+ try {
2053
+ const result = await httpClient.request(reqOpts);
2054
+ sideEffects?.onSuccess?.(result);
2055
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2056
+ } catch (err) {
2057
+ const transformedError = sdkTransformError(
2058
+ err,
2059
+ {
2060
+ spreadPathsToArguments: {},
2061
+ explicitPathsToArguments: { locationId: "$[0]", attributes: "$[1]" },
2062
+ singleArgumentUnchanged: false
2063
+ },
2064
+ ["locationId", "attributes"]
2065
+ );
2066
+ sideEffects?.onError?.(err);
2067
+ throw transformedError;
2068
+ }
2069
+ }
2070
+ async function getLocationAttributes2(locationId) {
2071
+ const { httpClient, sideEffects } = arguments[1];
2072
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2073
+ locationId
2074
+ });
2075
+ const reqOpts = getLocationAttributes(payload);
2076
+ sideEffects?.onSiteCall?.();
2077
+ try {
2078
+ const result = await httpClient.request(reqOpts);
2079
+ sideEffects?.onSuccess?.(result);
2080
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2081
+ } catch (err) {
2082
+ const transformedError = sdkTransformError(
2083
+ err,
2084
+ {
2085
+ spreadPathsToArguments: {},
2086
+ explicitPathsToArguments: { locationId: "$[0]" },
2087
+ singleArgumentUnchanged: false
2088
+ },
2089
+ ["locationId"]
2090
+ );
2091
+ sideEffects?.onError?.(err);
2092
+ throw transformedError;
2093
+ }
2094
+ }
2095
+ async function getLocationLodging2(locationId) {
2096
+ const { httpClient, sideEffects } = arguments[1];
2097
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2098
+ locationId
2099
+ });
2100
+ const reqOpts = getLocationLodging(payload);
2101
+ sideEffects?.onSiteCall?.();
2102
+ try {
2103
+ const result = await httpClient.request(reqOpts);
2104
+ sideEffects?.onSuccess?.(result);
2105
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2106
+ } catch (err) {
2107
+ const transformedError = sdkTransformError(
2108
+ err,
2109
+ {
2110
+ spreadPathsToArguments: {},
2111
+ explicitPathsToArguments: { locationId: "$[0]" },
2112
+ singleArgumentUnchanged: false
2113
+ },
2114
+ ["locationId"]
2115
+ );
2116
+ sideEffects?.onError?.(err);
2117
+ throw transformedError;
2118
+ }
2119
+ }
2120
+ async function updateLocationLodging2(locationId, lodging, options) {
2121
+ const { httpClient, sideEffects } = arguments[3];
2122
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2123
+ locationId,
2124
+ lodging,
2125
+ fieldMask: options?.fieldMask
2126
+ });
2127
+ const reqOpts = updateLocationLodging(payload);
2128
+ sideEffects?.onSiteCall?.();
2129
+ try {
2130
+ const result = await httpClient.request(reqOpts);
2131
+ sideEffects?.onSuccess?.(result);
2132
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2133
+ } catch (err) {
2134
+ const transformedError = sdkTransformError(
2135
+ err,
2136
+ {
2137
+ spreadPathsToArguments: {},
2138
+ explicitPathsToArguments: {
2139
+ locationId: "$[0]",
2140
+ lodging: "$[1]",
2141
+ fieldMask: "$[2].fieldMask"
2142
+ },
2143
+ singleArgumentUnchanged: false
2144
+ },
2145
+ ["locationId", "lodging", "options"]
2146
+ );
2147
+ sideEffects?.onError?.(err);
2148
+ throw transformedError;
2149
+ }
2150
+ }
2151
+ async function listAttributeMetadata2(options) {
2152
+ const { httpClient, sideEffects } = arguments[1];
2153
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2154
+ locationId: options?.locationId,
2155
+ categoryRegion: options?.categoryRegion,
2156
+ languageCode: options?.languageCode,
2157
+ paging: options?.paging
2158
+ });
2159
+ const reqOpts = listAttributeMetadata(payload);
2160
+ sideEffects?.onSiteCall?.();
2161
+ try {
2162
+ const result = await httpClient.request(reqOpts);
2163
+ sideEffects?.onSuccess?.(result);
2164
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2165
+ } catch (err) {
2166
+ const transformedError = sdkTransformError(
2167
+ err,
2168
+ {
2169
+ spreadPathsToArguments: {},
2170
+ explicitPathsToArguments: {
2171
+ locationId: "$[0].locationId",
2172
+ categoryRegion: "$[0].categoryRegion",
2173
+ languageCode: "$[0].languageCode",
2174
+ paging: "$[0].paging"
2175
+ },
2176
+ singleArgumentUnchanged: false
2177
+ },
2178
+ ["options"]
2179
+ );
2180
+ sideEffects?.onError?.(err);
2181
+ throw transformedError;
2182
+ }
2183
+ }
2184
+ async function listCategories2(regionCode, options) {
2185
+ const { httpClient, sideEffects } = arguments[2];
2186
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2187
+ regionCode,
2188
+ languageCode: options?.languageCode,
2189
+ searchTerm: options?.searchTerm,
2190
+ view: options?.view,
2191
+ paging: options?.paging,
2192
+ locationId: options?.locationId
2193
+ });
2194
+ const reqOpts = listCategories(payload);
2195
+ sideEffects?.onSiteCall?.();
2196
+ try {
2197
+ const result = await httpClient.request(reqOpts);
2198
+ sideEffects?.onSuccess?.(result);
2199
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2200
+ } catch (err) {
2201
+ const transformedError = sdkTransformError(
2202
+ err,
2203
+ {
2204
+ spreadPathsToArguments: {},
2205
+ explicitPathsToArguments: {
2206
+ regionCode: "$[0]",
2207
+ languageCode: "$[1].languageCode",
2208
+ searchTerm: "$[1].searchTerm",
2209
+ view: "$[1].view",
2210
+ paging: "$[1].paging",
2211
+ locationId: "$[1].locationId"
2212
+ },
2213
+ singleArgumentUnchanged: false
2214
+ },
2215
+ ["regionCode", "options"]
2216
+ );
2217
+ sideEffects?.onError?.(err);
2218
+ throw transformedError;
2219
+ }
2220
+ }
2221
+ async function getVerificationOptions2(locationId) {
2222
+ const { httpClient, sideEffects } = arguments[1];
2223
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2224
+ locationId
2225
+ });
2226
+ const reqOpts = getVerificationOptions(payload);
2227
+ sideEffects?.onSiteCall?.();
2228
+ try {
2229
+ const result = await httpClient.request(reqOpts);
2230
+ sideEffects?.onSuccess?.(result);
2231
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2232
+ } catch (err) {
2233
+ const transformedError = sdkTransformError(
2234
+ err,
2235
+ {
2236
+ spreadPathsToArguments: {},
2237
+ explicitPathsToArguments: { locationId: "$[0]" },
2238
+ singleArgumentUnchanged: false
2239
+ },
2240
+ ["locationId"]
2241
+ );
2242
+ sideEffects?.onError?.(err);
2243
+ throw transformedError;
2244
+ }
2245
+ }
2246
+ async function startVerification2(locationId, method, options) {
2247
+ const { httpClient, sideEffects } = arguments[3];
2248
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2249
+ locationId,
2250
+ method,
2251
+ methodInput: options?.methodInput
2252
+ });
2253
+ const reqOpts = startVerification(payload);
2254
+ sideEffects?.onSiteCall?.();
2255
+ try {
2256
+ const result = await httpClient.request(reqOpts);
2257
+ sideEffects?.onSuccess?.(result);
2258
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2259
+ } catch (err) {
2260
+ const transformedError = sdkTransformError(
2261
+ err,
2262
+ {
2263
+ spreadPathsToArguments: {},
2264
+ explicitPathsToArguments: {
2265
+ locationId: "$[0]",
2266
+ method: "$[1]",
2267
+ methodInput: "$[2].methodInput"
2268
+ },
2269
+ singleArgumentUnchanged: false
2270
+ },
2271
+ ["locationId", "method", "options"]
2272
+ );
2273
+ sideEffects?.onError?.(err);
2274
+ throw transformedError;
2275
+ }
2276
+ }
2277
+ async function completeVerification2(locationId, pin, options) {
2278
+ const { httpClient, sideEffects } = arguments[3];
2279
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2280
+ locationId,
2281
+ pin,
2282
+ pendingVerificationId: options?.pendingVerificationId
2283
+ });
2284
+ const reqOpts = completeVerification(payload);
2285
+ sideEffects?.onSiteCall?.();
2286
+ try {
2287
+ const result = await httpClient.request(reqOpts);
2288
+ sideEffects?.onSuccess?.(result);
2289
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2290
+ } catch (err) {
2291
+ const transformedError = sdkTransformError(
2292
+ err,
2293
+ {
2294
+ spreadPathsToArguments: {},
2295
+ explicitPathsToArguments: {
2296
+ locationId: "$[0]",
2297
+ pin: "$[1]",
2298
+ pendingVerificationId: "$[2].pendingVerificationId"
2299
+ },
2300
+ singleArgumentUnchanged: false
2301
+ },
2302
+ ["locationId", "pin", "options"]
2303
+ );
2304
+ sideEffects?.onError?.(err);
2305
+ throw transformedError;
2306
+ }
2307
+ }
2308
+ async function getVoiceOfMerchant2(locationId) {
2309
+ const { httpClient, sideEffects } = arguments[1];
2310
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2311
+ locationId
2312
+ });
2313
+ const reqOpts = getVoiceOfMerchant(payload);
2314
+ sideEffects?.onSiteCall?.();
2315
+ try {
2316
+ const result = await httpClient.request(reqOpts);
2317
+ sideEffects?.onSuccess?.(result);
2318
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2319
+ } catch (err) {
2320
+ const transformedError = sdkTransformError(
2321
+ err,
2322
+ {
2323
+ spreadPathsToArguments: {},
2324
+ explicitPathsToArguments: { locationId: "$[0]" },
2325
+ singleArgumentUnchanged: false
2326
+ },
2327
+ ["locationId"]
2328
+ );
2329
+ sideEffects?.onError?.(err);
2330
+ throw transformedError;
2331
+ }
2332
+ }
2333
+ async function getLocationInsights2(locationId, timeRange, options) {
2334
+ const { httpClient, sideEffects } = arguments[3];
2335
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2336
+ locationId,
2337
+ timeRange,
2338
+ metricTypes: options?.metricTypes
2339
+ });
2340
+ const reqOpts = getLocationInsights(payload);
2341
+ sideEffects?.onSiteCall?.();
2342
+ try {
2343
+ const result = await httpClient.request(reqOpts);
2344
+ sideEffects?.onSuccess?.(result);
2345
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2346
+ } catch (err) {
2347
+ const transformedError = sdkTransformError(
2348
+ err,
2349
+ {
2350
+ spreadPathsToArguments: {},
2351
+ explicitPathsToArguments: {
2352
+ locationId: "$[0]",
2353
+ timeRange: "$[1]",
2354
+ metricTypes: "$[2].metricTypes"
2355
+ },
2356
+ singleArgumentUnchanged: false
2357
+ },
2358
+ ["locationId", "timeRange", "options"]
2359
+ );
2360
+ sideEffects?.onError?.(err);
2361
+ throw transformedError;
2362
+ }
2363
+ }
2364
+ async function listSearchKeywordImpressions2(locationId, monthlyRange, options) {
2365
+ const { httpClient, sideEffects } = arguments[3];
2366
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2367
+ locationId,
2368
+ monthlyRange,
2369
+ paging: options?.paging
2370
+ });
2371
+ const reqOpts = listSearchKeywordImpressions(payload);
2372
+ sideEffects?.onSiteCall?.();
2373
+ try {
2374
+ const result = await httpClient.request(reqOpts);
2375
+ sideEffects?.onSuccess?.(result);
2376
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2377
+ } catch (err) {
2378
+ const transformedError = sdkTransformError(
2379
+ err,
2380
+ {
2381
+ spreadPathsToArguments: {},
2382
+ explicitPathsToArguments: {
2383
+ locationId: "$[0]",
2384
+ monthlyRange: "$[1]",
2385
+ paging: "$[2].paging"
2386
+ },
2387
+ singleArgumentUnchanged: false
2388
+ },
2389
+ ["locationId", "monthlyRange", "options"]
2390
+ );
2391
+ sideEffects?.onError?.(err);
2392
+ throw transformedError;
2393
+ }
2394
+ }
2395
+ async function inviteAdminToLocation2(locationId, email, options) {
2396
+ const { httpClient, sideEffects } = arguments[3];
2397
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2398
+ locationId,
2399
+ email,
2400
+ role: options?.role
2401
+ });
2402
+ const reqOpts = inviteAdminToLocation(payload);
2403
+ sideEffects?.onSiteCall?.();
2404
+ try {
2405
+ const result = await httpClient.request(reqOpts);
2406
+ sideEffects?.onSuccess?.(result);
2407
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2408
+ } catch (err) {
2409
+ const transformedError = sdkTransformError(
2410
+ err,
2411
+ {
2412
+ spreadPathsToArguments: {},
2413
+ explicitPathsToArguments: {
2414
+ locationId: "$[0]",
2415
+ email: "$[1]",
2416
+ role: "$[2].role"
2417
+ },
2418
+ singleArgumentUnchanged: false
2419
+ },
2420
+ ["locationId", "email", "options"]
2421
+ );
2422
+ sideEffects?.onError?.(err);
2423
+ throw transformedError;
2424
+ }
2425
+ }
2426
+ async function getLocationAdmins2(locationId) {
2427
+ const { httpClient, sideEffects } = arguments[1];
2428
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2429
+ locationId
2430
+ });
2431
+ const reqOpts = getLocationAdmins(payload);
2432
+ sideEffects?.onSiteCall?.();
2433
+ try {
2434
+ const result = await httpClient.request(reqOpts);
2435
+ sideEffects?.onSuccess?.(result);
2436
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2437
+ } catch (err) {
2438
+ const transformedError = sdkTransformError(
2439
+ err,
2440
+ {
2441
+ spreadPathsToArguments: {},
2442
+ explicitPathsToArguments: { locationId: "$[0]" },
2443
+ singleArgumentUnchanged: false
2444
+ },
2445
+ ["locationId"]
2446
+ );
2447
+ sideEffects?.onError?.(err);
2448
+ throw transformedError;
2449
+ }
2450
+ }
2451
+ async function getAddressSchemaByCountryCode2(countryCode, options) {
2452
+ const { httpClient, sideEffects } = arguments[2];
2453
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2454
+ countryCode,
2455
+ locale: options?.locale
2456
+ });
2457
+ const reqOpts = getAddressSchemaByCountryCode(
2458
+ payload
2459
+ );
2460
+ sideEffects?.onSiteCall?.();
2461
+ try {
2462
+ const result = await httpClient.request(reqOpts);
2463
+ sideEffects?.onSuccess?.(result);
2464
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2465
+ } catch (err) {
2466
+ const transformedError = sdkTransformError(
2467
+ err,
2468
+ {
2469
+ spreadPathsToArguments: {},
2470
+ explicitPathsToArguments: {
2471
+ countryCode: "$[0]",
2472
+ locale: "$[1].locale"
2473
+ },
2474
+ singleArgumentUnchanged: false
2475
+ },
2476
+ ["countryCode", "options"]
2477
+ );
2478
+ sideEffects?.onError?.(err);
2479
+ throw transformedError;
2480
+ }
2481
+ }
2482
+ async function suggestRegions2(query, options) {
2483
+ const { httpClient, sideEffects } = arguments[2];
2484
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2485
+ query,
2486
+ countryCode: options?.countryCode,
2487
+ languageCode: options?.languageCode
2488
+ });
2489
+ const reqOpts = suggestRegions(payload);
2490
+ sideEffects?.onSiteCall?.();
2491
+ try {
2492
+ const result = await httpClient.request(reqOpts);
2493
+ sideEffects?.onSuccess?.(result);
2494
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2495
+ } catch (err) {
2496
+ const transformedError = sdkTransformError(
2497
+ err,
2498
+ {
2499
+ spreadPathsToArguments: {},
2500
+ explicitPathsToArguments: {
2501
+ query: "$[0]",
2502
+ countryCode: "$[1].countryCode",
2503
+ languageCode: "$[1].languageCode"
2504
+ },
2505
+ singleArgumentUnchanged: false
2506
+ },
2507
+ ["query", "options"]
2508
+ );
2509
+ sideEffects?.onError?.(err);
2510
+ throw transformedError;
2511
+ }
2512
+ }
2513
+ async function suggestEstablishments2(query, options) {
2514
+ const { httpClient, sideEffects } = arguments[2];
2515
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2516
+ query,
2517
+ countryCode: options?.countryCode,
2518
+ languageCode: options?.languageCode
2519
+ });
2520
+ const reqOpts = suggestEstablishments(payload);
2521
+ sideEffects?.onSiteCall?.();
2522
+ try {
2523
+ const result = await httpClient.request(reqOpts);
2524
+ sideEffects?.onSuccess?.(result);
2525
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2526
+ } catch (err) {
2527
+ const transformedError = sdkTransformError(
2528
+ err,
2529
+ {
2530
+ spreadPathsToArguments: {},
2531
+ explicitPathsToArguments: {
2532
+ query: "$[0]",
2533
+ countryCode: "$[1].countryCode",
2534
+ languageCode: "$[1].languageCode"
2535
+ },
2536
+ singleArgumentUnchanged: false
2537
+ },
2538
+ ["query", "options"]
2539
+ );
2540
+ sideEffects?.onError?.(err);
2541
+ throw transformedError;
2542
+ }
2543
+ }
2544
+ async function searchGoogleLocations2(options) {
2545
+ const { httpClient, sideEffects } = arguments[1];
2546
+ const payload = renameKeysFromSDKRequestToRESTRequest({
2547
+ query: options?.query,
2548
+ location: options?.location
2549
+ });
2550
+ const reqOpts = searchGoogleLocations(payload);
2551
+ sideEffects?.onSiteCall?.();
2552
+ try {
2553
+ const result = await httpClient.request(reqOpts);
2554
+ sideEffects?.onSuccess?.(result);
2555
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
2556
+ } catch (err) {
2557
+ const transformedError = sdkTransformError(
2558
+ err,
2559
+ {
2560
+ spreadPathsToArguments: {},
2561
+ explicitPathsToArguments: {
2562
+ query: "$[0].query",
2563
+ location: "$[0].location"
2564
+ },
2565
+ singleArgumentUnchanged: false
2566
+ },
2567
+ ["options"]
2568
+ );
2569
+ sideEffects?.onError?.(err);
2570
+ throw transformedError;
2571
+ }
2572
+ }
2573
+ export {
2574
+ AddressFieldType,
2575
+ AmenityException,
2576
+ AttributeValueType,
2577
+ BreeamCertification,
2578
+ BusinessType,
2579
+ CategoryView,
2580
+ DailyMetric,
2581
+ DayOfWeek,
2582
+ EcoCertificate,
2583
+ LeedCertification,
2584
+ MatchStatus,
2585
+ MediaCategory,
2586
+ MediaFormat,
2587
+ RecommendationReason,
2588
+ ReviewSortOrder,
2589
+ Role,
2590
+ SortOrder,
2591
+ State,
2592
+ Status,
2593
+ UnitTier,
2594
+ VerificationMethod,
2595
+ VerificationState,
2596
+ WebhookIdentityType,
2597
+ bulkCreateLocations2 as bulkCreateLocations,
2598
+ bulkDeleteLocations2 as bulkDeleteLocations,
2599
+ completeVerification2 as completeVerification,
2600
+ createGoogleLocation2 as createGoogleLocation,
2601
+ createLocation2 as createLocation,
2602
+ createMedia2 as createMedia,
2603
+ deleteGoogleLocation2 as deleteGoogleLocation,
2604
+ deleteLocation2 as deleteLocation,
2605
+ deleteMedia2 as deleteMedia,
2606
+ deleteReviewReply2 as deleteReviewReply,
2607
+ getAddressSchemaByCountryCode2 as getAddressSchemaByCountryCode,
2608
+ getGbpLocation2 as getGbpLocation,
2609
+ getGoogleLocation2 as getGoogleLocation,
2610
+ getLocationAdmins2 as getLocationAdmins,
2611
+ getLocationAttributes2 as getLocationAttributes,
2612
+ getLocationInsights2 as getLocationInsights,
2613
+ getLocationLodging2 as getLocationLodging,
2614
+ getVerificationOptions2 as getVerificationOptions,
2615
+ getVoiceOfMerchant2 as getVoiceOfMerchant,
2616
+ inviteAdminToLocation2 as inviteAdminToLocation,
2617
+ listAttributeMetadata2 as listAttributeMetadata,
2618
+ listCategories2 as listCategories,
2619
+ listGbpAccounts2 as listGbpAccounts,
2620
+ listMedia2 as listMedia,
2621
+ listReviews2 as listReviews,
2622
+ listSearchKeywordImpressions2 as listSearchKeywordImpressions,
2623
+ listUnimportedLocations2 as listUnimportedLocations,
2624
+ putReviewReply2 as putReviewReply,
2625
+ queryGbpLocations2 as queryGbpLocations,
2626
+ queryGoogleLocations2 as queryGoogleLocations,
2627
+ searchGoogleLocations2 as searchGoogleLocations,
2628
+ startVerification2 as startVerification,
2629
+ suggestEstablishments2 as suggestEstablishments,
2630
+ suggestRegions2 as suggestRegions,
2631
+ typedQueryGbpLocations,
2632
+ updateGoogleLocation2 as updateGoogleLocation,
2633
+ updateLocation2 as updateLocation,
2634
+ updateLocationAttributes2 as updateLocationAttributes,
2635
+ updateLocationFoodMenus2 as updateLocationFoodMenus,
2636
+ updateLocationLodging2 as updateLocationLodging,
2637
+ utils
2638
+ };
2639
+ //# sourceMappingURL=index.typings.mjs.map