@zauru-sdk/types 6.10.0 → 6.12.0
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/Custom.types.d.ts +74 -1
- package/package.json +2 -2
package/dist/Custom.types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EmployeeGraphQL, ItemGraphQL, LotGraphQL, LotStockGraphQL, MembershipGraphQL, MovementGraphQL, PriceListGraphQL, ProfileGraphQL, PurchaseOrderGraphQL, ShipmentGraphQL, SuggestedPriceGraphQL } from "./GraphQL.types";
|
|
1
|
+
import { EmployeeGraphQL, ItemGraphQL, LotGraphQL, LotStockGraphQL, MembershipGraphQL, MovementGraphQL, PriceListGraphQL, ProfileGraphQL, PurchaseOrderGraphQL, ShipmentGraphQL, SuggestedPriceGraphQL, WebAppRowGraphQL } from "./GraphQL.types";
|
|
2
2
|
export type SpecialItem = {
|
|
3
3
|
item: number;
|
|
4
4
|
provider: number;
|
|
@@ -9,6 +9,53 @@ export type SpecialItem = {
|
|
|
9
9
|
providerCategory: number;
|
|
10
10
|
specialLabel: string;
|
|
11
11
|
};
|
|
12
|
+
export type PriceAdjustmentFilterMode = "all" | "include" | "exclude";
|
|
13
|
+
export type PriceAdjustmentFilters = {
|
|
14
|
+
itemMode: PriceAdjustmentFilterMode;
|
|
15
|
+
itemIds: number[];
|
|
16
|
+
tipoMode: PriceAdjustmentFilterMode;
|
|
17
|
+
tipos: string[];
|
|
18
|
+
programaMode: PriceAdjustmentFilterMode;
|
|
19
|
+
providerCategoryIds: number[];
|
|
20
|
+
};
|
|
21
|
+
export type PriceAdjustmentOperation = "add" | "subtract";
|
|
22
|
+
export type PriceAdjustmentValueType = "amount" | "percentage";
|
|
23
|
+
export type PriceAdjustmentRule = {
|
|
24
|
+
nombre: string;
|
|
25
|
+
prioridad: number;
|
|
26
|
+
activa: boolean;
|
|
27
|
+
operacion: PriceAdjustmentOperation;
|
|
28
|
+
tipoValor: PriceAdjustmentValueType;
|
|
29
|
+
valor: number;
|
|
30
|
+
filtros: PriceAdjustmentFilters;
|
|
31
|
+
fechaEliminacion: string;
|
|
32
|
+
};
|
|
33
|
+
export type PriceAdjustmentContext = {
|
|
34
|
+
itemId: number;
|
|
35
|
+
tipo?: string;
|
|
36
|
+
providerCategoryId?: number;
|
|
37
|
+
};
|
|
38
|
+
export type PriceAdjustmentStep = {
|
|
39
|
+
ruleName: string;
|
|
40
|
+
operation: PriceAdjustmentOperation;
|
|
41
|
+
valueType: PriceAdjustmentValueType;
|
|
42
|
+
value: number;
|
|
43
|
+
appliedAmount: number;
|
|
44
|
+
runningTotal: number;
|
|
45
|
+
};
|
|
46
|
+
export type PriceAdjustmentResult = {
|
|
47
|
+
basePrice: number;
|
|
48
|
+
finalPrice: number;
|
|
49
|
+
description: string;
|
|
50
|
+
steps: PriceAdjustmentStep[];
|
|
51
|
+
};
|
|
52
|
+
export type CostCalculationMemo = {
|
|
53
|
+
itemId: number;
|
|
54
|
+
basePrice: number;
|
|
55
|
+
finalPrice: number;
|
|
56
|
+
description: string;
|
|
57
|
+
steps: PriceAdjustmentStep[];
|
|
58
|
+
};
|
|
12
59
|
export type ExtendedInsertBookingBody = {
|
|
13
60
|
movements: Partial<MovementGraphQL>[];
|
|
14
61
|
};
|
|
@@ -529,10 +576,13 @@ export type PurchaseOrderCosto = {
|
|
|
529
576
|
finalizado?: boolean;
|
|
530
577
|
msgResultado?: string;
|
|
531
578
|
fecha: string;
|
|
579
|
+
memo?: string;
|
|
532
580
|
purchase_order_details: {
|
|
533
581
|
id: number;
|
|
534
582
|
item_id: number;
|
|
535
583
|
unit_cost: number;
|
|
584
|
+
calculo?: string;
|
|
585
|
+
precioBase?: number;
|
|
536
586
|
}[];
|
|
537
587
|
};
|
|
538
588
|
export type CostoSemanal = {
|
|
@@ -559,6 +609,28 @@ export type BitacoraCostosItems = {
|
|
|
559
609
|
modificadoPor: string;
|
|
560
610
|
fechaCreacion: string;
|
|
561
611
|
};
|
|
612
|
+
export type WeeklyCostPeriod = "lunMar" | "mieJue" | "vieSabDom";
|
|
613
|
+
export type WeeklyCostMatrixSource = "especial" | "general" | "fallback";
|
|
614
|
+
export type WeeklyCostMatrix = {
|
|
615
|
+
costos: CostoSemanal[];
|
|
616
|
+
costosEspeciales: CostoSemanalSpecialItem[];
|
|
617
|
+
fechas: BitacoraCostosItems["fechas"];
|
|
618
|
+
};
|
|
619
|
+
export type CalculateItemPriceFromWeeklyMatrixInput = {
|
|
620
|
+
itemId: number;
|
|
621
|
+
date: string;
|
|
622
|
+
region?: string;
|
|
623
|
+
tipo?: string;
|
|
624
|
+
providerCategoryId?: number;
|
|
625
|
+
matrix?: WeeklyCostMatrix | null;
|
|
626
|
+
specialItems?: Array<SpecialItem | WebAppRowGraphQL<SpecialItem>>;
|
|
627
|
+
rules?: Array<PriceAdjustmentRule | WebAppRowGraphQL<PriceAdjustmentRule>>;
|
|
628
|
+
};
|
|
629
|
+
export type CalculateItemPriceFromWeeklyMatrixResult = PriceAdjustmentResult & {
|
|
630
|
+
source: WeeklyCostMatrixSource;
|
|
631
|
+
period: WeeklyCostPeriod;
|
|
632
|
+
specialItemId?: number;
|
|
633
|
+
};
|
|
562
634
|
export type DischargeHistory = {
|
|
563
635
|
creadoPor: string;
|
|
564
636
|
fechaCreacion: string;
|
|
@@ -775,6 +847,7 @@ export type JsonMemoType = {
|
|
|
775
847
|
}>;
|
|
776
848
|
confirmed?: boolean;
|
|
777
849
|
rejectionPercentage?: number;
|
|
850
|
+
costCalculations?: CostCalculationMemo[];
|
|
778
851
|
};
|
|
779
852
|
export type CloseOpenWorkOrderDetailInput = {
|
|
780
853
|
id: number | string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/types",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.12.0",
|
|
4
4
|
"description": "Estructuras de Zauru, tipado de modelos y modelos personalizados.",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"typescript": "^5.1.6"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "7cec8a73384a6d1da9d612201b3ca2d233d6ce6e"
|
|
26
26
|
}
|