@gesagro/jaspion-sdk 1.0.3 → 1.0.5

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
@@ -304,7 +304,7 @@ declare class FarmSummary extends Report implements PdfReport, CsvReport {
304
304
  }
305
305
 
306
306
  type FarrowingAnalysisGroupBy = 'year-period' | 'parity' | 'employee' | 'breed' | 'doses' | 'first-mating-age' | 'first-mating-weight' | 'interval-from-weaning' | 'day-of-week' | 'lactation-length' | 'origin' | 'arrival-daily-gain' | 'first-mating-daily-gain';
307
- type FarrowingAnalysisEmphasis = 'farrowing-count' | 'total-born-count' | 'liveborn-count' | 'liveborn-percentage' | 'average-liveborn' | 'stillborn-count' | 'stillborn-percentage' | 'average-stillborn' | 'mummified-count' | 'mummified-percentage' | 'average-mummified' | 'average-litter-birth-weight' | 'average-farrowing-duration' | 'induction-count' | 'intervention-count' | 'average-gestation-length';
307
+ type FarrowingAnalysisEmphasis = 'farrowing-count' | 'total-born-count' | 'liveborn-count' | 'liveborn-percentage' | 'average-liveborn' | 'stillborn-count' | 'stillborn-percentage' | 'average-stillborn' | 'mummified-count' | 'mummified-percentage' | 'average-mummified' | 'average-litter-birth-weight' | 'average-farrowing-duration' | 'induction-count' | 'intervention-count' | 'average-gestation-length' | 'farrowing-percentage';
308
308
  interface FarrowingAnalysisInput {
309
309
  farmId: string;
310
310
  dateRange: {
@@ -902,6 +902,30 @@ declare class MaternityPigletDeathCollectionForm extends Report implements PdfRe
902
902
  pdf(input: MaternityPigletDeathCollectionFormInput): Promise<void>;
903
903
  }
904
904
 
905
+ type MaternityContext = 'lactating' | 'nurse-sow';
906
+
907
+ interface MaternityPigletDeathListInput {
908
+ farmId: string;
909
+ calendarType: CalendarType;
910
+ dateRange: {
911
+ start: string;
912
+ end: string;
913
+ } | null;
914
+ femaleSwineId: string | null;
915
+ parity: number | null;
916
+ context: MaternityContext | null;
917
+ employeeId: string | null;
918
+ causeId: string | null;
919
+ }
920
+ declare class MaternityPigletDeathList extends Report implements PdfReport, CsvReport {
921
+ readonly template = "@pig-master/maternity-piglet-death-list";
922
+ fileName: string;
923
+ pdf(input: MaternityPigletDeathListInput): Promise<void>;
924
+ csv(input: MaternityPigletDeathListInput): Promise<void>;
925
+ private getResources;
926
+ private getParameters;
927
+ }
928
+
905
929
  interface MaternityPigletTransferCollectionFormInput {
906
930
  farmId: string;
907
931
  calendarType: CalendarType;
@@ -1231,8 +1255,6 @@ declare class ScoreList extends Report implements PdfReport, CsvReport {
1231
1255
  private getParameters;
1232
1256
  }
1233
1257
 
1234
- type MaternityContext = 'lactating' | 'nurse-sow';
1235
-
1236
1258
  type WeaningAnalysisGroupBy = 'year-period' | 'parity' | 'breed';
1237
1259
  type WeaningAnalysisEmphasis = 'weaning-count' | 'weaning-percentage' | 'lactating-weaning-count' | 'nurse-sow-weaning-count' | 'piglet-batch-count' | 'liveborn-count' | 'weaned-piglet-count' | 'average-weaned-piglets' | 'dead-piglet-count' | 'dead-piglet-percentage' | 'estimated-dead-piglet-percentage' | 'transferred-piglet-count' | 'received-piglet-count' | 'weaned-litter-weight-sum' | 'average-weaned-litter-weight';
1238
1260
  interface WeaningAnalysisInput {
@@ -1340,6 +1362,7 @@ declare class PigMaster {
1340
1362
  readonly scoreList: ScoreList;
1341
1363
  readonly weaningAnalysis: WeaningAnalysis;
1342
1364
  readonly weaningCollectionForm: WeaningCollectionForm;
1365
+ readonly maternityPigletDeathList: MaternityPigletDeathList;
1343
1366
  constructor(http: HttpClient);
1344
1367
  }
1345
1368
 
package/dist/index.d.ts CHANGED
@@ -304,7 +304,7 @@ declare class FarmSummary extends Report implements PdfReport, CsvReport {
304
304
  }
305
305
 
306
306
  type FarrowingAnalysisGroupBy = 'year-period' | 'parity' | 'employee' | 'breed' | 'doses' | 'first-mating-age' | 'first-mating-weight' | 'interval-from-weaning' | 'day-of-week' | 'lactation-length' | 'origin' | 'arrival-daily-gain' | 'first-mating-daily-gain';
307
- type FarrowingAnalysisEmphasis = 'farrowing-count' | 'total-born-count' | 'liveborn-count' | 'liveborn-percentage' | 'average-liveborn' | 'stillborn-count' | 'stillborn-percentage' | 'average-stillborn' | 'mummified-count' | 'mummified-percentage' | 'average-mummified' | 'average-litter-birth-weight' | 'average-farrowing-duration' | 'induction-count' | 'intervention-count' | 'average-gestation-length';
307
+ type FarrowingAnalysisEmphasis = 'farrowing-count' | 'total-born-count' | 'liveborn-count' | 'liveborn-percentage' | 'average-liveborn' | 'stillborn-count' | 'stillborn-percentage' | 'average-stillborn' | 'mummified-count' | 'mummified-percentage' | 'average-mummified' | 'average-litter-birth-weight' | 'average-farrowing-duration' | 'induction-count' | 'intervention-count' | 'average-gestation-length' | 'farrowing-percentage';
308
308
  interface FarrowingAnalysisInput {
309
309
  farmId: string;
310
310
  dateRange: {
@@ -902,6 +902,30 @@ declare class MaternityPigletDeathCollectionForm extends Report implements PdfRe
902
902
  pdf(input: MaternityPigletDeathCollectionFormInput): Promise<void>;
903
903
  }
904
904
 
905
+ type MaternityContext = 'lactating' | 'nurse-sow';
906
+
907
+ interface MaternityPigletDeathListInput {
908
+ farmId: string;
909
+ calendarType: CalendarType;
910
+ dateRange: {
911
+ start: string;
912
+ end: string;
913
+ } | null;
914
+ femaleSwineId: string | null;
915
+ parity: number | null;
916
+ context: MaternityContext | null;
917
+ employeeId: string | null;
918
+ causeId: string | null;
919
+ }
920
+ declare class MaternityPigletDeathList extends Report implements PdfReport, CsvReport {
921
+ readonly template = "@pig-master/maternity-piglet-death-list";
922
+ fileName: string;
923
+ pdf(input: MaternityPigletDeathListInput): Promise<void>;
924
+ csv(input: MaternityPigletDeathListInput): Promise<void>;
925
+ private getResources;
926
+ private getParameters;
927
+ }
928
+
905
929
  interface MaternityPigletTransferCollectionFormInput {
906
930
  farmId: string;
907
931
  calendarType: CalendarType;
@@ -1231,8 +1255,6 @@ declare class ScoreList extends Report implements PdfReport, CsvReport {
1231
1255
  private getParameters;
1232
1256
  }
1233
1257
 
1234
- type MaternityContext = 'lactating' | 'nurse-sow';
1235
-
1236
1258
  type WeaningAnalysisGroupBy = 'year-period' | 'parity' | 'breed';
1237
1259
  type WeaningAnalysisEmphasis = 'weaning-count' | 'weaning-percentage' | 'lactating-weaning-count' | 'nurse-sow-weaning-count' | 'piglet-batch-count' | 'liveborn-count' | 'weaned-piglet-count' | 'average-weaned-piglets' | 'dead-piglet-count' | 'dead-piglet-percentage' | 'estimated-dead-piglet-percentage' | 'transferred-piglet-count' | 'received-piglet-count' | 'weaned-litter-weight-sum' | 'average-weaned-litter-weight';
1238
1260
  interface WeaningAnalysisInput {
@@ -1340,6 +1362,7 @@ declare class PigMaster {
1340
1362
  readonly scoreList: ScoreList;
1341
1363
  readonly weaningAnalysis: WeaningAnalysis;
1342
1364
  readonly weaningCollectionForm: WeaningCollectionForm;
1365
+ readonly maternityPigletDeathList: MaternityPigletDeathList;
1343
1366
  constructor(http: HttpClient);
1344
1367
  }
1345
1368
 
package/dist/index.js CHANGED
@@ -1704,6 +1704,48 @@ var MaternityPigletDeathCollectionForm = class extends Report {
1704
1704
  }
1705
1705
  };
1706
1706
 
1707
+ // src/namespaces/pig-master/reports/maternity-piglet-death-list.ts
1708
+ var MaternityPigletDeathList = class extends Report {
1709
+ constructor() {
1710
+ super(...arguments);
1711
+ this.template = "@pig-master/maternity-piglet-death-list";
1712
+ this.fileName = "Listagem de mortes de leit\xE3o";
1713
+ }
1714
+ async pdf(input) {
1715
+ return this.requestPdf({
1716
+ resources: this.getResources(input),
1717
+ parameters: [
1718
+ ...this.getParameters(input),
1719
+ { key: "DATA_ONLY", value: false }
1720
+ ]
1721
+ });
1722
+ }
1723
+ async csv(input) {
1724
+ return this.requestCsv({
1725
+ resources: this.getResources(input),
1726
+ parameters: [
1727
+ ...this.getParameters(input),
1728
+ { key: "DATA_ONLY", value: true }
1729
+ ]
1730
+ });
1731
+ }
1732
+ getResources(input) {
1733
+ return [{ key: "FARM_ID", value: input.farmId }];
1734
+ }
1735
+ getParameters(input) {
1736
+ return [
1737
+ { key: "CALENDAR", value: input.calendarType },
1738
+ { key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
1739
+ { key: "DATE_END", value: input.dateRange?.end ?? null },
1740
+ { key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
1741
+ { key: "PARITY", value: input.parity },
1742
+ { key: "CONTEXT", value: input.context },
1743
+ { key: "EMPLOYEE_ID", value: input.employeeId },
1744
+ { key: "CAUSE_ID", value: input.causeId }
1745
+ ];
1746
+ }
1747
+ };
1748
+
1707
1749
  // src/namespaces/pig-master/reports/maternity-piglet-transfer-collection-form.ts
1708
1750
  var MaternityPigletTransferCollectionForm = class extends Report {
1709
1751
  constructor() {
@@ -2366,6 +2408,7 @@ var PigMaster = class {
2366
2408
  this.scoreList = new ScoreList(http);
2367
2409
  this.weaningAnalysis = new WeaningAnalysis(http);
2368
2410
  this.weaningCollectionForm = new WeaningCollectionForm(http);
2411
+ this.maternityPigletDeathList = new MaternityPigletDeathList(http);
2369
2412
  }
2370
2413
  };
2371
2414