@gesagro/jaspion-sdk 2.0.7 → 2.0.8

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.d.mts CHANGED
@@ -964,6 +964,42 @@ declare class LocationList extends Report implements PdfReport, CsvReport {
964
964
  private getParameters;
965
965
  }
966
966
 
967
+ type FarrowingInduction = 'induced' | 'not-induced';
968
+
969
+ type FarrowingIntervention = 'interfered' | 'not-interfered';
970
+
971
+ type MaternityContext = 'lactating' | 'nurse-sow';
972
+
973
+ type MaternityPigletDeathAnalysisGroupBy = 'year-period' | 'parity' | 'employee' | 'breed' | 'day-of-week' | 'month-year' | 'origin' | 'location' | 'lactation-length' | 'lactation-length-category' | 'score' | 'context' | 'cause' | 'farrowing-classification';
974
+ type MaternityPigletDeathAnalysisEmphasis = 'dead-piglet-count' | 'dead-piglet-percentage' | 'average-dead-piglet-age';
975
+ interface MaternityPigletDeathAnalysisInput {
976
+ farmId: string;
977
+ dateRange: {
978
+ start: string;
979
+ end: string;
980
+ } | null;
981
+ calendarType: CalendarType;
982
+ groupBy: MaternityPigletDeathAnalysisGroupBy;
983
+ emphasis: MaternityPigletDeathAnalysisEmphasis;
984
+ femaleSwineId: string | null;
985
+ parity: number | null;
986
+ context: MaternityContext | null;
987
+ causeId: string | null;
988
+ employeeId: string | null;
989
+ femaleSwineBreedId: string | null;
990
+ femaleSwineOriginId: string | null;
991
+ scoreId: string | null;
992
+ locationId: string | null;
993
+ pen: string | null;
994
+ farrowingInduction: FarrowingInduction | null;
995
+ farrowingIntervention: FarrowingIntervention | null;
996
+ }
997
+ declare class MaternityPigletDeathAnalysis extends Report implements PdfReport {
998
+ readonly template = "@pig-master/maternity-piglet-death-analysis";
999
+ fileName: string;
1000
+ pdf(input: MaternityPigletDeathAnalysisInput): Promise<void>;
1001
+ }
1002
+
967
1003
  interface MaternityPigletDeathCollectionFormInput {
968
1004
  farmId: string;
969
1005
  calendarType: CalendarType;
@@ -974,8 +1010,6 @@ declare class MaternityPigletDeathCollectionForm extends Report implements PdfRe
974
1010
  pdf(input: MaternityPigletDeathCollectionFormInput): Promise<void>;
975
1011
  }
976
1012
 
