@betterstore/sdk 0.3.71 → 0.3.72

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @betterstore/sdk
2
2
 
3
+ ## 0.3.72
4
+
5
+ ### Patch Changes
6
+
7
+ - bug fixes
8
+
3
9
  ## 0.3.71
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -137,14 +137,36 @@ interface CustomerSubscription {
137
137
  }
138
138
  type CustomerSubscriptionUpdateParams = Partial<Pick<CustomerSubscription, "cancelAtPeriodEnd">>;
139
139
 
140
- interface Discount$1 {
140
+ interface Discount {
141
141
  id: string;
142
- title: string;
143
- description?: string;
144
- images: string[];
145
- seoPageTitle?: string;
146
- seoDescription?: string;
147
- seoHandle?: string;
142
+ createdAt: Date;
143
+ updatedAt: Date;
144
+ type: "AMOUNT_OFF_PRODUCTS" | "BUY_X_GET_Y" | "AMOUNT_OFF_ORDER" | "FREE_SHIPPING";
145
+ method: "CODE" | "AUTOMATIC";
146
+ code?: string | null;
147
+ title?: string | null;
148
+ value: number;
149
+ valueType: "PERCENTAGE" | "FIXED_AMOUNT" | "FREE";
150
+ discountScope: "PRODUCTS" | "COLLECTIONS";
151
+ allowedProductIDs: string[];
152
+ allowedCollectionIDs: string[];
153
+ allowedCombinations: ("ORDER" | "PRODUCT" | "SHIPPING")[];
154
+ minimumRequirementsType: "NONE" | "MINIMUM_ORDER_AMOUNT" | "MINIMUM_PRODUCT_QUANTITY";
155
+ minimumRequirementsValue?: number | null;
156
+ requiredProductIDs: string[];
157
+ requiredCollectionIDs: string[];
158
+ minimumRequirementsScope: "PRODUCTS" | "COLLECTIONS";
159
+ maxUses?: number | null;
160
+ maxUsesPerCustomer?: number | null;
161
+ maxAllowedProductQuantity?: number | null;
162
+ uses: number;
163
+ subscriptionDiscountDurationType: "ONE_TIME" | "RECURRING" | "FOREVER";
164
+ subscriptionDiscountDurationValue: number;
165
+ stripeDiscountId?: string | null;
166
+ startsAt: Date;
167
+ expiresAt?: Date | null;
168
+ status: "ACTIVE" | "EXPIRED" | "SCHEDULED";
169
+ organizationId: string;
148
170
  }
149
171
  type RetrieveDiscountParams = {
150
172
  id: string;
@@ -212,37 +234,6 @@ type ShipmentData = {
212
234
  trackingId?: string;
213
235
  trackingUrl?: string;
214
236
  };
215
- type Discount = {
216
- id: string;
217
- createdAt: Date;
218
- updatedAt: Date;
219
- type: "AMOUNT_OFF_PRODUCTS" | "BUY_X_GET_Y" | "AMOUNT_OFF_ORDER" | "FREE_SHIPPING";
220
- method: "CODE" | "AUTOMATIC";
221
- code?: string | null;
222
- title?: string | null;
223
- value: number;
224
- valueType: "PERCENTAGE" | "FIXED_AMOUNT" | "FREE";
225
- discountScope: "PRODUCTS" | "COLLECTIONS";
226
- allowedProductIDs: string[];
227
- allowedCollectionIDs: string[];
228
- allowedCombinations: ("ORDER" | "PRODUCT" | "SHIPPING")[];
229
- minimumRequirementsType: "NONE" | "MINIMUM_ORDER_AMOUNT" | "MINIMUM_PRODUCT_QUANTITY";
230
- minimumRequirementsValue?: number | null;
231
- requiredProductIDs: string[];
232
- requiredCollectionIDs: string[];
233
- minimumRequirementsScope: "PRODUCTS" | "COLLECTIONS";
234
- maxUses?: number | null;
235
- maxUsesPerCustomer?: number | null;
236
- maxAllowedProductQuantity?: number | null;
237
- uses: number;
238
- subscriptionDiscountDurationType: "ONE_TIME" | "RECURRING" | "FOREVER";
239
- subscriptionDiscountDurationValue: number;
240
- stripeDiscountId?: string | null;
241
- startsAt: Date;
242
- expiresAt?: Date | null;
243
- status: "ACTIVE" | "EXPIRED" | "SCHEDULED";
244
- organizationId: string;
245
- };
246
237
  interface CheckoutSession {
247
238
  id: string;
248
239
  testmode: boolean;
@@ -399,8 +390,8 @@ declare class Customer {
399
390
  declare class Discounts {
400
391
  private apiClient;
401
392
  constructor(apiKey: string, proxy?: string);
402
- list(): Promise<Discount$1[]>;
403
- retrieve(params: RetrieveDiscountParams): Promise<Discount$1 | null>;
393
+ list(): Promise<Discount[]>;
394
+ retrieve(params: RetrieveDiscountParams): Promise<Discount | null>;
404
395
  }
405
396
 
406
397
  declare class Helpers {
@@ -435,4 +426,4 @@ declare function createStoreHelpers(config?: {
435
426
  proxy?: string;
436
427
  }): Helpers;
437
428
 
438
- export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerSubscription, type CustomerSubscriptionUpdateParams, type CustomerUpdateParams, type Discount$1 as Discount, type LineItem, type LineItemCreate, type ListProductsParams, type ListProductsQuery, type Product, type ProductBillingInterval, type ProductBillingType, type ProductOption, type ProductStatus, type ProductVariant, type ProductWithoutVariants, type RetrieveCollectionParams, type RetrieveDiscountParams, type RetrieveProductParams, type ShippingRate, type SortBy, type SortOrder, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
429
+ export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerSubscription, type CustomerSubscriptionUpdateParams, type CustomerUpdateParams, type Discount, type LineItem, type LineItemCreate, type ListProductsParams, type ListProductsQuery, type Product, type ProductBillingInterval, type ProductBillingType, type ProductOption, type ProductStatus, type ProductVariant, type ProductWithoutVariants, type RetrieveCollectionParams, type RetrieveDiscountParams, type RetrieveProductParams, type ShippingRate, type SortBy, type SortOrder, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
package/dist/index.d.ts CHANGED
@@ -137,14 +137,36 @@ interface CustomerSubscription {
137
137
  }
138
138
  type CustomerSubscriptionUpdateParams = Partial<Pick<CustomerSubscription, "cancelAtPeriodEnd">>;
139
139
 
140
- interface Discount$1 {
140
+ interface Discount {
141
141
  id: string;
142
- title: string;
143
- description?: string;
144
- images: string[];
145
- seoPageTitle?: string;
146
- seoDescription?: string;
147
- seoHandle?: string;
142
+ createdAt: Date;
143
+ updatedAt: Date;
144
+ type: "AMOUNT_OFF_PRODUCTS" | "BUY_X_GET_Y" | "AMOUNT_OFF_ORDER" | "FREE_SHIPPING";
145
+ method: "CODE" | "AUTOMATIC";
146
+ code?: string | null;
147
+ title?: string | null;
148
+ value: number;
149
+ valueType: "PERCENTAGE" | "FIXED_AMOUNT" | "FREE";
150
+ discountScope: "PRODUCTS" | "COLLECTIONS";
151
+ allowedProductIDs: string[];
152
+ allowedCollectionIDs: string[];
153
+ allowedCombinations: ("ORDER" | "PRODUCT" | "SHIPPING")[];
154
+ minimumRequirementsType: "NONE" | "MINIMUM_ORDER_AMOUNT" | "MINIMUM_PRODUCT_QUANTITY";
155
+ minimumRequirementsValue?: number | null;
156
+ requiredProductIDs: string[];
157
+ requiredCollectionIDs: string[];
158
+ minimumRequirementsScope: "PRODUCTS" | "COLLECTIONS";
159
+ maxUses?: number | null;
160
+ maxUsesPerCustomer?: number | null;
161
+ maxAllowedProductQuantity?: number | null;
162
+ uses: number;
163
+ subscriptionDiscountDurationType: "ONE_TIME" | "RECURRING" | "FOREVER";
164
+ subscriptionDiscountDurationValue: number;
165
+ stripeDiscountId?: string | null;
166
+ startsAt: Date;
167
+ expiresAt?: Date | null;
168
+ status: "ACTIVE" | "EXPIRED" | "SCHEDULED";
169
+ organizationId: string;
148
170
  }
149
171
  type RetrieveDiscountParams = {
150
172
  id: string;
@@ -212,37 +234,6 @@ type ShipmentData = {
212
234
  trackingId?: string;
213
235
  trackingUrl?: string;
214
236
  };
215
- type Discount = {
216
- id: string;
217
- createdAt: Date;
218
- updatedAt: Date;
219
- type: "AMOUNT_OFF_PRODUCTS" | "BUY_X_GET_Y" | "AMOUNT_OFF_ORDER" | "FREE_SHIPPING";
220
- method: "CODE" | "AUTOMATIC";
221
- code?: string | null;
222
- title?: string | null;
223
- value: number;
224
- valueType: "PERCENTAGE" | "FIXED_AMOUNT" | "FREE";
225
- discountScope: "PRODUCTS" | "COLLECTIONS";
226
- allowedProductIDs: string[];
227
- allowedCollectionIDs: string[];
228
- allowedCombinations: ("ORDER" | "PRODUCT" | "SHIPPING")[];
229
- minimumRequirementsType: "NONE" | "MINIMUM_ORDER_AMOUNT" | "MINIMUM_PRODUCT_QUANTITY";
230
- minimumRequirementsValue?: number | null;
231
- requiredProductIDs: string[];
232
- requiredCollectionIDs: string[];
233
- minimumRequirementsScope: "PRODUCTS" | "COLLECTIONS";
234
- maxUses?: number | null;
235
- maxUsesPerCustomer?: number | null;
236
- maxAllowedProductQuantity?: number | null;
237
- uses: number;
238
- subscriptionDiscountDurationType: "ONE_TIME" | "RECURRING" | "FOREVER";
239
- subscriptionDiscountDurationValue: number;
240
- stripeDiscountId?: string | null;
241
- startsAt: Date;
242
- expiresAt?: Date | null;
243
- status: "ACTIVE" | "EXPIRED" | "SCHEDULED";
244
- organizationId: string;
245
- };
246
237
  interface CheckoutSession {
247
238
  id: string;
248
239
  testmode: boolean;
@@ -399,8 +390,8 @@ declare class Customer {
399
390
  declare class Discounts {
400
391
  private apiClient;
401
392
  constructor(apiKey: string, proxy?: string);
402
- list(): Promise<Discount$1[]>;
403
- retrieve(params: RetrieveDiscountParams): Promise<Discount$1 | null>;
393
+ list(): Promise<Discount[]>;
394
+ retrieve(params: RetrieveDiscountParams): Promise<Discount | null>;
404
395
  }
405
396
 
406
397
  declare class Helpers {
@@ -435,4 +426,4 @@ declare function createStoreHelpers(config?: {
435
426
  proxy?: string;
436
427
  }): Helpers;
437
428
 
438
- export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerSubscription, type CustomerSubscriptionUpdateParams, type CustomerUpdateParams, type Discount$1 as Discount, type LineItem, type LineItemCreate, type ListProductsParams, type ListProductsQuery, type Product, type ProductBillingInterval, type ProductBillingType, type ProductOption, type ProductStatus, type ProductVariant, type ProductWithoutVariants, type RetrieveCollectionParams, type RetrieveDiscountParams, type RetrieveProductParams, type ShippingRate, type SortBy, type SortOrder, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
429
+ export { type Address, type CheckoutCreateParams, type CheckoutSession, type CheckoutUpdateParams, type Collection, type CollectionWithProducts, type Currency, type Customer$1 as Customer, type CustomerCreateParams, type CustomerSubscription, type CustomerSubscriptionUpdateParams, type CustomerUpdateParams, type Discount, type LineItem, type LineItemCreate, type ListProductsParams, type ListProductsQuery, type Product, type ProductBillingInterval, type ProductBillingType, type ProductOption, type ProductStatus, type ProductVariant, type ProductWithoutVariants, type RetrieveCollectionParams, type RetrieveDiscountParams, type RetrieveProductParams, type ShippingRate, type SortBy, type SortOrder, type VariantOption, createStoreClient, createStoreHelpers, createBetterStore as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.3.71",
3
+ "version": "0.3.72",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {