@gesagro/jaspion-sdk 1.0.11 → 2.0.1
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/README.md +62 -3
- package/dist/index.d.mts +88 -12
- package/dist/index.d.ts +88 -12
- package/dist/index.js +272 -160
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +271 -159
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -4
package/dist/index.mjs
CHANGED
|
@@ -1,39 +1,16 @@
|
|
|
1
|
-
// src/core/http-client.ts
|
|
2
|
-
var HttpClient = class {
|
|
3
|
-
constructor(baseUrl) {
|
|
4
|
-
this.baseUrl = baseUrl;
|
|
5
|
-
this.headers = {
|
|
6
|
-
"Content-Type": "application/json"
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
setHeader(key, value) {
|
|
10
|
-
this.headers[key] = value;
|
|
11
|
-
}
|
|
12
|
-
async post(path, body) {
|
|
13
|
-
const response = await fetch(`${this.baseUrl}${path}`, {
|
|
14
|
-
method: "POST",
|
|
15
|
-
headers: this.headers,
|
|
16
|
-
body: JSON.stringify(body)
|
|
17
|
-
});
|
|
18
|
-
if (!response.ok) {
|
|
19
|
-
throw new Error(`Request failed with status ${response.status}`);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
1
|
// src/core/report.ts
|
|
25
2
|
var Report = class {
|
|
26
3
|
constructor(http) {
|
|
27
4
|
this.http = http;
|
|
28
5
|
}
|
|
29
6
|
async requestPdf(input) {
|
|
30
|
-
|
|
7
|
+
await this.request({
|
|
31
8
|
...input,
|
|
32
9
|
contentType: "application/pdf"
|
|
33
10
|
});
|
|
34
11
|
}
|
|
35
12
|
async requestCsv(input) {
|
|
36
|
-
|
|
13
|
+
await this.request({
|
|
37
14
|
...input,
|
|
38
15
|
contentType: "text/csv"
|
|
39
16
|
});
|
|
@@ -48,13 +25,17 @@ var Report = class {
|
|
|
48
25
|
"text/csv": ".csv"
|
|
49
26
|
};
|
|
50
27
|
const fileName = `${this.fileName}${fileExtensions[contentType]}`;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
28
|
+
return this.http.request({
|
|
29
|
+
method: "POST",
|
|
30
|
+
path: "/reports",
|
|
31
|
+
body: {
|
|
32
|
+
template: this.template,
|
|
33
|
+
fileName,
|
|
34
|
+
parameters,
|
|
35
|
+
resources,
|
|
36
|
+
contentType,
|
|
37
|
+
type: "jasper-reports"
|
|
38
|
+
}
|
|
58
39
|
});
|
|
59
40
|
}
|
|
60
41
|
};
|
|
@@ -67,7 +48,7 @@ var BirthPlaceList = class extends Report {
|
|
|
67
48
|
this.fileName = "Listagem de proced\xEAncias";
|
|
68
49
|
}
|
|
69
50
|
async pdf(input) {
|
|
70
|
-
|
|
51
|
+
await this.requestPdf({
|
|
71
52
|
resources: this.getResources(input),
|
|
72
53
|
parameters: [
|
|
73
54
|
...this.getParameters(input),
|
|
@@ -76,7 +57,7 @@ var BirthPlaceList = class extends Report {
|
|
|
76
57
|
});
|
|
77
58
|
}
|
|
78
59
|
async csv(input) {
|
|
79
|
-
|
|
60
|
+
await this.requestCsv({
|
|
80
61
|
resources: this.getResources(input),
|
|
81
62
|
parameters: [
|
|
82
63
|
...this.getParameters(input),
|
|
@@ -100,7 +81,7 @@ var BoarByBreedList = class extends Report {
|
|
|
100
81
|
this.fileName = "Machos por ra\xE7a";
|
|
101
82
|
}
|
|
102
83
|
async pdf(input) {
|
|
103
|
-
|
|
84
|
+
await this.requestPdf({
|
|
104
85
|
resources: this.getResources(input),
|
|
105
86
|
parameters: [
|
|
106
87
|
...this.getParameters(input),
|
|
@@ -109,7 +90,7 @@ var BoarByBreedList = class extends Report {
|
|
|
109
90
|
});
|
|
110
91
|
}
|
|
111
92
|
async csv(input) {
|
|
112
|
-
|
|
93
|
+
await this.requestCsv({
|
|
113
94
|
resources: this.getResources(input),
|
|
114
95
|
parameters: [
|
|
115
96
|
...this.getParameters(input),
|
|
@@ -137,7 +118,7 @@ var BoarDeathCollectionForm = class extends Report {
|
|
|
137
118
|
this.fileName = "Morte de macho";
|
|
138
119
|
}
|
|
139
120
|
async pdf(input) {
|
|
140
|
-
|
|
121
|
+
await this.requestPdf({
|
|
141
122
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
142
123
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
143
124
|
});
|
|
@@ -152,7 +133,7 @@ var BoarDeathList = class extends Report {
|
|
|
152
133
|
this.fileName = "Mortes de machos";
|
|
153
134
|
}
|
|
154
135
|
async pdf(input) {
|
|
155
|
-
|
|
136
|
+
await this.requestPdf({
|
|
156
137
|
resources: this.getResources(input),
|
|
157
138
|
parameters: [
|
|
158
139
|
...this.getParameters(input),
|
|
@@ -161,7 +142,7 @@ var BoarDeathList = class extends Report {
|
|
|
161
142
|
});
|
|
162
143
|
}
|
|
163
144
|
async csv(input) {
|
|
164
|
-
|
|
145
|
+
await this.requestCsv({
|
|
165
146
|
resources: this.getResources(input),
|
|
166
147
|
parameters: [
|
|
167
148
|
...this.getParameters(input),
|
|
@@ -199,7 +180,7 @@ var BoarDiscardCollectionForm = class extends Report {
|
|
|
199
180
|
this.fileName = "Descarte de macho";
|
|
200
181
|
}
|
|
201
182
|
async pdf(input) {
|
|
202
|
-
|
|
183
|
+
await this.requestPdf({
|
|
203
184
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
204
185
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
205
186
|
});
|
|
@@ -214,7 +195,7 @@ var BoarDiscardList = class extends Report {
|
|
|
214
195
|
this.fileName = "Descartes de machos";
|
|
215
196
|
}
|
|
216
197
|
async pdf(input) {
|
|
217
|
-
|
|
198
|
+
await this.requestPdf({
|
|
218
199
|
resources: this.getResources(input),
|
|
219
200
|
parameters: [
|
|
220
201
|
...this.getParameters(input),
|
|
@@ -223,7 +204,7 @@ var BoarDiscardList = class extends Report {
|
|
|
223
204
|
});
|
|
224
205
|
}
|
|
225
206
|
async csv(input) {
|
|
226
|
-
|
|
207
|
+
await this.requestCsv({
|
|
227
208
|
resources: this.getResources(input),
|
|
228
209
|
parameters: [
|
|
229
210
|
...this.getParameters(input),
|
|
@@ -262,7 +243,7 @@ var BoarEarTagReplacementList = class extends Report {
|
|
|
262
243
|
this.fileName = "Trocas de brinco de macho";
|
|
263
244
|
}
|
|
264
245
|
async pdf(input) {
|
|
265
|
-
|
|
246
|
+
await this.requestPdf({
|
|
266
247
|
resources: this.getResources(input),
|
|
267
248
|
parameters: [
|
|
268
249
|
...this.getParameters(input),
|
|
@@ -271,7 +252,7 @@ var BoarEarTagReplacementList = class extends Report {
|
|
|
271
252
|
});
|
|
272
253
|
}
|
|
273
254
|
async csv(input) {
|
|
274
|
-
|
|
255
|
+
await this.requestCsv({
|
|
275
256
|
resources: this.getResources(input),
|
|
276
257
|
parameters: [
|
|
277
258
|
...this.getParameters(input),
|
|
@@ -301,7 +282,7 @@ var BoarTreatmentCollectionForm = class extends Report {
|
|
|
301
282
|
this.fileName = "Medica\xE7\xE3o / vacina\xE7\xE3o de macho";
|
|
302
283
|
}
|
|
303
284
|
async pdf(input) {
|
|
304
|
-
|
|
285
|
+
await this.requestPdf({
|
|
305
286
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
306
287
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
307
288
|
});
|
|
@@ -316,7 +297,7 @@ var BoarTreatmentList = class extends Report {
|
|
|
316
297
|
this.fileName = "Listagem de medica\xE7\xF5es / vacinas (machos)";
|
|
317
298
|
}
|
|
318
299
|
async pdf(input) {
|
|
319
|
-
|
|
300
|
+
await this.requestPdf({
|
|
320
301
|
resources: this.getResources(input),
|
|
321
302
|
parameters: [
|
|
322
303
|
...this.getParameters(input),
|
|
@@ -325,7 +306,7 @@ var BoarTreatmentList = class extends Report {
|
|
|
325
306
|
});
|
|
326
307
|
}
|
|
327
308
|
async csv(input) {
|
|
328
|
-
|
|
309
|
+
await this.requestCsv({
|
|
329
310
|
resources: this.getResources(input),
|
|
330
311
|
parameters: [
|
|
331
312
|
...this.getParameters(input),
|
|
@@ -355,7 +336,7 @@ var BoarsInventory = class extends Report {
|
|
|
355
336
|
this.fileName = "Estoque de machos";
|
|
356
337
|
}
|
|
357
338
|
async pdf(input) {
|
|
358
|
-
|
|
339
|
+
await this.requestPdf({
|
|
359
340
|
resources: this.getResources(input),
|
|
360
341
|
parameters: [
|
|
361
342
|
...this.getParameters(input),
|
|
@@ -364,7 +345,7 @@ var BoarsInventory = class extends Report {
|
|
|
364
345
|
});
|
|
365
346
|
}
|
|
366
347
|
async csv(input) {
|
|
367
|
-
|
|
348
|
+
await this.requestCsv({
|
|
368
349
|
resources: this.getResources(input),
|
|
369
350
|
parameters: [
|
|
370
351
|
...this.getParameters(input),
|
|
@@ -395,7 +376,7 @@ var BreedList = class extends Report {
|
|
|
395
376
|
this.fileName = "Listagem de ra\xE7as";
|
|
396
377
|
}
|
|
397
378
|
async pdf(input) {
|
|
398
|
-
|
|
379
|
+
await this.requestPdf({
|
|
399
380
|
resources: this.getResources(input),
|
|
400
381
|
parameters: [
|
|
401
382
|
...this.getParameters(input),
|
|
@@ -404,7 +385,7 @@ var BreedList = class extends Report {
|
|
|
404
385
|
});
|
|
405
386
|
}
|
|
406
387
|
async csv(input) {
|
|
407
|
-
|
|
388
|
+
await this.requestCsv({
|
|
408
389
|
resources: this.getResources(input),
|
|
409
390
|
parameters: [
|
|
410
391
|
...this.getParameters(input),
|
|
@@ -428,7 +409,7 @@ var BreedingMonitor = class extends Report {
|
|
|
428
409
|
this.fileName = "Monitor de Reprodu\xE7\xE3o";
|
|
429
410
|
}
|
|
430
411
|
async pdf(input) {
|
|
431
|
-
|
|
412
|
+
await this.requestPdf({
|
|
432
413
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
433
414
|
parameters: [
|
|
434
415
|
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
@@ -448,7 +429,7 @@ var CauseList = class extends Report {
|
|
|
448
429
|
this.fileName = "Listagem de motivos";
|
|
449
430
|
}
|
|
450
431
|
async pdf(input) {
|
|
451
|
-
|
|
432
|
+
await this.requestPdf({
|
|
452
433
|
resources: this.getResources(input),
|
|
453
434
|
parameters: [
|
|
454
435
|
...this.getParameters(input),
|
|
@@ -457,7 +438,7 @@ var CauseList = class extends Report {
|
|
|
457
438
|
});
|
|
458
439
|
}
|
|
459
440
|
async csv(input) {
|
|
460
|
-
|
|
441
|
+
await this.requestCsv({
|
|
461
442
|
resources: this.getResources(input),
|
|
462
443
|
parameters: [
|
|
463
444
|
...this.getParameters(input),
|
|
@@ -487,7 +468,7 @@ var DrugList = class extends Report {
|
|
|
487
468
|
this.fileName = "Listagem de medicamentos / vacinas";
|
|
488
469
|
}
|
|
489
470
|
async pdf(input) {
|
|
490
|
-
|
|
471
|
+
await this.requestPdf({
|
|
491
472
|
resources: this.getResources(input),
|
|
492
473
|
parameters: [
|
|
493
474
|
...this.getParameters(input),
|
|
@@ -496,7 +477,7 @@ var DrugList = class extends Report {
|
|
|
496
477
|
});
|
|
497
478
|
}
|
|
498
479
|
async csv(input) {
|
|
499
|
-
|
|
480
|
+
await this.requestCsv({
|
|
500
481
|
resources: this.getResources(input),
|
|
501
482
|
parameters: [
|
|
502
483
|
...this.getParameters(input),
|
|
@@ -520,7 +501,7 @@ var EmployeeList = class extends Report {
|
|
|
520
501
|
this.fileName = "Listagem de funcion\xE1rios";
|
|
521
502
|
}
|
|
522
503
|
async pdf(input) {
|
|
523
|
-
|
|
504
|
+
await this.requestPdf({
|
|
524
505
|
resources: this.getResources(input),
|
|
525
506
|
parameters: [
|
|
526
507
|
...this.getParameters(input),
|
|
@@ -529,7 +510,7 @@ var EmployeeList = class extends Report {
|
|
|
529
510
|
});
|
|
530
511
|
}
|
|
531
512
|
async csv(input) {
|
|
532
|
-
|
|
513
|
+
await this.requestCsv({
|
|
533
514
|
resources: this.getResources(input),
|
|
534
515
|
parameters: [
|
|
535
516
|
...this.getParameters(input),
|
|
@@ -556,7 +537,7 @@ var FarmSummary = class extends Report {
|
|
|
556
537
|
this.fileName = "Fechamento de per\xEDodo";
|
|
557
538
|
}
|
|
558
539
|
async pdf(input) {
|
|
559
|
-
|
|
540
|
+
await this.requestPdf({
|
|
560
541
|
resources: this.getResources(input),
|
|
561
542
|
parameters: [
|
|
562
543
|
...this.getParameters(input),
|
|
@@ -565,7 +546,7 @@ var FarmSummary = class extends Report {
|
|
|
565
546
|
});
|
|
566
547
|
}
|
|
567
548
|
async csv(input) {
|
|
568
|
-
|
|
549
|
+
await this.requestCsv({
|
|
569
550
|
resources: this.getResources(input),
|
|
570
551
|
parameters: [
|
|
571
552
|
...this.getParameters(input),
|
|
@@ -593,7 +574,7 @@ var FarrowingAnalysis = class extends Report {
|
|
|
593
574
|
this.fileName = "An\xE1lise de partos";
|
|
594
575
|
}
|
|
595
576
|
async pdf(input) {
|
|
596
|
-
|
|
577
|
+
await this.requestPdf({
|
|
597
578
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
598
579
|
parameters: [
|
|
599
580
|
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
@@ -625,13 +606,53 @@ var FarrowingCollectionForm = class extends Report {
|
|
|
625
606
|
this.fileName = "Parto";
|
|
626
607
|
}
|
|
627
608
|
async pdf(input) {
|
|
628
|
-
|
|
609
|
+
await this.requestPdf({
|
|
629
610
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
630
611
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
631
612
|
});
|
|
632
613
|
}
|
|
633
614
|
};
|
|
634
615
|
|
|
616
|
+
// src/namespaces/pig-master/reports/farrowing-forecast.ts
|
|
617
|
+
var FarrowingForecast = class extends Report {
|
|
618
|
+
constructor() {
|
|
619
|
+
super(...arguments);
|
|
620
|
+
this.template = "@pig-master/farrowing-forecast";
|
|
621
|
+
this.fileName = "Previs\xE3o de partos";
|
|
622
|
+
}
|
|
623
|
+
async pdf(input) {
|
|
624
|
+
await this.requestPdf({
|
|
625
|
+
resources: this.getResources(input),
|
|
626
|
+
parameters: [
|
|
627
|
+
...this.getParameters(input),
|
|
628
|
+
{ key: "DATA_ONLY", value: false }
|
|
629
|
+
]
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
async csv(input) {
|
|
633
|
+
await this.requestCsv({
|
|
634
|
+
resources: this.getResources(input),
|
|
635
|
+
parameters: [
|
|
636
|
+
...this.getParameters(input),
|
|
637
|
+
{ key: "DATA_ONLY", value: true }
|
|
638
|
+
]
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
getResources(input) {
|
|
642
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
643
|
+
}
|
|
644
|
+
getParameters(input) {
|
|
645
|
+
return [
|
|
646
|
+
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
647
|
+
{ key: "DATE_END", value: input.dateRange.end },
|
|
648
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
649
|
+
{ key: "PARITY", value: input.parity?.toString() ?? null },
|
|
650
|
+
{ key: "LOCATION_ID", value: input.locationId },
|
|
651
|
+
{ key: "PEN", value: input.pen }
|
|
652
|
+
];
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
|
|
635
656
|
// src/core/to-snake-case.ts
|
|
636
657
|
function toSnakeCase(str) {
|
|
637
658
|
return str.replace(/[A-Z]/g, (letter, index) => {
|
|
@@ -647,7 +668,7 @@ var FarrowingList = class extends Report {
|
|
|
647
668
|
this.fileName = "Listagem de partos";
|
|
648
669
|
}
|
|
649
670
|
async pdf(input) {
|
|
650
|
-
|
|
671
|
+
await this.requestPdf({
|
|
651
672
|
resources: this.getResources(input),
|
|
652
673
|
parameters: [
|
|
653
674
|
...this.getParameters(input),
|
|
@@ -656,7 +677,7 @@ var FarrowingList = class extends Report {
|
|
|
656
677
|
});
|
|
657
678
|
}
|
|
658
679
|
async csv(input) {
|
|
659
|
-
|
|
680
|
+
await this.requestCsv({
|
|
660
681
|
resources: this.getResources(input),
|
|
661
682
|
parameters: [
|
|
662
683
|
...this.getParameters(input),
|
|
@@ -693,7 +714,7 @@ var FarrowingTypeList = class extends Report {
|
|
|
693
714
|
this.fileName = "Listagem de tipos de parto";
|
|
694
715
|
}
|
|
695
716
|
async pdf(input) {
|
|
696
|
-
|
|
717
|
+
await this.requestPdf({
|
|
697
718
|
resources: this.getResources(input),
|
|
698
719
|
parameters: [
|
|
699
720
|
...this.getParameters(input),
|
|
@@ -702,7 +723,7 @@ var FarrowingTypeList = class extends Report {
|
|
|
702
723
|
});
|
|
703
724
|
}
|
|
704
725
|
async csv(input) {
|
|
705
|
-
|
|
726
|
+
await this.requestCsv({
|
|
706
727
|
resources: this.getResources(input),
|
|
707
728
|
parameters: [
|
|
708
729
|
...this.getParameters(input),
|
|
@@ -726,7 +747,7 @@ var FemaleSwineArrivalMonitoring = class extends Report {
|
|
|
726
747
|
this.fileName = "Acompanhamento do lote";
|
|
727
748
|
}
|
|
728
749
|
async pdf(input) {
|
|
729
|
-
|
|
750
|
+
await this.requestPdf({
|
|
730
751
|
resources: this.getResources(input),
|
|
731
752
|
parameters: [
|
|
732
753
|
...this.getParameters(input),
|
|
@@ -735,7 +756,7 @@ var FemaleSwineArrivalMonitoring = class extends Report {
|
|
|
735
756
|
});
|
|
736
757
|
}
|
|
737
758
|
async csv(input) {
|
|
738
|
-
|
|
759
|
+
await this.requestCsv({
|
|
739
760
|
resources: this.getResources(input),
|
|
740
761
|
parameters: [
|
|
741
762
|
...this.getParameters(input),
|
|
@@ -766,7 +787,7 @@ var FemaleSwineByBreedList = class extends Report {
|
|
|
766
787
|
this.fileName = "F\xEAmeas por ra\xE7a";
|
|
767
788
|
}
|
|
768
789
|
async pdf(input) {
|
|
769
|
-
|
|
790
|
+
await this.requestPdf({
|
|
770
791
|
resources: this.getResources(input),
|
|
771
792
|
parameters: [
|
|
772
793
|
...this.getParameters(input),
|
|
@@ -775,7 +796,7 @@ var FemaleSwineByBreedList = class extends Report {
|
|
|
775
796
|
});
|
|
776
797
|
}
|
|
777
798
|
async csv(input) {
|
|
778
|
-
|
|
799
|
+
await this.requestCsv({
|
|
779
800
|
resources: this.getResources(input),
|
|
780
801
|
parameters: [
|
|
781
802
|
...this.getParameters(input),
|
|
@@ -807,7 +828,7 @@ var FemaleSwineByParityList = class extends Report {
|
|
|
807
828
|
this.fileName = "F\xEAmeas por cria";
|
|
808
829
|
}
|
|
809
830
|
async pdf(input) {
|
|
810
|
-
|
|
831
|
+
await this.requestPdf({
|
|
811
832
|
resources: this.getResources(input),
|
|
812
833
|
parameters: [
|
|
813
834
|
...this.getParameters(input),
|
|
@@ -816,7 +837,7 @@ var FemaleSwineByParityList = class extends Report {
|
|
|
816
837
|
});
|
|
817
838
|
}
|
|
818
839
|
async csv(input) {
|
|
819
|
-
|
|
840
|
+
await this.requestCsv({
|
|
820
841
|
resources: this.getResources(input),
|
|
821
842
|
parameters: [
|
|
822
843
|
...this.getParameters(input),
|
|
@@ -848,7 +869,7 @@ var FemaleSwineByStatusList = class extends Report {
|
|
|
848
869
|
this.fileName = "F\xEAmeas por status";
|
|
849
870
|
}
|
|
850
871
|
async pdf(input) {
|
|
851
|
-
|
|
872
|
+
await this.requestPdf({
|
|
852
873
|
resources: this.getResources(input),
|
|
853
874
|
parameters: [
|
|
854
875
|
...this.getParameters(input),
|
|
@@ -857,7 +878,7 @@ var FemaleSwineByStatusList = class extends Report {
|
|
|
857
878
|
});
|
|
858
879
|
}
|
|
859
880
|
async csv(input) {
|
|
860
|
-
|
|
881
|
+
await this.requestCsv({
|
|
861
882
|
resources: this.getResources(input),
|
|
862
883
|
parameters: [
|
|
863
884
|
...this.getParameters(input),
|
|
@@ -913,7 +934,7 @@ var FemaleSwineByTraceabilityList = class extends Report {
|
|
|
913
934
|
this.fileName = "F\xEAmeas por rastreabilidade";
|
|
914
935
|
}
|
|
915
936
|
async pdf(input) {
|
|
916
|
-
|
|
937
|
+
await this.requestPdf({
|
|
917
938
|
resources: this.getResources(input),
|
|
918
939
|
parameters: [
|
|
919
940
|
...this.getParameters(input),
|
|
@@ -922,7 +943,7 @@ var FemaleSwineByTraceabilityList = class extends Report {
|
|
|
922
943
|
});
|
|
923
944
|
}
|
|
924
945
|
async csv(input) {
|
|
925
|
-
|
|
946
|
+
await this.requestCsv({
|
|
926
947
|
resources: this.getResources(input),
|
|
927
948
|
parameters: [
|
|
928
949
|
...this.getParameters(input),
|
|
@@ -958,7 +979,7 @@ var FemaleSwineDeathAnalysis = class extends Report {
|
|
|
958
979
|
this.fileName = "An\xE1lise morte de f\xEAmeas";
|
|
959
980
|
}
|
|
960
981
|
async pdf(input) {
|
|
961
|
-
|
|
982
|
+
await this.requestPdf({
|
|
962
983
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
963
984
|
parameters: [
|
|
964
985
|
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
@@ -990,7 +1011,7 @@ var FemaleSwineDeathCollectionForm = class extends Report {
|
|
|
990
1011
|
this.fileName = "Morte de f\xEAmea";
|
|
991
1012
|
}
|
|
992
1013
|
async pdf(input) {
|
|
993
|
-
|
|
1014
|
+
await this.requestPdf({
|
|
994
1015
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
995
1016
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
996
1017
|
});
|
|
@@ -1005,7 +1026,7 @@ var FemaleSwineDeathList = class extends Report {
|
|
|
1005
1026
|
this.fileName = "Morte de f\xEAmeas";
|
|
1006
1027
|
}
|
|
1007
1028
|
async pdf(input) {
|
|
1008
|
-
|
|
1029
|
+
await this.requestPdf({
|
|
1009
1030
|
resources: this.getResources(input),
|
|
1010
1031
|
parameters: [
|
|
1011
1032
|
...this.getParameters(input),
|
|
@@ -1014,7 +1035,7 @@ var FemaleSwineDeathList = class extends Report {
|
|
|
1014
1035
|
});
|
|
1015
1036
|
}
|
|
1016
1037
|
async csv(input) {
|
|
1017
|
-
|
|
1038
|
+
await this.requestCsv({
|
|
1018
1039
|
resources: this.getResources(input),
|
|
1019
1040
|
parameters: [
|
|
1020
1041
|
...this.getParameters(input),
|
|
@@ -1054,7 +1075,7 @@ var FemaleSwineDiscardAnalysis = class extends Report {
|
|
|
1054
1075
|
this.fileName = "An\xE1lise descarte de f\xEAmeas";
|
|
1055
1076
|
}
|
|
1056
1077
|
async pdf(input) {
|
|
1057
|
-
|
|
1078
|
+
await this.requestPdf({
|
|
1058
1079
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1059
1080
|
parameters: [
|
|
1060
1081
|
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
@@ -1087,7 +1108,7 @@ var FemaleSwineDiscardCollectionForm = class extends Report {
|
|
|
1087
1108
|
this.fileName = "Descarte de f\xEAmea";
|
|
1088
1109
|
}
|
|
1089
1110
|
async pdf(input) {
|
|
1090
|
-
|
|
1111
|
+
await this.requestPdf({
|
|
1091
1112
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1092
1113
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1093
1114
|
});
|
|
@@ -1102,7 +1123,7 @@ var FemaleSwineDiscardList = class extends Report {
|
|
|
1102
1123
|
this.fileName = "Descarte de f\xEAmeas";
|
|
1103
1124
|
}
|
|
1104
1125
|
async pdf(input) {
|
|
1105
|
-
|
|
1126
|
+
await this.requestPdf({
|
|
1106
1127
|
resources: this.getResources(input),
|
|
1107
1128
|
parameters: [
|
|
1108
1129
|
...this.getParameters(input),
|
|
@@ -1111,7 +1132,7 @@ var FemaleSwineDiscardList = class extends Report {
|
|
|
1111
1132
|
});
|
|
1112
1133
|
}
|
|
1113
1134
|
async csv(input) {
|
|
1114
|
-
|
|
1135
|
+
await this.requestCsv({
|
|
1115
1136
|
resources: this.getResources(input),
|
|
1116
1137
|
parameters: [
|
|
1117
1138
|
...this.getParameters(input),
|
|
@@ -1152,7 +1173,7 @@ var FemaleSwineEarTagReplacementList = class extends Report {
|
|
|
1152
1173
|
this.fileName = "Trocas de brinco de f\xEAmeas";
|
|
1153
1174
|
}
|
|
1154
1175
|
async pdf(input) {
|
|
1155
|
-
|
|
1176
|
+
await this.requestPdf({
|
|
1156
1177
|
resources: this.getResources(input),
|
|
1157
1178
|
parameters: [
|
|
1158
1179
|
...this.getParameters(input),
|
|
@@ -1161,7 +1182,7 @@ var FemaleSwineEarTagReplacementList = class extends Report {
|
|
|
1161
1182
|
});
|
|
1162
1183
|
}
|
|
1163
1184
|
async csv(input) {
|
|
1164
|
-
|
|
1185
|
+
await this.requestCsv({
|
|
1165
1186
|
resources: this.getResources(input),
|
|
1166
1187
|
parameters: [
|
|
1167
1188
|
...this.getParameters(input),
|
|
@@ -1191,7 +1212,7 @@ var FemaleSwineInventory = class extends Report {
|
|
|
1191
1212
|
this.fileName = "Estoque de f\xEAmeas";
|
|
1192
1213
|
}
|
|
1193
1214
|
async pdf(input) {
|
|
1194
|
-
|
|
1215
|
+
await this.requestPdf({
|
|
1195
1216
|
resources: this.getResources(input),
|
|
1196
1217
|
parameters: [
|
|
1197
1218
|
...this.getParameters(input),
|
|
@@ -1200,7 +1221,7 @@ var FemaleSwineInventory = class extends Report {
|
|
|
1200
1221
|
});
|
|
1201
1222
|
}
|
|
1202
1223
|
async csv(input) {
|
|
1203
|
-
|
|
1224
|
+
await this.requestCsv({
|
|
1204
1225
|
resources: this.getResources(input),
|
|
1205
1226
|
parameters: [
|
|
1206
1227
|
...this.getParameters(input),
|
|
@@ -1231,7 +1252,7 @@ var FemaleSwinePendingActionList = class extends Report {
|
|
|
1231
1252
|
this.fileName = "A\xE7\xF5es pendentes";
|
|
1232
1253
|
}
|
|
1233
1254
|
async pdf(input) {
|
|
1234
|
-
|
|
1255
|
+
await this.requestPdf({
|
|
1235
1256
|
resources: this.getResources(input),
|
|
1236
1257
|
parameters: [
|
|
1237
1258
|
...this.getParameters(input),
|
|
@@ -1240,7 +1261,7 @@ var FemaleSwinePendingActionList = class extends Report {
|
|
|
1240
1261
|
});
|
|
1241
1262
|
}
|
|
1242
1263
|
async csv(input) {
|
|
1243
|
-
|
|
1264
|
+
await this.requestCsv({
|
|
1244
1265
|
resources: this.getResources(input),
|
|
1245
1266
|
parameters: [
|
|
1246
1267
|
...this.getParameters(input),
|
|
@@ -1268,7 +1289,7 @@ var FemaleSwinePreDiscardList = class extends Report {
|
|
|
1268
1289
|
this.fileName = "Listagem de pr\xE9-descartes de f\xEAmeas";
|
|
1269
1290
|
}
|
|
1270
1291
|
async pdf(input) {
|
|
1271
|
-
|
|
1292
|
+
await this.requestPdf({
|
|
1272
1293
|
resources: this.getResources(input),
|
|
1273
1294
|
parameters: [
|
|
1274
1295
|
...this.getParameters(input),
|
|
@@ -1277,7 +1298,7 @@ var FemaleSwinePreDiscardList = class extends Report {
|
|
|
1277
1298
|
});
|
|
1278
1299
|
}
|
|
1279
1300
|
async csv(input) {
|
|
1280
|
-
|
|
1301
|
+
await this.requestCsv({
|
|
1281
1302
|
resources: this.getResources(input),
|
|
1282
1303
|
parameters: [
|
|
1283
1304
|
...this.getParameters(input),
|
|
@@ -1309,7 +1330,7 @@ var FemaleSwineRecord = class extends Report {
|
|
|
1309
1330
|
this.fileName = "Ficha da f\xEAmea";
|
|
1310
1331
|
}
|
|
1311
1332
|
async pdf(input) {
|
|
1312
|
-
|
|
1333
|
+
await this.requestPdf({
|
|
1313
1334
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1314
1335
|
parameters: [
|
|
1315
1336
|
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
@@ -1329,7 +1350,7 @@ var FemaleSwineSalePlanningList = class extends Report {
|
|
|
1329
1350
|
this.fileName = "Listagem de f\xEAmeas planejadas para venda";
|
|
1330
1351
|
}
|
|
1331
1352
|
async pdf(input) {
|
|
1332
|
-
|
|
1353
|
+
await this.requestPdf({
|
|
1333
1354
|
resources: this.getResources(input),
|
|
1334
1355
|
parameters: [
|
|
1335
1356
|
...this.getParameters(input),
|
|
@@ -1338,7 +1359,7 @@ var FemaleSwineSalePlanningList = class extends Report {
|
|
|
1338
1359
|
});
|
|
1339
1360
|
}
|
|
1340
1361
|
async csv(input) {
|
|
1341
|
-
|
|
1362
|
+
await this.requestCsv({
|
|
1342
1363
|
resources: this.getResources(input),
|
|
1343
1364
|
parameters: [
|
|
1344
1365
|
...this.getParameters(input),
|
|
@@ -1352,6 +1373,7 @@ var FemaleSwineSalePlanningList = class extends Report {
|
|
|
1352
1373
|
getParameters(input) {
|
|
1353
1374
|
return [
|
|
1354
1375
|
{ key: "CALENDAR", value: input.calendarType },
|
|
1376
|
+
{ key: "QUERY", value: input.query },
|
|
1355
1377
|
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
1356
1378
|
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
1357
1379
|
{ key: "RECIPIENT_ID", value: input.recipientId },
|
|
@@ -1369,7 +1391,7 @@ var FemaleSwineTreatmentCollectionForm = class extends Report {
|
|
|
1369
1391
|
this.fileName = "Medica\xE7\xE3o / vacina\xE7\xE3o de f\xEAmea";
|
|
1370
1392
|
}
|
|
1371
1393
|
async pdf(input) {
|
|
1372
|
-
|
|
1394
|
+
await this.requestPdf({
|
|
1373
1395
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1374
1396
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1375
1397
|
});
|
|
@@ -1384,7 +1406,7 @@ var FemaleSwineTreatmentList = class extends Report {
|
|
|
1384
1406
|
this.fileName = "Listagem de medica\xE7\xF5es / vacinas (f\xEAmeas)";
|
|
1385
1407
|
}
|
|
1386
1408
|
async pdf(input) {
|
|
1387
|
-
|
|
1409
|
+
await this.requestPdf({
|
|
1388
1410
|
resources: this.getResources(input),
|
|
1389
1411
|
parameters: [
|
|
1390
1412
|
...this.getParameters(input),
|
|
@@ -1393,7 +1415,7 @@ var FemaleSwineTreatmentList = class extends Report {
|
|
|
1393
1415
|
});
|
|
1394
1416
|
}
|
|
1395
1417
|
async csv(input) {
|
|
1396
|
-
|
|
1418
|
+
await this.requestCsv({
|
|
1397
1419
|
resources: this.getResources(input),
|
|
1398
1420
|
parameters: [
|
|
1399
1421
|
...this.getParameters(input),
|
|
@@ -1423,7 +1445,7 @@ var FinishingPigletDeathCollectionForm = class extends Report {
|
|
|
1423
1445
|
this.fileName = "Morte de leit\xE3o na termina\xE7\xE3o";
|
|
1424
1446
|
}
|
|
1425
1447
|
async pdf(input) {
|
|
1426
|
-
|
|
1448
|
+
await this.requestPdf({
|
|
1427
1449
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1428
1450
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1429
1451
|
});
|
|
@@ -1438,7 +1460,7 @@ var FlushingFemaleSwineList = class extends Report {
|
|
|
1438
1460
|
this.fileName = "F\xEAmeas flushing";
|
|
1439
1461
|
}
|
|
1440
1462
|
async pdf(input) {
|
|
1441
|
-
|
|
1463
|
+
await this.requestPdf({
|
|
1442
1464
|
resources: this.getResources(input),
|
|
1443
1465
|
parameters: [
|
|
1444
1466
|
...this.getParameters(input),
|
|
@@ -1447,7 +1469,7 @@ var FlushingFemaleSwineList = class extends Report {
|
|
|
1447
1469
|
});
|
|
1448
1470
|
}
|
|
1449
1471
|
async csv(input) {
|
|
1450
|
-
|
|
1472
|
+
await this.requestCsv({
|
|
1451
1473
|
resources: this.getResources(input),
|
|
1452
1474
|
parameters: [
|
|
1453
1475
|
...this.getParameters(input),
|
|
@@ -1476,7 +1498,7 @@ var FlushingMonitor = class extends Report {
|
|
|
1476
1498
|
this.fileName = "Flushing";
|
|
1477
1499
|
}
|
|
1478
1500
|
async pdf(input) {
|
|
1479
|
-
|
|
1501
|
+
await this.requestPdf({
|
|
1480
1502
|
resources: this.getResources(input),
|
|
1481
1503
|
parameters: [
|
|
1482
1504
|
...this.getParameters(input),
|
|
@@ -1485,7 +1507,7 @@ var FlushingMonitor = class extends Report {
|
|
|
1485
1507
|
});
|
|
1486
1508
|
}
|
|
1487
1509
|
async csv(input) {
|
|
1488
|
-
|
|
1510
|
+
await this.requestCsv({
|
|
1489
1511
|
resources: this.getResources(input),
|
|
1490
1512
|
parameters: [
|
|
1491
1513
|
...this.getParameters(input),
|
|
@@ -1514,7 +1536,7 @@ var GiltInventory = class extends Report {
|
|
|
1514
1536
|
this.fileName = "Estoque de leitoas";
|
|
1515
1537
|
}
|
|
1516
1538
|
async pdf(input) {
|
|
1517
|
-
|
|
1539
|
+
await this.requestPdf({
|
|
1518
1540
|
resources: this.getResources(input),
|
|
1519
1541
|
parameters: [
|
|
1520
1542
|
...this.getParameters(input),
|
|
@@ -1523,7 +1545,7 @@ var GiltInventory = class extends Report {
|
|
|
1523
1545
|
});
|
|
1524
1546
|
}
|
|
1525
1547
|
async csv(input) {
|
|
1526
|
-
|
|
1548
|
+
await this.requestCsv({
|
|
1527
1549
|
resources: this.getResources(input),
|
|
1528
1550
|
parameters: [
|
|
1529
1551
|
...this.getParameters(input),
|
|
@@ -1554,7 +1576,7 @@ var GtaList = class extends Report {
|
|
|
1554
1576
|
this.fileName = "Listagem de gtas";
|
|
1555
1577
|
}
|
|
1556
1578
|
async pdf(input) {
|
|
1557
|
-
|
|
1579
|
+
await this.requestPdf({
|
|
1558
1580
|
resources: this.getResources(input),
|
|
1559
1581
|
parameters: [
|
|
1560
1582
|
...this.getParameters(input),
|
|
@@ -1563,7 +1585,7 @@ var GtaList = class extends Report {
|
|
|
1563
1585
|
});
|
|
1564
1586
|
}
|
|
1565
1587
|
async csv(input) {
|
|
1566
|
-
|
|
1588
|
+
await this.requestCsv({
|
|
1567
1589
|
resources: this.getResources(input),
|
|
1568
1590
|
parameters: [
|
|
1569
1591
|
...this.getParameters(input),
|
|
@@ -1590,7 +1612,7 @@ var HeatDetectionCollectionForm = class extends Report {
|
|
|
1590
1612
|
this.fileName = "Registro de cio";
|
|
1591
1613
|
}
|
|
1592
1614
|
async pdf(input) {
|
|
1593
|
-
|
|
1615
|
+
await this.requestPdf({
|
|
1594
1616
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1595
1617
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1596
1618
|
});
|
|
@@ -1605,7 +1627,7 @@ var HeatDetectionList = class extends Report {
|
|
|
1605
1627
|
this.fileName = "Listagem de registros de cio";
|
|
1606
1628
|
}
|
|
1607
1629
|
async pdf(input) {
|
|
1608
|
-
|
|
1630
|
+
await this.requestPdf({
|
|
1609
1631
|
resources: this.getResources(input),
|
|
1610
1632
|
parameters: [
|
|
1611
1633
|
...this.getParameters(input),
|
|
@@ -1614,7 +1636,7 @@ var HeatDetectionList = class extends Report {
|
|
|
1614
1636
|
});
|
|
1615
1637
|
}
|
|
1616
1638
|
async csv(input) {
|
|
1617
|
-
|
|
1639
|
+
await this.requestCsv({
|
|
1618
1640
|
resources: this.getResources(input),
|
|
1619
1641
|
parameters: [
|
|
1620
1642
|
...this.getParameters(input),
|
|
@@ -1654,7 +1676,7 @@ var HeatMonitoring = class extends Report {
|
|
|
1654
1676
|
this.fileName = "Mapa de Cio";
|
|
1655
1677
|
}
|
|
1656
1678
|
async pdf(input) {
|
|
1657
|
-
|
|
1679
|
+
await this.requestPdf({
|
|
1658
1680
|
resources: this.getResources(input),
|
|
1659
1681
|
parameters: [
|
|
1660
1682
|
...this.getParameters(input),
|
|
@@ -1663,7 +1685,7 @@ var HeatMonitoring = class extends Report {
|
|
|
1663
1685
|
});
|
|
1664
1686
|
}
|
|
1665
1687
|
async csv(input) {
|
|
1666
|
-
|
|
1688
|
+
await this.requestCsv({
|
|
1667
1689
|
resources: this.getResources(input),
|
|
1668
1690
|
parameters: [
|
|
1669
1691
|
...this.getParameters(input),
|
|
@@ -1694,7 +1716,7 @@ var LocationList = class extends Report {
|
|
|
1694
1716
|
this.fileName = "Listagem de localiza\xE7\xF5es";
|
|
1695
1717
|
}
|
|
1696
1718
|
async pdf(input) {
|
|
1697
|
-
|
|
1719
|
+
await this.requestPdf({
|
|
1698
1720
|
resources: this.getResources(input),
|
|
1699
1721
|
parameters: [
|
|
1700
1722
|
...this.getParameters(input),
|
|
@@ -1703,7 +1725,7 @@ var LocationList = class extends Report {
|
|
|
1703
1725
|
});
|
|
1704
1726
|
}
|
|
1705
1727
|
async csv(input) {
|
|
1706
|
-
|
|
1728
|
+
await this.requestCsv({
|
|
1707
1729
|
resources: this.getResources(input),
|
|
1708
1730
|
parameters: [
|
|
1709
1731
|
...this.getParameters(input),
|
|
@@ -1727,7 +1749,7 @@ var MaternityPigletDeathCollectionForm = class extends Report {
|
|
|
1727
1749
|
this.fileName = "Morte de leit\xE3o na maternidade";
|
|
1728
1750
|
}
|
|
1729
1751
|
async pdf(input) {
|
|
1730
|
-
|
|
1752
|
+
await this.requestPdf({
|
|
1731
1753
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1732
1754
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1733
1755
|
});
|
|
@@ -1742,7 +1764,7 @@ var MaternityPigletDeathList = class extends Report {
|
|
|
1742
1764
|
this.fileName = "Listagem de mortes de leit\xE3o";
|
|
1743
1765
|
}
|
|
1744
1766
|
async pdf(input) {
|
|
1745
|
-
|
|
1767
|
+
await this.requestPdf({
|
|
1746
1768
|
resources: this.getResources(input),
|
|
1747
1769
|
parameters: [
|
|
1748
1770
|
...this.getParameters(input),
|
|
@@ -1751,7 +1773,7 @@ var MaternityPigletDeathList = class extends Report {
|
|
|
1751
1773
|
});
|
|
1752
1774
|
}
|
|
1753
1775
|
async csv(input) {
|
|
1754
|
-
|
|
1776
|
+
await this.requestCsv({
|
|
1755
1777
|
resources: this.getResources(input),
|
|
1756
1778
|
parameters: [
|
|
1757
1779
|
...this.getParameters(input),
|
|
@@ -1784,13 +1806,59 @@ var MaternityPigletTransferCollectionForm = class extends Report {
|
|
|
1784
1806
|
this.fileName = "Transfer\xEAncia de leit\xE3o na maternidade";
|
|
1785
1807
|
}
|
|
1786
1808
|
async pdf(input) {
|
|
1787
|
-
|
|
1809
|
+
await this.requestPdf({
|
|
1788
1810
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1789
1811
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1790
1812
|
});
|
|
1791
1813
|
}
|
|
1792
1814
|
};
|
|
1793
1815
|
|
|
1816
|
+
// src/namespaces/pig-master/reports/maternity-piglet-transfer-list.ts
|
|
1817
|
+
var MaternityPigletTransferList = class extends Report {
|
|
1818
|
+
constructor() {
|
|
1819
|
+
super(...arguments);
|
|
1820
|
+
this.template = "@pig-master/maternity-piglet-transfer-list";
|
|
1821
|
+
this.fileName = "Listagem de transfer\xEAncias de leit\xE3o";
|
|
1822
|
+
}
|
|
1823
|
+
async pdf(input) {
|
|
1824
|
+
await this.requestPdf({
|
|
1825
|
+
resources: this.getResources(input),
|
|
1826
|
+
parameters: [
|
|
1827
|
+
...this.getParameters(input),
|
|
1828
|
+
{ key: "DATA_ONLY", value: false }
|
|
1829
|
+
]
|
|
1830
|
+
});
|
|
1831
|
+
}
|
|
1832
|
+
async csv(input) {
|
|
1833
|
+
await this.requestCsv({
|
|
1834
|
+
resources: this.getResources(input),
|
|
1835
|
+
parameters: [
|
|
1836
|
+
...this.getParameters(input),
|
|
1837
|
+
{ key: "DATA_ONLY", value: true }
|
|
1838
|
+
]
|
|
1839
|
+
});
|
|
1840
|
+
}
|
|
1841
|
+
getResources(input) {
|
|
1842
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1843
|
+
}
|
|
1844
|
+
getParameters(input) {
|
|
1845
|
+
return [
|
|
1846
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
1847
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
1848
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1849
|
+
{ key: "DONOR_ID", value: input.donorId },
|
|
1850
|
+
{ key: "DONOR_PARITY", value: input.donorParity?.toString() ?? null },
|
|
1851
|
+
{ key: "DONOR_CONTEXT", value: input.donorContext },
|
|
1852
|
+
{ key: "RECIPIENT_ID", value: input.recipientId },
|
|
1853
|
+
{
|
|
1854
|
+
key: "RECIPIENT_PARITY",
|
|
1855
|
+
value: input.recipientParity?.toString() ?? null
|
|
1856
|
+
},
|
|
1857
|
+
{ key: "RECIPIENT_CONTEXT", value: input.recipientContext }
|
|
1858
|
+
];
|
|
1859
|
+
}
|
|
1860
|
+
};
|
|
1861
|
+
|
|
1794
1862
|
// src/namespaces/pig-master/reports/mating-analysis.ts
|
|
1795
1863
|
var MatingAnalysis = class extends Report {
|
|
1796
1864
|
constructor() {
|
|
@@ -1799,7 +1867,7 @@ var MatingAnalysis = class extends Report {
|
|
|
1799
1867
|
this.fileName = "An\xE1lise de coberturas";
|
|
1800
1868
|
}
|
|
1801
1869
|
async pdf(input) {
|
|
1802
|
-
|
|
1870
|
+
await this.requestPdf({
|
|
1803
1871
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1804
1872
|
parameters: [
|
|
1805
1873
|
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
@@ -1837,7 +1905,7 @@ var MatingCollectionForm = class extends Report {
|
|
|
1837
1905
|
this.fileName = "Cobertura";
|
|
1838
1906
|
}
|
|
1839
1907
|
async pdf(input) {
|
|
1840
|
-
|
|
1908
|
+
await this.requestPdf({
|
|
1841
1909
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1842
1910
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1843
1911
|
});
|
|
@@ -1852,7 +1920,7 @@ var MatingGroupList = class extends Report {
|
|
|
1852
1920
|
this.fileName = "Listagem de grupos de cobertura";
|
|
1853
1921
|
}
|
|
1854
1922
|
async pdf(input) {
|
|
1855
|
-
|
|
1923
|
+
await this.requestPdf({
|
|
1856
1924
|
resources: this.getResources(input),
|
|
1857
1925
|
parameters: [
|
|
1858
1926
|
...this.getParameters(input),
|
|
@@ -1861,7 +1929,7 @@ var MatingGroupList = class extends Report {
|
|
|
1861
1929
|
});
|
|
1862
1930
|
}
|
|
1863
1931
|
async csv(input) {
|
|
1864
|
-
|
|
1932
|
+
await this.requestCsv({
|
|
1865
1933
|
resources: this.getResources(input),
|
|
1866
1934
|
parameters: [
|
|
1867
1935
|
...this.getParameters(input),
|
|
@@ -1885,7 +1953,7 @@ var MatingList = class extends Report {
|
|
|
1885
1953
|
this.fileName = "Listagem de coberturas";
|
|
1886
1954
|
}
|
|
1887
1955
|
async pdf(input) {
|
|
1888
|
-
|
|
1956
|
+
await this.requestPdf({
|
|
1889
1957
|
resources: this.getResources(input),
|
|
1890
1958
|
parameters: [
|
|
1891
1959
|
...this.getParameters(input),
|
|
@@ -1894,7 +1962,7 @@ var MatingList = class extends Report {
|
|
|
1894
1962
|
});
|
|
1895
1963
|
}
|
|
1896
1964
|
async csv(input) {
|
|
1897
|
-
|
|
1965
|
+
await this.requestCsv({
|
|
1898
1966
|
resources: this.getResources(input),
|
|
1899
1967
|
parameters: [
|
|
1900
1968
|
...this.getParameters(input),
|
|
@@ -1942,7 +2010,7 @@ var MatingOverview = class extends Report {
|
|
|
1942
2010
|
this.fileName = "Performance de coberturas";
|
|
1943
2011
|
}
|
|
1944
2012
|
async pdf(input) {
|
|
1945
|
-
|
|
2013
|
+
await this.requestPdf({
|
|
1946
2014
|
resources: this.getResources(input),
|
|
1947
2015
|
parameters: [
|
|
1948
2016
|
...this.getParameters(input),
|
|
@@ -1951,7 +2019,7 @@ var MatingOverview = class extends Report {
|
|
|
1951
2019
|
});
|
|
1952
2020
|
}
|
|
1953
2021
|
async csv(input) {
|
|
1954
|
-
|
|
2022
|
+
await this.requestCsv({
|
|
1955
2023
|
resources: this.getResources(input),
|
|
1956
2024
|
parameters: [
|
|
1957
2025
|
...this.getParameters(input),
|
|
@@ -1982,7 +2050,7 @@ var MbrfFemaleSwineRecord = class extends Report {
|
|
|
1982
2050
|
this.fileName = "Ficha fim";
|
|
1983
2051
|
}
|
|
1984
2052
|
async pdf(input) {
|
|
1985
|
-
|
|
2053
|
+
await this.requestPdf({
|
|
1986
2054
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1987
2055
|
parameters: [
|
|
1988
2056
|
{ key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
|
|
@@ -2000,7 +2068,7 @@ var NurseryPigletDeathCollectionForm = class extends Report {
|
|
|
2000
2068
|
this.fileName = "Morte de leit\xE3o na creche";
|
|
2001
2069
|
}
|
|
2002
2070
|
async pdf(input) {
|
|
2003
|
-
|
|
2071
|
+
await this.requestPdf({
|
|
2004
2072
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2005
2073
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
2006
2074
|
});
|
|
@@ -2015,7 +2083,7 @@ var OriginList = class extends Report {
|
|
|
2015
2083
|
this.fileName = "Listagem de origens";
|
|
2016
2084
|
}
|
|
2017
2085
|
async pdf(input) {
|
|
2018
|
-
|
|
2086
|
+
await this.requestPdf({
|
|
2019
2087
|
resources: this.getResources(input),
|
|
2020
2088
|
parameters: [
|
|
2021
2089
|
...this.getParameters(input),
|
|
@@ -2024,7 +2092,7 @@ var OriginList = class extends Report {
|
|
|
2024
2092
|
});
|
|
2025
2093
|
}
|
|
2026
2094
|
async csv(input) {
|
|
2027
|
-
|
|
2095
|
+
await this.requestCsv({
|
|
2028
2096
|
resources: this.getResources(input),
|
|
2029
2097
|
parameters: [
|
|
2030
2098
|
...this.getParameters(input),
|
|
@@ -2048,7 +2116,7 @@ var ParityStructure = class extends Report {
|
|
|
2048
2116
|
this.fileName = "Estrutura et\xE1ria";
|
|
2049
2117
|
}
|
|
2050
2118
|
async pdf(input) {
|
|
2051
|
-
|
|
2119
|
+
await this.requestPdf({
|
|
2052
2120
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2053
2121
|
parameters: [
|
|
2054
2122
|
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
@@ -2069,7 +2137,7 @@ var PreFlushingFemaleSwineList = class extends Report {
|
|
|
2069
2137
|
this.fileName = "F\xEAmeas pr\xE9-flushing";
|
|
2070
2138
|
}
|
|
2071
2139
|
async pdf(input) {
|
|
2072
|
-
|
|
2140
|
+
await this.requestPdf({
|
|
2073
2141
|
resources: this.getResources(input),
|
|
2074
2142
|
parameters: [
|
|
2075
2143
|
...this.getParameters(input),
|
|
@@ -2078,7 +2146,7 @@ var PreFlushingFemaleSwineList = class extends Report {
|
|
|
2078
2146
|
});
|
|
2079
2147
|
}
|
|
2080
2148
|
async csv(input) {
|
|
2081
|
-
|
|
2149
|
+
await this.requestCsv({
|
|
2082
2150
|
resources: this.getResources(input),
|
|
2083
2151
|
parameters: [
|
|
2084
2152
|
...this.getParameters(input),
|
|
@@ -2107,7 +2175,7 @@ var PregnantFemaleSwineList = class extends Report {
|
|
|
2107
2175
|
this.fileName = "F\xEAmeas gestantes";
|
|
2108
2176
|
}
|
|
2109
2177
|
async pdf(input) {
|
|
2110
|
-
|
|
2178
|
+
await this.requestPdf({
|
|
2111
2179
|
resources: this.getResources(input),
|
|
2112
2180
|
parameters: [
|
|
2113
2181
|
{ key: "DATA_ONLY", value: false },
|
|
@@ -2116,7 +2184,7 @@ var PregnantFemaleSwineList = class extends Report {
|
|
|
2116
2184
|
});
|
|
2117
2185
|
}
|
|
2118
2186
|
async csv(input) {
|
|
2119
|
-
|
|
2187
|
+
await this.requestCsv({
|
|
2120
2188
|
resources: this.getResources(input),
|
|
2121
2189
|
parameters: [
|
|
2122
2190
|
{ key: "DATA_ONLY", value: true },
|
|
@@ -2145,7 +2213,7 @@ var PregnantFemaleSwineSaleList = class extends Report {
|
|
|
2145
2213
|
this.fileName = "Listagem de vendas de gestantes";
|
|
2146
2214
|
}
|
|
2147
2215
|
async pdf(input) {
|
|
2148
|
-
|
|
2216
|
+
await this.requestPdf({
|
|
2149
2217
|
resources: this.getResources(input),
|
|
2150
2218
|
parameters: [
|
|
2151
2219
|
...this.getParameters(input),
|
|
@@ -2154,7 +2222,7 @@ var PregnantFemaleSwineSaleList = class extends Report {
|
|
|
2154
2222
|
});
|
|
2155
2223
|
}
|
|
2156
2224
|
async csv(input) {
|
|
2157
|
-
|
|
2225
|
+
await this.requestCsv({
|
|
2158
2226
|
resources: this.getResources(input),
|
|
2159
2227
|
parameters: [
|
|
2160
2228
|
...this.getParameters(input),
|
|
@@ -2198,7 +2266,7 @@ var ReproductiveFailureAnalysis = class extends Report {
|
|
|
2198
2266
|
this.fileName = "An\xE1lise de perdas de cobertura";
|
|
2199
2267
|
}
|
|
2200
2268
|
async pdf(input) {
|
|
2201
|
-
|
|
2269
|
+
await this.requestPdf({
|
|
2202
2270
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2203
2271
|
parameters: [
|
|
2204
2272
|
{ key: "GROUP", value: input.groupBy },
|
|
@@ -2231,7 +2299,7 @@ var ReproductiveFailureCollectionForm = class extends Report {
|
|
|
2231
2299
|
this.fileName = "Perda de cobertura";
|
|
2232
2300
|
}
|
|
2233
2301
|
async pdf(input) {
|
|
2234
|
-
|
|
2302
|
+
await this.requestPdf({
|
|
2235
2303
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2236
2304
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
2237
2305
|
});
|
|
@@ -2246,7 +2314,7 @@ var ReproductiveFailureList = class extends Report {
|
|
|
2246
2314
|
this.fileName = "Perdas de cobertura";
|
|
2247
2315
|
}
|
|
2248
2316
|
async pdf(input) {
|
|
2249
|
-
|
|
2317
|
+
await this.requestPdf({
|
|
2250
2318
|
resources: this.getResources(input),
|
|
2251
2319
|
parameters: [
|
|
2252
2320
|
...this.getParameters(input),
|
|
@@ -2255,7 +2323,7 @@ var ReproductiveFailureList = class extends Report {
|
|
|
2255
2323
|
});
|
|
2256
2324
|
}
|
|
2257
2325
|
async csv(input) {
|
|
2258
|
-
|
|
2326
|
+
await this.requestCsv({
|
|
2259
2327
|
resources: this.getResources(input),
|
|
2260
2328
|
parameters: [
|
|
2261
2329
|
...this.getParameters(input),
|
|
@@ -2293,7 +2361,7 @@ var ScoreList = class extends Report {
|
|
|
2293
2361
|
this.fileName = "Listagem de escores";
|
|
2294
2362
|
}
|
|
2295
2363
|
async pdf(input) {
|
|
2296
|
-
|
|
2364
|
+
await this.requestPdf({
|
|
2297
2365
|
resources: this.getResources(input),
|
|
2298
2366
|
parameters: [
|
|
2299
2367
|
...this.getParameters(input),
|
|
@@ -2302,7 +2370,7 @@ var ScoreList = class extends Report {
|
|
|
2302
2370
|
});
|
|
2303
2371
|
}
|
|
2304
2372
|
async csv(input) {
|
|
2305
|
-
|
|
2373
|
+
await this.requestCsv({
|
|
2306
2374
|
resources: this.getResources(input),
|
|
2307
2375
|
parameters: [
|
|
2308
2376
|
...this.getParameters(input),
|
|
@@ -2326,7 +2394,7 @@ var WeaningAnalysis = class extends Report {
|
|
|
2326
2394
|
this.fileName = "An\xE1lise de desmames";
|
|
2327
2395
|
}
|
|
2328
2396
|
async pdf(input) {
|
|
2329
|
-
|
|
2397
|
+
await this.requestPdf({
|
|
2330
2398
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2331
2399
|
parameters: [
|
|
2332
2400
|
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
@@ -2359,13 +2427,62 @@ var WeaningCollectionForm = class extends Report {
|
|
|
2359
2427
|
this.fileName = "Desmame";
|
|
2360
2428
|
}
|
|
2361
2429
|
async pdf(input) {
|
|
2362
|
-
|
|
2430
|
+
await this.requestPdf({
|
|
2363
2431
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2364
2432
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
2365
2433
|
});
|
|
2366
2434
|
}
|
|
2367
2435
|
};
|
|
2368
2436
|
|
|
2437
|
+
// src/namespaces/pig-master/reports/weaning-forecast.ts
|
|
2438
|
+
var WeaningForecast = class extends Report {
|
|
2439
|
+
constructor() {
|
|
2440
|
+
super(...arguments);
|
|
2441
|
+
this.template = "@pig-master/weaning-forecast";
|
|
2442
|
+
this.fileName = "Previs\xE3o de desmames";
|
|
2443
|
+
}
|
|
2444
|
+
async pdf(input) {
|
|
2445
|
+
await this.requestPdf({
|
|
2446
|
+
resources: this.getResources(input),
|
|
2447
|
+
parameters: [
|
|
2448
|
+
...this.getParameters(input),
|
|
2449
|
+
{ key: "DATA_ONLY", value: false }
|
|
2450
|
+
]
|
|
2451
|
+
});
|
|
2452
|
+
}
|
|
2453
|
+
async csv(input) {
|
|
2454
|
+
await this.requestCsv({
|
|
2455
|
+
resources: this.getResources(input),
|
|
2456
|
+
parameters: [
|
|
2457
|
+
...this.getParameters(input),
|
|
2458
|
+
{ key: "DATA_ONLY", value: true }
|
|
2459
|
+
]
|
|
2460
|
+
});
|
|
2461
|
+
}
|
|
2462
|
+
getResources(input) {
|
|
2463
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
2464
|
+
}
|
|
2465
|
+
getParameters(input) {
|
|
2466
|
+
return [
|
|
2467
|
+
{ key: "WEANING_DATE", value: input.weaningDate },
|
|
2468
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
2469
|
+
{ key: "PARITY", value: input.parity?.toString() ?? null },
|
|
2470
|
+
{ key: "LOCATION_ID", value: input.locationId },
|
|
2471
|
+
{ key: "PEN", value: input.pen },
|
|
2472
|
+
{
|
|
2473
|
+
key: "MIN_LACTATION_DAYS",
|
|
2474
|
+
value: input.lactationLengthRange?.start.toString() ?? null
|
|
2475
|
+
},
|
|
2476
|
+
{
|
|
2477
|
+
key: "MAX_LACTATION_DAYS",
|
|
2478
|
+
value: input.lactationLengthRange?.end.toString() ?? null
|
|
2479
|
+
},
|
|
2480
|
+
{ key: "ORDERBYDIRECTION", value: input.orderBy.direction },
|
|
2481
|
+
{ key: "ORDERBYCOLUMN", value: toSnakeCase(input.orderBy.column) }
|
|
2482
|
+
];
|
|
2483
|
+
}
|
|
2484
|
+
};
|
|
2485
|
+
|
|
2369
2486
|
// src/namespaces/pig-master/reports/weaning-list.ts
|
|
2370
2487
|
var WeaningList = class extends Report {
|
|
2371
2488
|
constructor() {
|
|
@@ -2374,7 +2491,7 @@ var WeaningList = class extends Report {
|
|
|
2374
2491
|
this.fileName = "Listagem de desmames";
|
|
2375
2492
|
}
|
|
2376
2493
|
async pdf(input) {
|
|
2377
|
-
|
|
2494
|
+
await this.requestPdf({
|
|
2378
2495
|
resources: this.getResources(input),
|
|
2379
2496
|
parameters: [
|
|
2380
2497
|
...this.getParameters(input),
|
|
@@ -2383,7 +2500,7 @@ var WeaningList = class extends Report {
|
|
|
2383
2500
|
});
|
|
2384
2501
|
}
|
|
2385
2502
|
async csv(input) {
|
|
2386
|
-
|
|
2503
|
+
await this.requestCsv({
|
|
2387
2504
|
resources: this.getResources(input),
|
|
2388
2505
|
parameters: [
|
|
2389
2506
|
...this.getParameters(input),
|
|
@@ -2503,24 +2620,19 @@ var PigMaster = class {
|
|
|
2503
2620
|
this.maternityPigletDeathList = new MaternityPigletDeathList(http);
|
|
2504
2621
|
this.weaningList = new WeaningList(http);
|
|
2505
2622
|
this.farrowingList = new FarrowingList(http);
|
|
2623
|
+
this.maternityPigletTransferList = new MaternityPigletTransferList(http);
|
|
2624
|
+
this.weaningForecast = new WeaningForecast(http);
|
|
2625
|
+
this.farrowingForecast = new FarrowingForecast(http);
|
|
2506
2626
|
}
|
|
2507
2627
|
};
|
|
2508
2628
|
|
|
2509
|
-
// src/
|
|
2510
|
-
var
|
|
2511
|
-
constructor(http) {
|
|
2512
|
-
this.http = http;
|
|
2629
|
+
// src/jaspion.ts
|
|
2630
|
+
var Jaspion = class {
|
|
2631
|
+
constructor({ http }) {
|
|
2513
2632
|
this.pigMaster = new PigMaster(http);
|
|
2514
2633
|
}
|
|
2515
|
-
setAccessToken(token) {
|
|
2516
|
-
this.http.setHeader("Authorization", `Bearer ${token}`);
|
|
2517
|
-
}
|
|
2518
2634
|
};
|
|
2519
|
-
function jaspion(baseUrl) {
|
|
2520
|
-
const http = new HttpClient(baseUrl);
|
|
2521
|
-
return new JaspionClient(http);
|
|
2522
|
-
}
|
|
2523
2635
|
export {
|
|
2524
|
-
|
|
2636
|
+
Jaspion
|
|
2525
2637
|
};
|
|
2526
2638
|
//# sourceMappingURL=index.mjs.map
|