@gesagro/jaspion-sdk 2.0.4 → 2.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.d.mts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -245,6 +245,23 @@ declare class BreedingMonitor extends Report implements PdfReport {
|
|
|
245
245
|
pdf(input: BreedingMonitorInput): Promise<void>;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
+
interface BreedingProjectionInput {
|
|
249
|
+
farmId: string;
|
|
250
|
+
dateRange: {
|
|
251
|
+
start: string;
|
|
252
|
+
end: string;
|
|
253
|
+
};
|
|
254
|
+
calendarType: CalendarType;
|
|
255
|
+
}
|
|
256
|
+
declare class BreedingProjection extends Report implements PdfReport {
|
|
257
|
+
readonly template = "@pig-master/breeding-projection";
|
|
258
|
+
fileName: string;
|
|
259
|
+
pdf(input: BreedingProjectionInput): Promise<void>;
|
|
260
|
+
csv(input: BreedingProjectionInput): Promise<void>;
|
|
261
|
+
private getResources;
|
|
262
|
+
private getParameters;
|
|
263
|
+
}
|
|
264
|
+
|
|
248
265
|
interface OrderBy<T extends string> {
|
|
249
266
|
column: T;
|
|
250
267
|
direction: 'asc' | 'desc';
|
|
@@ -1240,6 +1257,8 @@ interface PregnantFemaleSwineSaleListInput {
|
|
|
1240
1257
|
recipientId: string | null;
|
|
1241
1258
|
orderBy: OrderBy<PregnantFemaleSwineSalesOrderByColumns>;
|
|
1242
1259
|
originId: string | null;
|
|
1260
|
+
breedId: string | null;
|
|
1261
|
+
birthPlaceId: string | null;
|
|
1243
1262
|
yearPeriod: YearPeriod;
|
|
1244
1263
|
}
|
|
1245
1264
|
declare class PregnantFemaleSwineSaleList extends Report implements PdfReport, CsvReport {
|
|
@@ -1498,6 +1517,7 @@ declare class PigMaster {
|
|
|
1498
1517
|
readonly maternityPigletTransferList: MaternityPigletTransferList;
|
|
1499
1518
|
readonly weaningForecast: WeaningForecast;
|
|
1500
1519
|
readonly farrowingForecast: FarrowingForecast;
|
|
1520
|
+
readonly breedingProjection: BreedingProjection;
|
|
1501
1521
|
constructor(http: HttpClient);
|
|
1502
1522
|
}
|
|
1503
1523
|
|
package/dist/index.d.ts
CHANGED
|
@@ -245,6 +245,23 @@ declare class BreedingMonitor extends Report implements PdfReport {
|
|
|
245
245
|
pdf(input: BreedingMonitorInput): Promise<void>;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
+
interface BreedingProjectionInput {
|
|
249
|
+
farmId: string;
|
|
250
|
+
dateRange: {
|
|
251
|
+
start: string;
|
|
252
|
+
end: string;
|
|
253
|
+
};
|
|
254
|
+
calendarType: CalendarType;
|
|
255
|
+
}
|
|
256
|
+
declare class BreedingProjection extends Report implements PdfReport {
|
|
257
|
+
readonly template = "@pig-master/breeding-projection";
|
|
258
|
+
fileName: string;
|
|
259
|
+
pdf(input: BreedingProjectionInput): Promise<void>;
|
|
260
|
+
csv(input: BreedingProjectionInput): Promise<void>;
|
|
261
|
+
private getResources;
|
|
262
|
+
private getParameters;
|
|
263
|
+
}
|
|
264
|
+
|
|
248
265
|
interface OrderBy<T extends string> {
|
|
249
266
|
column: T;
|
|
250
267
|
direction: 'asc' | 'desc';
|
|
@@ -1240,6 +1257,8 @@ interface PregnantFemaleSwineSaleListInput {
|
|
|
1240
1257
|
recipientId: string | null;
|
|
1241
1258
|
orderBy: OrderBy<PregnantFemaleSwineSalesOrderByColumns>;
|
|
1242
1259
|
originId: string | null;
|
|
1260
|
+
breedId: string | null;
|
|
1261
|
+
birthPlaceId: string | null;
|
|
1243
1262
|
yearPeriod: YearPeriod;
|
|
1244
1263
|
}
|
|
1245
1264
|
declare class PregnantFemaleSwineSaleList extends Report implements PdfReport, CsvReport {
|
|
@@ -1498,6 +1517,7 @@ declare class PigMaster {
|
|
|
1498
1517
|
readonly maternityPigletTransferList: MaternityPigletTransferList;
|
|
1499
1518
|
readonly weaningForecast: WeaningForecast;
|
|
1500
1519
|
readonly farrowingForecast: FarrowingForecast;
|
|
1520
|
+
readonly breedingProjection: BreedingProjection;
|
|
1501
1521
|
constructor(http: HttpClient);
|
|
1502
1522
|
}
|
|
1503
1523
|
|
package/dist/index.js
CHANGED
|
@@ -447,6 +447,43 @@ var BreedingMonitor = class extends Report {
|
|
|
447
447
|
}
|
|
448
448
|
};
|
|
449
449
|
|
|
450
|
+
// src/namespaces/pig-master/reports/breeding-projection.ts
|
|
451
|
+
var BreedingProjection = class extends Report {
|
|
452
|
+
constructor() {
|
|
453
|
+
super(...arguments);
|
|
454
|
+
this.template = "@pig-master/breeding-projection";
|
|
455
|
+
this.fileName = "Proje\xE7\xE3o de reprodu\xE7\xE3o";
|
|
456
|
+
}
|
|
457
|
+
async pdf(input) {
|
|
458
|
+
await this.requestPdf({
|
|
459
|
+
resources: this.getResources(input),
|
|
460
|
+
parameters: [
|
|
461
|
+
...this.getParameters(input),
|
|
462
|
+
{ key: "DATA_ONLY", value: false }
|
|
463
|
+
]
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
async csv(input) {
|
|
467
|
+
await this.requestCsv({
|
|
468
|
+
resources: this.getResources(input),
|
|
469
|
+
parameters: [
|
|
470
|
+
...this.getParameters(input),
|
|
471
|
+
{ key: "DATA_ONLY", value: true }
|
|
472
|
+
]
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
getResources(input) {
|
|
476
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
477
|
+
}
|
|
478
|
+
getParameters(input) {
|
|
479
|
+
return [
|
|
480
|
+
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
481
|
+
{ key: "DATE_END", value: input.dateRange.end },
|
|
482
|
+
{ key: "CALENDAR", value: input.calendarType }
|
|
483
|
+
];
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
|
|
450
487
|
// src/namespaces/pig-master/reports/cause-list.ts
|
|
451
488
|
var CauseList = class extends Report {
|
|
452
489
|
constructor() {
|
|
@@ -2278,6 +2315,8 @@ var PregnantFemaleSwineSaleList = class extends Report {
|
|
|
2278
2315
|
{ key: "DUE_DATE_BEGIN", value: input.dueDateRange?.start ?? null },
|
|
2279
2316
|
{ key: "DUE_DATE_END", value: input.dueDateRange?.end ?? null },
|
|
2280
2317
|
{ key: "ORIGIN_ID", value: input.originId },
|
|
2318
|
+
{ key: "BREED_ID", value: input.breedId },
|
|
2319
|
+
{ key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
|
|
2281
2320
|
{ key: "P_WEEKDAY", value: input.yearPeriod.weekday },
|
|
2282
2321
|
{ key: "P_WEEK", value: input.yearPeriod.week }
|
|
2283
2322
|
];
|
|
@@ -2650,6 +2689,7 @@ var PigMaster = class {
|
|
|
2650
2689
|
this.maternityPigletTransferList = new MaternityPigletTransferList(http);
|
|
2651
2690
|
this.weaningForecast = new WeaningForecast(http);
|
|
2652
2691
|
this.farrowingForecast = new FarrowingForecast(http);
|
|
2692
|
+
this.breedingProjection = new BreedingProjection(http);
|
|
2653
2693
|
}
|
|
2654
2694
|
};
|
|
2655
2695
|
|