@gesagro/jaspion-sdk 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1294,6 +1294,32 @@ declare class WeaningCollectionForm extends Report implements PdfReport {
1294
1294
  pdf(input: WeaningCollectionFormInput): Promise<void>;
1295
1295
  }
1296
1296
 
1297
+ interface WeaningListInput {
1298
+ farmId: string;
1299
+ dateRange: {
1300
+ start: string;
1301
+ end: string;
1302
+ } | null;
1303
+ matingDateRange: {
1304
+ start: string;
1305
+ end: string;
1306
+ } | null;
1307
+ calendarType: CalendarType;
1308
+ parity: number | null;
1309
+ originId: string | null;
1310
+ breedId: string | null;
1311
+ birthPlaceId: string | null;
1312
+ femaleSwineId: string | null;
1313
+ context: MaternityContext | null;
1314
+ nurseryPigletBatchId: string | null;
1315
+ }
1316
+ declare class WeaningList extends Report implements PdfReport, CsvReport {
1317
+ readonly template = "@pig-master/weaning-list";
1318
+ fileName: string;
1319
+ pdf(input: WeaningListInput): Promise<void>;
1320
+ csv(input: WeaningListInput): Promise<void>;
1321
+ }
1322
+
1297
1323
  declare class PigMaster {
1298
1324
  readonly birthPlaceList: BirthPlaceList;
1299
1325
  readonly boarByBreedList: BoarByBreedList;
@@ -1363,6 +1389,7 @@ declare class PigMaster {
1363
1389
  readonly weaningAnalysis: WeaningAnalysis;
1364
1390
  readonly weaningCollectionForm: WeaningCollectionForm;
1365
1391
  readonly maternityPigletDeathList: MaternityPigletDeathList;
1392
+ readonly weaningList: WeaningList;
1366
1393
  constructor(http: HttpClient);
1367
1394
  }
1368
1395
 
package/dist/index.d.ts CHANGED
@@ -1294,6 +1294,32 @@ declare class WeaningCollectionForm extends Report implements PdfReport {
1294
1294
  pdf(input: WeaningCollectionFormInput): Promise<void>;
1295
1295
  }
1296
1296
 
1297
+ interface WeaningListInput {
1298
+ farmId: string;
1299
+ dateRange: {
1300
+ start: string;
1301
+ end: string;
1302
+ } | null;
1303
+ matingDateRange: {
1304
+ start: string;
1305
+ end: string;
1306
+ } | null;
1307
+ calendarType: CalendarType;
1308
+ parity: number | null;
1309
+ originId: string | null;
1310
+ breedId: string | null;
1311
+ birthPlaceId: string | null;
1312
+ femaleSwineId: string | null;
1313
+ context: MaternityContext | null;
1314
+ nurseryPigletBatchId: string | null;
1315
+ }
1316
+ declare class WeaningList extends Report implements PdfReport, CsvReport {
1317
+ readonly template = "@pig-master/weaning-list";
1318
+ fileName: string;
1319
+ pdf(input: WeaningListInput): Promise<void>;
1320
+ csv(input: WeaningListInput): Promise<void>;
1321
+ }
1322
+
1297
1323
  declare class PigMaster {
1298
1324
  readonly birthPlaceList: BirthPlaceList;
1299
1325
  readonly boarByBreedList: BoarByBreedList;
@@ -1363,6 +1389,7 @@ declare class PigMaster {
1363
1389
  readonly weaningAnalysis: WeaningAnalysis;
1364
1390
  readonly weaningCollectionForm: WeaningCollectionForm;
1365
1391
  readonly maternityPigletDeathList: MaternityPigletDeathList;
1392
+ readonly weaningList: WeaningList;
1366
1393
  constructor(http: HttpClient);
1367
1394
  }
1368
1395
 
package/dist/index.js CHANGED
@@ -2339,6 +2339,59 @@ var WeaningCollectionForm = class extends Report {
2339
2339
  }
2340
2340
  };
2341
2341
 
2342
+ // src/namespaces/pig-master/reports/weaning-list.ts
2343
+ var WeaningList = class extends Report {
2344
+ constructor() {
2345
+ super(...arguments);
2346
+ this.template = "@pig-master/weaning-list";
2347
+ this.fileName = "Listagem de desmames";
2348
+ }
2349
+ async pdf(input) {
2350
+ return this.requestPdf({
2351
+ resources: [{ key: "FARM_ID", value: input.farmId }],
2352
+ parameters: [
2353
+ { key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
2354
+ { key: "DATE_END", value: input.dateRange?.end ?? null },
2355
+ { key: "CALENDAR", value: input.calendarType },
2356
+ { key: "PARITY", value: input.parity?.toString() ?? null },
2357
+ { key: "ORIGIN_ID", value: input.originId },
2358
+ { key: "BREED_ID", value: input.breedId },
2359
+ { key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
2360
+ { key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
2361
+ {
2362
+ key: "MATING_DATE_BEGIN",
2363
+ value: input.matingDateRange?.start ?? null
2364
+ },
2365
+ { key: "MATING_DATE_END", value: input.matingDateRange?.end ?? null },
2366
+ { key: "CONTEXT", value: input.context },
2367
+ { key: "PIGLET_BATCH_ID", value: input.nurseryPigletBatchId }
2368
+ ]
2369
+ });
2370
+ }
2371
+ async csv(input) {
2372
+ return this.requestCsv({
2373
+ resources: [{ key: "FARM_ID", value: input.farmId }],
2374
+ parameters: [
2375
+ { key: "DATE_BEGIN", value: input.dateRange?.start ?? null },
2376
+ { key: "DATE_END", value: input.dateRange?.end ?? null },
2377
+ { key: "CALENDAR", value: input.calendarType },
2378
+ { key: "PARITY", value: input.parity?.toString() ?? null },
2379
+ { key: "ORIGIN_ID", value: input.originId },
2380
+ { key: "BREED_ID", value: input.breedId },
2381
+ { key: "BIRTH_PLACE_ID", value: input.birthPlaceId },
2382
+ { key: "FEMALE_SWINE_ID", value: input.femaleSwineId },
2383
+ {
2384
+ key: "MATING_DATE_BEGIN",
2385
+ value: input.matingDateRange?.start ?? null
2386
+ },
2387
+ { key: "MATING_DATE_END", value: input.matingDateRange?.end ?? null },
2388
+ { key: "CONTEXT", value: input.context },
2389
+ { key: "PIGLET_BATCH_ID", value: input.nurseryPigletBatchId }
2390
+ ]
2391
+ });
2392
+ }
2393
+ };
2394
+
2342
2395
  // src/namespaces/pig-master/index.ts
2343
2396
  var PigMaster = class {
2344
2397
  constructor(http) {
@@ -2412,6 +2465,7 @@ var PigMaster = class {
2412
2465
  this.weaningAnalysis = new WeaningAnalysis(http);
2413
2466
  this.weaningCollectionForm = new WeaningCollectionForm(http);
2414
2467
  this.maternityPigletDeathList = new MaternityPigletDeathList(http);
2468
+ this.weaningList = new WeaningList(http);
2415
2469
  }
2416
2470
  };
2417
2471