@artisan-commerce/types 0.14.0-canary.31 → 0.14.0-canary.33

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
@@ -3,6 +3,24 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.14.0-canary.33](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.32...@artisan-commerce/types@0.14.0-canary.33) (2022-03-07)
7
+
8
+ **Note:** Version bump only for package @artisan-commerce/types
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.14.0-canary.32](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.31...@artisan-commerce/types@0.14.0-canary.32) (2022-02-03)
15
+
16
+
17
+ ### Features
18
+
19
+ * **benefit:** add handle to discount_fixed ([b2f2381](https://bitbucket.org/tradesystem/artisn_sdk/commit/b2f23811e8a54018f4056f9d8593d035f86dd499))
20
+ * **benefit:** update applyBenefit service ([d393665](https://bitbucket.org/tradesystem/artisn_sdk/commit/d393665edd5de83002d95e7e52a301c1e3631704))
21
+
22
+
23
+
6
24
  ## [0.14.0-canary.31](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.30...@artisan-commerce/types@0.14.0-canary.31) (2022-01-14)
7
25
 
8
26
 
package/dist/bundle.d.ts CHANGED
@@ -487,6 +487,13 @@ interface CountrySummary {
487
487
  * @since 0.5.14
488
488
  */
489
489
  declare type BaseWeekDay = "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY";
490
+ /**
491
+ * Common additional information.
492
+ *
493
+ * @typedef AdditionalInfo
494
+ * @since 0.1.0
495
+ */
496
+ declare type AdditionalInfo = Record<string, any>;
490
497
 
491
498
  /**
492
499
  * Representation of a Commerce Vendor.
@@ -798,9 +805,9 @@ interface ShippingCostTax {
798
805
  * Representation of a Commerce Shopping Cart.
799
806
  *
800
807
  * @interface ShoppingCart
801
- * @since 0.5.14
808
+ * @since 0.1.0
802
809
  */
803
- interface ShoppingCart {
810
+ interface ShoppingCart<T extends AdditionalInfo = AdditionalInfo> {
804
811
  /** Shopping cart unique identifier */
805
812
  id: string;
806
813
  /** Shopping cart name */
@@ -822,7 +829,7 @@ interface ShoppingCart {
822
829
  /** Shopping cart shipping cost */
823
830
  shippingCost: ShippingCost | null;
824
831
  /** Shopping cart additional info */
825
- additional_info?: Record<string, any>;
832
+ additional_info?: T;
826
833
  /** Shopping cart bill total */
827
834
  billTotal: BillTotal;
828
835
  /** Shopping cart applied benefits */
@@ -1253,7 +1260,9 @@ interface Benefit {
1253
1260
  /** Benefit description */
1254
1261
  description: string;
1255
1262
  /** Benefit discount percentage */
1256
- discountPercentage: number;
1263
+ discountPercentage: number | null;
1264
+ /** Benefit discount fixed */
1265
+ discountFixed: string | null;
1257
1266
  /** Benefit expiration date */
1258
1267
  expirationDate: string;
1259
1268
  /** External benefit id */
@@ -1330,9 +1339,9 @@ declare type BenefitsByUserNodes = ArtisnDBCollectionReference<ArtisnDBDocumentD
1330
1339
  * The possible values of the benefit type.
1331
1340
  *
1332
1341
  * @typedef BenefitTypes
1333
- * @since 0.5.14
1342
+ * @since 0.1.0
1334
1343
  */
1335
- declare type BenefitTypes = "ALTER_DELIVERY" | "PRODUCT" | "DISCOUNT";
1344
+ declare type BenefitTypes = "ALTER_DELIVERY" | "PRODUCT" | "DISCOUNT_FIXED" | "DISCOUNT_PERCENTAGE";
1336
1345
  /**
1337
1346
  * Redeemed coupon related data.
1338
1347
  *
@@ -1679,9 +1688,9 @@ interface BannerCoupon {
1679
1688
  * Representation of a Commerce Billing Data.
1680
1689
  *
1681
1690
  * @interface BillingData
1682
- * @since 0.5.14
1691
+ * @since 0.1.0
1683
1692
  */
1684
- interface BaseBillingData {
1693
+ interface BaseBillingData<T extends AdditionalInfo = AdditionalInfo> {
1685
1694
  /** Billing's nickname */
1686
1695
  nickname: string;
1687
1696
  /** Billing's associated user complete name */
@@ -1700,6 +1709,8 @@ interface BaseBillingData {
1700
1709
  default: boolean;
1701
1710
  /** It contains country id and country name, see {@link CountrySummary} */
1702
1711
  country: CountrySummary;
1712
+ /** Additional billing information */
1713
+ additionalInfo?: T;
1703
1714
  }
1704
1715
  /**
1705
1716
  * Representation of a billing data saved on a database.
@@ -1708,7 +1719,7 @@ interface BaseBillingData {
1708
1719
  * @since 0.5.14
1709
1720
  * @extends {{@link BaseBillingData}
1710
1721
  */
1711
- interface BillingData extends BaseBillingData {
1722
+ interface BillingData<T extends AdditionalInfo = AdditionalInfo> extends BaseBillingData<T> {
1712
1723
  /** Billing's auto generated id */
1713
1724
  id: number;
1714
1725
  }
@@ -2250,17 +2261,6 @@ interface UserCountry {
2250
2261
  /** User's country id */
2251
2262
  id: number;
2252
2263
  }
2253
- /**
2254
- * Representation of the user's additional info,
2255
- * commonly used to save user's images urls.
2256
- *
2257
- * @interface AdditionalInfo
2258
- * @since 0.5.14
2259
- * @property {any} `[key: string]` Property with key value pairs
2260
- */
2261
- interface AdditionalInfo {
2262
- [key: string]: any;
2263
- }
2264
2264
  /**
2265
2265
  * Representation of a phone.
2266
2266
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@artisan-commerce/types",
3
3
  "description": "Artisn's types and interfaces library",
4
- "version": "0.14.0-canary.31",
4
+ "version": "0.14.0-canary.33",
5
5
  "main": "./dist/bundle.d.ts",
6
6
  "module": "./dist/bundle.d.ts",
7
7
  "types": "./dist/bundle.d.ts",
@@ -34,5 +34,5 @@
34
34
  "@react-native-firebase/firestore": "^12.8.0",
35
35
  "firebase": "^8.1.1"
36
36
  },
37
- "gitHead": "e1e0eab372bf2999fc64adaa082dd8c443ad6a6f"
37
+ "gitHead": "0f7d112c16f14207b4ac0c92606736e8bf6618a8"
38
38
  }