@zauru-sdk/types 6.9.0 → 6.11.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.
@@ -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
  };
@@ -468,6 +515,8 @@ export type POHistoryMassive = {
468
515
  originalOtherCharges: number;
469
516
  originalDiscount: number;
470
517
  revertida?: boolean;
518
+ /** memo del listado, para actualizar rejectionPercentage sin volver a consultar la OC */
519
+ memo?: string | object | null;
471
520
  };
472
521
  export type BitacoraPOMassive = {
473
522
  accion: string;
@@ -527,10 +576,12 @@ export type PurchaseOrderCosto = {
527
576
  finalizado?: boolean;
528
577
  msgResultado?: string;
529
578
  fecha: string;
579
+ memo?: string;
530
580
  purchase_order_details: {
531
581
  id: number;
532
582
  item_id: number;
533
583
  unit_cost: number;
584
+ calculo?: string;
534
585
  }[];
535
586
  };
536
587
  export type CostoSemanal = {
@@ -773,6 +824,7 @@ export type JsonMemoType = {
773
824
  }>;
774
825
  confirmed?: boolean;
775
826
  rejectionPercentage?: number;
827
+ costCalculations?: CostCalculationMemo[];
776
828
  };
777
829
  export type CloseOpenWorkOrderDetailInput = {
778
830
  id: number | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/types",
3
- "version": "6.9.0",
3
+ "version": "6.11.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": "2cc49202c68f74f1ef031322b108b1461b9c9ad7"
25
+ "gitHead": "3b01e2440af4265aa61b77aba1e7dd33abb2e4fa"
26
26
  }