@hectare/platform.clients.trading 1.1.240 → 1.1.242

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 (34) hide show
  1. package/index.d.ts +2 -4
  2. package/models/BidDetail.d.ts +25 -49
  3. package/models/ContractDetail.d.ts +100 -64
  4. package/models/CreateBid.d.ts +2 -22
  5. package/models/CreateContractSchema.d.ts +32 -0
  6. package/models/CreateInventorySchema.d.ts +9 -7
  7. package/models/CreateListing.d.ts +2 -28
  8. package/models/CreateMarketingPlanSchema.d.ts +0 -1
  9. package/models/HarvestSummarySchema.d.ts +50 -18
  10. package/models/InventoryDetailSchema.d.ts +39 -25
  11. package/models/InventorySchema.d.ts +0 -1
  12. package/models/InventorySearchResultsSchema.d.ts +39 -25
  13. package/models/InventorySummarySchema.d.ts +41 -19
  14. package/models/ListingDetail.d.ts +50 -88
  15. package/models/ListingSummary.d.ts +25 -39
  16. package/models/MarketingPlanDetailSchema.d.ts +4 -4
  17. package/models/MarketingPlanSearchResultsSchema.d.ts +4 -4
  18. package/models/MarketingPlanSummarySchema.d.ts +4 -4
  19. package/models/PatchBid.d.ts +0 -20
  20. package/models/PatchBidOption.d.ts +0 -8
  21. package/models/PatchInventorySchema.d.ts +11 -0
  22. package/models/PatchListingSchema.d.ts +1 -18
  23. package/models/PatchMarketingPlanSchema.d.ts +0 -1
  24. package/models/SearchResultsBidSchema.d.ts +25 -49
  25. package/models/SearchResultsListingSchema.d.ts +25 -39
  26. package/package.json +1 -1
  27. package/models/BidAlerts.d.ts +0 -10
  28. package/models/ContractDeliverySchema.d.ts +0 -87
  29. package/models/ContractDeliverySettlementDeductionSchema.d.ts +0 -8
  30. package/models/ContractDeliverySettlementDeductionSchema.js +0 -1
  31. package/models/ContractDeliverySettlementSchema.d.ts +0 -48
  32. package/models/ContractDeliverySettlementSchema.js +0 -1
  33. /package/models/{BidAlerts.js → CreateContractSchema.js} +0 -0
  34. /package/models/{ContractDeliverySchema.js → PatchInventorySchema.js} +0 -0
