@betterstore/sdk 0.5.14 → 0.5.15
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 +2 -13
- package/dist/index.d.ts +2 -13
- package/dist/index.js +0 -15
- package/dist/index.mjs +0 -15
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -93,13 +93,12 @@ interface CheckoutSession {
|
|
|
93
93
|
type AutosuggestAddressResult = {
|
|
94
94
|
id: string;
|
|
95
95
|
title: string;
|
|
96
|
-
|
|
96
|
+
address: Pick<Address, "line1" | "line2" | "city" | "province" | "provinceCode" | "country" | "countryCode" | "zipCode">;
|
|
97
97
|
position: {
|
|
98
98
|
lat: number;
|
|
99
99
|
lng: number;
|
|
100
100
|
};
|
|
101
101
|
};
|
|
102
|
-
type GeocodeAddressResult = Omit<AutosuggestAddressResult, "position"> & Pick<Address, "line1" | "line2" | "city" | "province" | "provinceCode" | "country" | "countryCode" | "zipCode">;
|
|
103
102
|
|
|
104
103
|
type SortOrder = "asc" | "desc";
|
|
105
104
|
type GetListParams<A, B> = {
|
|
@@ -518,16 +517,6 @@ declare class Client {
|
|
|
518
517
|
longitude?: string;
|
|
519
518
|
countryCode?: string;
|
|
520
519
|
}): Promise<AutosuggestAddressResult[]>;
|
|
521
|
-
/**
|
|
522
|
-
* Get geocode address results
|
|
523
|
-
*/
|
|
524
|
-
getGeocodeAddressResults(clientSecret: string, params: {
|
|
525
|
-
id: string;
|
|
526
|
-
title: string;
|
|
527
|
-
position: AutosuggestAddressResult["position"];
|
|
528
|
-
countryCode: string;
|
|
529
|
-
locale?: string;
|
|
530
|
-
}): Promise<GeocodeAddressResult[]>;
|
|
531
520
|
}
|
|
532
521
|
|
|
533
522
|
declare class Collections {
|
|
@@ -601,4 +590,4 @@ declare function createStoreHelpers(config?: {
|
|
|
601
590
|
proxy?: string;
|
|
602
591
|
}): Helpers;
|
|
603
592
|
|
|
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
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -93,13 +93,12 @@ interface CheckoutSession {
|
|
|
93
93
|
type AutosuggestAddressResult = {
|
|
94
94
|
id: string;
|
|
95
95
|
title: string;
|
|
96
|
-
|
|
96
|
+
address: Pick<Address, "line1" | "line2" | "city" | "province" | "provinceCode" | "country" | "countryCode" | "zipCode">;
|
|
97
97
|
position: {
|
|
98
98
|
lat: number;
|
|
99
99
|
lng: number;
|
|
100
100
|
};
|
|
101
101
|
};
|
|
102
|
-
type GeocodeAddressResult = Omit<AutosuggestAddressResult, "position"> & Pick<Address, "line1" | "line2" | "city" | "province" | "provinceCode" | "country" | "countryCode" | "zipCode">;
|
|
103
102
|
|
|
104
103
|
type SortOrder = "asc" | "desc";
|
|
105
104
|
type GetListParams<A, B> = {
|
|
@@ -518,16 +517,6 @@ declare class Client {
|
|
|
518
517
|
longitude?: string;
|
|
519
518
|
countryCode?: string;
|
|
520
519
|
}): Promise<AutosuggestAddressResult[]>;
|
|
521
|
-
/**
|
|
522
|
-
* Get geocode address results
|
|
523
|
-
*/
|
|
524
|
-
getGeocodeAddressResults(clientSecret: string, params: {
|
|
525
|
-
id: string;
|
|
526
|
-
title: string;
|
|
527
|
-
position: AutosuggestAddressResult["position"];
|
|
528
|
-
countryCode: string;
|
|
529
|
-
locale?: string;
|
|
530
|
-
}): Promise<GeocodeAddressResult[]>;
|
|
531
520
|
}
|
|
532
521
|
|
|
533
522
|
declare class Collections {
|
|
@@ -601,4 +590,4 @@ declare function createStoreHelpers(config?: {
|
|
|
601
590
|
proxy?: string;
|
|
602
591
|
}): Helpers;
|
|
603
592
|
|
|
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
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -420,21 +420,6 @@ var Client = class {
|
|
|
420
420
|
});
|
|
421
421
|
return data;
|
|
422
422
|
}
|
|
423
|
-
/**
|
|
424
|
-
* Get geocode address results
|
|
425
|
-
*/
|
|
426
|
-
async getGeocodeAddressResults(clientSecret, params) {
|
|
427
|
-
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
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
|
-
});
|
|
436
|
-
return data;
|
|
437
|
-
}
|
|
438
423
|
};
|
|
439
424
|
var client_default = Client;
|
|
440
425
|
|
package/dist/index.mjs
CHANGED
|
@@ -382,21 +382,6 @@ var Client = class {
|
|
|
382
382
|
});
|
|
383
383
|
return data;
|
|
384
384
|
}
|
|
385
|
-
/**
|
|
386
|
-
* Get geocode address results
|
|
387
|
-
*/
|
|
388
|
-
async getGeocodeAddressResults(clientSecret, params) {
|
|
389
|
-
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
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
|
-
});
|
|
398
|
-
return data;
|
|
399
|
-
}
|
|
400
385
|
};
|
|
401
386
|
var client_default = Client;
|
|
402
387
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@betterstore/sdk",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.15",
|
|
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",
|