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