@gesagro/jaspion-sdk 1.0.4 → 1.0.6

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
@@ -1678,6 +1678,48 @@ var MaternityPigletDeathCollectionForm = class extends Report {
1678
1678
  }
1679
1679
  };
1680
1680
 
1681
+ // src/namespaces/pig-master/reports/maternity-piglet-death-list.ts
1682
+ var MaternityPigletDeathList = class extends Report {
1683
+ constructor() {
1684
+ super(...arguments);
1685
+ this.template = "@pig-master/maternity-piglet-death-list";
1686
+ this.fileName = "Listagem de mortes de leit\xE3o";
1687
+ }
1688
+ async pdf(input) {
1689
+ return this.requestPdf({
1690
+ resources: this.getResources(input),
1691
+ parameters: [
1692
+ ...this.getParameters(input),
1693
+ { key: "DATA_ONLY", value: false }
1694
+ ]
1695
+ });
1696
+ }
1697
+ async csv(input) {
1698
+ return this.requestCsv({
1699
+ resources: this.getResources(input),
1700
+ parameters: [
1701
+ ...this.getParameters(input),
1702
+ { key: "DATA_ONLY", value: true }
1703
+ ]
1704
+ });
1705
+ }
1706
+ getResources(input) {
1707
+ return [{ key: "FARM_ID", value: input.farmId }];
1708
+ }
1709
+ getParameters(input) {
1710
+ return [
1711
+ { key: "CALENDAR", value: input.calendarType },
1712
+ { key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
1713
+ { key: "DATE_END", value: input.dateRange?.end ?? null },
1714
+ { key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
1715
+ { key: "PARITY", value: input.parity },
1716
+ { key: "CONTEXT", value: input.context },
1717
+ { key: "EMPLOYEE_ID", value: input.employeeId },
1718
+ { key: "CAUSE_ID", value: input.causeId }
1719
+ ];
1720
+ }
1721
+ };
1722
+
1681
1723
  // src/namespaces/pig-master/reports/maternity-piglet-transfer-collection-form.ts
1682
1724
  var MaternityPigletTransferCollectionForm = class extends Report {
1683
1725
  constructor() {
@@ -2031,10 +2073,10 @@ var PregnantFemaleSwineList = class extends Report {
2031
2073
  }
2032
2074
  getParameters(input) {
2033
2075
  return [
2076
+ { key: "CALENDAR", value: input.calendarType },
2034
2077
  { key: "MATING_DATE_BEGIN", value: input.matingDateRange.start },
2035
2078
  { key: "MATING_DATE_END", value: input.matingDateRange.end },
2036
- { key: "CALENDAR", value: input.calendarType },
2037
- { key: "GESTATION_WEEK", value: input.gestationWeek }
2079
+ { key: "GESTATION_WEEK", value: input.gestationWeek.toString() }
2038
2080
  ];
2039
2081
  }
2040
2082
  };
@@ -2340,6 +2382,7 @@ var PigMaster = class {
2340
2382
  this.scoreList = new ScoreList(http);
2341
2383
  this.weaningAnalysis = new WeaningAnalysis(http);
2342
2384
  this.weaningCollectionForm = new WeaningCollectionForm(http);
2385
+ this.maternityPigletDeathList = new MaternityPigletDeathList(http);
2343
2386
  }
2344
2387
  };
2345
2388