@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.js
CHANGED
|
@@ -20,46 +20,23 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
|
|
23
|
+
Jaspion: () => Jaspion
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(index_exports);
|
|
26
26
|
|
|
27
|
-
// src/core/http-client.ts
|
|
28
|
-
var HttpClient = class {
|
|
29
|
-
constructor(baseUrl) {
|
|
30
|
-
this.baseUrl = baseUrl;
|
|
31
|
-
this.headers = {
|
|
32
|
-
"Content-Type": "application/json"
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
setHeader(key, value) {
|
|
36
|
-
this.headers[key] = value;
|
|
37
|
-
}
|
|
38
|
-
async post(path, body) {
|
|
39
|
-
const response = await fetch(`${this.baseUrl}${path}`, {
|
|
40
|
-
method: "POST",
|
|
41
|
-
headers: this.headers,
|
|
42
|
-
body: JSON.stringify(body)
|
|
43
|
-
});
|
|
44
|
-
if (!response.ok) {
|
|
45
|
-
throw new Error(`Request failed with status ${response.status}`);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
|
|
50
27
|
// src/core/report.ts
|
|
51
28
|
var Report = class {
|
|
52
29
|
constructor(http) {
|
|
53
30
|
this.http = http;
|
|
54
31
|
}
|
|
55
32
|
async requestPdf(input) {
|
|
56
|
-
|
|
33
|
+
await this.request({
|
|
57
34
|
...input,
|
|
58
35
|
contentType: "application/pdf"
|
|
59
36
|
});
|
|
60
37
|
}
|
|
61
38
|
async requestCsv(input) {
|
|
62
|
-
|
|
39
|
+
await this.request({
|
|
63
40
|
...input,
|
|
64
41
|
contentType: "text/csv"
|
|
65
42
|
});
|
|
@@ -74,13 +51,17 @@ var Report = class {
|
|
|
74
51
|
"text/csv": ".csv"
|
|
75
52
|
};
|
|
76
53
|
const fileName = `${this.fileName}${fileExtensions[contentType]}`;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
54
|
+
return this.http.request({
|
|
55
|
+
method: "POST",
|
|
56
|
+
path: "/reports",
|
|
57
|
+
body: {
|
|
58
|
+
template: this.template,
|
|
59
|
+
fileName,
|
|
60
|
+
parameters,
|
|
61
|
+
resources,
|
|
62
|
+
contentType,
|
|
63
|
+
type: "jasper-reports"
|
|
64
|
+
}
|
|
84
65
|
});
|
|
85
66
|
}
|
|
86
67
|
};
|
|
@@ -93,7 +74,7 @@ var BirthPlaceList = class extends Report {
|
|
|
93
74
|
this.fileName = "Listagem de proced\xEAncias";
|
|
94
75
|
}
|
|
95
76
|
async pdf(input) {
|
|
96
|
-
|
|
77
|
+
await this.requestPdf({
|
|
97
78
|
resources: this.getResources(input),
|
|
98
79
|
parameters: [
|
|
99
80
|
...this.getParameters(input),
|
|
@@ -102,7 +83,7 @@ var BirthPlaceList = class extends Report {
|
|
|
102
83
|
});
|
|
103
84
|
}
|
|
104
85
|
async csv(input) {
|
|
105
|
-
|
|
86
|
+
await this.requestCsv({
|
|
106
87
|
resources: this.getResources(input),
|
|
107
88
|
parameters: [
|
|
108
89
|
...this.getParameters(input),
|
|
@@ -126,7 +107,7 @@ var BoarByBreedList = class extends Report {
|
|
|
126
107
|
this.fileName = "Machos por ra\xE7a";
|
|
127
108
|
}
|
|
128
109
|
async pdf(input) {
|
|
129
|
-
|
|
110
|
+
await this.requestPdf({
|
|
130
111
|
resources: this.getResources(input),
|
|
131
112
|
parameters: [
|
|
132
113
|
...this.getParameters(input),
|
|
@@ -135,7 +116,7 @@ var BoarByBreedList = class extends Report {
|
|
|
135
116
|
});
|
|
136
117
|
}
|
|
137
118
|
async csv(input) {
|
|
138
|
-
|
|
119
|
+
await this.requestCsv({
|
|
139
120
|
resources: this.getResources(input),
|
|
140
121
|
parameters: [
|
|
141
122
|
...this.getParameters(input),
|
|
@@ -163,7 +144,7 @@ var BoarDeathCollectionForm = class extends Report {
|
|
|
163
144
|
this.fileName = "Morte de macho";
|
|
164
145
|
}
|
|
165
146
|
async pdf(input) {
|
|
166
|
-
|
|
147
|
+
await this.requestPdf({
|
|
167
148
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
168
149
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
169
150
|
});
|
|
@@ -178,7 +159,7 @@ var BoarDeathList = class extends Report {
|
|
|
178
159
|
this.fileName = "Mortes de machos";
|
|
179
160
|
}
|
|
180
161
|
async pdf(input) {
|
|
181
|
-
|
|
162
|
+
await this.requestPdf({
|
|
182
163
|
resources: this.getResources(input),
|
|
183
164
|
parameters: [
|
|
184
165
|
...this.getParameters(input),
|
|
@@ -187,7 +168,7 @@ var BoarDeathList = class extends Report {
|
|
|
187
168
|
});
|
|
188
169
|
}
|
|
189
170
|
async csv(input) {
|
|
190
|
-
|
|
171
|
+
await this.requestCsv({
|
|
191
172
|
resources: this.getResources(input),
|
|
192
173
|
parameters: [
|
|
193
174
|
...this.getParameters(input),
|
|
@@ -225,7 +206,7 @@ var BoarDiscardCollectionForm = class extends Report {
|
|
|
225
206
|
this.fileName = "Descarte de macho";
|
|
226
207
|
}
|
|
227
208
|
async pdf(input) {
|
|
228
|
-
|
|
209
|
+
await this.requestPdf({
|
|
229
210
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
230
211
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
231
212
|
});
|
|
@@ -240,7 +221,7 @@ var BoarDiscardList = class extends Report {
|
|
|
240
221
|
this.fileName = "Descartes de machos";
|
|
241
222
|
}
|
|
242
223
|
async pdf(input) {
|
|
243
|
-
|
|
224
|
+
await this.requestPdf({
|
|
244
225
|
resources: this.getResources(input),
|
|
245
226
|
parameters: [
|
|
246
227
|
...this.getParameters(input),
|
|
@@ -249,7 +230,7 @@ var BoarDiscardList = class extends Report {
|
|
|
249
230
|
});
|
|
250
231
|
}
|
|
251
232
|
async csv(input) {
|
|
252
|
-
|
|
233
|
+
await this.requestCsv({
|
|
253
234
|
resources: this.getResources(input),
|
|
254
235
|
parameters: [
|
|
255
236
|
...this.getParameters(input),
|
|
@@ -288,7 +269,7 @@ var BoarEarTagReplacementList = class extends Report {
|
|
|
288
269
|
this.fileName = "Trocas de brinco de macho";
|
|
289
270
|
}
|
|
290
271
|
async pdf(input) {
|
|
291
|
-
|
|
272
|
+
await this.requestPdf({
|
|
292
273
|
resources: this.getResources(input),
|
|
293
274
|
parameters: [
|
|
294
275
|
...this.getParameters(input),
|
|
@@ -297,7 +278,7 @@ var BoarEarTagReplacementList = class extends Report {
|
|
|
297
278
|
});
|
|
298
279
|
}
|
|
299
280
|
async csv(input) {
|
|
300
|
-
|
|
281
|
+
await this.requestCsv({
|
|
301
282
|
resources: this.getResources(input),
|
|
302
283
|
parameters: [
|
|
303
284
|
...this.getParameters(input),
|
|
@@ -327,7 +308,7 @@ var BoarTreatmentCollectionForm = class extends Report {
|
|
|
327
308
|
this.fileName = "Medica\xE7\xE3o / vacina\xE7\xE3o de macho";
|
|
328
309
|
}
|
|
329
310
|
async pdf(input) {
|
|
330
|
-
|
|
311
|
+
await this.requestPdf({
|
|
331
312
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
332
313
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
333
314
|
});
|
|
@@ -342,7 +323,7 @@ var BoarTreatmentList = class extends Report {
|
|
|
342
323
|
this.fileName = "Listagem de medica\xE7\xF5es / vacinas (machos)";
|
|
343
324
|
}
|
|
344
325
|
async pdf(input) {
|
|
345
|
-
|
|
326
|
+
await this.requestPdf({
|
|
346
327
|
resources: this.getResources(input),
|
|
347
328
|
parameters: [
|
|
348
329
|
...this.getParameters(input),
|
|
@@ -351,7 +332,7 @@ var BoarTreatmentList = class extends Report {
|
|
|
351
332
|
});
|
|
352
333
|
}
|
|
353
334
|
async csv(input) {
|
|
354
|
-
|
|
335
|
+
await this.requestCsv({
|
|
355
336
|
resources: this.getResources(input),
|
|
356
337
|
parameters: [
|
|
357
338
|
...this.getParameters(input),
|
|
@@ -381,7 +362,7 @@ var BoarsInventory = class extends Report {
|
|
|
381
362
|
this.fileName = "Estoque de machos";
|
|
382
363
|
}
|
|
383
364
|
async pdf(input) {
|
|
384
|
-
|
|
365
|
+
await this.requestPdf({
|
|
385
366
|
resources: this.getResources(input),
|
|
386
367
|
parameters: [
|
|
387
368
|
...this.getParameters(input),
|
|
@@ -390,7 +371,7 @@ var BoarsInventory = class extends Report {
|
|
|
390
371
|
});
|
|
391
372
|
}
|
|
392
373
|
async csv(input) {
|
|
393
|
-
|
|
374
|
+
await this.requestCsv({
|
|
394
375
|
resources: this.getResources(input),
|
|
395
376
|
parameters: [
|
|
396
377
|
...this.getParameters(input),
|
|
@@ -421,7 +402,7 @@ var BreedList = class extends Report {
|
|
|
421
402
|
this.fileName = "Listagem de ra\xE7as";
|
|
422
403
|
}
|
|
423
404
|
async pdf(input) {
|
|
424
|
-
|
|
405
|
+
await this.requestPdf({
|
|
425
406
|
resources: this.getResources(input),
|
|
426
407
|
parameters: [
|
|
427
408
|
...this.getParameters(input),
|
|
@@ -430,7 +411,7 @@ var BreedList = class extends Report {
|
|
|
430
411
|
});
|
|
431
412
|
}
|
|
432
413
|
async csv(input) {
|
|
433
|
-
|
|
414
|
+
await this.requestCsv({
|
|
434
415
|
resources: this.getResources(input),
|
|
435
416
|
parameters: [
|
|
436
417
|
...this.getParameters(input),
|
|
@@ -454,7 +435,7 @@ var BreedingMonitor = class extends Report {
|
|
|
454
435
|
this.fileName = "Monitor de Reprodu\xE7\xE3o";
|
|
455
436
|
}
|
|
456
437
|
async pdf(input) {
|
|
457
|
-
|
|
438
|
+
await this.requestPdf({
|
|
458
439
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
459
440
|
parameters: [
|
|
460
441
|
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
@@ -474,7 +455,7 @@ var CauseList = class extends Report {
|
|
|
474
455
|
this.fileName = "Listagem de motivos";
|
|
475
456
|
}
|
|
476
457
|
async pdf(input) {
|
|
477
|
-
|
|
458
|
+
await this.requestPdf({
|
|
478
459
|
resources: this.getResources(input),
|
|
479
460
|
parameters: [
|
|
480
461
|
...this.getParameters(input),
|
|
@@ -483,7 +464,7 @@ var CauseList = class extends Report {
|
|
|
483
464
|
});
|
|
484
465
|
}
|
|
485
466
|
async csv(input) {
|
|
486
|
-
|
|
467
|
+
await this.requestCsv({
|
|
487
468
|
resources: this.getResources(input),
|
|
488
469
|
parameters: [
|
|
489
470
|
...this.getParameters(input),
|
|
@@ -513,7 +494,7 @@ var DrugList = class extends Report {
|
|
|
513
494
|
this.fileName = "Listagem de medicamentos / vacinas";
|
|
514
495
|
}
|
|
515
496
|
async pdf(input) {
|
|
516
|
-
|
|
497
|
+
await this.requestPdf({
|
|
517
498
|
resources: this.getResources(input),
|
|
518
499
|
parameters: [
|
|
519
500
|
...this.getParameters(input),
|
|
@@ -522,7 +503,7 @@ var DrugList = class extends Report {
|
|
|
522
503
|
});
|
|
523
504
|
}
|
|
524
505
|
async csv(input) {
|
|
525
|
-
|
|
506
|
+
await this.requestCsv({
|
|
526
507
|
resources: this.getResources(input),
|
|
527
508
|
parameters: [
|
|
528
509
|
...this.getParameters(input),
|
|
@@ -546,7 +527,7 @@ var EmployeeList = class extends Report {
|
|
|
546
527
|
this.fileName = "Listagem de funcion\xE1rios";
|
|
547
528
|
}
|
|
548
529
|
async pdf(input) {
|
|
549
|
-
|
|
530
|
+
await this.requestPdf({
|
|
550
531
|
resources: this.getResources(input),
|
|
551
532
|
parameters: [
|
|
552
533
|
...this.getParameters(input),
|
|
@@ -555,7 +536,7 @@ var EmployeeList = class extends Report {
|
|
|
555
536
|
});
|
|
556
537
|
}
|
|
557
538
|
async csv(input) {
|
|
558
|
-
|
|
539
|
+
await this.requestCsv({
|
|
559
540
|
resources: this.getResources(input),
|
|
560
541
|
parameters: [
|
|
561
542
|
...this.getParameters(input),
|
|
@@ -582,7 +563,7 @@ var FarmSummary = class extends Report {
|
|
|
582
563
|
this.fileName = "Fechamento de per\xEDodo";
|
|
583
564
|
}
|
|
584
565
|
async pdf(input) {
|
|
585
|
-
|
|
566
|
+
await this.requestPdf({
|
|
586
567
|
resources: this.getResources(input),
|
|
587
568
|
parameters: [
|
|
588
569
|
...this.getParameters(input),
|
|
@@ -591,7 +572,7 @@ var FarmSummary = class extends Report {
|
|
|
591
572
|
});
|
|
592
573
|
}
|
|
593
574
|
async csv(input) {
|
|
594
|
-
|
|
575
|
+
await this.requestCsv({
|
|
595
576
|
resources: this.getResources(input),
|
|
596
577
|
parameters: [
|
|
597
578
|
...this.getParameters(input),
|
|
@@ -619,7 +600,7 @@ var FarrowingAnalysis = class extends Report {
|
|
|
619
600
|
this.fileName = "An\xE1lise de partos";
|
|
620
601
|
}
|
|
621
602
|
async pdf(input) {
|
|
622
|
-
|
|
603
|
+
await this.requestPdf({
|
|
623
604
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
624
605
|
parameters: [
|
|
625
606
|
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
@@ -651,13 +632,53 @@ var FarrowingCollectionForm = class extends Report {
|
|
|
651
632
|
this.fileName = "Parto";
|
|
652
633
|
}
|
|
653
634
|
async pdf(input) {
|
|
654
|
-
|
|
635
|
+
await this.requestPdf({
|
|
655
636
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
656
637
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
657
638
|
});
|
|
658
639
|
}
|
|
659
640
|
};
|
|
660
641
|
|
|
642
|
+
// src/namespaces/pig-master/reports/farrowing-forecast.ts
|
|
643
|
+
var FarrowingForecast = class extends Report {
|
|
644
|
+
constructor() {
|
|
645
|
+
super(...arguments);
|
|
646
|
+
this.template = "@pig-master/farrowing-forecast";
|
|
647
|
+
this.fileName = "Previs\xE3o de partos";
|
|
648
|
+
}
|
|
649
|
+
async pdf(input) {
|
|
650
|
+
await this.requestPdf({
|
|
651
|
+
resources: this.getResources(input),
|
|
652
|
+
parameters: [
|
|
653
|
+
...this.getParameters(input),
|
|
654
|
+
{ key: "DATA_ONLY", value: false }
|
|
655
|
+
]
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
async csv(input) {
|
|
659
|
+
await this.requestCsv({
|
|
660
|
+
resources: this.getResources(input),
|
|
661
|
+
parameters: [
|
|
662
|
+
...this.getParameters(input),
|
|
663
|
+
{ key: "DATA_ONLY", value: true }
|
|
664
|
+
]
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
getResources(input) {
|
|
668
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
669
|
+
}
|
|
670
|
+
getParameters(input) {
|
|
671
|
+
return [
|
|
672
|
+
{ key: "DATE_BEGIN", value: input.dateRange.start },
|
|
673
|
+
{ key: "DATE_END", value: input.dateRange.end },
|
|
674
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
675
|
+
{ key: "PARITY", value: input.parity?.toString() ?? null },
|
|
676
|
+
{ key: "LOCATION_ID", value: input.locationId },
|
|
677
|
+
{ key: "PEN", value: input.pen }
|
|
678
|
+
];
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
|
|
661
682
|
// src/core/to-snake-case.ts
|
|
662
683
|
function toSnakeCase(str) {
|
|
663
684
|
return str.replace(/[A-Z]/g, (letter, index) => {
|
|
@@ -673,7 +694,7 @@ var FarrowingList = class extends Report {
|
|
|
673
694
|
this.fileName = "Listagem de partos";
|
|
674
695
|
}
|
|
675
696
|
async pdf(input) {
|
|
676
|
-
|
|
697
|
+
await this.requestPdf({
|
|
677
698
|
resources: this.getResources(input),
|
|
678
699
|
parameters: [
|
|
679
700
|
...this.getParameters(input),
|
|
@@ -682,7 +703,7 @@ var FarrowingList = class extends Report {
|
|
|
682
703
|
});
|
|
683
704
|
}
|
|
684
705
|
async csv(input) {
|
|
685
|
-
|
|
706
|
+
await this.requestCsv({
|
|
686
707
|
resources: this.getResources(input),
|
|
687
708
|
parameters: [
|
|
688
709
|
...this.getParameters(input),
|
|
@@ -719,7 +740,7 @@ var FarrowingTypeList = class extends Report {
|
|
|
719
740
|
this.fileName = "Listagem de tipos de parto";
|
|
720
741
|
}
|
|
721
742
|
async pdf(input) {
|
|
722
|
-
|
|
743
|
+
await this.requestPdf({
|
|
723
744
|
resources: this.getResources(input),
|
|
724
745
|
parameters: [
|
|
725
746
|
...this.getParameters(input),
|
|
@@ -728,7 +749,7 @@ var FarrowingTypeList = class extends Report {
|
|
|
728
749
|
});
|
|
729
750
|
}
|
|
730
751
|
async csv(input) {
|
|
731
|
-
|
|
752
|
+
await this.requestCsv({
|
|
732
753
|
resources: this.getResources(input),
|
|
733
754
|
parameters: [
|
|
734
755
|
...this.getParameters(input),
|
|
@@ -752,7 +773,7 @@ var FemaleSwineArrivalMonitoring = class extends Report {
|
|
|
752
773
|
this.fileName = "Acompanhamento do lote";
|
|
753
774
|
}
|
|
754
775
|
async pdf(input) {
|
|
755
|
-
|
|
776
|
+
await this.requestPdf({
|
|
756
777
|
resources: this.getResources(input),
|
|
757
778
|
parameters: [
|
|
758
779
|
...this.getParameters(input),
|
|
@@ -761,7 +782,7 @@ var FemaleSwineArrivalMonitoring = class extends Report {
|
|
|
761
782
|
});
|
|
762
783
|
}
|
|
763
784
|
async csv(input) {
|
|
764
|
-
|
|
785
|
+
await this.requestCsv({
|
|
765
786
|
resources: this.getResources(input),
|
|
766
787
|
parameters: [
|
|
767
788
|
...this.getParameters(input),
|
|
@@ -792,7 +813,7 @@ var FemaleSwineByBreedList = class extends Report {
|
|
|
792
813
|
this.fileName = "F\xEAmeas por ra\xE7a";
|
|
793
814
|
}
|
|
794
815
|
async pdf(input) {
|
|
795
|
-
|
|
816
|
+
await this.requestPdf({
|
|
796
817
|
resources: this.getResources(input),
|
|
797
818
|
parameters: [
|
|
798
819
|
...this.getParameters(input),
|
|
@@ -801,7 +822,7 @@ var FemaleSwineByBreedList = class extends Report {
|
|
|
801
822
|
});
|
|
802
823
|
}
|
|
803
824
|
async csv(input) {
|
|
804
|
-
|
|
825
|
+
await this.requestCsv({
|
|
805
826
|
resources: this.getResources(input),
|
|
806
827
|
parameters: [
|
|
807
828
|
...this.getParameters(input),
|
|
@@ -833,7 +854,7 @@ var FemaleSwineByParityList = class extends Report {
|
|
|
833
854
|
this.fileName = "F\xEAmeas por cria";
|
|
834
855
|
}
|
|
835
856
|
async pdf(input) {
|
|
836
|
-
|
|
857
|
+
await this.requestPdf({
|
|
837
858
|
resources: this.getResources(input),
|
|
838
859
|
parameters: [
|
|
839
860
|
...this.getParameters(input),
|
|
@@ -842,7 +863,7 @@ var FemaleSwineByParityList = class extends Report {
|
|
|
842
863
|
});
|
|
843
864
|
}
|
|
844
865
|
async csv(input) {
|
|
845
|
-
|
|
866
|
+
await this.requestCsv({
|
|
846
867
|
resources: this.getResources(input),
|
|
847
868
|
parameters: [
|
|
848
869
|
...this.getParameters(input),
|
|
@@ -874,7 +895,7 @@ var FemaleSwineByStatusList = class extends Report {
|
|
|
874
895
|
this.fileName = "F\xEAmeas por status";
|
|
875
896
|
}
|
|
876
897
|
async pdf(input) {
|
|
877
|
-
|
|
898
|
+
await this.requestPdf({
|
|
878
899
|
resources: this.getResources(input),
|
|
879
900
|
parameters: [
|
|
880
901
|
...this.getParameters(input),
|
|
@@ -883,7 +904,7 @@ var FemaleSwineByStatusList = class extends Report {
|
|
|
883
904
|
});
|
|
884
905
|
}
|
|
885
906
|
async csv(input) {
|
|
886
|
-
|
|
907
|
+
await this.requestCsv({
|
|
887
908
|
resources: this.getResources(input),
|
|
888
909
|
parameters: [
|
|
889
910
|
...this.getParameters(input),
|
|
@@ -939,7 +960,7 @@ var FemaleSwineByTraceabilityList = class extends Report {
|
|
|
939
960
|
this.fileName = "F\xEAmeas por rastreabilidade";
|
|
940
961
|
}
|
|
941
962
|
async pdf(input) {
|
|
942
|
-
|
|
963
|
+
await this.requestPdf({
|
|
943
964
|
resources: this.getResources(input),
|
|
944
965
|
parameters: [
|
|
945
966
|
...this.getParameters(input),
|
|
@@ -948,7 +969,7 @@ var FemaleSwineByTraceabilityList = class extends Report {
|
|
|
948
969
|
});
|
|
949
970
|
}
|
|
950
971
|
async csv(input) {
|
|
951
|
-
|
|
972
|
+
await this.requestCsv({
|
|
952
973
|
resources: this.getResources(input),
|
|
953
974
|
parameters: [
|
|
954
975
|
...this.getParameters(input),
|
|
@@ -984,7 +1005,7 @@ var FemaleSwineDeathAnalysis = class extends Report {
|
|
|
984
1005
|
this.fileName = "An\xE1lise morte de f\xEAmeas";
|
|
985
1006
|
}
|
|
986
1007
|
async pdf(input) {
|
|
987
|
-
|
|
1008
|
+
await this.requestPdf({
|
|
988
1009
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
989
1010
|
parameters: [
|
|
990
1011
|
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
@@ -1016,7 +1037,7 @@ var FemaleSwineDeathCollectionForm = class extends Report {
|
|
|
1016
1037
|
this.fileName = "Morte de f\xEAmea";
|
|
1017
1038
|
}
|
|
1018
1039
|
async pdf(input) {
|
|
1019
|
-
|
|
1040
|
+
await this.requestPdf({
|
|
1020
1041
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1021
1042
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1022
1043
|
});
|
|
@@ -1031,7 +1052,7 @@ var FemaleSwineDeathList = class extends Report {
|
|
|
1031
1052
|
this.fileName = "Morte de f\xEAmeas";
|
|
1032
1053
|
}
|
|
1033
1054
|
async pdf(input) {
|
|
1034
|
-
|
|
1055
|
+
await this.requestPdf({
|
|
1035
1056
|
resources: this.getResources(input),
|
|
1036
1057
|
parameters: [
|
|
1037
1058
|
...this.getParameters(input),
|
|
@@ -1040,7 +1061,7 @@ var FemaleSwineDeathList = class extends Report {
|
|
|
1040
1061
|
});
|
|
1041
1062
|
}
|
|
1042
1063
|
async csv(input) {
|
|
1043
|
-
|
|
1064
|
+
await this.requestCsv({
|
|
1044
1065
|
resources: this.getResources(input),
|
|
1045
1066
|
parameters: [
|
|
1046
1067
|
...this.getParameters(input),
|
|
@@ -1080,7 +1101,7 @@ var FemaleSwineDiscardAnalysis = class extends Report {
|
|
|
1080
1101
|
this.fileName = "An\xE1lise descarte de f\xEAmeas";
|
|
1081
1102
|
}
|
|
1082
1103
|
async pdf(input) {
|
|
1083
|
-
|
|
1104
|
+
await this.requestPdf({
|
|
1084
1105
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1085
1106
|
parameters: [
|
|
1086
1107
|
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
@@ -1113,7 +1134,7 @@ var FemaleSwineDiscardCollectionForm = class extends Report {
|
|
|
1113
1134
|
this.fileName = "Descarte de f\xEAmea";
|
|
1114
1135
|
}
|
|
1115
1136
|
async pdf(input) {
|
|
1116
|
-
|
|
1137
|
+
await this.requestPdf({
|
|
1117
1138
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1118
1139
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1119
1140
|
});
|
|
@@ -1128,7 +1149,7 @@ var FemaleSwineDiscardList = class extends Report {
|
|
|
1128
1149
|
this.fileName = "Descarte de f\xEAmeas";
|
|
1129
1150
|
}
|
|
1130
1151
|
async pdf(input) {
|
|
1131
|
-
|
|
1152
|
+
await this.requestPdf({
|
|
1132
1153
|
resources: this.getResources(input),
|
|
1133
1154
|
parameters: [
|
|
1134
1155
|
...this.getParameters(input),
|
|
@@ -1137,7 +1158,7 @@ var FemaleSwineDiscardList = class extends Report {
|
|
|
1137
1158
|
});
|
|
1138
1159
|
}
|
|
1139
1160
|
async csv(input) {
|
|
1140
|
-
|
|
1161
|
+
await this.requestCsv({
|
|
1141
1162
|
resources: this.getResources(input),
|
|
1142
1163
|
parameters: [
|
|
1143
1164
|
...this.getParameters(input),
|
|
@@ -1178,7 +1199,7 @@ var FemaleSwineEarTagReplacementList = class extends Report {
|
|
|
1178
1199
|
this.fileName = "Trocas de brinco de f\xEAmeas";
|
|
1179
1200
|
}
|
|
1180
1201
|
async pdf(input) {
|
|
1181
|
-
|
|
1202
|
+
await this.requestPdf({
|
|
1182
1203
|
resources: this.getResources(input),
|
|
1183
1204
|
parameters: [
|
|
1184
1205
|
...this.getParameters(input),
|
|
@@ -1187,7 +1208,7 @@ var FemaleSwineEarTagReplacementList = class extends Report {
|
|
|
1187
1208
|
});
|
|
1188
1209
|
}
|
|
1189
1210
|
async csv(input) {
|
|
1190
|
-
|
|
1211
|
+
await this.requestCsv({
|
|
1191
1212
|
resources: this.getResources(input),
|
|
1192
1213
|
parameters: [
|
|
1193
1214
|
...this.getParameters(input),
|
|
@@ -1217,7 +1238,7 @@ var FemaleSwineInventory = class extends Report {
|
|
|
1217
1238
|
this.fileName = "Estoque de f\xEAmeas";
|
|
1218
1239
|
}
|
|
1219
1240
|
async pdf(input) {
|
|
1220
|
-
|
|
1241
|
+
await this.requestPdf({
|
|
1221
1242
|
resources: this.getResources(input),
|
|
1222
1243
|
parameters: [
|
|
1223
1244
|
...this.getParameters(input),
|
|
@@ -1226,7 +1247,7 @@ var FemaleSwineInventory = class extends Report {
|
|
|
1226
1247
|
});
|
|
1227
1248
|
}
|
|
1228
1249
|
async csv(input) {
|
|
1229
|
-
|
|
1250
|
+
await this.requestCsv({
|
|
1230
1251
|
resources: this.getResources(input),
|
|
1231
1252
|
parameters: [
|
|
1232
1253
|
...this.getParameters(input),
|
|
@@ -1257,7 +1278,7 @@ var FemaleSwinePendingActionList = class extends Report {
|
|
|
1257
1278
|
this.fileName = "A\xE7\xF5es pendentes";
|
|
1258
1279
|
}
|
|
1259
1280
|
async pdf(input) {
|
|
1260
|
-
|
|
1281
|
+
await this.requestPdf({
|
|
1261
1282
|
resources: this.getResources(input),
|
|
1262
1283
|
parameters: [
|
|
1263
1284
|
...this.getParameters(input),
|
|
@@ -1266,7 +1287,7 @@ var FemaleSwinePendingActionList = class extends Report {
|
|
|
1266
1287
|
});
|
|
1267
1288
|
}
|
|
1268
1289
|
async csv(input) {
|
|
1269
|
-
|
|
1290
|
+
await this.requestCsv({
|
|
1270
1291
|
resources: this.getResources(input),
|
|
1271
1292
|
parameters: [
|
|
1272
1293
|
...this.getParameters(input),
|
|
@@ -1294,7 +1315,7 @@ var FemaleSwinePreDiscardList = class extends Report {
|
|
|
1294
1315
|
this.fileName = "Listagem de pr\xE9-descartes de f\xEAmeas";
|
|
1295
1316
|
}
|
|
1296
1317
|
async pdf(input) {
|
|
1297
|
-
|
|
1318
|
+
await this.requestPdf({
|
|
1298
1319
|
resources: this.getResources(input),
|
|
1299
1320
|
parameters: [
|
|
1300
1321
|
...this.getParameters(input),
|
|
@@ -1303,7 +1324,7 @@ var FemaleSwinePreDiscardList = class extends Report {
|
|
|
1303
1324
|
});
|
|
1304
1325
|
}
|
|
1305
1326
|
async csv(input) {
|
|
1306
|
-
|
|
1327
|
+
await this.requestCsv({
|
|
1307
1328
|
resources: this.getResources(input),
|
|
1308
1329
|
parameters: [
|
|
1309
1330
|
...this.getParameters(input),
|
|
@@ -1335,7 +1356,7 @@ var FemaleSwineRecord = class extends Report {
|
|
|
1335
1356
|
this.fileName = "Ficha da f\xEAmea";
|
|
1336
1357
|
}
|
|
1337
1358
|
async pdf(input) {
|
|
1338
|
-
|
|
1359
|
+
await this.requestPdf({
|
|
1339
1360
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1340
1361
|
parameters: [
|
|
1341
1362
|
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
@@ -1355,7 +1376,7 @@ var FemaleSwineSalePlanningList = class extends Report {
|
|
|
1355
1376
|
this.fileName = "Listagem de f\xEAmeas planejadas para venda";
|
|
1356
1377
|
}
|
|
1357
1378
|
async pdf(input) {
|
|
1358
|
-
|
|
1379
|
+
await this.requestPdf({
|
|
1359
1380
|
resources: this.getResources(input),
|
|
1360
1381
|
parameters: [
|
|
1361
1382
|
...this.getParameters(input),
|
|
@@ -1364,7 +1385,7 @@ var FemaleSwineSalePlanningList = class extends Report {
|
|
|
1364
1385
|
});
|
|
1365
1386
|
}
|
|
1366
1387
|
async csv(input) {
|
|
1367
|
-
|
|
1388
|
+
await this.requestCsv({
|
|
1368
1389
|
resources: this.getResources(input),
|
|
1369
1390
|
parameters: [
|
|
1370
1391
|
...this.getParameters(input),
|
|
@@ -1378,6 +1399,7 @@ var FemaleSwineSalePlanningList = class extends Report {
|
|
|
1378
1399
|
getParameters(input) {
|
|
1379
1400
|
return [
|
|
1380
1401
|
{ key: "CALENDAR", value: input.calendarType },
|
|
1402
|
+
{ key: "QUERY", value: input.query },
|
|
1381
1403
|
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
1382
1404
|
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
1383
1405
|
{ key: "RECIPIENT_ID", value: input.recipientId },
|
|
@@ -1395,7 +1417,7 @@ var FemaleSwineTreatmentCollectionForm = class extends Report {
|
|
|
1395
1417
|
this.fileName = "Medica\xE7\xE3o / vacina\xE7\xE3o de f\xEAmea";
|
|
1396
1418
|
}
|
|
1397
1419
|
async pdf(input) {
|
|
1398
|
-
|
|
1420
|
+
await this.requestPdf({
|
|
1399
1421
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1400
1422
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1401
1423
|
});
|
|
@@ -1410,7 +1432,7 @@ var FemaleSwineTreatmentList = class extends Report {
|
|
|
1410
1432
|
this.fileName = "Listagem de medica\xE7\xF5es / vacinas (f\xEAmeas)";
|
|
1411
1433
|
}
|
|
1412
1434
|
async pdf(input) {
|
|
1413
|
-
|
|
1435
|
+
await this.requestPdf({
|
|
1414
1436
|
resources: this.getResources(input),
|
|
1415
1437
|
parameters: [
|
|
1416
1438
|
...this.getParameters(input),
|
|
@@ -1419,7 +1441,7 @@ var FemaleSwineTreatmentList = class extends Report {
|
|
|
1419
1441
|
});
|
|
1420
1442
|
}
|
|
1421
1443
|
async csv(input) {
|
|
1422
|
-
|
|
1444
|
+
await this.requestCsv({
|
|
1423
1445
|
resources: this.getResources(input),
|
|
1424
1446
|
parameters: [
|
|
1425
1447
|
...this.getParameters(input),
|
|
@@ -1449,7 +1471,7 @@ var FinishingPigletDeathCollectionForm = class extends Report {
|
|
|
1449
1471
|
this.fileName = "Morte de leit\xE3o na termina\xE7\xE3o";
|
|
1450
1472
|
}
|
|
1451
1473
|
async pdf(input) {
|
|
1452
|
-
|
|
1474
|
+
await this.requestPdf({
|
|
1453
1475
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1454
1476
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1455
1477
|
});
|
|
@@ -1464,7 +1486,7 @@ var FlushingFemaleSwineList = class extends Report {
|
|
|
1464
1486
|
this.fileName = "F\xEAmeas flushing";
|
|
1465
1487
|
}
|
|
1466
1488
|
async pdf(input) {
|
|
1467
|
-
|
|
1489
|
+
await this.requestPdf({
|
|
1468
1490
|
resources: this.getResources(input),
|
|
1469
1491
|
parameters: [
|
|
1470
1492
|
...this.getParameters(input),
|
|
@@ -1473,7 +1495,7 @@ var FlushingFemaleSwineList = class extends Report {
|
|
|
1473
1495
|
});
|
|
1474
1496
|
}
|
|
1475
1497
|
async csv(input) {
|
|
1476
|
-
|
|
1498
|
+
await this.requestCsv({
|
|
1477
1499
|
resources: this.getResources(input),
|
|
1478
1500
|
parameters: [
|
|
1479
1501
|
...this.getParameters(input),
|
|
@@ -1502,7 +1524,7 @@ var FlushingMonitor = class extends Report {
|
|
|
1502
1524
|
this.fileName = "Flushing";
|
|
1503
1525
|
}
|
|
1504
1526
|
async pdf(input) {
|
|
1505
|
-
|
|
1527
|
+
await this.requestPdf({
|
|
1506
1528
|
resources: this.getResources(input),
|
|
1507
1529
|
parameters: [
|
|
1508
1530
|
...this.getParameters(input),
|
|
@@ -1511,7 +1533,7 @@ var FlushingMonitor = class extends Report {
|
|
|
1511
1533
|
});
|
|
1512
1534
|
}
|
|
1513
1535
|
async csv(input) {
|
|
1514
|
-
|
|
1536
|
+
await this.requestCsv({
|
|
1515
1537
|
resources: this.getResources(input),
|
|
1516
1538
|
parameters: [
|
|
1517
1539
|
...this.getParameters(input),
|
|
@@ -1540,7 +1562,7 @@ var GiltInventory = class extends Report {
|
|
|
1540
1562
|
this.fileName = "Estoque de leitoas";
|
|
1541
1563
|
}
|
|
1542
1564
|
async pdf(input) {
|
|
1543
|
-
|
|
1565
|
+
await this.requestPdf({
|
|
1544
1566
|
resources: this.getResources(input),
|
|
1545
1567
|
parameters: [
|
|
1546
1568
|
...this.getParameters(input),
|
|
@@ -1549,7 +1571,7 @@ var GiltInventory = class extends Report {
|
|
|
1549
1571
|
});
|
|
1550
1572
|
}
|
|
1551
1573
|
async csv(input) {
|
|
1552
|
-
|
|
1574
|
+
await this.requestCsv({
|
|
1553
1575
|
resources: this.getResources(input),
|
|
1554
1576
|
parameters: [
|
|
1555
1577
|
...this.getParameters(input),
|
|
@@ -1580,7 +1602,7 @@ var GtaList = class extends Report {
|
|
|
1580
1602
|
this.fileName = "Listagem de gtas";
|
|
1581
1603
|
}
|
|
1582
1604
|
async pdf(input) {
|
|
1583
|
-
|
|
1605
|
+
await this.requestPdf({
|
|
1584
1606
|
resources: this.getResources(input),
|
|
1585
1607
|
parameters: [
|
|
1586
1608
|
...this.getParameters(input),
|
|
@@ -1589,7 +1611,7 @@ var GtaList = class extends Report {
|
|
|
1589
1611
|
});
|
|
1590
1612
|
}
|
|
1591
1613
|
async csv(input) {
|
|
1592
|
-
|
|
1614
|
+
await this.requestCsv({
|
|
1593
1615
|
resources: this.getResources(input),
|
|
1594
1616
|
parameters: [
|
|
1595
1617
|
...this.getParameters(input),
|
|
@@ -1616,7 +1638,7 @@ var HeatDetectionCollectionForm = class extends Report {
|
|
|
1616
1638
|
this.fileName = "Registro de cio";
|
|
1617
1639
|
}
|
|
1618
1640
|
async pdf(input) {
|
|
1619
|
-
|
|
1641
|
+
await this.requestPdf({
|
|
1620
1642
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1621
1643
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1622
1644
|
});
|
|
@@ -1631,7 +1653,7 @@ var HeatDetectionList = class extends Report {
|
|
|
1631
1653
|
this.fileName = "Listagem de registros de cio";
|
|
1632
1654
|
}
|
|
1633
1655
|
async pdf(input) {
|
|
1634
|
-
|
|
1656
|
+
await this.requestPdf({
|
|
1635
1657
|
resources: this.getResources(input),
|
|
1636
1658
|
parameters: [
|
|
1637
1659
|
...this.getParameters(input),
|
|
@@ -1640,7 +1662,7 @@ var HeatDetectionList = class extends Report {
|
|
|
1640
1662
|
});
|
|
1641
1663
|
}
|
|
1642
1664
|
async csv(input) {
|
|
1643
|
-
|
|
1665
|
+
await this.requestCsv({
|
|
1644
1666
|
resources: this.getResources(input),
|
|
1645
1667
|
parameters: [
|
|
1646
1668
|
...this.getParameters(input),
|
|
@@ -1680,7 +1702,7 @@ var HeatMonitoring = class extends Report {
|
|
|
1680
1702
|
this.fileName = "Mapa de Cio";
|
|
1681
1703
|
}
|
|
1682
1704
|
async pdf(input) {
|
|
1683
|
-
|
|
1705
|
+
await this.requestPdf({
|
|
1684
1706
|
resources: this.getResources(input),
|
|
1685
1707
|
parameters: [
|
|
1686
1708
|
...this.getParameters(input),
|
|
@@ -1689,7 +1711,7 @@ var HeatMonitoring = class extends Report {
|
|
|
1689
1711
|
});
|
|
1690
1712
|
}
|
|
1691
1713
|
async csv(input) {
|
|
1692
|
-
|
|
1714
|
+
await this.requestCsv({
|
|
1693
1715
|
resources: this.getResources(input),
|
|
1694
1716
|
parameters: [
|
|
1695
1717
|
...this.getParameters(input),
|
|
@@ -1720,7 +1742,7 @@ var LocationList = class extends Report {
|
|
|
1720
1742
|
this.fileName = "Listagem de localiza\xE7\xF5es";
|
|
1721
1743
|
}
|
|
1722
1744
|
async pdf(input) {
|
|
1723
|
-
|
|
1745
|
+
await this.requestPdf({
|
|
1724
1746
|
resources: this.getResources(input),
|
|
1725
1747
|
parameters: [
|
|
1726
1748
|
...this.getParameters(input),
|
|
@@ -1729,7 +1751,7 @@ var LocationList = class extends Report {
|
|
|
1729
1751
|
});
|
|
1730
1752
|
}
|
|
1731
1753
|
async csv(input) {
|
|
1732
|
-
|
|
1754
|
+
await this.requestCsv({
|
|
1733
1755
|
resources: this.getResources(input),
|
|
1734
1756
|
parameters: [
|
|
1735
1757
|
...this.getParameters(input),
|
|
@@ -1753,7 +1775,7 @@ var MaternityPigletDeathCollectionForm = class extends Report {
|
|
|
1753
1775
|
this.fileName = "Morte de leit\xE3o na maternidade";
|
|
1754
1776
|
}
|
|
1755
1777
|
async pdf(input) {
|
|
1756
|
-
|
|
1778
|
+
await this.requestPdf({
|
|
1757
1779
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1758
1780
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1759
1781
|
});
|
|
@@ -1768,7 +1790,7 @@ var MaternityPigletDeathList = class extends Report {
|
|
|
1768
1790
|
this.fileName = "Listagem de mortes de leit\xE3o";
|
|
1769
1791
|
}
|
|
1770
1792
|
async pdf(input) {
|
|
1771
|
-
|
|
1793
|
+
await this.requestPdf({
|
|
1772
1794
|
resources: this.getResources(input),
|
|
1773
1795
|
parameters: [
|
|
1774
1796
|
...this.getParameters(input),
|
|
@@ -1777,7 +1799,7 @@ var MaternityPigletDeathList = class extends Report {
|
|
|
1777
1799
|
});
|
|
1778
1800
|
}
|
|
1779
1801
|
async csv(input) {
|
|
1780
|
-
|
|
1802
|
+
await this.requestCsv({
|
|
1781
1803
|
resources: this.getResources(input),
|
|
1782
1804
|
parameters: [
|
|
1783
1805
|
...this.getParameters(input),
|
|
@@ -1810,13 +1832,59 @@ var MaternityPigletTransferCollectionForm = class extends Report {
|
|
|
1810
1832
|
this.fileName = "Transfer\xEAncia de leit\xE3o na maternidade";
|
|
1811
1833
|
}
|
|
1812
1834
|
async pdf(input) {
|
|
1813
|
-
|
|
1835
|
+
await this.requestPdf({
|
|
1814
1836
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1815
1837
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1816
1838
|
});
|
|
1817
1839
|
}
|
|
1818
1840
|
};
|
|
1819
1841
|
|
|
1842
|
+
// src/namespaces/pig-master/reports/maternity-piglet-transfer-list.ts
|
|
1843
|
+
var MaternityPigletTransferList = class extends Report {
|
|
1844
|
+
constructor() {
|
|
1845
|
+
super(...arguments);
|
|
1846
|
+
this.template = "@pig-master/maternity-piglet-transfer-list";
|
|
1847
|
+
this.fileName = "Listagem de transfer\xEAncias de leit\xE3o";
|
|
1848
|
+
}
|
|
1849
|
+
async pdf(input) {
|
|
1850
|
+
await this.requestPdf({
|
|
1851
|
+
resources: this.getResources(input),
|
|
1852
|
+
parameters: [
|
|
1853
|
+
...this.getParameters(input),
|
|
1854
|
+
{ key: "DATA_ONLY", value: false }
|
|
1855
|
+
]
|
|
1856
|
+
});
|
|
1857
|
+
}
|
|
1858
|
+
async csv(input) {
|
|
1859
|
+
await this.requestCsv({
|
|
1860
|
+
resources: this.getResources(input),
|
|
1861
|
+
parameters: [
|
|
1862
|
+
...this.getParameters(input),
|
|
1863
|
+
{ key: "DATA_ONLY", value: true }
|
|
1864
|
+
]
|
|
1865
|
+
});
|
|
1866
|
+
}
|
|
1867
|
+
getResources(input) {
|
|
1868
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
1869
|
+
}
|
|
1870
|
+
getParameters(input) {
|
|
1871
|
+
return [
|
|
1872
|
+
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
1873
|
+
{ key: "DATE_END", value: input.dateRange?.end ?? null },
|
|
1874
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
1875
|
+
{ key: "DONOR_ID", value: input.donorId },
|
|
1876
|
+
{ key: "DONOR_PARITY", value: input.donorParity?.toString() ?? null },
|
|
1877
|
+
{ key: "DONOR_CONTEXT", value: input.donorContext },
|
|
1878
|
+
{ key: "RECIPIENT_ID", value: input.recipientId },
|
|
1879
|
+
{
|
|
1880
|
+
key: "RECIPIENT_PARITY",
|
|
1881
|
+
value: input.recipientParity?.toString() ?? null
|
|
1882
|
+
},
|
|
1883
|
+
{ key: "RECIPIENT_CONTEXT", value: input.recipientContext }
|
|
1884
|
+
];
|
|
1885
|
+
}
|
|
1886
|
+
};
|
|
1887
|
+
|
|
1820
1888
|
// src/namespaces/pig-master/reports/mating-analysis.ts
|
|
1821
1889
|
var MatingAnalysis = class extends Report {
|
|
1822
1890
|
constructor() {
|
|
@@ -1825,7 +1893,7 @@ var MatingAnalysis = class extends Report {
|
|
|
1825
1893
|
this.fileName = "An\xE1lise de coberturas";
|
|
1826
1894
|
}
|
|
1827
1895
|
async pdf(input) {
|
|
1828
|
-
|
|
1896
|
+
await this.requestPdf({
|
|
1829
1897
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1830
1898
|
parameters: [
|
|
1831
1899
|
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
@@ -1863,7 +1931,7 @@ var MatingCollectionForm = class extends Report {
|
|
|
1863
1931
|
this.fileName = "Cobertura";
|
|
1864
1932
|
}
|
|
1865
1933
|
async pdf(input) {
|
|
1866
|
-
|
|
1934
|
+
await this.requestPdf({
|
|
1867
1935
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
1868
1936
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
1869
1937
|
});
|
|
@@ -1878,7 +1946,7 @@ var MatingGroupList = class extends Report {
|
|
|
1878
1946
|
this.fileName = "Listagem de grupos de cobertura";
|
|
1879
1947
|
}
|
|
1880
1948
|
async pdf(input) {
|
|
1881
|
-
|
|
1949
|
+
await this.requestPdf({
|
|
1882
1950
|
resources: this.getResources(input),
|
|
1883
1951
|
parameters: [
|
|
1884
1952
|
...this.getParameters(input),
|
|
@@ -1887,7 +1955,7 @@ var MatingGroupList = class extends Report {
|
|
|
1887
1955
|
});
|
|
1888
1956
|
}
|
|
1889
1957
|
async csv(input) {
|
|
1890
|
-
|
|
1958
|
+
await this.requestCsv({
|
|
1891
1959
|
resources: this.getResources(input),
|
|
1892
1960
|
parameters: [
|
|
1893
1961
|
...this.getParameters(input),
|
|
@@ -1911,7 +1979,7 @@ var MatingList = class extends Report {
|
|
|
1911
1979
|
this.fileName = "Listagem de coberturas";
|
|
1912
1980
|
}
|
|
1913
1981
|
async pdf(input) {
|
|
1914
|
-
|
|
1982
|
+
await this.requestPdf({
|
|
1915
1983
|
resources: this.getResources(input),
|
|
1916
1984
|
parameters: [
|
|
1917
1985
|
...this.getParameters(input),
|
|
@@ -1920,7 +1988,7 @@ var MatingList = class extends Report {
|
|
|
1920
1988
|
});
|
|
1921
1989
|
}
|
|
1922
1990
|
async csv(input) {
|
|
1923
|
-
|
|
1991
|
+
await this.requestCsv({
|
|
1924
1992
|
resources: this.getResources(input),
|
|
1925
1993
|
parameters: [
|
|
1926
1994
|
...this.getParameters(input),
|
|
@@ -1968,7 +2036,7 @@ var MatingOverview = class extends Report {
|
|
|
1968
2036
|
this.fileName = "Performance de coberturas";
|
|
1969
2037
|
}
|
|
1970
2038
|
async pdf(input) {
|
|
1971
|
-
|
|
2039
|
+
await this.requestPdf({
|
|
1972
2040
|
resources: this.getResources(input),
|
|
1973
2041
|
parameters: [
|
|
1974
2042
|
...this.getParameters(input),
|
|
@@ -1977,7 +2045,7 @@ var MatingOverview = class extends Report {
|
|
|
1977
2045
|
});
|
|
1978
2046
|
}
|
|
1979
2047
|
async csv(input) {
|
|
1980
|
-
|
|
2048
|
+
await this.requestCsv({
|
|
1981
2049
|
resources: this.getResources(input),
|
|
1982
2050
|
parameters: [
|
|
1983
2051
|
...this.getParameters(input),
|
|
@@ -2008,7 +2076,7 @@ var MbrfFemaleSwineRecord = class extends Report {
|
|
|
2008
2076
|
this.fileName = "Ficha fim";
|
|
2009
2077
|
}
|
|
2010
2078
|
async pdf(input) {
|
|
2011
|
-
|
|
2079
|
+
await this.requestPdf({
|
|
2012
2080
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2013
2081
|
parameters: [
|
|
2014
2082
|
{ key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
|
|
@@ -2026,7 +2094,7 @@ var NurseryPigletDeathCollectionForm = class extends Report {
|
|
|
2026
2094
|
this.fileName = "Morte de leit\xE3o na creche";
|
|
2027
2095
|
}
|
|
2028
2096
|
async pdf(input) {
|
|
2029
|
-
|
|
2097
|
+
await this.requestPdf({
|
|
2030
2098
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2031
2099
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
2032
2100
|
});
|
|
@@ -2041,7 +2109,7 @@ var OriginList = class extends Report {
|
|
|
2041
2109
|
this.fileName = "Listagem de origens";
|
|
2042
2110
|
}
|
|
2043
2111
|
async pdf(input) {
|
|
2044
|
-
|
|
2112
|
+
await this.requestPdf({
|
|
2045
2113
|
resources: this.getResources(input),
|
|
2046
2114
|
parameters: [
|
|
2047
2115
|
...this.getParameters(input),
|
|
@@ -2050,7 +2118,7 @@ var OriginList = class extends Report {
|
|
|
2050
2118
|
});
|
|
2051
2119
|
}
|
|
2052
2120
|
async csv(input) {
|
|
2053
|
-
|
|
2121
|
+
await this.requestCsv({
|
|
2054
2122
|
resources: this.getResources(input),
|
|
2055
2123
|
parameters: [
|
|
2056
2124
|
...this.getParameters(input),
|
|
@@ -2074,7 +2142,7 @@ var ParityStructure = class extends Report {
|
|
|
2074
2142
|
this.fileName = "Estrutura et\xE1ria";
|
|
2075
2143
|
}
|
|
2076
2144
|
async pdf(input) {
|
|
2077
|
-
|
|
2145
|
+
await this.requestPdf({
|
|
2078
2146
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2079
2147
|
parameters: [
|
|
2080
2148
|
{ key: "LOCATE", value: input.language.replace("-", "_") },
|
|
@@ -2095,7 +2163,7 @@ var PreFlushingFemaleSwineList = class extends Report {
|
|
|
2095
2163
|
this.fileName = "F\xEAmeas pr\xE9-flushing";
|
|
2096
2164
|
}
|
|
2097
2165
|
async pdf(input) {
|
|
2098
|
-
|
|
2166
|
+
await this.requestPdf({
|
|
2099
2167
|
resources: this.getResources(input),
|
|
2100
2168
|
parameters: [
|
|
2101
2169
|
...this.getParameters(input),
|
|
@@ -2104,7 +2172,7 @@ var PreFlushingFemaleSwineList = class extends Report {
|
|
|
2104
2172
|
});
|
|
2105
2173
|
}
|
|
2106
2174
|
async csv(input) {
|
|
2107
|
-
|
|
2175
|
+
await this.requestCsv({
|
|
2108
2176
|
resources: this.getResources(input),
|
|
2109
2177
|
parameters: [
|
|
2110
2178
|
...this.getParameters(input),
|
|
@@ -2133,7 +2201,7 @@ var PregnantFemaleSwineList = class extends Report {
|
|
|
2133
2201
|
this.fileName = "F\xEAmeas gestantes";
|
|
2134
2202
|
}
|
|
2135
2203
|
async pdf(input) {
|
|
2136
|
-
|
|
2204
|
+
await this.requestPdf({
|
|
2137
2205
|
resources: this.getResources(input),
|
|
2138
2206
|
parameters: [
|
|
2139
2207
|
{ key: "DATA_ONLY", value: false },
|
|
@@ -2142,7 +2210,7 @@ var PregnantFemaleSwineList = class extends Report {
|
|
|
2142
2210
|
});
|
|
2143
2211
|
}
|
|
2144
2212
|
async csv(input) {
|
|
2145
|
-
|
|
2213
|
+
await this.requestCsv({
|
|
2146
2214
|
resources: this.getResources(input),
|
|
2147
2215
|
parameters: [
|
|
2148
2216
|
{ key: "DATA_ONLY", value: true },
|
|
@@ -2171,7 +2239,7 @@ var PregnantFemaleSwineSaleList = class extends Report {
|
|
|
2171
2239
|
this.fileName = "Listagem de vendas de gestantes";
|
|
2172
2240
|
}
|
|
2173
2241
|
async pdf(input) {
|
|
2174
|
-
|
|
2242
|
+
await this.requestPdf({
|
|
2175
2243
|
resources: this.getResources(input),
|
|
2176
2244
|
parameters: [
|
|
2177
2245
|
...this.getParameters(input),
|
|
@@ -2180,7 +2248,7 @@ var PregnantFemaleSwineSaleList = class extends Report {
|
|
|
2180
2248
|
});
|
|
2181
2249
|
}
|
|
2182
2250
|
async csv(input) {
|
|
2183
|
-
|
|
2251
|
+
await this.requestCsv({
|
|
2184
2252
|
resources: this.getResources(input),
|
|
2185
2253
|
parameters: [
|
|
2186
2254
|
...this.getParameters(input),
|
|
@@ -2224,7 +2292,7 @@ var ReproductiveFailureAnalysis = class extends Report {
|
|
|
2224
2292
|
this.fileName = "An\xE1lise de perdas de cobertura";
|
|
2225
2293
|
}
|
|
2226
2294
|
async pdf(input) {
|
|
2227
|
-
|
|
2295
|
+
await this.requestPdf({
|
|
2228
2296
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2229
2297
|
parameters: [
|
|
2230
2298
|
{ key: "GROUP", value: input.groupBy },
|
|
@@ -2257,7 +2325,7 @@ var ReproductiveFailureCollectionForm = class extends Report {
|
|
|
2257
2325
|
this.fileName = "Perda de cobertura";
|
|
2258
2326
|
}
|
|
2259
2327
|
async pdf(input) {
|
|
2260
|
-
|
|
2328
|
+
await this.requestPdf({
|
|
2261
2329
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2262
2330
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
2263
2331
|
});
|
|
@@ -2272,7 +2340,7 @@ var ReproductiveFailureList = class extends Report {
|
|
|
2272
2340
|
this.fileName = "Perdas de cobertura";
|
|
2273
2341
|
}
|
|
2274
2342
|
async pdf(input) {
|
|
2275
|
-
|
|
2343
|
+
await this.requestPdf({
|
|
2276
2344
|
resources: this.getResources(input),
|
|
2277
2345
|
parameters: [
|
|
2278
2346
|
...this.getParameters(input),
|
|
@@ -2281,7 +2349,7 @@ var ReproductiveFailureList = class extends Report {
|
|
|
2281
2349
|
});
|
|
2282
2350
|
}
|
|
2283
2351
|
async csv(input) {
|
|
2284
|
-
|
|
2352
|
+
await this.requestCsv({
|
|
2285
2353
|
resources: this.getResources(input),
|
|
2286
2354
|
parameters: [
|
|
2287
2355
|
...this.getParameters(input),
|
|
@@ -2319,7 +2387,7 @@ var ScoreList = class extends Report {
|
|
|
2319
2387
|
this.fileName = "Listagem de escores";
|
|
2320
2388
|
}
|
|
2321
2389
|
async pdf(input) {
|
|
2322
|
-
|
|
2390
|
+
await this.requestPdf({
|
|
2323
2391
|
resources: this.getResources(input),
|
|
2324
2392
|
parameters: [
|
|
2325
2393
|
...this.getParameters(input),
|
|
@@ -2328,7 +2396,7 @@ var ScoreList = class extends Report {
|
|
|
2328
2396
|
});
|
|
2329
2397
|
}
|
|
2330
2398
|
async csv(input) {
|
|
2331
|
-
|
|
2399
|
+
await this.requestCsv({
|
|
2332
2400
|
resources: this.getResources(input),
|
|
2333
2401
|
parameters: [
|
|
2334
2402
|
...this.getParameters(input),
|
|
@@ -2352,7 +2420,7 @@ var WeaningAnalysis = class extends Report {
|
|
|
2352
2420
|
this.fileName = "An\xE1lise de desmames";
|
|
2353
2421
|
}
|
|
2354
2422
|
async pdf(input) {
|
|
2355
|
-
|
|
2423
|
+
await this.requestPdf({
|
|
2356
2424
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2357
2425
|
parameters: [
|
|
2358
2426
|
{ key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
|
|
@@ -2385,13 +2453,62 @@ var WeaningCollectionForm = class extends Report {
|
|
|
2385
2453
|
this.fileName = "Desmame";
|
|
2386
2454
|
}
|
|
2387
2455
|
async pdf(input) {
|
|
2388
|
-
|
|
2456
|
+
await this.requestPdf({
|
|
2389
2457
|
resources: [{ key: "FARM_ID", value: input.farmId }],
|
|
2390
2458
|
parameters: [{ key: "CALENDAR", value: input.calendarType }]
|
|
2391
2459
|
});
|
|
2392
2460
|
}
|
|
2393
2461
|
};
|
|
2394
2462
|
|
|
2463
|
+
// src/namespaces/pig-master/reports/weaning-forecast.ts
|
|
2464
|
+
var WeaningForecast = class extends Report {
|
|
2465
|
+
constructor() {
|
|
2466
|
+
super(...arguments);
|
|
2467
|
+
this.template = "@pig-master/weaning-forecast";
|
|
2468
|
+
this.fileName = "Previs\xE3o de desmames";
|
|
2469
|
+
}
|
|
2470
|
+
async pdf(input) {
|
|
2471
|
+
await this.requestPdf({
|
|
2472
|
+
resources: this.getResources(input),
|
|
2473
|
+
parameters: [
|
|
2474
|
+
...this.getParameters(input),
|
|
2475
|
+
{ key: "DATA_ONLY", value: false }
|
|
2476
|
+
]
|
|
2477
|
+
});
|
|
2478
|
+
}
|
|
2479
|
+
async csv(input) {
|
|
2480
|
+
await this.requestCsv({
|
|
2481
|
+
resources: this.getResources(input),
|
|
2482
|
+
parameters: [
|
|
2483
|
+
...this.getParameters(input),
|
|
2484
|
+
{ key: "DATA_ONLY", value: true }
|
|
2485
|
+
]
|
|
2486
|
+
});
|
|
2487
|
+
}
|
|
2488
|
+
getResources(input) {
|
|
2489
|
+
return [{ key: "FARM_ID", value: input.farmId }];
|
|
2490
|
+
}
|
|
2491
|
+
getParameters(input) {
|
|
2492
|
+
return [
|
|
2493
|
+
{ key: "WEANING_DATE", value: input.weaningDate },
|
|
2494
|
+
{ key: "CALENDAR", value: input.calendarType },
|
|
2495
|
+
{ key: "PARITY", value: input.parity?.toString() ?? null },
|
|
2496
|
+
{ key: "LOCATION_ID", value: input.locationId },
|
|
2497
|
+
{ key: "PEN", value: input.pen },
|
|
2498
|
+
{
|
|
2499
|
+
key: "MIN_LACTATION_DAYS",
|
|
2500
|
+
value: input.lactationLengthRange?.start.toString() ?? null
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
key: "MAX_LACTATION_DAYS",
|
|
2504
|
+
value: input.lactationLengthRange?.end.toString() ?? null
|
|
2505
|
+
},
|
|
2506
|
+
{ key: "ORDERBYDIRECTION", value: input.orderBy.direction },
|
|
2507
|
+
{ key: "ORDERBYCOLUMN", value: toSnakeCase(input.orderBy.column) }
|
|
2508
|
+
];
|
|
2509
|
+
}
|
|
2510
|
+
};
|
|
2511
|
+
|
|
2395
2512
|
// src/namespaces/pig-master/reports/weaning-list.ts
|
|
2396
2513
|
var WeaningList = class extends Report {
|
|
2397
2514
|
constructor() {
|
|
@@ -2400,7 +2517,7 @@ var WeaningList = class extends Report {
|
|
|
2400
2517
|
this.fileName = "Listagem de desmames";
|
|
2401
2518
|
}
|
|
2402
2519
|
async pdf(input) {
|
|
2403
|
-
|
|
2520
|
+
await this.requestPdf({
|
|
2404
2521
|
resources: this.getResources(input),
|
|
2405
2522
|
parameters: [
|
|
2406
2523
|
...this.getParameters(input),
|
|
@@ -2409,7 +2526,7 @@ var WeaningList = class extends Report {
|
|
|
2409
2526
|
});
|
|
2410
2527
|
}
|
|
2411
2528
|
async csv(input) {
|
|
2412
|
-
|
|
2529
|
+
await this.requestCsv({
|
|
2413
2530
|
resources: this.getResources(input),
|
|
2414
2531
|
parameters: [
|
|
2415
2532
|
...this.getParameters(input),
|
|
@@ -2529,25 +2646,20 @@ var PigMaster = class {
|
|
|
2529
2646
|
this.maternityPigletDeathList = new MaternityPigletDeathList(http);
|
|
2530
2647
|
this.weaningList = new WeaningList(http);
|
|
2531
2648
|
this.farrowingList = new FarrowingList(http);
|
|
2649
|
+
this.maternityPigletTransferList = new MaternityPigletTransferList(http);
|
|
2650
|
+
this.weaningForecast = new WeaningForecast(http);
|
|
2651
|
+
this.farrowingForecast = new FarrowingForecast(http);
|
|
2532
2652
|
}
|
|
2533
2653
|
};
|
|
2534
2654
|
|
|
2535
|
-
// src/
|
|
2536
|
-
var
|
|
2537
|
-
constructor(http) {
|
|
2538
|
-
this.http = http;
|
|
2655
|
+
// src/jaspion.ts
|
|
2656
|
+
var Jaspion = class {
|
|
2657
|
+
constructor({ http }) {
|
|
2539
2658
|
this.pigMaster = new PigMaster(http);
|
|
2540
2659
|
}
|
|
2541
|
-
setAccessToken(token) {
|
|
2542
|
-
this.http.setHeader("Authorization", `Bearer ${token}`);
|
|
2543
|
-
}
|
|
2544
2660
|
};
|
|
2545
|
-
function jaspion(baseUrl) {
|
|
2546
|
-
const http = new HttpClient(baseUrl);
|
|
2547
|
-
return new JaspionClient(http);
|
|
2548
|
-
}
|
|
2549
2661
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2550
2662
|
0 && (module.exports = {
|
|
2551
|
-
|
|
2663
|
+
Jaspion
|
|
2552
2664
|
});
|
|
2553
2665
|
//# sourceMappingURL=index.js.map
|