@artisan-commerce/types 0.14.0-canary.19 → 0.14.0-canary.20

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,16 @@
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.20](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.19...@artisan-commerce/types@0.14.0-canary.20) (2021-10-19)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **global:** add interfaces and builders for order ([53d18b0](https://bitbucket.org/tradesystem/artisn_sdk/commit/53d18b07c53fa54f9af69a0751b94a95452bfdc3))
12
+ * **global:** fix tax calculation builder ([3f7698f](https://bitbucket.org/tradesystem/artisn_sdk/commit/3f7698f1cfdf97e2b8d8fa4040b70a7cfa150b74))
13
+
14
+
15
+
6
16
  ## [0.14.0-canary.19](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.18...@artisan-commerce/types@0.14.0-canary.19) (2021-10-14)
7
17
 
8
18
 
package/dist/bundle.d.ts CHANGED
@@ -1080,8 +1080,8 @@ interface Alert {
1080
1080
  interface CartStore extends Store {
1081
1081
  /** The products that belong to the store, see {@link CartProduct} */
1082
1082
  products: Objectify<CartProduct>;
1083
- /** Cart store's alerts */
1084
- alerts: [];
1083
+ /** Cart store's alerts, see {@link Alert} */
1084
+ alerts: Alert[];
1085
1085
  }
1086
1086
  /**
1087
1087
  * The possible values of a Bill Total.
@@ -2246,6 +2246,8 @@ interface OrderStore extends Store {
2246
2246
  interface OrderProduct {
2247
2247
  /** Order product id */
2248
2248
  id: number;
2249
+ /** Order product additional info, see {@link OrderProductAdditionalInfo } */
2250
+ additionalInfo: OrderProductAdditionalInfo;
2249
2251
  /** Order product unique identifier */
2250
2252
  productId: number;
2251
2253
  /** Order product name */
@@ -2259,6 +2261,125 @@ interface OrderProduct {
2259
2261
  /** Order product questions and answers, see {@link CartProductQuestion} */
2260
2262
  questionsAndAnswers: CartProductQuestion[];
2261
2263
  }
2264
+ /**
2265
+ * The order product additional info.
2266
+ *
2267
+ * @interface OrderProductAdditionalInfo
2268
+ * @since 0.1.0
2269
+ */
2270
+ interface OrderProductAdditionalInfo {
2271
+ /** Order product attributes, see {@link OrderProductAttributes} */
2272
+ attributes: OrderProductAttributes;
2273
+ /** Indicates if a product is available */
2274
+ available: boolean;
2275
+ /** Order bill product, see {@link OrderBillProduct} */
2276
+ bill_product: OrderBillProductAdditionalInfo;
2277
+ /** Order bill product and answers, see {@link OrderBillProduct} */
2278
+ bill_product_and_answers: OrderBillProductAdditionalInfo;
2279
+ /** The description of the product */
2280
+ description: string;
2281
+ /** Array of product images, see {@link OrderProductImage} */
2282
+ images: OrderProductImage[];
2283
+ /** Indicates if a product has a price vip */
2284
+ is_price_vip: boolean;
2285
+ /** The max amount for sale of the product */
2286
+ max_amount_for_sale: number;
2287
+ /** The measure of the product */
2288
+ measure: string;
2289
+ /** The store associated with the product */
2290
+ new_store: number;
2291
+ /** Indicates if a product is out of service */
2292
+ out_of_service: boolean;
2293
+ /** Indicates if a product is out of stock */
2294
+ out_of_stock: boolean;
2295
+ /** Price category type, see {@link PriceCategoryType} */
2296
+ price_category: PriceCategoryType;
2297
+ /** Order bill product prices, see {@link OrderBillProduct} */
2298
+ prices: OrderBillProductAdditionalInfo;
2299
+ /** Indicates if a product is sponsored */
2300
+ sponsored: boolean;
2301
+ /** The status of the product, see {@link ProductStatus} */
2302
+ status: ProductStatus;
2303
+ /** The stock of the product */
2304
+ stock: number;
2305
+ /** The suggested price of the product */
2306
+ suggested_price: string;
2307
+ /** The type of the product, see {@link ProductType} */
2308
+ type: ProductType;
2309
+ }
2310
+ /**
2311
+ * Order product attributes.
2312
+ *
2313
+ * @interface OrderProductAttributes
2314
+ * @since 0.1.0
2315
+ */
2316
+ interface OrderProductAttributes {
2317
+ /** Whether or not to show product in menu */
2318
+ show_in_menu: boolean;
2319
+ /** Product's quantity, the attribute is not in camel case purposefully */
2320
+ cantidad: string;
2321
+ /** Product external id */
2322
+ external_id: string | null;
2323
+ }
2324
+ /**
2325
+ * Order product image.
2326
+ *
2327
+ * @interface OrderProductImage
2328
+ * @since 0.1.0
2329
+ */
2330
+ interface OrderProductImage {
2331
+ /** The directory where the image is saved */
2332
+ key: string;
2333
+ /** Image's name */
2334
+ name: string;
2335
+ /** The bucket where the image is located */
2336
+ bucket: string;
2337
+ /** The url where the image is saved */
2338
+ url: string;
2339
+ /** The cloud where the image is saved */
2340
+ cloud_front_url: string;
2341
+ }
2342
+ /**
2343
+ * Order bill product additional information.
2344
+ *
2345
+ * @interface OrderBillProductAdditionalInfo
2346
+ * @since 0.1.0
2347
+ */
2348
+ interface OrderBillProductAdditionalInfo {
2349
+ /** Normal price category, see {@link OrderProductPriceCategory} */
2350
+ normal: OrderProductPriceCategory;
2351
+ /** Points price category, see {@link OrderProductPriceCategory} */
2352
+ points: OrderProductPriceCategory;
2353
+ }
2354
+ /**
2355
+ * Order bill product tax calculations.
2356
+ *
2357
+ * @typedef TaxCalculations
2358
+ * @since 0.1.0
2359
+ */
2360
+ declare type TaxCalculations = Record<string, TaxCalculation>;
2361
+ /**
2362
+ * Order bill product tax calculation
2363
+ *
2364
+ * @interface TaxCalculation
2365
+ * @since 0.1.0
2366
+ */
2367
+ interface TaxCalculation {
2368
+ /** Tax calculation code */
2369
+ code: number;
2370
+ /** Tax calculation name, see {@link TaxType} */
2371
+ name: TaxType;
2372
+ /** Tax calculation value added tax rate */
2373
+ vat_rate_code: number;
2374
+ /** Tax calculation value added tax */
2375
+ vat_rate: string;
2376
+ /** Tax calculation percentage */
2377
+ percentage: number;
2378
+ /** Tax calculation base */
2379
+ tax_base: number;
2380
+ /** Tax calculation value */
2381
+ value: number;
2382
+ }
2262
2383
  /**
2263
2384
  * The total bill associated with a product of order.
2264
2385
  *
@@ -2281,6 +2402,54 @@ interface OrderBillProduct extends OrderBillTotal {
2281
2402
  /** Order bill product amount */
2282
2403
  amount: number;
2283
2404
  }
2405
+ /**
2406
+ * The bill associated with a product of order.
2407
+ *
2408
+ * @interface OrderProductPriceCategory
2409
+ * @since 0.1.0
2410
+ */
2411
+ interface OrderProductPriceCategory {
2412
+ /** Order product price category amount */
2413
+ amount: number;
2414
+ /** Array of tax calculation, see {@link TaxCalculation} */
2415
+ taxes: TaxCalculation[];
2416
+ /** Order product price category with taxes */
2417
+ net_price: number;
2418
+ /** Order product price currency symbol */
2419
+ symbol: string;
2420
+ /** Order product price category without taxes */
2421
+ gross_price: number;
2422
+ /** Array of discounts applied to the price category */
2423
+ discounts: any[];
2424
+ /** Order product price discount */
2425
+ discount: number;
2426
+ /** Order product price total discounts with taxes */
2427
+ discount_net_price: number;
2428
+ /** Order product price total discounts without taxes */
2429
+ discount_gross_price: number;
2430
+ /** Order product price category type, see {@link PriceCategoryType} */
2431
+ category: PriceCategoryType;
2432
+ /** Order product price product id */
2433
+ product_id?: number;
2434
+ /** Order product price product name */
2435
+ name?: string;
2436
+ /** Order product price subtotal without taxes */
2437
+ subtotal_before_taxes: number;
2438
+ /** Order product price tax total */
2439
+ tax_total: number;
2440
+ /** Order product price discount total */
2441
+ discount_total: number;
2442
+ /** Order product price total */
2443
+ total: number;
2444
+ /** Order product price subtotal without taxes and discounts */
2445
+ subtotal_before_taxes_before_discounts: number;
2446
+ /** Order product price subtotal */
2447
+ subtotal_zero?: number;
2448
+ /** Order product price subtotal without taxes */
2449
+ subtotal_without_taxes?: number;
2450
+ /** An object of tax calculations, see {@link TaxCalculations} */
2451
+ tax_calcs?: TaxCalculations;
2452
+ }
2284
2453
  /**
2285
2454
  * The retry of the order.
2286
2455
  *
@@ -2773,4 +2942,4 @@ interface CardInscription {
2773
2942
  createdAt?: string;
2774
2943
  }
2775
2944
 
2776
- 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, BannerImage, BannerScope, BannerType, BaseBillingData, BaseField, BaseLivingPlace, BaseOrder, BasePaymentMethod, BaseProduct, BaseShippingAddress, BaseUser, BaseWeekDay, Benefit, BenefitTypes, BenefitsByUserNode, BenefitsByUserNodes, BillTotal, BillTotalCategory, BillingData, CDNImage, CLDocumentType, CODocumentType, CardInscription, CardName, CartProduct, CartProductAnswer, CartProductQuestion, CartStore, CartTotals, Catalogue, Category, CategoryWithProducts, CommonDocumentType, Country, CountryCode, CountryCurrency, CountrySummary, 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, Objectify, OperatorInformation, Order, OrderAdditionalInfo, OrderBillProduct, OrderBillTotal, OrderCommonFields, OrderDetailShippingCost, OrderDetails, OrderPaymentMethod, OrderProduct, OrderRetry, OrderRetryPaymentMethod, OrderShoppingCart, OrderStatus, OrderStep, OrderStepAdditionalInfo, OrderStepAdditionalInfoGroup, OrderStore, OrderUser, PEDocumentType, PYDocumentType, PaymentMethod, PaymentMethodByOrder, PaymentMethodName, PaymentProvider, Phone, PriceCategory, PriceCategoryTax, PriceCategoryType, Product, ProductAnswer, ProductAttributes, ProductDetails, ProductPrices, ProductQuestion, ProductStatus, ProductType, RandomImageConfig, Rule, Schedule, Service, Settings, ShippingAddress, ShippingCost, ShippingCostTax, ShoppingCart, ShoppingCartBenefits, ShoppingCartNode, ShoppingCartNodes, Status, StepCategory, StepCode, StepNotification, StepWorkflow, StepWorkflowAdditionalInfo, StepWorkflowGroup, Store, StoreLocation, StorePolygons, Suborder, TaxType, TransitionWorkflow, URLImage, USDocumentType, UYDocumentType, UpdatedShippingAddress, User, UserCountry, UserSettings, UserType, VEDocumentType, Vendor, Wallet, WebhookWorkflow, Workflow, ZipCodeField };
2945
+ 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, BannerImage, BannerScope, BannerType, BaseBillingData, BaseField, BaseLivingPlace, BaseOrder, BasePaymentMethod, BaseProduct, BaseShippingAddress, BaseUser, BaseWeekDay, Benefit, BenefitTypes, BenefitsByUserNode, BenefitsByUserNodes, BillTotal, BillTotalCategory, BillingData, CDNImage, CLDocumentType, CODocumentType, CardInscription, CardName, CartProduct, CartProductAnswer, CartProductQuestion, CartStore, CartTotals, Catalogue, Category, CategoryWithProducts, CommonDocumentType, Country, CountryCode, CountryCurrency, CountrySummary, 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, Objectify, OperatorInformation, Order, OrderAdditionalInfo, OrderBillProduct, OrderBillProductAdditionalInfo, OrderBillTotal, OrderCommonFields, OrderDetailShippingCost, OrderDetails, OrderPaymentMethod, OrderProduct, OrderProductAdditionalInfo, OrderProductAttributes, OrderProductImage, OrderProductPriceCategory, OrderRetry, OrderRetryPaymentMethod, OrderShoppingCart, OrderStatus, OrderStep, OrderStepAdditionalInfo, OrderStepAdditionalInfoGroup, OrderStore, OrderUser, PEDocumentType, PYDocumentType, PaymentMethod, PaymentMethodByOrder, PaymentMethodName, PaymentProvider, Phone, PriceCategory, PriceCategoryTax, PriceCategoryType, Product, ProductAnswer, ProductAttributes, ProductDetails, ProductPrices, ProductQuestion, ProductStatus, ProductType, RandomImageConfig, Rule, Schedule, Service, Settings, ShippingAddress, ShippingCost, ShippingCostTax, ShoppingCart, ShoppingCartBenefits, ShoppingCartNode, ShoppingCartNodes, Status, StepCategory, StepCode, StepNotification, StepWorkflow, StepWorkflowAdditionalInfo, StepWorkflowGroup, Store, StoreLocation, StorePolygons, Suborder, TaxCalculation, TaxCalculations, TaxType, 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.19",
4
+ "version": "0.14.0-canary.20",
5
5
  "main": "./dist/bundle.d.ts",
6
6
  "module": "./dist/bundle.d.ts",
7
7
  "types": "./dist/bundle.d.ts",
@@ -50,5 +50,5 @@
50
50
  "npm-run-all": "^4.1.5",
51
51
  "prettier": "^2.1.2"
52
52
  },
53
- "gitHead": "9ec4dccd5dd073b70584657e1c91ac0710121f70"
53
+ "gitHead": "bf40692bccbfb025fc0a8d34dc7abe33c89694a9"
54
54
  }