@betterstore/sdk 0.6.4 → 0.6.6
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OTPSignupParams, OTPSignupResponse, OTPLoginParams, OTPLoginResponse, OTPVerifyParams, OTPVerifyResponse, CustomerSession, CheckoutCreateParams, CheckoutSession, CheckoutUpdateParams, GetShippingRatesResponse, CustomerCreateParams, CustomerResponse, CustomerUpdateParams, AutosuggestAddressResult, LookupAddressResult, ListCollectionsParams, ListCollectionsResponse, RetrieveCollectionParams, RetrieveCollectionResponse, CustomerSubscriptionUpdateParams, CustomerSubscription, ListDiscountsParams, ListDiscountsResponse, RetrieveDiscountParams, RetrieveDiscountResponse, ListProductsParams, ListProductsResponse, RetrieveProductParams, RetrieveProductResponse } from '@betterstore/bridge';
|
|
2
|
-
export { Address, AutosuggestAddressResult, CheckoutCreateParams, CheckoutSession, CheckoutUpdateParams, CustomShippingVendorRate, CustomerCreateParams, CustomerResponse, CustomerSession, CustomerSubscription, CustomerSubscriptionUpdateParams, CustomerUpdateParams, GetShippingRatesResponse, ListCollectionsParams, ListCollectionsResponse, ListDiscountsParams, ListDiscountsResponse, ListProductsParams, ListProductsResponse, LookupAddressResult, OTPLoginParams, OTPLoginResponse, OTPSignupParams, OTPSignupResponse, OTPVerifyParams, OTPVerifyResponse,
|
|
2
|
+
export { Address, AutosuggestAddressResult, CheckoutCreateParams, CheckoutSession, CheckoutUpdateParams, CustomShippingVendorRate, CustomerCreateParams, CustomerResponse, CustomerSession, CustomerSubscription, CustomerSubscriptionUpdateParams, CustomerUpdateParams, GetShippingRatesResponse, ListCollectionsParams, ListCollectionsResponse, ListDiscountsParams, ListDiscountsResponse, ListProductsParams, ListProductsResponse, LookupAddressResult, OTPLoginParams, OTPLoginResponse, OTPSignupParams, OTPSignupResponse, OTPVerifyParams, OTPVerifyResponse, ProductOption, RetrieveCollectionParams, RetrieveCollectionResponse, RetrieveDiscountParams, RetrieveDiscountResponse, RetrieveProductParams, RetrieveProductResponse, VariantOption, formatCurrency, formatPrice } from '@betterstore/bridge';
|
|
3
3
|
import axios from 'axios';
|
|
4
4
|
import * as _betterstore_bridge_generated_prisma_client from '@betterstore/bridge/generated/prisma/client';
|
|
5
5
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OTPSignupParams, OTPSignupResponse, OTPLoginParams, OTPLoginResponse, OTPVerifyParams, OTPVerifyResponse, CustomerSession, CheckoutCreateParams, CheckoutSession, CheckoutUpdateParams, GetShippingRatesResponse, CustomerCreateParams, CustomerResponse, CustomerUpdateParams, AutosuggestAddressResult, LookupAddressResult, ListCollectionsParams, ListCollectionsResponse, RetrieveCollectionParams, RetrieveCollectionResponse, CustomerSubscriptionUpdateParams, CustomerSubscription, ListDiscountsParams, ListDiscountsResponse, RetrieveDiscountParams, RetrieveDiscountResponse, ListProductsParams, ListProductsResponse, RetrieveProductParams, RetrieveProductResponse } from '@betterstore/bridge';
|
|
2
|
-
export { Address, AutosuggestAddressResult, CheckoutCreateParams, CheckoutSession, CheckoutUpdateParams, CustomShippingVendorRate, CustomerCreateParams, CustomerResponse, CustomerSession, CustomerSubscription, CustomerSubscriptionUpdateParams, CustomerUpdateParams, GetShippingRatesResponse, ListCollectionsParams, ListCollectionsResponse, ListDiscountsParams, ListDiscountsResponse, ListProductsParams, ListProductsResponse, LookupAddressResult, OTPLoginParams, OTPLoginResponse, OTPSignupParams, OTPSignupResponse, OTPVerifyParams, OTPVerifyResponse,
|
|
2
|
+
export { Address, AutosuggestAddressResult, CheckoutCreateParams, CheckoutSession, CheckoutUpdateParams, CustomShippingVendorRate, CustomerCreateParams, CustomerResponse, CustomerSession, CustomerSubscription, CustomerSubscriptionUpdateParams, CustomerUpdateParams, GetShippingRatesResponse, ListCollectionsParams, ListCollectionsResponse, ListDiscountsParams, ListDiscountsResponse, ListProductsParams, ListProductsResponse, LookupAddressResult, OTPLoginParams, OTPLoginResponse, OTPSignupParams, OTPSignupResponse, OTPVerifyParams, OTPVerifyResponse, ProductOption, RetrieveCollectionParams, RetrieveCollectionResponse, RetrieveDiscountParams, RetrieveDiscountResponse, RetrieveProductParams, RetrieveProductResponse, VariantOption, formatCurrency, formatPrice } from '@betterstore/bridge';
|
|
3
3
|
import axios from 'axios';
|
|
4
4
|
import * as _betterstore_bridge_generated_prisma_client from '@betterstore/bridge/generated/prisma/client';
|
|
5
5
|
|
package/dist/index.js
CHANGED
|
@@ -439,7 +439,7 @@ var Collections = class {
|
|
|
439
439
|
this.apiClient = createApiClient(apiKey, proxy);
|
|
440
440
|
}
|
|
441
441
|
async list(params) {
|
|
442
|
-
const data = await this.apiClient.post(`/collections`, params);
|
|
442
|
+
const data = await this.apiClient.post(`/collections`, params ?? {});
|
|
443
443
|
if (!data || !Array.isArray(data) || "isError" in data && data.isError || !("collections" in data)) {
|
|
444
444
|
return [];
|
|
445
445
|
}
|
|
@@ -533,7 +533,7 @@ var Discounts = class {
|
|
|
533
533
|
async list(params) {
|
|
534
534
|
const data = await this.apiClient.post(
|
|
535
535
|
"/discounts",
|
|
536
|
-
params
|
|
536
|
+
params ?? {}
|
|
537
537
|
);
|
|
538
538
|
if (!data || !Array.isArray(data) || "isError" in data && data.isError || !("discounts" in data)) {
|
|
539
539
|
return [];
|
|
@@ -563,7 +563,7 @@ var Products = class {
|
|
|
563
563
|
async list(params) {
|
|
564
564
|
const data = await this.apiClient.post(
|
|
565
565
|
"/products",
|
|
566
|
-
params
|
|
566
|
+
params ?? {}
|
|
567
567
|
);
|
|
568
568
|
if (!data || !Array.isArray(data) || "isError" in data && data.isError || !("products" in data)) {
|
|
569
569
|
return [];
|
package/dist/index.mjs
CHANGED
|
@@ -399,7 +399,7 @@ var Collections = class {
|
|
|
399
399
|
this.apiClient = createApiClient(apiKey, proxy);
|
|
400
400
|
}
|
|
401
401
|
async list(params) {
|
|
402
|
-
const data = await this.apiClient.post(`/collections`, params);
|
|
402
|
+
const data = await this.apiClient.post(`/collections`, params ?? {});
|
|
403
403
|
if (!data || !Array.isArray(data) || "isError" in data && data.isError || !("collections" in data)) {
|
|
404
404
|
return [];
|
|
405
405
|
}
|
|
@@ -493,7 +493,7 @@ var Discounts = class {
|
|
|
493
493
|
async list(params) {
|
|
494
494
|
const data = await this.apiClient.post(
|
|
495
495
|
"/discounts",
|
|
496
|
-
params
|
|
496
|
+
params ?? {}
|
|
497
497
|
);
|
|
498
498
|
if (!data || !Array.isArray(data) || "isError" in data && data.isError || !("discounts" in data)) {
|
|
499
499
|
return [];
|
|
@@ -523,7 +523,7 @@ var Products = class {
|
|
|
523
523
|
async list(params) {
|
|
524
524
|
const data = await this.apiClient.post(
|
|
525
525
|
"/products",
|
|
526
|
-
params
|
|
526
|
+
params ?? {}
|
|
527
527
|
);
|
|
528
528
|
if (!data || !Array.isArray(data) || "isError" in data && data.isError || !("products" in data)) {
|
|
529
529
|
return [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@betterstore/sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@betterstore/typescript-config": "0.0.0"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@betterstore/bridge": "^0.0.
|
|
21
|
+
"@betterstore/bridge": "^0.0.25",
|
|
22
22
|
"axios": "^1.8.2",
|
|
23
23
|
"zod": "^3.24.2"
|
|
24
24
|
},
|