@hectare/platform.clients.trading 1.1.160 → 1.1.162

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.
Files changed (38) hide show
  1. package/index.d.ts +0 -6
  2. package/models/BidDetail.d.ts +3 -145
  3. package/models/ContractDetail.d.ts +0 -7
  4. package/models/CreateBid.d.ts +4 -0
  5. package/models/CreateInventorySchema.d.ts +1 -1
  6. package/models/CreateListing.d.ts +1 -1
  7. package/models/CreateMarketingPlanSchema.d.ts +1 -1
  8. package/models/CreateTradeRequest.d.ts +4 -0
  9. package/models/InventoryDetailSchema.d.ts +1 -1
  10. package/models/InventorySearchResultsSchema.d.ts +1 -1
  11. package/models/InventorySummarySchema.d.ts +1 -1
  12. package/models/ListingDetail.d.ts +5 -147
  13. package/models/ListingSummary.d.ts +2 -1
  14. package/models/MarketingPlanDetailSchema.d.ts +2 -2
  15. package/models/MarketingPlanSearchResultsSchema.d.ts +2 -2
  16. package/models/MarketingPlanSummarySchema.d.ts +2 -2
  17. package/models/PatchBid.d.ts +4 -0
  18. package/models/PatchBidOption.d.ts +4 -0
  19. package/models/PatchListingSchema.d.ts +1 -1
  20. package/models/PatchMarketingPlanScheduleSchema.d.ts +1 -1
  21. package/models/PatchMarketingPlanSchema.d.ts +1 -1
  22. package/models/SearchResultsBidSchema.d.ts +3 -145
  23. package/models/SearchResultsListingSchema.d.ts +2 -1
  24. package/models/TradeRequestDetail.d.ts +1 -1
  25. package/models/TradingConfig.d.ts +0 -27
  26. package/package.json +1 -1
  27. package/models/AdvancePayContractSchema.d.ts +0 -138
  28. package/models/AdvancePayContractSchema.js +0 -1
  29. package/models/AdvancePayOfferSchema.d.ts +0 -62
  30. package/models/AdvancePayOfferSchema.js +0 -1
  31. package/models/AdvancePayRequestOfferSchema.d.ts +0 -13
  32. package/models/AdvancePayRequestOfferSchema.js +0 -1
  33. package/models/AdvancePayUploadCollectionReceiptSchema.d.ts +0 -12
  34. package/models/AdvancePayUploadCollectionReceiptSchema.js +0 -1
  35. package/models/FinMidWebhook.d.ts +0 -10
  36. package/models/FinMidWebhook.js +0 -1
  37. package/models/FinMidWebhookEvent.d.ts +0 -6
  38. package/models/FinMidWebhookEvent.js +0 -1
package/index.d.ts CHANGED
@@ -1,8 +1,4 @@
1
1
  export type { AcceptBid } from './models/AcceptBid.js';
2
- export type { AdvancePayContractSchema } from './models/AdvancePayContractSchema.js';
3
- export type { AdvancePayOfferSchema } from './models/AdvancePayOfferSchema.js';
4
- export type { AdvancePayRequestOfferSchema } from './models/AdvancePayRequestOfferSchema.js';
5
- export type { AdvancePayUploadCollectionReceiptSchema } from './models/AdvancePayUploadCollectionReceiptSchema.js';
6
2
  export type { AskAnExpertBuyerRallyReportSchema } from './models/AskAnExpertBuyerRallyReportSchema.js';
7
3
  export type { Availability } from './models/Availability.js';
8
4
  export type { BidAlerts } from './models/BidAlerts.js';
@@ -35,8 +31,6 @@ export type { ExFarmPricesRegionSchema } from './models/ExFarmPricesRegionSchema
35
31
  export type { ExFarmPricesSchema } from './models/ExFarmPricesSchema.js';
36
32
  export type { ExpiredBidOffer } from './models/ExpiredBidOffer.js';
37
33
  export type { FeedItem } from './models/FeedItem.js';
38
- export type { FinMidWebhook } from './models/FinMidWebhook.js';
39
- export type { FinMidWebhookEvent } from './models/FinMidWebhookEvent.js';
40
34
  export type { InsightPrices } from './models/InsightPrices.js';
41
35
  export type { InsightsDailySpotPricesByDateRangeSchema } from './models/InsightsDailySpotPricesByDateRangeSchema.js';
42
36
  export type { InsightsDailySpotPricesSchema } from './models/InsightsDailySpotPricesSchema.js';