977
- type MaternityContext = 'lactating' | 'nurse-sow';
978
-
979
1013
  interface MaternityPigletDeathListInput {
980
1014
  farmId: string;
981
1015
  calendarType: CalendarType;
@@ -1518,6 +1552,7 @@ declare class PigMaster {
1518
1552
  readonly weaningForecast: WeaningForecast;
1519
1553
  readonly farrowingForecast: FarrowingForecast;
1520
1554
  readonly breedingProjection: BreedingProjection;
1555
+ readonly maternityPigletDeathAnalysis: MaternityPigletDeathAnalysis;
1521
1556
  constructor(http: HttpClient);
1522
1557
  }
1523
1558
 
package/dist/index.d.ts CHANGED
@@ -964,6 +964,42 @@ declare class LocationList extends Report implements PdfReport, CsvReport {
964
964
  private getParameters;
965
965
  }
966
966
 
967
+ type FarrowingInduction = 'induced' | 'not-induced';
968
+
969
+ type FarrowingIntervention = 'interfered' | 'not-interfered';
970
+
971
+ type MaternityContext = 'lactating' | 'nurse-sow';
972
+
973
+ type MaternityPigletDeathAnalysisGroupBy = 'year-period' | 'parity' | 'employee' | 'breed' | 'day-of-week' | 'month-year' | 'origin' | 'location' | 'lactation-length' | 'lactation-length-category' | 'score' | 'context' | 'cause' | 'farrowing-classification';
974
+ type MaternityPigletDeathAnalysisEmphasis = 'dead-piglet-count' | 'dead-piglet-percentage' | 'average-dead-piglet-age';
975
+ interface MaternityPigletDeathAnalysisInput {
976
+ farmId: string;
977
+ dateRange: {
978
+ start: string;
979
+ end: string;
980
+ } | null;
981
+ calendarType: CalendarType;
982
+ groupBy: MaternityPigletDeathAnalysisGroupBy;
983
+ emphasis: MaternityPigletDeathAnalysisEmphasis;
984
+ femaleSwineId: string | null;
985
+ parity: number | null;
986
+ context: MaternityContext | null;
987
+ causeId: string | null;
988
+ employeeId: string | null;
989
+ femaleSwineBreedId: string | null;
990
+ femaleSwineOriginId: string | null;
991
+ scoreId: string | null;
992
+ locationId: string | null;
993
+ pen: string | null;
994
+ farrowingInduction: FarrowingInduction | null;
995
+ farrowingIntervention: FarrowingIntervention | null;
996
+ }
997
+ declare class MaternityPigletDeathAnalysis extends Report implements PdfReport {
998
+ readonly template = "@pig-master/maternity-piglet-death-analysis";
999
+ fileName: string;
1000
+ pdf(input: MaternityPigletDeathAnalysisInput): Promise<void>;
1001
+ }
1002
+
967
1003
  interface MaternityPigletDeathCollectionFormInput {
968
1004
  farmId: string;
969
1005
  calendarType: CalendarType;
@@ -974,8 +1010,6 @@ declare class MaternityPigletDeathCollectionForm extends Report implements PdfRe
974
1010
  pdf(input: MaternityPigletDeathCollectionFormInput): Promise<void>;
975
1011
  }
976
1012
 
977
- type MaternityContext = 'lactating' | 'nurse-sow';
978
-
979
1013
  interface MaternityPigletDeathListInput {
980
1014
  farmId: string;
981
1015
  calendarType: CalendarType;
@@ -1518,6 +1552,7 @@ declare class PigMaster {
1518
1552
  readonly weaningForecast: WeaningForecast;
1519
1553
  readonly farrowingForecast: FarrowingForecast;
1520
1554
  readonly breedingProjection: BreedingProjection;
1555
+ readonly maternityPigletDeathAnalysis: MaternityPigletDeathAnalysis;
1521
1556
  constructor(http: HttpClient);
1522
1557
  }
1523
1558
 
package/dist/index.js CHANGED
@@ -1804,6 +1804,39 @@ var LocationList = class extends Report {
1804
1804
  }
1805
1805
  };
1806
1806
 
1807
+ // src/namespaces/pig-master/reports/maternity-piglet-death-analysis.ts
1808
+ var MaternityPigletDeathAnalysis = class extends Report {
1809
+ constructor() {
1810
+ super(...arguments);
1811
+ this.template = "@pig-master/maternity-piglet-death-analysis";
1812
+ this.fileName = "An\xE1lise de mortes de leit\xF5es na maternidade";
1813
+ }
1814
+ async pdf(input) {
1815
+ await this.requestPdf({
1816
+ resources: [{ key: "FARM_ID", value: input.farmId }],
1817
+ parameters: [
1818
+ { key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
1819
+ { key: "DATE_END", value: input.dateRange?.end ?? null },
1820
+ { key: "CALENDAR", value: input.calendarType },
1821
+ { key: "GROUP", value: input.groupBy },
1822
+ { key: "FIELD", value: input.emphasis },
1823
+ { key: "PARITY", value: input.parity?.toString() ?? null },
1824
+ { key: "ORIGIN_ID", value: input.femaleSwineOriginId },
1825
+ { key: "BREED_ID", value: input.femaleSwineBreedId },
1826
+ { key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
1827
+ { key: "EMPLOYEE_ID", value: input.employeeId },
1828
+ { key: "LOCATION_ID", value: input.locationId },
1829
+ { key: "PEN", value: input.pen },
1830
+ { key: "CAUSE_ID", value: input.causeId },
1831
+ { key: "SCORE_ID", value: input.scoreId },
1832
+ { key: "CONTEXT", value: input.context },
1833
+ { key: "INDUCTION", value: input.farrowingInduction },
1834
+ { key: "INTERVENTION", value: input.farrowingIntervention }
1835
+ ]
1836
+ });
1837
+ }
1838
+ };
1839
+
1807
1840
  // src/namespaces/pig-master/reports/maternity-piglet-death-collection-form.ts
1808
1841
  var MaternityPigletDeathCollectionForm = class extends Report {
1809
1842
  constructor() {
@@ -2690,6 +2723,7 @@ var PigMaster = class {
2690
2723
  this.weaningForecast = new WeaningForecast(http);
2691
2724
  this.farrowingForecast = new FarrowingForecast(http);
2692
2725
  this.breedingProjection = new BreedingProjection(http);
2726
+ this.maternityPigletDeathAnalysis = new MaternityPigletDeathAnalysis(http);
2693
2727
  }
2694
2728
  };
2695
2729