@nicefer/types 1.0.95 → 1.0.97

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/countries.js CHANGED
@@ -6,17 +6,20 @@ exports.Countries = [
6
6
  {
7
7
  id: 'HN',
8
8
  name: 'Honduras',
9
- code: 504
9
+ code: 504,
10
+ ccy: 'HNL'
10
11
  },
11
12
  {
12
13
  id: 'SV',
13
14
  name: 'El Salvador',
14
- code: 503
15
+ code: 503,
16
+ ccy: 'USD'
15
17
  },
16
18
  {
17
19
  id: 'US',
18
20
  name: 'Estados Unidos',
19
- code: 1
21
+ code: 1,
22
+ ccy: 'USD'
20
23
  },
21
24
  ];
22
25
  exports.Regions = {
package/dist/orders.js CHANGED
@@ -6,3 +6,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  ;
7
7
  ;
8
8
  ;
9
+ ;
@@ -1,6 +1,8 @@
1
+ import { PaymentInDB } from "./payments";
1
2
  export interface Country {
2
3
  id: 'HN' | 'US' | 'SV';
3
4
  name: string;
5
+ ccy: PaymentInDB['ccy'];
4
6
  code: number | null | undefined;
5
7
  }
6
8
  export interface City {
@@ -1,7 +1,7 @@
1
1
  import { PaymentIntent } from "@stripe/stripe-js";
2
2
  import { DeliveryMethod, ProductWithVariantInBag } from "./bag";
3
3
  import { UserAddressInDB } from "./users";
4
- import { PaymentInDB } from "./payments";
4
+ import { Country } from "./countries";
5
5
  export interface OrderDiscount {
6
6
  id: string;
7
7
  name: string;
@@ -33,6 +33,7 @@ export interface OrderInDB {
33
33
  id: string;
34
34
  customerName: string;
35
35
  customerId: string;
36
+ customerCountry: Country;
36
37
  products: ProductWithVariantInBag[];
37
38
  /**
38
39
  * Indicará qué productos de {@link products} fueron preparados y cuantas unidades.
@@ -43,7 +44,6 @@ export interface OrderInDB {
43
44
  totalPrice: number;
44
45
  shippingPrice: number;
45
46
  discounts?: OrderDiscountApplied[];
46
- ccy: PaymentInDB['ccy'];
47
47
  status: 'pending' | 'payment_error' | 'processing' | 'prepared' | 'shipped' | 'delivered' | 'canceled';
48
48
  orderDate: string;
49
49
  /**
@@ -66,6 +66,7 @@ export type OrderErrorCodes = 'ERR_CREATE_ORDER' | 'ERR_ORDER_INFO' | 'ERR_CHANG
66
66
  */
67
67
  export interface ConfirmOrderPayload {
68
68
  orderReadyToPay: OrderReady;
69
+ customerCountry: Country;
69
70
  paymentMethod: OrderInDB['paymentMethod'];
70
71
  shippingMethod: OrderInDB['shippingMethod'];
71
72
  deliveryAddress: OrderInDB['deliveryAddress'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nicefer/types",
3
- "version": "1.0.95",
3
+ "version": "1.0.97",
4
4
  "description": "Tipos compartidos para Nicefer",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",