@@ -14,6 +14,7 @@ export type BidDetail = {
14
14
  organisationVetted?: boolean;
15
15
  businessUnitId?: string;
16
16
  businessUnitName?: string;
17
+ businessCollectionAddressId?: number | null;
17
18
  id?: string;
18
19
  name: string;
19
20
  email: string;
@@ -88,7 +89,7 @@ export type BidDetail = {
88
89
  };
89
90
  movement: {
90
91
  months: Array<string>;
91
- asAvailable: boolean;
92
+ asAvailable: boolean | null;
92
93
  };
93
94
  buyerNotes: string | null;
94
95
  files?: Array<{
@@ -253,7 +254,7 @@ export type BidDetail = {
253
254
  };
254
255
  movement: {
255
256
  months: Array<string>;
256
- asAvailable: boolean;
257
+ asAvailable: boolean | null;
257
258
  };
258
259
  pricePerUnit: {
259
260
  amount: number;
@@ -265,9 +266,6 @@ export type BidDetail = {
265
266
  weight?: number;
266
267
  } | null;
267
268
  expiredOfferExpireAtUTC: string | null;
268
- isAdvancePayEligible: boolean;
269
- advancePayStatus?: string;
270
- advancePayContractId: string | null;
271
269
  acceptedAtUTC: string | null;
272
270
  soldWeight: number | null;
273
271
  haulageType: 'ex-farm' | 'delivered';
@@ -307,146 +305,6 @@ export type BidDetail = {
307
305
  } | null> | null;
308
306
  reference: string | null;
309
307
  };
310
- isAdvancePayEligible: boolean;
311
- advancePayStatus?: string;
312
- advancePayContract: {
313
- id: string;
314
- finmidPaymentId: string;
315
- status: 'pending' | 'captured' | 'settled';
316
- inventory: {
317
- harvestYear: string;
318
- commodity: {
319
- commodity: {
320
- id: number;
321
- name: string;
322
- };
323
- type: {
324
- id: number;
325
- name: string;
326
- };
327
- grade: {
328
- id: number;
329
- name: string;
330
- };
331
- variety?: string;
332
- varieties: Array<string>;
333
- attributes: Array<{
334
- id: number;
335
- name: string;
336
- }>;
337
- tags?: Array<number>;
338
- weight: {
339
- name: string;
340
- conversion: number;
341
- weight?: number;
342
- };
343
- };
344
- };
345
- trade: {
346
- listingId: string;
347
- bidId: string;
348
- buyer: {
349
- userId: string;
350
- organisationId: string;
351
- organisationName: string;
352
- };
353
- seller: {
354
- userId: string;
355
- organisationId: string;
356
- organisationName: string;
357
- };
358
- movement: {
359
- startDateUTC: string;
360
- endDateUTC: string;
361
- type: 'date' | 'month';
362
- };
363
- settlementDateUTC: string;
364
- buyerTermDays: number;
365
- amount: {
366
- amount: number;
367
- currency: string;
368
- };
369
- };
370
- offer: {
371
- totalWeight: {
372
- name: string;
373
- conversion: number;
374
- weight?: number;
375
- };
376
- totalTradeValue: {
377
- amount: number;
378
- currency: string;
379
- };
380
- totalSellerReceivable: {
381
- amount: number;
382
- currency: string;
383
- };
384
- movementTermUTC: string;
385
- pricePerUnit: {
386
- amount: number;
387
- currency: string;
388
- };
389
- payments: {
390
- fees: {
391
- amount: number;
392
- currency: string;
393
- };
394
- };
395
- };
396
- payments: {
397
- advance: {
398
- percentage: number;
399
- amount: {
400
- amount: number;
401
- currency: string;
402
- };
403
- amountAfterFees?: {
404
- amount: number;
405
- currency: string;
406
- } | null;
407
- status: 'pending' | 'captured';
408
- capturedAtUTC: string;
409
- dueAtUTC: string;
410
- };
411
- intermediate: {
412
- percentage: number;
413
- amount: {
414
- amount: number;
415
- currency: string;
416
- };
417
- amountAfterFees?: {
418
- amount: number;
419
- currency: string;
420
- } | null;
421
- status: 'pending' | 'captured';
422
- capturedAtUTC: string;
423
- dueAtUTC: string;
424
- } | null;
425
- settlement: {
426
- percentage: number;
427
- amount: {
428
- amount: number;
429
- currency: string;
430
- };
431
- amountAfterFees?: {
432
- amount: number;
433
- currency: string;
434
- } | null;
435
- status: 'pending' | 'captured';
436
- capturedAtUTC: string;
437
- };
438
- };
439
- collectionReceipts: Array<{
440
- name?: string;
441
- id: string;
442
- url?: string | null;
443
- userId?: string | null;
444
- userName?: string | null;
445
- organisationId?: string | null;
446
- createdAtUTC?: string | null;
447
- } | null>;
448
- tags: Array<string>;
449
- } | null;
450
308
  buyerContact: {
451
309
  email: string;
452
310
  phone: {
@@ -277,13 +277,6 @@ export type ContractDetail = {
277
277
  } | null;
278
278
  assuranceId?: string;
279
279
  assuranceScheme?: 'RT' | 'SQC';
280
- advancePay?: {
281
- accountName: string;
282
- sortCode: string;
283
- accountNumber: string;
284
- enabled: boolean;
285
- eligible: boolean;
286
- } | null;
287
280
  salesforceId?: string;
288
281
  salesforceUpdates?: Array<string>;
289
282
  };
@@ -9,6 +9,10 @@ export type CreateBid = {
9
9
  excludedDatesUTC?: Array<string> | null;
10
10
  asAvailable?: boolean | null;
11
11
  };
12
+ movement?: {
13
+ months: Array<string>;
14
+ asAvailable: boolean | null;
15
+ };
12
16
  pricePerUnit: {
13
17
  amount: number;
14
18
  currency: string;
@@ -39,7 +39,7 @@ export type CreateInventorySchema = {
39
39
  buyerNotes: string | null;
40
40
  movement: {
41
41
  months: Array<string>;
42
- asAvailable: boolean;
42
+ asAvailable: boolean | null;
43
43
  };
44
44
  };
45
45
  tags?: Array<string> | null;
@@ -30,7 +30,7 @@ export type CreateListing = {
30
30
  };
31
31
  movement?: {
32
32
  months: Array<string>;
33
- asAvailable: boolean;
33
+ asAvailable: boolean | null;
34
34
  };
35
35
  price?: {
36
36
  amount: number;
@@ -8,7 +8,7 @@ export type CreateMarketingPlanSchema = {
8
8
  } | null;
9
9
  movement: {
10
10
  months: Array<string>;
11
- asAvailable: boolean;
11
+ asAvailable: boolean | null;
12
12
  };
13
13
  haulageType: 'ex-farm' | 'delivered' | 'both' | null;
14
14
  buyerNotes: string | null;
@@ -20,6 +20,10 @@ export type CreateTradeRequest = {
20
20
  type: 'date' | 'month';
21
21
  excludedDatesUTC?: Array<string> | null;
22
22
  };
23
+ movement?: {
24
+ months: Array<string>;
25
+ asAvailable: boolean | null;
26
+ };
23
27
  haulageTerms: {
24
28
  haulageType: 'ex-farm' | 'delivered' | null;
25
29
  deliveryPostcode?: string | null;
@@ -63,7 +63,7 @@ export type InventoryDetailSchema = {
63
63
  buyerNotes: string | null;
64
64
  movement: {
65
65
  months: Array<string>;
66
- asAvailable: boolean;
66
+ asAvailable: boolean | null;
67
67
  };
68
68
  };
69
69
  summary: {
@@ -64,7 +64,7 @@ export type InventorySearchResultsSchema = {
64
64
  buyerNotes: string | null;
65
65
  movement: {
66
66
  months: Array<string>;
67
- asAvailable: boolean;
67
+ asAvailable: boolean | null;
68
68
  };
69
69
  };
70
70
  summary: {
@@ -17,7 +17,7 @@ export type InventorySummarySchema = {
17
17
  buyerNotes: string | null;
18
18
  movement: {
19
19
  months: Array<string>;
20
- asAvailable: boolean;
20
+ asAvailable: boolean | null;
21
21
  };
22
22
  };
23
23
  };
@@ -11,6 +11,7 @@ export type ListingDetail = {
11
11
  organisationVetted?: boolean;
12
12
  businessUnitId?: string;
13
13
  businessUnitName?: string;
14
+ businessCollectionAddressId?: number | null;
14
15
  id?: string;
15
16
  name: string;
16
17
  email: string;
@@ -85,7 +86,7 @@ export type ListingDetail = {
85
86
  };
86
87
  movement: {
87
88
  months: Array<string>;
88
- asAvailable: boolean;
89
+ asAvailable: boolean | null;
89
90
  };
90
91
  buyerNotes: string | null;
91
92
  files?: Array<{
@@ -251,7 +252,6 @@ export type ListingDetail = {
251
252
  currency: string;
252
253
  } | null;
253
254
  contractId: string;
254
- advancePayContractId: string;
255
255
  movementPeriod: {
256
256
  startDateUTC: string;
257
257
  endDateUTC: string;
@@ -275,6 +275,7 @@ export type ListingDetail = {
275
275
  organisationVetted?: boolean;
276
276
  businessUnitId?: string;
277
277
  businessUnitName?: string;
278
+ businessCollectionAddressId?: number | null;
278
279
  id?: string;
279
280
  name: string;
280
281
  email: string;
@@ -349,7 +350,7 @@ export type ListingDetail = {
349
350
  };
350
351
  movement: {
351
352
  months: Array<string>;
352
- asAvailable: boolean;
353
+ asAvailable: boolean | null;
353
354
  };
354
355
  buyerNotes: string | null;
355
356
  files?: Array<{
@@ -514,7 +515,7 @@ export type ListingDetail = {
514
515
  };
515
516
  movement: {
516
517
  months: Array<string>;
517
- asAvailable: boolean;
518
+ asAvailable: boolean | null;
518
519
  };
519
520
  pricePerUnit: {
520
521
  amount: number;
@@ -526,9 +527,6 @@ export type ListingDetail = {
526
527
  weight?: number;
527
528
  } | null;
528
529
  expiredOfferExpireAtUTC: string | null;
529
- isAdvancePayEligible: boolean;
530
- advancePayStatus?: string;
531
- advancePayContractId: string | null;
532
530
  acceptedAtUTC: string | null;
533
531
  soldWeight: number | null;
534
532
  haulageType: 'ex-farm' | 'delivered';
@@ -568,146 +566,6 @@ export type ListingDetail = {
568
566
  } | null> | null;
569
567
  reference: string | null;
570
568
  };
571
- isAdvancePayEligible: boolean;
572
- advancePayStatus?: string;
573
- advancePayContract: {
574
- id: string;
575
- finmidPaymentId: string;
576
- status: 'pending' | 'captured' | 'settled';
577
- inventory: {
578
- harvestYear: string;
579
- commodity: {
580
- commodity: {
581
- id: number;
582
- name: string;
583
- };
584
- type: {
585
- id: number;
586
- name: string;
587
- };
588
- grade: {
589
- id: number;
590
- name: string;
591
- };
592
- variety?: string;
593
- varieties: Array<string>;
594
- attributes: Array<{
595
- id: number;
596
- name: string;
597
- }>;
598
- tags?: Array<number>;
599
- weight: {
600
- name: string;
601
- conversion: number;
602
- weight?: number;
603
- };
604
- };
605
- };
606
- trade: {
607
- listingId: string;
608
- bidId: string;
609
- buyer: {
610
- userId: string;
611
- organisationId: string;
612
- organisationName: string;
613
- };
614
- seller: {
615
- userId: string;
616
- organisationId: string;
617
- organisationName: string;
618
- };
619
- movement: {
620
- startDateUTC: string;
621
- endDateUTC: string;
622
- type: 'date' | 'month';
623
- };
624
- settlementDateUTC: string;
625
- buyerTermDays: number;
626
- amount: {
627
- amount: number;
628
- currency: string;
629
- };
630
- };
631
- offer: {
632
- totalWeight: {
633
- name: string;
634
- conversion: number;
635
- weight?: number;
636
- };
637
- totalTradeValue: {
638
- amount: number;
639
- currency: string;
640
- };
641
- totalSellerReceivable: {
642
- amount: number;
643
- currency: string;
644
- };
645
- movementTermUTC: string;
646
- pricePerUnit: {
647
- amount: number;
648
- currency: string;
649
- };
650
- payments: {
651
- fees: {
652
- amount: number;
653
- currency: string;
654
- };
655
- };
656
- };
657
- payments: {
658
- advance: {
659
- percentage: number;
660
- amount: {
661
- amount: number;
662
- currency: string;
663
- };
664
- amountAfterFees?: {
665
- amount: number;
666
- currency: string;
667
- } | null;
668
- status: 'pending' | 'captured';
669
- capturedAtUTC: string;
670
- dueAtUTC: string;
671
- };
672
- intermediate: {
673
- percentage: number;
674
- amount: {
675
- amount: number;
676
- currency: string;
677
- };
678
- amountAfterFees?: {
679
- amount: number;
680
- currency: string;
681
- } | null;
682
- status: 'pending' | 'captured';
683
- capturedAtUTC: string;
684
- dueAtUTC: string;
685
- } | null;
686
- settlement: {
687
- percentage: number;
688
- amount: {
689
- amount: number;
690
- currency: string;
691
- };
692
- amountAfterFees?: {
693
- amount: number;
694
- currency: string;
695
- } | null;
696
- status: 'pending' | 'captured';
697
- capturedAtUTC: string;
698
- };
699
- };
700
- collectionReceipts: Array<{
701
- name?: string;
702
- id: string;
703
- url?: string | null;
704
- userId?: string | null;
705
- userName?: string | null;
706
- organisationId?: string | null;
707
- createdAtUTC?: string | null;
708
- } | null>;
709
- tags: Array<string>;
710
- } | null;
711
569
  buyerContact: {
712
570
  email: string;
713
571
  phone: {
@@ -11,6 +11,7 @@ export type ListingSummary = {
11
11
  organisationVetted?: boolean;
12
12
  businessUnitId?: string;
13
13
  businessUnitName?: string;
14
+ businessCollectionAddressId?: number | null;
14
15
  id?: string;
15
16
  name: string;
16
17
  email: string;
@@ -85,7 +86,7 @@ export type ListingSummary = {
85
86
  };
86
87
  movement: {
87
88
  months: Array<string>;
88
- asAvailable: boolean;
89
+ asAvailable: boolean | null;
89
90
  };
90
91
  buyerNotes: string | null;
91
92
  files?: Array<{
@@ -70,7 +70,7 @@ export type MarketingPlanDetailSchema = {
70
70
  } | null;
71
71
  movement: {
72
72
  months: Array<string>;
73
- asAvailable: boolean;
73
+ asAvailable: boolean | null;
74
74
  };
75
75
  haulageType: 'ex-farm' | 'delivered' | null;
76
76
  buyerNotes: string | null;
@@ -141,7 +141,7 @@ export type MarketingPlanDetailSchema = {
141
141
  };
142
142
  movement?: {
143
143
  months: Array<string>;
144
- asAvailable: boolean;
144
+ asAvailable: boolean | null;
145
145
  };
146
146
  skipped?: boolean;
147
147
  }>;
@@ -71,7 +71,7 @@ export type MarketingPlanSearchResultsSchema = {
71
71
  } | null;
72
72
  movement: {
73
73
  months: Array<string>;
74
- asAvailable: boolean;
74
+ asAvailable: boolean | null;
75
75
  };
76
76
  haulageType: 'ex-farm' | 'delivered' | null;
77
77
  buyerNotes: string | null;
@@ -142,7 +142,7 @@ export type MarketingPlanSearchResultsSchema = {
142
142
  };
143
143
  movement?: {
144
144
  months: Array<string>;
145
- asAvailable: boolean;
145
+ asAvailable: boolean | null;
146
146
  };
147
147
  skipped?: boolean;
148
148
  }>;
@@ -70,7 +70,7 @@ export type MarketingPlanSummarySchema = {
70
70
  } | null;
71
71
  movement: {
72
72
  months: Array<string>;
73
- asAvailable: boolean;
73
+ asAvailable: boolean | null;
74
74
  };
75
75
  haulageType: 'ex-farm' | 'delivered' | null;
76
76
  buyerNotes: string | null;
@@ -141,7 +141,7 @@ export type MarketingPlanSummarySchema = {
141
141
  };
142
142
  movement?: {
143
143
  months: Array<string>;
144
- asAvailable: boolean;
144
+ asAvailable: boolean | null;
145
145
  };
146
146
  skipped?: boolean;
147
147
  }>;
@@ -7,6 +7,10 @@ export type PatchBid = {
7
7
  endDateUTC: string;
8
8
  type: 'date' | 'month';
9
9
  };
10
+ movement?: {
11
+ months: Array<string>;
12
+ asAvailable: boolean | null;
13
+ };
10
14
  pricePerUnit: {
11
15
  amount: number;
12
16
  currency: string;
@@ -5,6 +5,10 @@ export type PatchBidOption = {
5
5
  endDateUTC: string;
6
6
  type: 'date' | 'month';
7
7
  };
8
+ movement?: {
9
+ months: Array<string>;
10
+ asAvailable: boolean | null;
11
+ };
8
12
  pricePerUnit: {
9
13
  amount: number;
10
14
  currency: string;
@@ -21,7 +21,7 @@ export type PatchListingSchema = {
21
21
  };
22
22
  movement?: {
23
23
  months: Array<string>;
24
- asAvailable: boolean;
24
+ asAvailable: boolean | null;
25
25
  };
26
26
  price?: {
27
27
  amount: number;
@@ -8,7 +8,7 @@ export type PatchMarketingPlanScheduleSchema = {
8
8
  maxWeight: number;
9
9
  movement: {
10
10
  months: Array<string>;
11
- asAvailable: boolean;
11
+ asAvailable: boolean | null;
12
12
  };
13
13
  skipped: boolean;
14
14
  listingId?: string | null;
@@ -8,7 +8,7 @@ export type PatchMarketingPlanSchema = {
8
8
  } | null;
9
9
  movement: {
10
10
  months: Array<string>;
11
- asAvailable: boolean;
11
+ asAvailable: boolean | null;
12
12
  };
13
13
  haulageType: 'ex-farm' | 'delivered' | 'both' | null;
14
14
  buyerNotes: string | null;
@@ -15,6 +15,7 @@ export type SearchResultsBidSchema = {
15
15
  organisationVetted?: boolean;
16
16
  businessUnitId?: string;
17
17
  businessUnitName?: string;
18
+ businessCollectionAddressId?: number | null;
18
19
  id?: string;
19
20
  name: string;
20
21
  email: string;
@@ -89,7 +90,7 @@ export type SearchResultsBidSchema = {
89
90
  };
90
91
  movement: {
91
92
  months: Array<string>;
92
- asAvailable: boolean;
93
+ asAvailable: boolean | null;
93
94
  };
94
95
  buyerNotes: string | null;
95
96
  files?: Array<{
@@ -254,7 +255,7 @@ export type SearchResultsBidSchema = {
254
255
  };
255
256
  movement: {
256
257
  months: Array<string>;
257
- asAvailable: boolean;
258
+ asAvailable: boolean | null;
258
259
  };
259
260
  pricePerUnit: {
260
261
  amount: number;
@@ -266,9 +267,6 @@ export type SearchResultsBidSchema = {
266
267
  weight?: number;
267
268
  } | null;
268
269
  expiredOfferExpireAtUTC: string | null;
269
- isAdvancePayEligible: boolean;
270
- advancePayStatus?: string;
271
- advancePayContractId: string | null;
272
270
  acceptedAtUTC: string | null;
273
271
  soldWeight: number | null;
274
272
  haulageType: 'ex-farm' | 'delivered';
@@ -308,146 +306,6 @@ export type SearchResultsBidSchema = {
308
306
  } | null> | null;
309
307
  reference: string | null;
310
308
  };
311
- isAdvancePayEligible: boolean;
312
- advancePayStatus?: string;
313
- advancePayContract: {
314
- id: string;
315
- finmidPaymentId: string;
316
- status: 'pending' | 'captured' | 'settled';
317
- inventory: {
318
- harvestYear: string;
319
- commodity: {
320
- commodity: {
321
- id: number;
322
- name: string;
323
- };
324
- type: {
325
- id: number;
326
- name: string;
327
- };
328
- grade: {
329
- id: number;
330
- name: string;
331
- };
332
- variety?: string;
333
- varieties: Array<string>;
334
- attributes: Array<{
335
- id: number;
336
- name: string;
337
- }>;
338
- tags?: Array<number>;
339
- weight: {
340
- name: string;
341
- conversion: number;
342
- weight?: number;
343
- };
344
- };
345
- };
346
- trade: {
347
- listingId: string;
348
- bidId: string;
349
- buyer: {
350
- userId: string;
351
- organisationId: string;
352
- organisationName: string;
353
- };
354
- seller: {
355
- userId: string;
356
- organisationId: string;
357
- organisationName: string;
358
- };
359
- movement: {
360
- startDateUTC: string;
361
- endDateUTC: string;
362
- type: 'date' | 'month';
363
- };
364
- settlementDateUTC: string;
365
- buyerTermDays: number;
366
- amount: {
367
- amount: number;
368
- currency: string;
369
- };
370
- };
371
- offer: {
372
- totalWeight: {
373
- name: string;
374
- conversion: number;
375
- weight?: number;
376
- };
377
- totalTradeValue: {
378
- amount: number;
379
- currency: string;
380
- };
381
- totalSellerReceivable: {
382
- amount: number;
383
- currency: string;
384
- };
385
- movementTermUTC: string;
386
- pricePerUnit: {
387
- amount: number;
388
- currency: string;
389
- };
390
- payments: {
391
- fees: {
392
- amount: number;
393
- currency: string;
394
- };
395
- };
396
- };
397
- payments: {
398
- advance: {
399
- percentage: number;
400
- amount: {
401
- amount: number;
402
- currency: string;
403
- };
404
- amountAfterFees?: {
405
- amount: number;
406
- currency: string;
407
- } | null;
408
- status: 'pending' | 'captured';
409
- capturedAtUTC: string;
410
- dueAtUTC: string;
411
- };
412
- intermediate: {
413
- percentage: number;
414
- amount: {
415
- amount: number;
416
- currency: string;
417
- };
418
- amountAfterFees?: {
419
- amount: number;
420
- currency: string;
421
- } | null;
422
- status: 'pending' | 'captured';
423
- capturedAtUTC: string;
424
- dueAtUTC: string;
425
- } | null;
426
- settlement: {
427
- percentage: number;
428
- amount: {
429
- amount: number;
430
- currency: string;
431
- };
432
- amountAfterFees?: {
433
- amount: number;
434
- currency: string;
435
- } | null;
436
- status: 'pending' | 'captured';
437
- capturedAtUTC: string;
438
- };
439
- };
440
- collectionReceipts: Array<{
441
- name?: string;
442
- id: string;
443
- url?: string | null;
444
- userId?: string | null;
445
- userName?: string | null;
446
- organisationId?: string | null;
447
- createdAtUTC?: string | null;
448
- } | null>;
449
- tags: Array<string>;
450
- } | null;
451
309
  buyerContact: {
452
310
  email: string;
453
311
  phone: {
@@ -12,6 +12,7 @@ export type SearchResultsListingSchema = {
12
12
  organisationVetted?: boolean;
13
13
  businessUnitId?: string;
14
14
  businessUnitName?: string;
15
+ businessCollectionAddressId?: number | null;
15
16
  id?: string;
16
17
  name: string;
17
18
  email: string;
@@ -86,7 +87,7 @@ export type SearchResultsListingSchema = {
86
87
  };
87
88
  movement: {
88
89
  months: Array<string>;
89
- asAvailable: boolean;
90
+ asAvailable: boolean | null;
90
91
  };
91
92
  buyerNotes: string | null;
92
93
  files?: Array<{
@@ -42,7 +42,7 @@ export type TradeRequestDetail = {
42
42
  };
43
43
  movement: {
44
44
  months: Array<string>;
45
- asAvailable: boolean;
45
+ asAvailable: boolean | null;
46
46
  };
47
47
  haulageTerms: {
48
48
  haulageType?: 'ex-farm' | 'delivered' | null;
@@ -25,33 +25,6 @@ export type TradingConfig = {
25
25
  id: number;
26
26
  description: string;
27
27
  }>;
28
- advancePay: {
29
- harvestYears: Array<string>;
30
- interestRates: {
31
- finmid: Array<{
32
- termDays: number;
33
- ratePct: number;
34
- periodDays: number;
35
- }>;
36
- ecb: {
37
- ratePct: number;
38
- periodDays: number;
39
- };
40
- hectare: {
41
- ratePct: number;
42
- periodDays: number;
43
- };
44
- };
45
- maxEligibilityDays: number;
46
- commercialTerms: Array<{
47
- termDaysThreshold: number;
48
- upfrontPct: number;
49
- intermediatePct: number;
50
- settlementPct: number;
51
- }>;
52
- settlementAdjustmentPerUnit: number;
53
- gracePeriodDays: number;
54
- };
55
28
  bidExpiredOfferExpiryTimeframe: {
56
29
  isEnabled: boolean;
57
30
  expiryHours: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hectare/platform.clients.trading",
3
- "version": "1.1.160",
3
+ "version": "1.1.162",
4
4
  "main": "index.js",
5
5
  "exported": true,
6
6
  "types": "index.d.ts",
@@ -1,138 +0,0 @@
1
- export type AdvancePayContractSchema = {
2
- id: string;
3
- finmidPaymentId: string;
4
- status: 'pending' | 'captured' | 'settled';
5
- inventory: {
6
- harvestYear: string;
7
- commodity: {
8
- commodity: {
9
- id: number;
10
- name: string;
11
- };
12
- type: {
13
- id: number;
14
- name: string;
15
- };
16
- grade: {
17
- id: number;
18
- name: string;
19
- };
20
- variety?: string;
21
- varieties: Array<string>;
22
- attributes: Array<{
23
- id: number;
24
- name: string;
25
- }>;
26
- tags?: Array<number>;
27
- weight: {
28
- name: string;
29
- conversion: number;
30
- weight?: number;
31
- };
32
- };
33
- };
34
- trade: {
35
- listingId: string;
36
- bidId: string;
37
- buyer: {
38
- userId: string;
39
- organisationId: string;
40
- organisationName: string;
41
- };
42
- seller: {
43
- userId: string;
44
- organisationId: string;
45
- organisationName: string;
46
- };
47
- movement: {
48
- startDateUTC: string;
49
- endDateUTC: string;
50
- type: 'date' | 'month';
51
- };
52
- settlementDateUTC: string;
53
- buyerTermDays: number;
54
- amount: {
55
- amount: number;
56
- currency: string;
57
- };
58
- };
59
- offer: {
60
- totalWeight: {
61
- name: string;
62
- conversion: number;
63
- weight?: number;
64
- };
65
- totalTradeValue: {
66
- amount: number;
67
- currency: string;
68
- };
69
- totalSellerReceivable: {
70
- amount: number;
71
- currency: string;
72
- };
73
- movementTermUTC: string;
74
- pricePerUnit: {
75
- amount: number;
76
- currency: string;
77
- };
78
- payments: {
79
- fees: {
80
- amount: number;
81
- currency: string;
82
- };
83
- };
84
- };
85
- payments: {
86
- advance: {
87
- percentage: number;
88
- amount: {
89
- amount: number;
90
- currency: string;
91
- };
92
- amountAfterFees?: {
93
- amount: number;
94
- currency: string;
95
- } | null;
96
- status: 'pending' | 'captured';
97
- capturedAtUTC: string;
98
- dueAtUTC: string;
99
- };
100
- intermediate: {
101
- percentage: number;
102
- amount: {
103
- amount: number;
104
- currency: string;
105
- };
106
- amountAfterFees?: {
107
- amount: number;
108
- currency: string;
109
- } | null;
110
- status: 'pending' | 'captured';
111
- capturedAtUTC: string;
112
- dueAtUTC: string;
113
- } | null;
114
- settlement: {
115
- percentage: number;
116
- amount: {
117
- amount: number;
118
- currency: string;
119
- };
120
- amountAfterFees?: {
121
- amount: number;
122
- currency: string;
123
- } | null;
124
- status: 'pending' | 'captured';
125
- capturedAtUTC: string;
126
- };
127
- };
128
- collectionReceipts: Array<{
129
- name?: string;
130
- id: string;
131
- url?: string | null;
132
- userId?: string | null;
133
- userName?: string | null;
134
- organisationId?: string | null;
135
- createdAtUTC?: string | null;
136
- } | null>;
137
- tags: Array<string>;
138
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,62 +0,0 @@
1
- export type AdvancePayOfferSchema = {
2
- totalWeight: {
3
- name: string;
4
- conversion: number;
5
- weight?: number;
6
- };
7
- totalTradeValue: {
8
- amount: number;
9
- currency: string;
10
- };
11
- totalSellerReceivable: {
12
- amount: number;
13
- currency: string;
14
- };
15
- movementTermUTC: string;
16
- pricePerUnit: {
17
- amount: number;
18
- currency: string;
19
- };
20
- payments: {
21
- fees: {
22
- amount: number;
23
- currency: string;
24
- };
25
- advance: {
26
- amount: {
27
- amount: number;
28
- currency: string;
29
- };
30
- amountAfterFees?: {
31
- amount: number;
32
- currency: string;
33
- } | null;
34
- percentage: number;
35
- type: 'advance' | 'intermediate' | 'settlement';
36
- };
37
- intermediate?: {
38
- amount: {
39
- amount: number;
40
- currency: string;
41
- };
42
- amountAfterFees?: {
43
- amount: number;
44
- currency: string;
45
- } | null;
46
- percentage: number;
47
- type: 'advance' | 'intermediate' | 'settlement';
48
- };
49
- settlement: {
50
- amount: {
51
- amount: number;
52
- currency: string;
53
- };
54
- amountAfterFees?: {
55
- amount: number;
56
- currency: string;
57
- } | null;
58
- percentage: number;
59
- type: 'advance' | 'intermediate' | 'settlement';
60
- };
61
- };
62
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,13 +0,0 @@
1
- export type AdvancePayRequestOfferSchema = {
2
- weight: {
3
- name: string;
4
- conversion: number;
5
- weight?: number;
6
- };
7
- pricePerUnit: {
8
- amount: number;
9
- currency: string;
10
- };
11
- movementPeriodDays: number;
12
- repaymentDays: number;
13
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- export type AdvancePayUploadCollectionReceiptSchema = {
2
- collectionReceipts: Array<{
3
- name?: string;
4
- id: string;
5
- url?: string | null;
6
- userId?: string | null;
7
- userName?: string | null;
8
- organisationId?: string | null;
9
- createdAtUTC?: string | null;
10
- } | null>;
11
- movementDateUTC: string;
12
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- export type FinMidWebhook = {
2
- webhook_id: string;
3
- timestamp: string;
4
- events: Array<{
5
- event_id?: string;
6
- timestamp?: string;
7
- type?: string;
8
- data?: any;
9
- }> | null;
10
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- export type FinMidWebhookEvent = {
2
- event_id?: string;
3
- timestamp?: string;
4
- type?: string;
5
- data?: any;
6
- };
@@ -1 +0,0 @@
1
- export {};