@@ -2,63 +2,95 @@ export type HarvestSummarySchema = {
2
2
  harvestYear: string;
3
3
  harvestYears: Array<string>;
4
4
  status: 'pending' | 'in-progress' | 'completed';
5
- harvestWeight?: {
5
+ totalHarvestWeight: {
6
6
  name: string;
7
7
  conversion: number;
8
8
  weight?: number;
9
9
  };
10
- tradedWeight: {
10
+ totalTradedWeight: {
11
11
  name: string;
12
12
  conversion: number;
13
13
  weight?: number;
14
14
  };
15
- revenueTraded: {
15
+ totalRemainingWeight: {
16
+ name: string;
17
+ conversion: number;
18
+ weight?: number;
19
+ };
20
+ totalRevenueTraded: {
16
21
  amount: number;
17
22
  currency: string;
18
23
  };
19
- revenueAvailable: {
24
+ totalRevenueUnrealised: {
20
25
  amount: number;
21
26
  currency: string;
22
27
  };
28
+ totalRemainingPercentage: number;
29
+ totalTradedPercentage: number;
23
30
  crops: Array<{
24
- inventoryId: string;
25
- title: string;
26
- harvestYear?: string;
31
+ hexCode: string;
32
+ harvestWeight: {
33
+ name: string;
34
+ conversion: number;
35
+ weight?: number;
36
+ };
27
37
  targetPrice: {
28
38
  amount: number;
29
39
  currency: string;
30
- };
31
- hitTargetPrice: {
40
+ } | null;
41
+ breakevenPrice: {
32
42
  amount: number;
33
43
  currency: string;
34
- };
44
+ } | null;
35
45
  averagePrice: {
36
46
  amount: number;
37
47
  currency: string;
38
- };
39
- spotPrice: {
48
+ } | null;
49
+ hitTargetPrice: {
40
50
  amount: number;
41
51
  currency: string;
42
- };
43
- harvestWeight: {
52
+ } | null;
53
+ offPlatformRevenue: {
54
+ amount: number;
55
+ currency: string;
56
+ } | null;
57
+ offPlatformTradedWeight?: {
44
58
  name: string;
45
59
  conversion: number;
46
60
  weight?: number;
47
61
  };
48
- tradedWeight: {
62
+ offPlatformTradedCount: number;
63
+ onPlatformRevenue: {
64
+ amount: number;
65
+ currency: string;
66
+ } | null;
67
+ onPlatformTradedWeight?: {
49
68
  name: string;
50
69
  conversion: number;
51
70
  weight?: number;
52
71
  };
53
- revenueTraded: {
72
+ onPlatformTradedCount: number;
73
+ totalRevenue: {
54
74
  amount: number;
55
75
  currency: string;
76
+ } | null;
77
+ totalTradedWeight: {
78
+ name: string;
79
+ conversion: number;
80
+ weight?: number;
56
81
  };
57
- revenueAvailable: {
82
+ totalTradedCount?: number;
83
+ totalUnrealisedRevenue: {
84
+ amount: number;
85
+ currency: string;
86
+ } | null;
87
+ inventoryId: string;
88
+ title: string;
89
+ harvestYear: string;
90
+ spotPrice?: {
58
91
  amount: number;
59
92
  currency: string;
60
93
  };
61
- hexCode: string | null;
62
94
  updatedAtUTC: string;
63
95
  }>;
64
96
  };
@@ -4,8 +4,6 @@ export type InventoryDetailSchema = {
4
4
  updatedAtUTC: string;
5
5
  businessId: string;
6
6
  businessName: string;
7
- businessUnitId: string;
8
- businessUnitName: string;
9
7
  organisationId: string;
10
8
  organisationName: string;
11
9
  status: 'active' | 'deleted';
@@ -25,7 +23,6 @@ export type InventoryDetailSchema = {
25
23
  id: number;
26
24
  name: string;
27
25
  };
28
- variety?: string;
29
26
  varieties: Array<string>;
30
27
  attributes: Array<{
31
28
  id: number;
@@ -59,47 +56,60 @@ export type InventoryDetailSchema = {
59
56
  createdAtUTC?: string | null;
60
57
  } | null>;
61
58
  };
62
- offPlatformSales: Array<{
63
- tonnage: {
59
+ summary: {
60
+ hexCode: string;
61
+ harvestWeight: {
64
62
  name: string;
65
63
  conversion: number;
66
64
  weight?: number;
67
65
  };
68
- pricePerTonne: {
66
+ targetPrice: {
69
67
  amount: number;
70
68
  currency: string;
71
69
  } | null;
72
- reference?: string | null;
73
- buyerId?: string | null;
74
- buyerName?: string | null;
75
- }>;
76
- summary: {
77
- harvestWeight: {
78
- name: string;
79
- conversion: number;
80
- weight?: number;
70
+ breakevenPrice: {
71
+ amount: number;
72
+ currency: string;
73
+ } | null;
74
+ averagePrice: {
75
+ amount: number;
76
+ currency: string;
77
+ } | null;
78
+ hitTargetPrice: {
79
+ amount: number;
80
+ currency: string;
81
81
  } | null;
82
- tradedWeight: {
82
+ offPlatformRevenue: {
83
+ amount: number;
84
+ currency: string;
85
+ } | null;
86
+ offPlatformTradedWeight?: {
83
87
  name: string;
84
88
  conversion: number;
85
89
  weight?: number;
86
90
  };
87
- listedWeight: {
91
+ offPlatformTradedCount: number;
92
+ onPlatformRevenue: {
93
+ amount: number;
94
+ currency: string;
95
+ } | null;
96
+ onPlatformTradedWeight?: {
88
97
  name: string;
89
98
  conversion: number;
90
99
  weight?: number;
91
100
  };
92
- listingCount: number;
93
- tradedCount: number;
94
- targetPrice: {
95
- amount: number;
96
- currency: string;
97
- } | null;
98
- averagePrice: {
101
+ onPlatformTradedCount: number;
102
+ totalRevenue: {
99
103
  amount: number;
100
104
  currency: string;
101
105
  } | null;
102
- revenue: {
106
+ totalTradedWeight: {
107
+ name: string;
108
+ conversion: number;
109
+ weight?: number;
110
+ };
111
+ totalTradedCount?: number;
112
+ totalUnrealisedRevenue: {
103
113
  amount: number;
104
114
  currency: string;
105
115
  } | null;
@@ -109,4 +119,8 @@ export type InventoryDetailSchema = {
109
119
  id: string;
110
120
  name: string;
111
121
  }>;
122
+ trades: Array<{
123
+ id: string;
124
+ name: string;
125
+ }>;
112
126
  };
@@ -14,7 +14,6 @@ export type InventorySchema = {
14
14
  id: number;
15
15
  name: string;
16
16
  };
17
- variety?: string;
18
17
  varieties: Array<string>;
19
18
  attributes: Array<{
20
19
  id: number;
@@ -5,8 +5,6 @@ export type InventorySearchResultsSchema = {
5
5
  updatedAtUTC: string;
6
6
  businessId: string;
7
7
  businessName: string;
8
- businessUnitId: string;
9
- businessUnitName: string;
10
8
  organisationId: string;
11
9
  organisationName: string;
12
10
  status: 'active' | 'deleted';
@@ -26,7 +24,6 @@ export type InventorySearchResultsSchema = {
26
24
  id: number;
27
25
  name: string;
28
26
  };
29
- variety?: string;
30
27
  varieties: Array<string>;
31
28
  attributes: Array<{
32
29
  id: number;
@@ -60,47 +57,60 @@ export type InventorySearchResultsSchema = {
60
57
  createdAtUTC?: string | null;
61
58
  } | null>;
62
59
  };
63
- offPlatformSales: Array<{
64
- tonnage: {
60
+ summary: {
61
+ hexCode: string;
62
+ harvestWeight: {
65
63
  name: string;
66
64
  conversion: number;
67
65
  weight?: number;
68
66
  };
69
- pricePerTonne: {
67
+ targetPrice: {
70
68
  amount: number;
71
69
  currency: string;
72
70
  } | null;
73
- reference?: string | null;
74
- buyerId?: string | null;
75
- buyerName?: string | null;
76
- }>;
77
- summary: {
78
- harvestWeight: {
79
- name: string;
80
- conversion: number;
81
- weight?: number;
71
+ breakevenPrice: {
72
+ amount: number;
73
+ currency: string;
74
+ } | null;
75
+ averagePrice: {
76
+ amount: number;
77
+ currency: string;
78
+ } | null;
79
+ hitTargetPrice: {
80
+ amount: number;
81
+ currency: string;
82
82
  } | null;
83
- tradedWeight: {
83
+ offPlatformRevenue: {
84
+ amount: number;
85
+ currency: string;
86
+ } | null;
87
+ offPlatformTradedWeight?: {
84
88
  name: string;
85
89
  conversion: number;
86
90
  weight?: number;
87
91
  };
88
- listedWeight: {
92
+ offPlatformTradedCount: number;
93
+ onPlatformRevenue: {
94
+ amount: number;
95
+ currency: string;
96
+ } | null;
97
+ onPlatformTradedWeight?: {
89
98
  name: string;
90
99
  conversion: number;
91
100
  weight?: number;
92
101
  };
93
- listingCount: number;
94
- tradedCount: number;
95
- targetPrice: {
96
- amount: number;
97
- currency: string;
98
- } | null;
99
- averagePrice: {
102
+ onPlatformTradedCount: number;
103
+ totalRevenue: {
100
104
  amount: number;
101
105
  currency: string;
102
106
  } | null;
103
- revenue: {
107
+ totalTradedWeight: {
108
+ name: string;
109
+ conversion: number;
110
+ weight?: number;
111
+ };
112
+ totalTradedCount?: number;
113
+ totalUnrealisedRevenue: {
104
114
  amount: number;
105
115
  currency: string;
106
116
  } | null;
@@ -110,6 +120,10 @@ export type InventorySearchResultsSchema = {
110
120
  id: string;
111
121
  name: string;
112
122
  }>;
123
+ trades: Array<{
124
+ id: string;
125
+ name: string;
126
+ }>;
113
127
  }>;
114
128
  custom?: any;
115
129
  totalDocs: number;
@@ -1,36 +1,58 @@
1
1
  export type InventorySummarySchema = {
2
- id: string;
3
- organisationId: string;
4
- organisationName: string;
5
- businessId: string;
6
- businessName: string;
7
- businessUnitId: string;
8
- businessUnitName: string;
9
- commodityId: number;
10
- commodityTypeId: number;
11
- commodityGradeId: number;
12
- tagsIds: Array<number>;
13
- harvestYear: string;
14
- commodity: string;
15
- type: string;
16
- grade: string;
17
- tags: string;
18
- varieties: string;
2
+ hexCode: string;
3
+ harvestWeight: {
4
+ name: string;
5
+ conversion: number;
6
+ weight?: number;
7
+ };
19
8
  targetPrice: {
20
9
  amount: number;
21
10
  currency: string;
22
11
  } | null;
12
+ breakevenPrice: {
13
+ amount: number;
14
+ currency: string;
15
+ } | null;
23
16
  averagePrice: {
24
17
  amount: number;
25
18
  currency: string;
26
19
  } | null;
27
- revenue: {
20
+ hitTargetPrice: {
28
21
  amount: number;
29
22
  currency: string;
30
23
  } | null;
31
- harvestWeight: {
24
+ offPlatformRevenue: {
25
+ amount: number;
26
+ currency: string;
27
+ } | null;
28
+ offPlatformTradedWeight?: {
32
29
  name: string;
33
30
  conversion: number;
34
31
  weight?: number;
35
32
  };
33
+ offPlatformTradedCount: number;
34
+ onPlatformRevenue: {
35
+ amount: number;
36
+ currency: string;
37
+ } | null;
38
+ onPlatformTradedWeight?: {
39
+ name: string;
40
+ conversion: number;
41
+ weight?: number;
42
+ };
43
+ onPlatformTradedCount: number;
44
+ totalRevenue: {
45
+ amount: number;
46
+ currency: string;
47
+ } | null;
48
+ totalTradedWeight: {
49
+ name: string;
50
+ conversion: number;
51
+ weight?: number;
52
+ };
53
+ totalTradedCount?: number;
54
+ totalUnrealisedRevenue: {
55
+ amount: number;
56
+ currency: string;
57
+ } | null;
36
58
  };
@@ -12,8 +12,10 @@ export type ListingDetail = {
12
12
  organisationName: string;
13
13
  organisationLogo: string;
14
14
  organisationVetted: boolean;
15
- businessUnitId: string;
16
- businessUnitName: string;
15
+ businessId: string;
16
+ businessName: string;
17
+ businessUnitId?: string;
18
+ businessUnitName?: string;
17
19
  businessCollectionAddressId: number | null;
18
20
  businessCollectionAddress: {
19
21
  id: number | null;
@@ -87,17 +89,6 @@ export type ListingDetail = {
87
89
  endDateUTC: string | null;
88
90
  reviewEndDateUTC: string | null;
89
91
  postReviewEndDateUTC: string | null;
90
- price: {
91
- amount: number;
92
- currency: string;
93
- } | null;
94
- movementPeriod: {
95
- startDateUTC: string;
96
- endDateUTC: string;
97
- type: 'date' | 'month';
98
- excludedDatesUTC?: Array<string> | null;
99
- asAvailable?: boolean | null;
100
- };
101
92
  movement: {
102
93
  months: Array<string>;
103
94
  asAvailable: boolean | null;
@@ -116,25 +107,11 @@ export type ListingDetail = {
116
107
  amount: number;
117
108
  currency: string;
118
109
  } | null;
119
- guidePrice: {
120
- amount: number;
121
- currency: string;
122
- } | null;
123
- guidePriceMin: {
124
- amount: number;
125
- currency: string;
126
- } | null;
127
- guidePriceMax: {
128
- amount: number;
129
- currency: string;
130
- } | null;
131
- isBasePremOnly?: boolean;
132
110
  contractType: 'base' | 'fixed' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
133
111
  haulageType: 'ex-farm' | 'delivered' | 'both' | null;
134
112
  haulageTypeTASCC?: boolean | null;
135
113
  };
136
114
  inventory: {
137
- id?: string;
138
115
  type: 'crop' | 'produce';
139
116
  harvestYear: string;
140
117
  commodity: {
@@ -150,7 +127,6 @@ export type ListingDetail = {
150
127
  id: number;
151
128
  name: string;
152
129
  };
153
- variety?: string;
154
130
  varieties: Array<string>;
155
131
  attributes: Array<{
156
132
  id: number;
@@ -163,6 +139,27 @@ export type ListingDetail = {
163
139
  weight?: number;
164
140
  };
165
141
  };
142
+ measures: Array<{
143
+ specification: {
144
+ id: number;
145
+ name: string;
146
+ unit: string;
147
+ };
148
+ min: number | null;
149
+ max: number | null;
150
+ }> | null;
151
+ hasSampled: boolean;
152
+ customMeasures: boolean | null;
153
+ files?: Array<{
154
+ name?: string;
155
+ id: string;
156
+ url?: string | null;
157
+ userId?: string | null;
158
+ userName?: string | null;
159
+ organisationId?: string | null;
160
+ createdAtUTC?: string | null;
161
+ } | null>;
162
+ id?: string;
166
163
  weight: {
167
164
  min: {
168
165
  name: string;
@@ -175,17 +172,6 @@ export type ListingDetail = {
175
172
  weight?: number;
176
173
  };
177
174
  };
178
- measures: Array<{
179
- specification: {
180
- id: number;
181
- name: string;
182
- unit: string;
183
- };
184
- min: number | null;
185
- max: number | null;
186
- }> | null;
187
- hasSampled: boolean | null;
188
- customMeasures: boolean | null;
189
175
  };
190
176
  activeBids: number;
191
177
  bidInfo: {
@@ -278,8 +264,10 @@ export type ListingDetail = {
278
264
  organisationName: string;
279
265
  organisationLogo: string;
280
266
  organisationVetted: boolean;
281
- businessUnitId: string;
282
- businessUnitName: string;
267
+ businessId: string;
268
+ businessName: string;
269
+ businessUnitId?: string;
270
+ businessUnitName?: string;
283
271
  businessCollectionAddressId: number | null;
284
272
  businessCollectionAddress: {
285
273
  id: number | null;
@@ -353,17 +341,6 @@ export type ListingDetail = {
353
341
  endDateUTC: string | null;
354
342
  reviewEndDateUTC: string | null;
355
343
  postReviewEndDateUTC: string | null;
356
- price: {
357
- amount: number;
358
- currency: string;
359
- } | null;
360
- movementPeriod: {
361
- startDateUTC: string;
362
- endDateUTC: string;
363
- type: 'date' | 'month';
364
- excludedDatesUTC?: Array<string> | null;
365
- asAvailable?: boolean | null;
366
- };
367
344
  movement: {
368
345
  months: Array<string>;
369
346
  asAvailable: boolean | null;
@@ -382,25 +359,11 @@ export type ListingDetail = {
382
359
  amount: number;
383
360
  currency: string;
384
361
  } | null;
385
- guidePrice: {
386
- amount: number;
387
- currency: string;
388
- } | null;
389
- guidePriceMin: {
390
- amount: number;
391
- currency: string;
392
- } | null;
393
- guidePriceMax: {
394
- amount: number;
395
- currency: string;
396
- } | null;
397
- isBasePremOnly?: boolean;
398
362
  contractType: 'base' | 'fixed' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
399
363
  haulageType: 'ex-farm' | 'delivered' | 'both' | null;
400
364
  haulageTypeTASCC?: boolean | null;
401
365
  };
402
366
  inventory: {
403
- id?: string;
404
367
  type: 'crop' | 'produce';
405
368
  harvestYear: string;
406
369
  commodity: {
@@ -416,7 +379,6 @@ export type ListingDetail = {
416
379
  id: number;
417
380
  name: string;
418
381
  };
419
- variety?: string;
420
382
  varieties: Array<string>;
421
383
  attributes: Array<{
422
384
  id: number;
@@ -429,6 +391,27 @@ export type ListingDetail = {
429
391
  weight?: number;
430
392
  };
431
393
  };
394
+ measures: Array<{
395
+ specification: {
396
+ id: number;
397
+ name: string;
398
+ unit: string;
399
+ };
400
+ min: number | null;
401
+ max: number | null;
402
+ }> | null;
403
+ hasSampled: boolean;
404
+ customMeasures: boolean | null;
405
+ files?: Array<{
406
+ name?: string;
407
+ id: string;
408
+ url?: string | null;
409
+ userId?: string | null;
410
+ userName?: string | null;
411
+ organisationId?: string | null;
412
+ createdAtUTC?: string | null;
413
+ } | null>;
414
+ id?: string;
432
415
  weight: {
433
416
  min: {
434
417
  name: string;
@@ -441,17 +424,6 @@ export type ListingDetail = {
441
424
  weight?: number;
442
425
  };
443
426
  };
444
- measures: Array<{
445
- specification: {
446
- id: number;
447
- name: string;
448
- unit: string;
449
- };
450
- min: number | null;
451
- max: number | null;
452
- }> | null;
453
- hasSampled: boolean | null;
454
- customMeasures: boolean | null;
455
427
  };
456
428
  activeBids: number;
457
429
  bidInfo: {
@@ -546,23 +518,13 @@ export type ListingDetail = {
546
518
  vatNumber?: string | null;
547
519
  };
548
520
  userId: string;
549
- userFullName?: string;
550
521
  organisationId?: string;
551
- organisationCreatedAtUTC?: string;
552
- organisationName?: string;
553
- organisationLogo?: string;
554
- organisationVetted?: boolean;
555
522
  createdAtUTC: string;
556
523
  status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
557
524
  expiresAtUTC: string;
558
525
  options: Array<{
559
526
  id: number;
560
527
  status: 'active' | 'accepted' | 'inactive';
561
- movementPeriod: {
562
- startDateUTC: string;
563
- endDateUTC: string;
564
- type: 'date' | 'month';
565
- };
566
528
  movement: {
567
529
  months: Array<string>;
568
530
  asAvailable: boolean | null;