@betterstore/sdk 0.5.15 → 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 +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +7 -0
- package/dist/index.mjs +7 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -93,12 +93,19 @@ interface CheckoutSession {
|
|
|
93
93
|
type AutosuggestAddressResult = {
|
|
94
94
|
id: string;
|
|
95
95
|
title: string;
|
|
96
|
-
address:
|
|
96
|
+
address: {
|
|
97
|
+
label: string;
|
|
98
|
+
};
|
|
97
99
|
position: {
|
|
98
100
|
lat: number;
|
|
99
101
|
lng: number;
|
|
100
102
|
};
|
|
101
103
|
};
|
|
104
|
+
type LookupAddressResult = {
|
|
105
|
+
id: string;
|
|
106
|
+
title: string;
|
|
107
|
+
address: Pick<Address, "line1" | "city" | "province" | "provinceCode" | "country" | "countryCode" | "zipCode">;
|
|
108
|
+
};
|
|
102
109
|
|
|
103
110
|
type SortOrder = "asc" | "desc";
|
|
104
111
|
type GetListParams<A, B> = {
|
|
@@ -517,6 +524,10 @@ declare class Client {
|
|
|
517
524
|
longitude?: string;
|
|
518
525
|
countryCode?: string;
|
|
519
526
|
}): Promise<AutosuggestAddressResult[]>;
|
|
527
|
+
lookupAddress(clientSecret: string, params: {
|
|
528
|
+
id: string;
|
|
529
|
+
locale?: string;
|
|
530
|
+
}): Promise<LookupAddressResult>;
|
|
520
531
|
}
|
|
521
532
|
|
|
522
533
|
declare class Collections {
|
|
@@ -590,4 +601,4 @@ declare function createStoreHelpers(config?: {
|
|
|
590
601
|
proxy?: string;
|
|
591
602
|
}): Helpers;
|
|
592
603
|
|
|
593
|
-
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 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 };
|
|
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,12 +93,19 @@ interface CheckoutSession {
|
|
|
93
93
|
type AutosuggestAddressResult = {
|
|
94
94
|
id: string;
|
|
95
95
|
title: string;
|
|
96
|
-
address:
|
|
96
|
+
address: {
|
|
97
|
+
label: string;
|
|
98
|
+
};
|
|
97
99
|
position: {
|
|
98
100
|
lat: number;
|
|
99
101
|
lng: number;
|
|
100
102
|
};
|
|
101
103
|
};
|
|
104
|
+
type LookupAddressResult = {
|
|
105
|
+
id: string;
|
|
106
|
+
title: string;
|
|
107
|
+
address: Pick<Address, "line1" | "city" | "province" | "provinceCode" | "country" | "countryCode" | "zipCode">;
|
|
108
|
+
};
|
|
102
109
|
|
|
103
110
|
type SortOrder = "asc" | "desc";
|
|
104
111
|
type GetListParams<A, B> = {
|
|
@@ -517,6 +524,10 @@ declare class Client {
|
|
|
517
524
|
longitude?: string;
|
|
518
525
|
countryCode?: string;
|
|
519
526
|
}): Promise<AutosuggestAddressResult[]>;
|
|
527
|
+
lookupAddress(clientSecret: string, params: {
|
|
528
|
+
id: string;
|
|
529
|
+
locale?: string;
|
|
530
|
+
}): Promise<LookupAddressResult>;
|
|
520
531
|
}
|
|
521
532
|
|
|
522
533
|
declare class Collections {
|
|
@@ -590,4 +601,4 @@ declare function createStoreHelpers(config?: {
|
|
|
590
601
|
proxy?: string;
|
|
591
602
|
}): Helpers;
|
|
592
603
|
|
|
593
|
-
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 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 };
|
|
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,6 +420,13 @@ var Client = class {
|
|
|
420
420
|
});
|
|
421
421
|
return data;
|
|
422
422
|
}
|
|
423
|
+
async lookupAddress(clientSecret, params) {
|
|
424
|
+
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
425
|
+
const { data } = await apiClient.get("/helpers/lookup-address", {
|
|
426
|
+
params
|
|
427
|
+
});
|
|
428
|
+
return data;
|
|
429
|
+
}
|
|
423
430
|
};
|
|
424
431
|
var client_default = Client;
|
|
425
432
|
|
package/dist/index.mjs
CHANGED
|
@@ -382,6 +382,13 @@ var Client = class {
|
|
|
382
382
|
});
|
|
383
383
|
return data;
|
|
384
384
|
}
|
|
385
|
+
async lookupAddress(clientSecret, params) {
|
|
386
|
+
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
387
|
+
const { data } = await apiClient.get("/helpers/lookup-address", {
|
|
388
|
+
params
|
|
389
|
+
});
|
|
390
|
+
return data;
|
|
391
|
+
}
|
|
385
392
|
};
|
|
386
393
|
var client_default = Client;
|
|
387
394
|
|