@betterstore/sdk 0.5.12 → 0.5.13
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/dist/index.d.mts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +10 -12
- package/dist/index.mjs +10 -12
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -94,8 +94,8 @@ type AutosuggestAddressResult = {
|
|
|
94
94
|
id: string;
|
|
95
95
|
title: string;
|
|
96
96
|
position: {
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
lat: number;
|
|
98
|
+
lng: number;
|
|
99
99
|
};
|
|
100
100
|
};
|
|
101
101
|
type GeocodeAddressResult = Omit<AutosuggestAddressResult, "position"> & Pick<Address, "line1" | "line2" | "city" | "province" | "provinceCode" | "country" | "countryCode" | "zipCode">;
|
|
@@ -521,7 +521,8 @@ declare class Client {
|
|
|
521
521
|
* Get geocode address results
|
|
522
522
|
*/
|
|
523
523
|
getGeocodeAddressResults(clientSecret: string, params: {
|
|
524
|
-
|
|
524
|
+
id: string;
|
|
525
|
+
title: string;
|
|
525
526
|
position: AutosuggestAddressResult["position"];
|
|
526
527
|
}): Promise<GeocodeAddressResult[]>;
|
|
527
528
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -94,8 +94,8 @@ type AutosuggestAddressResult = {
|
|
|
94
94
|
id: string;
|
|
95
95
|
title: string;
|
|
96
96
|
position: {
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
lat: number;
|
|
98
|
+
lng: number;
|
|
99
99
|
};
|
|
100
100
|
};
|
|
101
101
|
type GeocodeAddressResult = Omit<AutosuggestAddressResult, "position"> & Pick<Address, "line1" | "line2" | "city" | "province" | "provinceCode" | "country" | "countryCode" | "zipCode">;
|
|
@@ -521,7 +521,8 @@ declare class Client {
|
|
|
521
521
|
* Get geocode address results
|
|
522
522
|
*/
|
|
523
523
|
getGeocodeAddressResults(clientSecret: string, params: {
|
|
524
|
-
|
|
524
|
+
id: string;
|
|
525
|
+
title: string;
|
|
525
526
|
position: AutosuggestAddressResult["position"];
|
|
526
527
|
}): Promise<GeocodeAddressResult[]>;
|
|
527
528
|
}
|
package/dist/index.js
CHANGED
|
@@ -415,14 +415,9 @@ var Client = class {
|
|
|
415
415
|
*/
|
|
416
416
|
async getAutosuggestAddressResults(clientSecret, params) {
|
|
417
417
|
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
418
|
-
const { data
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
params
|
|
422
|
-
}
|
|
423
|
-
);
|
|
424
|
-
console.log("autosuggest data", data);
|
|
425
|
-
console.log("autosuggest rest", rest);
|
|
418
|
+
const { data } = await apiClient.get("/helpers/autosuggest-address", {
|
|
419
|
+
params
|
|
420
|
+
});
|
|
426
421
|
return data;
|
|
427
422
|
}
|
|
428
423
|
/**
|
|
@@ -430,11 +425,14 @@ var Client = class {
|
|
|
430
425
|
*/
|
|
431
426
|
async getGeocodeAddressResults(clientSecret, params) {
|
|
432
427
|
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
433
|
-
const {
|
|
434
|
-
|
|
428
|
+
const { position, ...rest } = params;
|
|
429
|
+
const { data } = await apiClient.get("/helpers/geocode-address", {
|
|
430
|
+
params: {
|
|
431
|
+
...rest,
|
|
432
|
+
lat: position.lat,
|
|
433
|
+
lng: position.lng
|
|
434
|
+
}
|
|
435
435
|
});
|
|
436
|
-
console.log("geocode data", data);
|
|
437
|
-
console.log("geocode rest", rest);
|
|
438
436
|
return data;
|
|
439
437
|
}
|
|
440
438
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -377,14 +377,9 @@ var Client = class {
|
|
|
377
377
|
*/
|
|
378
378
|
async getAutosuggestAddressResults(clientSecret, params) {
|
|
379
379
|
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
380
|
-
const { data
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
params
|
|
384
|
-
}
|
|
385
|
-
);
|
|
386
|
-
console.log("autosuggest data", data);
|
|
387
|
-
console.log("autosuggest rest", rest);
|
|
380
|
+
const { data } = await apiClient.get("/helpers/autosuggest-address", {
|
|
381
|
+
params
|
|
382
|
+
});
|
|
388
383
|
return data;
|
|
389
384
|
}
|
|
390
385
|
/**
|
|
@@ -392,11 +387,14 @@ var Client = class {
|
|
|
392
387
|
*/
|
|
393
388
|
async getGeocodeAddressResults(clientSecret, params) {
|
|
394
389
|
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
395
|
-
const {
|
|
396
|
-
|
|
390
|
+
const { position, ...rest } = params;
|
|
391
|
+
const { data } = await apiClient.get("/helpers/geocode-address", {
|
|
392
|
+
params: {
|
|
393
|
+
...rest,
|
|
394
|
+
lat: position.lat,
|
|
395
|
+
lng: position.lng
|
|
396
|
+
}
|
|
397
397
|
});
|
|
398
|
-
console.log("geocode data", data);
|
|
399
|
-
console.log("geocode rest", rest);
|
|
400
398
|
return data;
|
|
401
399
|
}
|
|
402
400
|
};
|