@gesagro/jaspion-sdk 2.0.4 → 2.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.mjs CHANGED
@@ -421,6 +421,43 @@ var BreedingMonitor = class extends Report {
421
421
  }
422
422
  };
423
423
 
424
+ // src/namespaces/pig-master/reports/breeding-projection.ts
425
+ var BreedingProjection = class extends Report {
426
+ constructor() {
427
+ super(...arguments);
428
+ this.template = "@pig-master/breeding-projection";
429
+ this.fileName = "Proje\xE7\xE3o de Reprodu\xE7\xE3o";
430
+ }
431
+ async pdf(input) {
432
+ await this.requestPdf({
433
+ resources: this.getResources(input),
434
+ parameters: [
435
+ ...this.getParameters(input),
436
+ { key: "DATA_ONLY", value: false }
437
+ ]
438
+ });
439
+ }
440
+ async csv(input) {
441
+ await this.requestCsv({
442
+ resources: this.getResources(input),
443
+ parameters: [
444
+ ...this.getParameters(input),
445
+ { key: "DATA_ONLY", value: true }
446
+ ]
447
+ });
448
+ }
449
+ getResources(input) {
450
+ return [{ key: "FARM_ID", value: input.farmId }];
451
+ }
452
+ getParameters(input) {
453
+ return [
454
+ { key: "DATE_BEGIN", value: input.dateRange.start },
455
+ { key: "DATE_END", value: input.dateRange.end },
456
+ { key: "CALENDAR", value: input.calendarType }
457
+ ];
458
+ }
459
+ };
460
+
424
461
  // src/namespaces/pig-master/reports/cause-list.ts
425
462
  var CauseList = class extends Report {
426
463
  constructor() {
@@ -2624,6 +2661,7 @@ var PigMaster = class {
2624
2661
  this.maternityPigletTransferList = new MaternityPigletTransferList(http);
2625
2662
  this.weaningForecast = new WeaningForecast(http);
2626
2663
  this.farrowingForecast = new FarrowingForecast(http);
2664
+ this.breedingProjection = new BreedingProjection(http);
2627
2665
  }
2628
2666
  };
2629
2667