@betterstore/sdk 0.5.14 → 0.5.16
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 +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +3 -11
- package/dist/index.mjs +3 -11
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -93,13 +93,19 @@ interface CheckoutSession {
|
|
|
93
93
|
type AutosuggestAddressResult = {
|
|
94
94
|
id: string;
|
|
95
95
|
title: string;
|
|
96
|
-
|
|
96
|
+
address: {
|
|
97
|
+
label: string;
|
|
98
|
+
};
|
|
97
99
|
position: {
|
|
98
100
|
lat: number;
|
|
99
101
|
lng: number;
|
|
100
102
|
};
|
|
101
103
|
};
|
|
102
|
-
type
|
|
104
|
+
type LookupAddressResult = {
|
|
105
|
+
id: string;
|
|
106
|
+
title: string;
|
|
107
|
+
address: Pick<Address, "line1" | "city" | "province" | "provinceCode" | "country" | "countryCode" | "zipCode">;
|
|
108
|
+
};
|
|
103
109
|
|
|
104
110
|
type SortOrder = "asc" | "desc";
|
|
105
111
|
type GetListParams<A, B> = {
|
|
@@ -518,16 +524,10 @@ declare class Client {
|
|
|
518
524
|
longitude?: string;
|
|
519
525
|
countryCode?: string;
|
|
520
526
|
}): Promise<AutosuggestAddressResult[]>;
|
|
521
|
-
|
|
522
|
-
* Get geocode address results
|
|
523
|
-
*/
|
|
524
|
-
getGeocodeAddressResults(clientSecret: string, params: {
|
|
527
|
+
lookupAddress(clientSecret: string, params: {
|
|
525
528
|
id: string;
|
|
526
|
-
title: string;
|
|
527
|
-
position: AutosuggestAddressResult["position"];
|
|
528
|
-
countryCode: string;
|
|
529
529
|
locale?: string;
|
|
530
|
-
}): Promise<
|
|
530
|
+
}): Promise<LookupAddressResult>;
|
|
531
531
|
}
|
|
532
532
|
|
|
533
533
|
declare class Collections {
|
|
@@ -601,4 +601,4 @@ declare function createStoreHelpers(config?: {
|
|
|
601
601
|
proxy?: string;
|
|
602
602
|
}): Helpers;
|
|
603
603
|
|
|
604
|
-
export { type Address, type AutosuggestAddressResult, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerSession, type CustomerSubscription, type CustomerSubscriptionUpdateParams, type CustomerUpdateParams, type Discount, type
|
|
604
|
+
export { type Address, type AutosuggestAddressResult, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerSession, type CustomerSubscription, type CustomerSubscriptionUpdateParams, type CustomerUpdateParams, type Discount, type LineItem, type LineItemCreate, type ListCollectionsParams, type ListCollectionsQuery, type ListCollectionsSortBy, type ListDiscountsParams, type ListDiscountsQuery, type ListDiscountsSortBy, type ListProductsParams, type ListProductsQuery, type ListProductsSortBy, type LookupAddressResult, type OTPLoginParams, type OTPLoginResponse, type OTPSignupParams, type OTPSignupResponse, type OTPVerifyParams, type OTPVerifyResponse, type Product, type ProductBillingInterval, type ProductBillingType, type ProductOption, type ProductStatus, type ProductVariant, type ProductWithoutVariants, type RetrieveCollectionParams, type RetrieveDiscountParams, type RetrieveProductParams, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -93,13 +93,19 @@ interface CheckoutSession {
|
|
|
93
93
|
type AutosuggestAddressResult = {
|
|
94
94
|
id: string;
|
|
95
95
|
title: string;
|
|
96
|
-
|
|
96
|
+
address: {
|
|
97
|
+
label: string;
|
|
98
|
+
};
|
|
97
99
|
position: {
|
|
98
100
|
lat: number;
|
|
99
101
|
lng: number;
|
|
100
102
|
};
|
|
101
103
|
};
|
|
102
|
-
type
|
|
104
|
+
type LookupAddressResult = {
|
|
105
|
+
id: string;
|
|
106
|
+
title: string;
|
|
107
|
+
address: Pick<Address, "line1" | "city" | "province" | "provinceCode" | "country" | "countryCode" | "zipCode">;
|
|
108
|
+
};
|
|
103
109
|
|
|
104
110
|
type SortOrder = "asc" | "desc";
|
|
105
111
|
type GetListParams<A, B> = {
|
|
@@ -518,16 +524,10 @@ declare class Client {
|
|
|
518
524
|
longitude?: string;
|
|
519
525
|
countryCode?: string;
|
|
520
526
|
}): Promise<AutosuggestAddressResult[]>;
|
|
521
|
-
|
|
522
|
-
* Get geocode address results
|
|
523
|
-
*/
|
|
524
|
-
getGeocodeAddressResults(clientSecret: string, params: {
|
|
527
|
+
lookupAddress(clientSecret: string, params: {
|
|
525
528
|
id: string;
|
|
526
|
-
title: string;
|
|
527
|
-
position: AutosuggestAddressResult["position"];
|
|
528
|
-
countryCode: string;
|
|
529
529
|
locale?: string;
|
|
530
|
-
}): Promise<
|
|
530
|
+
}): Promise<LookupAddressResult>;
|
|
531
531
|
}
|
|
532
532
|
|
|
533
533
|
declare class Collections {
|
|
@@ -601,4 +601,4 @@ declare function createStoreHelpers(config?: {
|
|
|
601
601
|
proxy?: string;
|
|
602
602
|
}): Helpers;
|
|
603
603
|
|
|
604
|
-
export { type Address, type AutosuggestAddressResult, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerSession, type CustomerSubscription, type CustomerSubscriptionUpdateParams, type CustomerUpdateParams, type Discount, type
|
|
604
|
+
export { type Address, type AutosuggestAddressResult, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerSession, type CustomerSubscription, type CustomerSubscriptionUpdateParams, type CustomerUpdateParams, type Discount, type LineItem, type LineItemCreate, type ListCollectionsParams, type ListCollectionsQuery, type ListCollectionsSortBy, type ListDiscountsParams, type ListDiscountsQuery, type ListDiscountsSortBy, type ListProductsParams, type ListProductsQuery, type ListProductsSortBy, type LookupAddressResult, type OTPLoginParams, type OTPLoginResponse, type OTPSignupParams, type OTPSignupResponse, type OTPVerifyParams, type OTPVerifyResponse, type Product, type ProductBillingInterval, type ProductBillingType, type ProductOption, type ProductStatus, type ProductVariant, type ProductWithoutVariants, type RetrieveCollectionParams, type RetrieveDiscountParams, type RetrieveProductParams, type ShippingRate, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
|
package/dist/index.js
CHANGED
|
@@ -420,18 +420,10 @@ var Client = class {
|
|
|
420
420
|
});
|
|
421
421
|
return data;
|
|
422
422
|
}
|
|
423
|
-
|
|
424
|
-
* Get geocode address results
|
|
425
|
-
*/
|
|
426
|
-
async getGeocodeAddressResults(clientSecret, params) {
|
|
423
|
+
async lookupAddress(clientSecret, params) {
|
|
427
424
|
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
428
|
-
const {
|
|
429
|
-
|
|
430
|
-
params: {
|
|
431
|
-
...rest,
|
|
432
|
-
lat: position.lat,
|
|
433
|
-
lng: position.lng
|
|
434
|
-
}
|
|
425
|
+
const { data } = await apiClient.get("/helpers/lookup-address", {
|
|
426
|
+
params
|
|
435
427
|
});
|
|
436
428
|
return data;
|
|
437
429
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -382,18 +382,10 @@ var Client = class {
|
|
|
382
382
|
});
|
|
383
383
|
return data;
|
|
384
384
|
}
|
|
385
|
-
|
|
386
|
-
* Get geocode address results
|
|
387
|
-
*/
|
|
388
|
-
async getGeocodeAddressResults(clientSecret, params) {
|
|
385
|
+
async lookupAddress(clientSecret, params) {
|
|
389
386
|
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
390
|
-
const {
|
|
391
|
-
|
|
392
|
-
params: {
|
|
393
|
-
...rest,
|
|
394
|
-
lat: position.lat,
|
|
395
|
-
lng: position.lng
|
|
396
|
-
}
|
|
387
|
+
const { data } = await apiClient.get("/helpers/lookup-address", {
|
|
388
|
+
params
|
|
397
389
|
});
|
|
398
390
|
return data;
|
|
399
391
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@betterstore/sdk",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.16",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"tsup": "^8.4.0",
|
|
15
15
|
"eslint": "^9.29.0",
|
|
16
16
|
"typescript": "5.8.2",
|
|
17
|
-
"@betterstore/
|
|
18
|
-
"@betterstore/
|
|
17
|
+
"@betterstore/eslint-config": "0.0.0",
|
|
18
|
+
"@betterstore/typescript-config": "0.0.0"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"axios": "^1.8.2",
|