@gesagro/jaspion-sdk 2.1.2 → 3.0.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.
@@ -43,7 +43,7 @@ interface RequestReportInput {
43
43
  resources: Resource[];
44
44
  }
45
45
  declare abstract class Report {
46
- private readonly http;
46
+ private http;
47
47
  abstract readonly template: string;
48
48
  abstract fileName: string;
49
49
  constructor(http: HttpClient);
@@ -440,6 +440,25 @@ declare class FarrowingList extends Report implements PdfReport, CsvReport {
440
440
  private getParameters;
441
441
  }
442
442
  //#endregion
443
+ //#region src/namespaces/pig-master/reports/farrowing-rate.d.ts
444
+ interface FarrowingRateInput {
445
+ farmId: string;
446
+ calendarType: CalendarType;
447
+ dateRange: {
448
+ start: string;
449
+ end: string;
450
+ };
451
+ parity: number | null;
452
+ femaleSwineBreedId: string | null;
453
+ femaleSwineBirthPlaceId: string | null;
454
+ femaleSwineOriginId: string | null;
455
+ }
456
+ declare class FarrowingRate extends Report implements PdfReport {
457
+ readonly template = "@pig-master/farrowing-rate";
458
+ fileName: string;
459
+ pdf(input: FarrowingRateInput): Promise<void>;
460
+ }
461
+ //#endregion
443
462
  //#region src/namespaces/pig-master/reports/farrowing-type-list.d.ts
444
463
  interface FarrowingTypeListInput {
445
464
  farmId: string;
@@ -1470,7 +1489,7 @@ interface RetentionRateInput {
1470
1489
  dateRange: {
1471
1490
  start: string;
1472
1491
  end: string;
1473
- } | null;
1492
+ };
1474
1493
  calendarType: CalendarType;
1475
1494
  }
1476
1495
  declare class RetentionRate extends Report implements PdfReport {
@@ -1682,6 +1701,7 @@ declare class PigMaster {
1682
1701
  readonly maternityPigletDeathList: MaternityPigletDeathList;
1683
1702
  readonly weaningList: WeaningList;
1684
1703
  readonly farrowingList: FarrowingList;
1704
+ readonly farrowingRate: FarrowingRate;
1685
1705
  readonly maternityPigletTransferList: MaternityPigletTransferList;
1686
1706
  readonly weaningForecast: WeaningForecast;
1687
1707
  readonly farrowingForecast: FarrowingForecast;
@@ -1695,10 +1715,10 @@ declare class PigMaster {
1695
1715
  interface JaspionConfig {
1696
1716
  http: HttpClient;
1697
1717
  }
1698
- declare class Jaspion {
1718
+ export declare class Jaspion {
1699
1719
  readonly pigMaster: PigMaster;
1700
1720
  constructor({ http }: JaspionConfig);
1701
1721
  }
1702
1722
  //#endregion
1703
- export { type HttpClient, type HttpMethod, type HttpRequest, type HttpResponse, Jaspion, type JaspionConfig };
1704
- //# sourceMappingURL=index.d.mts.map
1723
+ export type { HttpClient, HttpMethod, HttpRequest, HttpResponse, JaspionConfig };
1724
+ //# sourceMappingURL=index.d.ts.map
@@ -1012,6 +1012,50 @@ var FarrowingList = class extends Report {
1012
1012
  }
1013
1013
  };
1014
1014
  //#endregion
1015
+ //#region src/namespaces/pig-master/reports/farrowing-rate.ts
1016
+ var FarrowingRate = class extends Report {
1017
+ template = "@pig-master/farrowing-rate";
1018
+ fileName = "Taxa de parição";
1019
+ async pdf(input) {
1020
+ await this.requestPdf({
1021
+ resources: [{
1022
+ key: "FARM_ID",
1023
+ value: input.farmId
1024
+ }],
1025
+ parameters: [
1026
+ {
1027
+ key: "DATE_BEGIN",
1028
+ value: input.dateRange.start
1029
+ },
1030
+ {
1031
+ key: "DATE_END",
1032
+ value: input.dateRange.end
1033
+ },
1034
+ {
1035
+ key: "CALENDAR",
1036
+ value: input.calendarType
1037
+ },
1038
+ {
1039
+ key: "PARITY",
1040
+ value: input.parity?.toString() ?? null
1041
+ },
1042
+ {
1043
+ key: "BREED_ID",
1044
+ value: input.femaleSwineBreedId
1045
+ },
1046
+ {
1047
+ key: "BIRTH_PLACE_ID",
1048
+ value: input.femaleSwineBirthPlaceId
1049
+ },
1050
+ {
1051
+ key: "ORIGIN_ID",
1052
+ value: input.femaleSwineOriginId
1053
+ }
1054
+ ]
1055
+ });
1056
+ }
1057
+ };
1058
+ //#endregion
1015
1059
  //#region src/namespaces/pig-master/reports/farrowing-type-list.ts
1016
1060
  var FarrowingTypeList = class extends Report {
1017
1061
  template = "@pig-master/farrowing-type-list";
@@ -3581,11 +3625,11 @@ var RetentionRate = class extends Report {
3581
3625
  },
3582
3626
  {
3583
3627
  key: "DATE_BEGIN",
3584
- value: input.dateRange?.start ?? null
3628
+ value: input.dateRange.start
3585
3629
  },
3586
3630
  {
3587
3631
  key: "DATE_END",
3588
- value: input.dateRange?.end ?? null
3632
+ value: input.dateRange.end
3589
3633
  }
3590
3634
  ]
3591
3635
  });
@@ -4020,6 +4064,7 @@ var PigMaster = class {
4020
4064
  maternityPigletDeathList;
4021
4065
  weaningList;
4022
4066
  farrowingList;
4067
+ farrowingRate;
4023
4068
  maternityPigletTransferList;
4024
4069
  weaningForecast;
4025
4070
  farrowingForecast;
@@ -4098,6 +4143,7 @@ var PigMaster = class {
4098
4143
  this.maternityPigletDeathList = new MaternityPigletDeathList(http);
4099
4144
  this.weaningList = new WeaningList(http);
4100
4145
  this.farrowingList = new FarrowingList(http);
4146
+ this.farrowingRate = new FarrowingRate(http);
4101
4147
  this.maternityPigletTransferList = new MaternityPigletTransferList(http);
4102
4148
  this.weaningForecast = new WeaningForecast(http);
4103
4149
  this.farrowingForecast = new FarrowingForecast(http);
@@ -4117,4 +4163,4 @@ var Jaspion = class {
4117
4163
  //#endregion
4118
4164
  export { Jaspion };
4119
4165
 
4120
- //# sourceMappingURL=index.mjs.map
4166
+ //# sourceMappingURL=index.js.map