@artisan-commerce/types 0.14.0-canary.32 → 0.14.0-canary.34

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,23 @@
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.34](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.33...@artisan-commerce/types@0.14.0-canary.34) (2022-04-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **shoppingcart:** bugfix shoppingCart ([9e22bf2](https://bitbucket.org/tradesystem/artisn_sdk/commit/9e22bf2d19583738febd7d57e798f86baf57fdaa))
12
+
13
+
14
+
15
+ ## [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)
16
+
17
+ **Note:** Version bump only for package @artisan-commerce/types
18
+
19
+
20
+
21
+
22
+
6
23
  ## [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)
7
24
 
8
25
 
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 */
@@ -887,6 +894,35 @@ interface BillTotalCategory {
887
894
  taxTotal: number;
888
895
  /** Bill total category total */
889
896
  total: number;
897
+ /** discounts shopping cart */
898
+ discounts: Discount[];
899
+ }
900
+ /**
901
+ * Representation of shopping cart discount.
902
+ *
903
+ * @interface Discounts
904
+ * @since 0.1.0
905
+ */
906
+ interface Discount {
907
+ benefitId: number;
908
+ /** Benefit wallet id */
909
+ benefitWalletId: number;
910
+ /** Discount base value */
911
+ discountBase: number;
912
+ /** Whether or not the coupon has taxes */
913
+ hasTaxes: boolean;
914
+ /** If the coupon discount has been initialized */
915
+ isInitialized: boolean;
916
+ /** The benefit name */
917
+ name: string;
918
+ /** The benefit percentage */
919
+ percentage: number;
920
+ /** The benefit taxes */
921
+ taxValue: number;
922
+ /** The benefit type */
923
+ type: BenefitTypes;
924
+ /** The discount value */
925
+ value: number;
890
926
  }
891
927
  /**
892
928
  * Representation of a Cart Totals.
@@ -1681,9 +1717,9 @@ interface BannerCoupon {
1681
1717
  * Representation of a Commerce Billing Data.
1682
1718
  *
1683
1719
  * @interface BillingData
1684
- * @since 0.5.14
1720
+ * @since 0.1.0
1685
1721
  */
1686
- interface BaseBillingData {
1722
+ interface BaseBillingData<T extends AdditionalInfo = AdditionalInfo> {
1687
1723
  /** Billing's nickname */
1688
1724
  nickname: string;
1689
1725
  /** Billing's associated user complete name */
@@ -1702,6 +1738,8 @@ interface BaseBillingData {
1702
1738
  default: boolean;
1703
1739
  /** It contains country id and country name, see {@link CountrySummary} */
1704
1740
  country: CountrySummary;
1741
+ /** Additional billing information */
1742
+ additionalInfo?: T;
1705
1743
  }
1706
1744
  /**
1707
1745
  * Representation of a billing data saved on a database.
@@ -1710,7 +1748,7 @@ interface BaseBillingData {
1710
1748
  * @since 0.5.14
1711
1749
  * @extends {{@link BaseBillingData}
1712
1750
  */
1713
- interface BillingData extends BaseBillingData {
1751
+ interface BillingData<T extends AdditionalInfo = AdditionalInfo> extends BaseBillingData<T> {
1714
1752
  /** Billing's auto generated id */
1715
1753
  id: number;
1716
1754
  }
@@ -2252,17 +2290,6 @@ interface UserCountry {
2252
2290
  /** User's country id */
2253
2291
  id: number;
2254
2292
  }
2255
- /**
2256
- * Representation of the user's additional info,
2257
- * commonly used to save user's images urls.
2258
- *
2259
- * @interface AdditionalInfo
2260
- * @since 0.5.14
2261
- * @property {any} `[key: string]` Property with key value pairs
2262
- */
2263
- interface AdditionalInfo {
2264
- [key: string]: any;
2265
- }
2266
2293
  /**
2267
2294
  * Representation of a phone.
2268
2295
  *
@@ -3407,4 +3434,4 @@ interface CardInscription {
3407
3434
  createdAt?: string;
3408
3435
  }
3409
3436
 
3410
- export { ARDocumentType, Account, AdditionalInfo, AdditionalStoreInformation, Alert, Allocation, ArtisnApp, ArtisnDB, ArtisnDBCollectionReference, ArtisnDBDocumentData, ArtisnDBQueryDocumentSnapshot, ArtisnHeaders, ArtisnHints, ArtisnParams, ArtisnPlatform, ArtisnQuery, ArtisnRNApp, ArtisnRNAuth, ArtisnRNAuthInstance, ArtisnRNSettings, ArtisnRequest, ArtisnRequestBody, ArtisnRequestHeaders, ArtisnRequestMethod, ArtisnRestrictedHeaders, ArtisnWebApp, ArtisnWebAuth, ArtisnWebAuthInstance, ArtisnWebSettings, Award, BODocumentType, BRDocumentType, Banner, BannerBenefits, BannerCoupon, BannerImage, BannerScope, BannerType, BaseBillingData, BaseField, BaseLivingPlace, BaseOrder, BasePaymentMethod, BaseProduct, BaseShippingAddress, BaseUser, BaseWeekDay, Benefit, BenefitData, BenefitTypes, BenefitsByUserNode, BenefitsByUserNodes, BillTotal, BillTotalCategory, BillingData, CDNImage, CLDocumentType, CODocumentType, CardInscription, CardName, CartProduct, CartProductAnswer, CartProductQuestion, CartStore, CartTotals, Catalogue, Category, CategoryWithProducts, Code, CommonDocumentType, Country, CountryCode, CountryCurrency, CountrySummary, Coupon, CouponCategory, CouponType, CreditCardMapping, CurrencyCodes, DayOfWeek, Days, Delivery, DeliveryTimeUnit, DocumentType, ECDocumentType, Field, FieldRecord, Gender, GenericStoreLocation, Image, ImageFit, ImageManipulationConfig, ImageToFormat, Injection, InjectionDetail, IntegrationMessage, Issue, IssueAdditionalInfo, IssueHistory, LivingPlace, LivingPlaceToSave, MaritalStatus, Message, MetadataShipping, NewShippingAddress, Notification, NotificationAdditionalInfo, NotificationExtraData, NotificationListItem, NotificationPriority, NotificationStep, NotificationStore, NotificationUser, NotificationVendor, Objectify, OperatorInformation, Order, OrderAdditionalInfo, OrderBillProduct, OrderBillProductAdditionalInfo, OrderBillTotal, OrderCommonFields, OrderDetailShippingCost, OrderDetails, OrderPaymentMethod, OrderProduct, OrderProductAdditionalInfo, OrderProductAttributes, OrderProductBillTotal, OrderProductImage, OrderProductPriceCategory, OrderRetry, OrderRetryPaymentMethod, OrderShoppingCart, OrderStatus, OrderStep, OrderStepAdditionalInfo, OrderStepAdditionalInfoGroup, OrderStore, OrderStoreAdditionalInfo, OrderStoreDelivery, OrderUser, PEDocumentType, PYDocumentType, PaymentMethod, PaymentMethodByOrder, PaymentMethodName, PaymentProvider, Phone, PriceCategory, PriceCategoryTax, PriceCategoryType, Product, ProductAnswer, ProductAttributes, ProductCoupon, ProductDetails, ProductPrices, ProductQuestion, ProductStatus, ProductType, RandomImageConfig, ReadValue, Rule, Schedule, Service, Settings, ShippingAddress, ShippingCost, ShippingCostTax, ShoppingCart, ShoppingCartBenefits, ShoppingCartNode, ShoppingCartNodes, Status, StepCategory, StepCode, StepNotification, StepWorkflow, StepWorkflowAdditionalInfo, StepWorkflowGroup, Store, StoreCoupon, StoreCouponDetail, StoreLocation, StorePolygons, Suborder, TaxCalculation, TaxCalculations, TaxType, Token, TransitionWorkflow, URLImage, USDocumentType, UYDocumentType, UpdatedShippingAddress, User, UserCountry, UserSettings, UserType, VEDocumentType, Vendor, Wallet, WebhookWorkflow, Workflow, ZipCodeField };
3437
+ export { ARDocumentType, Account, AdditionalInfo, AdditionalStoreInformation, Alert, Allocation, ArtisnApp, ArtisnDB, ArtisnDBCollectionReference, ArtisnDBDocumentData, ArtisnDBQueryDocumentSnapshot, ArtisnHeaders, ArtisnHints, ArtisnParams, ArtisnPlatform, ArtisnQuery, ArtisnRNApp, ArtisnRNAuth, ArtisnRNAuthInstance, ArtisnRNSettings, ArtisnRequest, ArtisnRequestBody, ArtisnRequestHeaders, ArtisnRequestMethod, ArtisnRestrictedHeaders, ArtisnWebApp, ArtisnWebAuth, ArtisnWebAuthInstance, ArtisnWebSettings, Award, BODocumentType, BRDocumentType, Banner, BannerBenefits, BannerCoupon, BannerImage, BannerScope, BannerType, BaseBillingData, BaseField, BaseLivingPlace, BaseOrder, BasePaymentMethod, BaseProduct, BaseShippingAddress, BaseUser, BaseWeekDay, Benefit, BenefitData, BenefitTypes, BenefitsByUserNode, BenefitsByUserNodes, BillTotal, BillTotalCategory, BillingData, CDNImage, CLDocumentType, CODocumentType, CardInscription, CardName, CartProduct, CartProductAnswer, CartProductQuestion, CartStore, CartTotals, Catalogue, Category, CategoryWithProducts, Code, CommonDocumentType, Country, CountryCode, CountryCurrency, CountrySummary, Coupon, CouponCategory, CouponType, CreditCardMapping, CurrencyCodes, DayOfWeek, Days, Delivery, DeliveryTimeUnit, Discount, DocumentType, ECDocumentType, Field, FieldRecord, Gender, GenericStoreLocation, Image, ImageFit, ImageManipulationConfig, ImageToFormat, Injection, InjectionDetail, IntegrationMessage, Issue, IssueAdditionalInfo, IssueHistory, LivingPlace, LivingPlaceToSave, MaritalStatus, Message, MetadataShipping, NewShippingAddress, Notification, NotificationAdditionalInfo, NotificationExtraData, NotificationListItem, NotificationPriority, NotificationStep, NotificationStore, NotificationUser, NotificationVendor, Objectify, OperatorInformation, Order, OrderAdditionalInfo, OrderBillProduct, OrderBillProductAdditionalInfo, OrderBillTotal, OrderCommonFields, OrderDetailShippingCost, OrderDetails, OrderPaymentMethod, OrderProduct, OrderProductAdditionalInfo, OrderProductAttributes, OrderProductBillTotal, OrderProductImage, OrderProductPriceCategory, OrderRetry, OrderRetryPaymentMethod, OrderShoppingCart, OrderStatus, OrderStep, OrderStepAdditionalInfo, OrderStepAdditionalInfoGroup, OrderStore, OrderStoreAdditionalInfo, OrderStoreDelivery, OrderUser, PEDocumentType, PYDocumentType, PaymentMethod, PaymentMethodByOrder, PaymentMethodName, PaymentProvider, Phone, PriceCategory, PriceCategoryTax, PriceCategoryType, Product, ProductAnswer, ProductAttributes, ProductCoupon, ProductDetails, ProductPrices, ProductQuestion, ProductStatus, ProductType, RandomImageConfig, ReadValue, Rule, Schedule, Service, Settings, ShippingAddress, ShippingCost, ShippingCostTax, ShoppingCart, ShoppingCartBenefits, ShoppingCartNode, ShoppingCartNodes, Status, StepCategory, StepCode, StepNotification, StepWorkflow, StepWorkflowAdditionalInfo, StepWorkflowGroup, Store, StoreCoupon, StoreCouponDetail, StoreLocation, StorePolygons, Suborder, TaxCalculation, TaxCalculations, TaxType, Token, TransitionWorkflow, URLImage, USDocumentType, UYDocumentType, UpdatedShippingAddress, User, UserCountry, UserSettings, UserType, VEDocumentType, Vendor, Wallet, WebhookWorkflow, Workflow, ZipCodeField };
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.32",
4
+ "version": "0.14.0-canary.34",
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": "ad88ffa2a383481b53bce14414e6a0b6c2942f3e"
37
+ "gitHead": "bd05f9bb540ac313d058fb96936fa3810f7cc103"
38
38
  }