@gesagro/jaspion-sdk 2.0.9 → 2.0.10

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/index.mjs CHANGED
@@ -2618,6 +2618,46 @@ var WeaningList = class extends Report {
2618
2618
  }
2619
2619
  };
2620
2620
 
2621
+ // src/namespaces/pig-master/reports/weaning-overview.ts
2622
+ var WeaningOverview = class extends Report {
2623
+ constructor() {
2624
+ super(...arguments);
2625
+ this.template = "@pig-master/weaning-overview";
2626
+ this.fileName = "Performance de desmames";
2627
+ }
2628
+ async pdf(input) {
2629
+ await this.requestPdf({
2630
+ resources: this.getResources(input),
2631
+ parameters: [
2632
+ ...this.getParameters(input),
2633
+ { key: "DATA_ONLY", value: false }
2634
+ ]
2635
+ });
2636
+ }
2637
+ async csv(input) {
2638
+ await this.requestCsv({
2639
+ resources: this.getResources(input),
2640
+ parameters: [
2641
+ ...this.getParameters(input),
2642
+ { key: "DATA_ONLY", value: true }
2643
+ ]
2644
+ });
2645
+ }
2646
+ getResources(input) {
2647
+ return [{ key: "FARM_ID", value: input.farmId }];
2648
+ }
2649
+ getParameters(input) {
2650
+ return [
2651
+ { key: "DATE_BEGIN", value: input.dateRange.start },
2652
+ { key: "DATE_END", value: input.dateRange.end },
2653
+ { key: "CALENDAR", value: input.calendarType },
2654
+ { key: "ORIGIN_ID", value: input.originId },
2655
+ { key: "BREED_ID", value: input.breedId },
2656
+ { key: "BIRTH_PLACE_ID", value: input.birthPlaceId }
2657
+ ];
2658
+ }
2659
+ };
2660
+
2621
2661
  // src/namespaces/pig-master/index.ts
2622
2662
  var PigMaster = class {
2623
2663
  constructor(http) {
@@ -2698,6 +2738,7 @@ var PigMaster = class {
2698
2738
  this.farrowingForecast = new FarrowingForecast(http);
2699
2739
  this.breedingProjection = new BreedingProjection(http);
2700
2740
  this.maternityPigletDeathAnalysis = new MaternityPigletDeathAnalysis(http);
2741
+ this.weaningOverview = new WeaningOverview(http);
2701
2742
  }
2702
2743
  };
2703
2744