@nicefer/types 3.0.0-alpha.25 → 3.0.0-alpha.26
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/types/bag.d.ts +8 -8
- package/dist/types/bag.d.ts.map +1 -1
- package/dist/types/expenses.d.ts +3 -3
- package/dist/types/orders.d.ts +12 -12
- package/dist/types/payments.d.ts +4 -4
- package/dist/types/products.d.ts +9 -9
- package/dist/types/replenishment.d.ts +2 -2
- package/dist/types/replenishment.d.ts.map +1 -1
- package/dist/types/stats.d.ts +4 -4
- package/dist/types/warehouses.d.ts +2 -2
- package/package.json +1 -1
package/dist/types/bag.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ import { PaymentInDB } from "./payments";
|
|
|
3
3
|
import { CategoryType } from "./product-category";
|
|
4
4
|
import { ProductVariantInDB } from "./products";
|
|
5
5
|
export interface Bag {
|
|
6
|
-
subtotalPrice:
|
|
7
|
-
subtotalWithDiscount:
|
|
8
|
-
totalPrice:
|
|
9
|
-
shippingPrice:
|
|
6
|
+
subtotalPrice: string;
|
|
7
|
+
subtotalWithDiscount: string;
|
|
8
|
+
totalPrice: string;
|
|
9
|
+
shippingPrice: string;
|
|
10
10
|
discounts?: OrderDiscountApplied[];
|
|
11
11
|
ccy: PaymentInDB['ccy'];
|
|
12
12
|
products: {
|
|
@@ -30,9 +30,9 @@ export interface ProductWithVariantInBag {
|
|
|
30
30
|
warehouseId: string;
|
|
31
31
|
selectedOptions: ProductVariantInDB['selectedOptions'];
|
|
32
32
|
variantQty: number;
|
|
33
|
-
variantPrice:
|
|
34
|
-
variantPriceWithDiscount?:
|
|
35
|
-
createdAt:
|
|
36
|
-
updatedAt?:
|
|
33
|
+
variantPrice: string;
|
|
34
|
+
variantPriceWithDiscount?: string;
|
|
35
|
+
createdAt: Date;
|
|
36
|
+
updatedAt?: Date;
|
|
37
37
|
}
|
|
38
38
|
//# sourceMappingURL=bag.d.ts.map
|
package/dist/types/bag.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bag.d.ts","sourceRoot":"","sources":["../../src/types/bag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,WAAW,GAAG;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACnC,GAAG,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IACxB,QAAQ,EAAE;QACR,CAAC,SAAS,EAAE,MAAM,GAAG,uBAAuB,CAAC;KAC9C,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IAEpB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAElB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,GAAG,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAExB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IAEpB,eAAe,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;IAEvD,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"bag.d.ts","sourceRoot":"","sources":["../../src/types/bag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,WAAW,GAAG;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACnC,GAAG,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IACxB,QAAQ,EAAE;QACR,CAAC,SAAS,EAAE,MAAM,GAAG,uBAAuB,CAAC;KAC9C,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IAEpB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAElB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACnC,GAAG,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAExB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IAEpB,eAAe,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;IAEvD,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
package/dist/types/expenses.d.ts
CHANGED
|
@@ -22,10 +22,10 @@ export interface Expense {
|
|
|
22
22
|
_id?: string;
|
|
23
23
|
description: string;
|
|
24
24
|
categories: ExpenseCategory[];
|
|
25
|
-
amountHNL:
|
|
26
|
-
amountUSD:
|
|
25
|
+
amountHNL: string;
|
|
26
|
+
amountUSD: string;
|
|
27
27
|
ccy: Country['ccy'];
|
|
28
|
-
exchangeRate:
|
|
28
|
+
exchangeRate: string;
|
|
29
29
|
expensedAt: Date;
|
|
30
30
|
paymentMethod: PaymentMethods;
|
|
31
31
|
supplier?: SupplierFK;
|
package/dist/types/orders.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface OrderDiscount {
|
|
|
15
15
|
subtitle: string;
|
|
16
16
|
code: string;
|
|
17
17
|
automatic?: boolean;
|
|
18
|
-
amount:
|
|
18
|
+
amount: string;
|
|
19
19
|
isPercent: boolean;
|
|
20
20
|
condition: 'first_order' | 'delivery_free' | 'none' | 'student' | 'share_5_friends';
|
|
21
21
|
conditionDescription: string;
|
|
@@ -32,7 +32,7 @@ export interface OrderStatus {
|
|
|
32
32
|
createdAt: Date;
|
|
33
33
|
}
|
|
34
34
|
export interface OrderDiscountApplied extends OrderDiscount {
|
|
35
|
-
amountInCurrentCcy?:
|
|
35
|
+
amountInCurrentCcy?: string;
|
|
36
36
|
}
|
|
37
37
|
export interface ProductPrepared {
|
|
38
38
|
productId: string;
|
|
@@ -91,12 +91,12 @@ export interface OrderInDB {
|
|
|
91
91
|
* Indicará qué productos de {@link products} fueron preparados y cuantas unidades.
|
|
92
92
|
*/
|
|
93
93
|
productsPrepared?: ProductPrepared[];
|
|
94
|
-
subtotalPrice:
|
|
95
|
-
subtotalWithDiscount:
|
|
96
|
-
totalPrice:
|
|
97
|
-
paidAmount:
|
|
98
|
-
dueAmount:
|
|
99
|
-
shippingPrice:
|
|
94
|
+
subtotalPrice: string;
|
|
95
|
+
subtotalWithDiscount: string;
|
|
96
|
+
totalPrice: string;
|
|
97
|
+
paidAmount: string;
|
|
98
|
+
dueAmount: string;
|
|
99
|
+
shippingPrice: string;
|
|
100
100
|
discounts?: OrderDiscountApplied[];
|
|
101
101
|
trackingHistory: OrderStatus[];
|
|
102
102
|
deliveryAddress: UserAddressInDB;
|
|
@@ -144,10 +144,10 @@ export interface OrderReady {
|
|
|
144
144
|
msg?: string | null | undefined;
|
|
145
145
|
};
|
|
146
146
|
salesChannel?: SalesChannel;
|
|
147
|
-
subtotalPrice:
|
|
148
|
-
shippingPrice:
|
|
149
|
-
subtotalWithDiscount:
|
|
150
|
-
totalPrice:
|
|
147
|
+
subtotalPrice: string;
|
|
148
|
+
shippingPrice: string;
|
|
149
|
+
subtotalWithDiscount: string;
|
|
150
|
+
totalPrice: string;
|
|
151
151
|
}
|
|
152
152
|
/**
|
|
153
153
|
* Ordenes listas para que el usuario decida pagar
|
package/dist/types/payments.d.ts
CHANGED
|
@@ -30,8 +30,8 @@ export interface CashDetails {
|
|
|
30
30
|
* pago del cliente realice el pago a Nicefer
|
|
31
31
|
*/
|
|
32
32
|
cashOnDelivery?: {
|
|
33
|
-
feePercent:
|
|
34
|
-
feeAmount:
|
|
33
|
+
feePercent: string;
|
|
34
|
+
feeAmount: string;
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
@@ -40,7 +40,7 @@ export interface CashDetails {
|
|
|
40
40
|
export interface PaymentInDB {
|
|
41
41
|
_id?: string;
|
|
42
42
|
orderId: string;
|
|
43
|
-
amount:
|
|
43
|
+
amount: string;
|
|
44
44
|
ccy: string;
|
|
45
45
|
method: PaymentMethods;
|
|
46
46
|
/**
|
|
@@ -76,7 +76,7 @@ export interface StripePaymentIntentParams {
|
|
|
76
76
|
cardHolder: string | string | null | undefined;
|
|
77
77
|
billingAddressLine1: string | string | null | undefined;
|
|
78
78
|
billingAddressCity: string | string | null | undefined;
|
|
79
|
-
amount:
|
|
79
|
+
amount: string;
|
|
80
80
|
currency: string;
|
|
81
81
|
metadata: PaymentInStripeMetadata;
|
|
82
82
|
}
|
package/dist/types/products.d.ts
CHANGED
|
@@ -130,15 +130,15 @@ export interface VariantWarehouseFK {
|
|
|
130
130
|
id: string;
|
|
131
131
|
name: string;
|
|
132
132
|
stock: number;
|
|
133
|
-
price:
|
|
134
|
-
priceUSD:
|
|
135
|
-
lastPrice?:
|
|
136
|
-
lastPriceUSD?:
|
|
137
|
-
supplierPriceUSD:
|
|
138
|
-
supplierPriceHNL:
|
|
139
|
-
profitMarginUSD:
|
|
140
|
-
profitMarginHNL:
|
|
141
|
-
profitMarginPercent:
|
|
133
|
+
price: string;
|
|
134
|
+
priceUSD: string;
|
|
135
|
+
lastPrice?: string;
|
|
136
|
+
lastPriceUSD?: string;
|
|
137
|
+
supplierPriceUSD: string;
|
|
138
|
+
supplierPriceHNL: string;
|
|
139
|
+
profitMarginUSD: string;
|
|
140
|
+
profitMarginHNL: string;
|
|
141
|
+
profitMarginPercent: string;
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
144
|
* Para poder mostrar las variantes agrupadas
|
|
@@ -36,7 +36,7 @@ export interface RProduct {
|
|
|
36
36
|
/**
|
|
37
37
|
* Precio de compra al proveedor
|
|
38
38
|
*/
|
|
39
|
-
supplierPrice:
|
|
39
|
+
supplierPrice: string;
|
|
40
40
|
/** Id's que usa el proveedor para manejar este producto en su sistema */
|
|
41
41
|
referenceCodes: string[];
|
|
42
42
|
/**
|
|
@@ -62,7 +62,7 @@ export interface ROrder {
|
|
|
62
62
|
*/
|
|
63
63
|
supplierOrderId: string;
|
|
64
64
|
supplier: Supplier;
|
|
65
|
-
totalValue:
|
|
65
|
+
totalValue: string;
|
|
66
66
|
packsQty: number;
|
|
67
67
|
/**
|
|
68
68
|
* Almacén final que recibirá la orden.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replenishment.d.ts","sourceRoot":"","sources":["../../src/types/replenishment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"replenishment.d.ts","sourceRoot":"","sources":["../../src/types/replenishment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAA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K,CAAC;IACX,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC,sBAAsB,CAAC,CAAC;IACtD,IAAI,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,CAAC;IAExC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,eAAe,EAAE,CAAC;IAEnC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE;QACT,EAAE,EAAE,MAAM,CAAC;QACX,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IAEF;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
package/dist/types/stats.d.ts
CHANGED
|
@@ -9,16 +9,16 @@ export interface UserStats {
|
|
|
9
9
|
}
|
|
10
10
|
export type Month = '01' | '02' | '03' | '04' | '05' | '06' | '07' | '08' | '09' | '10' | '11' | '12';
|
|
11
11
|
export interface MonthStats {
|
|
12
|
-
sales?:
|
|
13
|
-
expenses?:
|
|
12
|
+
sales?: string;
|
|
13
|
+
expenses?: string;
|
|
14
14
|
orders?: number;
|
|
15
15
|
}
|
|
16
16
|
export interface YearStats {
|
|
17
17
|
_id?: number;
|
|
18
18
|
year: number;
|
|
19
19
|
totals?: {
|
|
20
|
-
sales?:
|
|
21
|
-
expenses?:
|
|
20
|
+
sales?: string;
|
|
21
|
+
expenses?: string;
|
|
22
22
|
orders?: number;
|
|
23
23
|
};
|
|
24
24
|
months?: Partial<Record<Month, MonthStats>>;
|
|
@@ -32,8 +32,8 @@ export interface DeliveryMethod {
|
|
|
32
32
|
id: 'standard' | 'express' | 'weekend';
|
|
33
33
|
name: string;
|
|
34
34
|
inBusinessDays: `${number}-${number}`;
|
|
35
|
-
deliveryFeeInUSD:
|
|
36
|
-
deliveryFeeInHNL:
|
|
35
|
+
deliveryFeeInUSD: string;
|
|
36
|
+
deliveryFeeInHNL: string;
|
|
37
37
|
/**
|
|
38
38
|
* El cargo en {@link deliveryFeeInUSD} y {@link deliveryFeeInHNL}
|
|
39
39
|
* permitirá un máximo de lo indicado aquí. Si se supera el máximo,
|