@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
package/index.d.ts CHANGED
@@ -1,17 +1,14 @@
1
1
  export type { AcceptBid } from './models/AcceptBid.js';
2
2
  export type { AskAnExpertBuyerRallyReportSchema } from './models/AskAnExpertBuyerRallyReportSchema.js';
3
- export type { BidAlerts } from './models/BidAlerts.js';
4
3
  export type { BidContract } from './models/BidContract.js';
5
4
  export type { BidDetail } from './models/BidDetail.js';
6
5
  export type { CloseListingReasonSchema } from './models/CloseListingReasonSchema.js';
7
6
  export type { CommodityPrices } from './models/CommodityPrices.js';
8
7
  export type { CompleteMarketingPlanSchema } from './models/CompleteMarketingPlanSchema.js';
9
- export type { ContractDeliverySchema } from './models/ContractDeliverySchema.js';
10
- export type { ContractDeliverySettlementDeductionSchema } from './models/ContractDeliverySettlementDeductionSchema.js';
11
- export type { ContractDeliverySettlementSchema } from './models/ContractDeliverySettlementSchema.js';
12
8
  export type { ContractDetail } from './models/ContractDetail.js';
13
9
  export type { CreateBid } from './models/CreateBid.js';
14
10
  export type { CreateBidOfferSchema } from './models/CreateBidOfferSchema.js';
11
+ export type { CreateContractSchema } from './models/CreateContractSchema.js';
15
12
  export type { CreateInventorySchema } from './models/CreateInventorySchema.js';
16
13
  export type { CreateListing } from './models/CreateListing.js';
17
14
  export type { CreateMarketingPlanSchema } from './models/CreateMarketingPlanSchema.js';
@@ -50,6 +47,7 @@ export type { NewsFeed } from './models/NewsFeed.js';
50
47
  export type { PatchBid } from './models/PatchBid.js';
51
48
  export type { PatchBidOfferSchema } from './models/PatchBidOfferSchema.js';
52
49
  export type { PatchBidOption } from './models/PatchBidOption.js';
50
+ export type { PatchInventorySchema } from './models/PatchInventorySchema.js';
53
51
  export type { PatchListingAdjustTradeSchema } from './models/PatchListingAdjustTradeSchema.js';
54
52
  export type { PatchListingSchema } from './models/PatchListingSchema.js';
55
53
  export type { PatchListingSubstatusSchema } from './models/PatchListingSubstatusSchema.js';
@@ -15,8 +15,10 @@ export type BidDetail = {
15
15
  organisationName: string;
16
16
  organisationLogo: string;
17
17
  organisationVetted: boolean;
18
- businessUnitId: string;
19
- businessUnitName: string;
18
+ businessId: string;
19
+ businessName: string;
20
+ businessUnitId?: string;
21
+ businessUnitName?: string;
20
22
  businessCollectionAddressId: number | null;
21
23
  businessCollectionAddress: {
22
24
  id: number | null;
@@ -90,17 +92,6 @@ export type BidDetail = {
90
92
  endDateUTC: string | null;
91
93
  reviewEndDateUTC: string | null;
92
94
  postReviewEndDateUTC: string | null;
93
- price: {
94
- amount: number;
95
- currency: string;
96
- } | null;
97
- movementPeriod: {
98
- startDateUTC: string;
99
- endDateUTC: string;
100
- type: 'date' | 'month';
101
- excludedDatesUTC?: Array<string> | null;
102
- asAvailable?: boolean | null;
103
- };
104
95
  movement: {
105
96
  months: Array<string>;
106
97
  asAvailable: boolean | null;
@@ -119,25 +110,11 @@ export type BidDetail = {
119
110
  amount: number;
120
111
  currency: string;
121
112
  } | null;
122
- guidePrice: {
123
- amount: number;
124
- currency: string;
125
- } | null;
126
- guidePriceMin: {
127
- amount: number;
128
- currency: string;
129
- } | null;
130
- guidePriceMax: {
131
- amount: number;
132
- currency: string;
133
- } | null;
134
- isBasePremOnly?: boolean;
135
113
  contractType: 'base' | 'fixed' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
136
114
  haulageType: 'ex-farm' | 'delivered' | 'both' | null;
137
115
  haulageTypeTASCC?: boolean | null;
138
116
  };
139
117
  inventory: {
140
- id?: string;
141
118
  type: 'crop' | 'produce';
142
119
  harvestYear: string;
143
120
  commodity: {
@@ -153,7 +130,6 @@ export type BidDetail = {
153
130
  id: number;
154
131
  name: string;
155
132
  };
156
- variety?: string;
157
133
  varieties: Array<string>;
158
134
  attributes: Array<{
159
135
  id: number;
@@ -166,6 +142,27 @@ export type BidDetail = {
166
142
  weight?: number;
167
143
  };
168
144
  };
145
+ measures: Array<{
146
+ specification: {
147
+ id: number;
148
+ name: string;
149
+ unit: string;
150
+ };
151
+ min: number | null;
152
+ max: number | null;
153
+ }> | null;
154
+ hasSampled: boolean;
155
+ customMeasures: boolean | null;
156
+ files?: Array<{
157
+ name?: string;
158
+ id: string;
159
+ url?: string | null;
160
+ userId?: string | null;
161
+ userName?: string | null;
162
+ organisationId?: string | null;
163
+ createdAtUTC?: string | null;
164
+ } | null>;
165
+ id?: string;
169
166
  weight: {
170
167
  min: {
171
168
  name: string;
@@ -178,17 +175,6 @@ export type BidDetail = {
178
175
  weight?: number;
179
176
  };
180
177
  };
181
- measures: Array<{
182
- specification: {
183
- id: number;
184
- name: string;
185
- unit: string;
186
- };
187
- min: number | null;
188
- max: number | null;
189
- }> | null;
190
- hasSampled: boolean | null;
191
- customMeasures: boolean | null;
192
178
  };
193
179
  activeBids: number;
194
180
  bidInfo: {
@@ -283,23 +269,13 @@ export type BidDetail = {
283
269
  vatNumber?: string | null;
284
270
  };
285
271
  userId: string;
286
- userFullName?: string;
287
272
  organisationId?: string;
288
- organisationCreatedAtUTC?: string;
289
- organisationName?: string;
290
- organisationLogo?: string;
291
- organisationVetted?: boolean;
292
273
  createdAtUTC: string;
293
274
  status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
294
275
  expiresAtUTC: string;
295
276
  options: Array<{
296
277
  id: number;
297
278
  status: 'active' | 'accepted' | 'inactive';
298
- movementPeriod: {
299
- startDateUTC: string;
300
- endDateUTC: string;
301
- type: 'date' | 'month';
302
- };
303
279
  movement: {
304
280
  months: Array<string>;
305
281
  asAvailable: boolean | null;
@@ -1,13 +1,13 @@
1
1
  export type ContractDetail = {
2
2
  id: string;
3
3
  createdAtUTC: string;
4
- status: 'pending' | 'in-progress' | 'complete' | 'awaiting-payment' | 'cancelled';
5
4
  details: {
6
- bidId: string;
7
- bidOptionId: number;
5
+ bidId: string | null;
6
+ bidOptionId: number | null;
8
7
  userId: string;
9
8
  listingId: string | null;
10
- reference: string;
9
+ inventoryId: string;
10
+ reference: string | null;
11
11
  totalWeight: {
12
12
  name: string;
13
13
  conversion: number;
@@ -40,7 +40,7 @@ export type ContractDetail = {
40
40
  } | null>;
41
41
  terms: string | null;
42
42
  };
43
- inventory: {
43
+ crop: {
44
44
  type: 'crop' | 'produce';
45
45
  harvestYear: string;
46
46
  commodity: {
@@ -56,7 +56,6 @@ export type ContractDetail = {
56
56
  id: number;
57
57
  name: string;
58
58
  };
59
- variety?: string;
60
59
  varieties: Array<string>;
61
60
  attributes: Array<{
62
61
  id: number;
@@ -77,27 +76,88 @@ export type ContractDetail = {
77
76
  };
78
77
  min: number | null;
79
78
  max: number | null;
80
- }>;
79
+ }> | null;
80
+ hasSampled: boolean;
81
+ customMeasures?: boolean | null;
82
+ files: Array<{
83
+ name?: string;
84
+ id: string;
85
+ url?: string | null;
86
+ userId?: string | null;
87
+ userName?: string | null;
88
+ organisationId?: string | null;
89
+ createdAtUTC?: string | null;
90
+ } | null>;
91
+ };
92
+ inventory?: {
93
+ type: 'crop' | 'produce';
94
+ harvestYear: string;
95
+ commodity: {
96
+ commodity: {
97
+ id: number;
98
+ name: string;
99
+ };
100
+ type: {
101
+ id: number;
102
+ name: string;
103
+ };
104
+ grade: {
105
+ id: number;
106
+ name: string;
107
+ };
108
+ varieties: Array<string>;
109
+ attributes: Array<{
110
+ id: number;
111
+ name: string;
112
+ }>;
113
+ tags?: Array<number>;
114
+ weight: {
115
+ name: string;
116
+ conversion: number;
117
+ weight?: number;
118
+ };
119
+ };
120
+ measures: Array<{
121
+ specification: {
122
+ id: number;
123
+ name: string;
124
+ unit: string;
125
+ };
126
+ min: number | null;
127
+ max: number | null;
128
+ }> | null;
129
+ hasSampled: boolean;
130
+ customMeasures?: boolean | null;
131
+ files: Array<{
132
+ name?: string;
133
+ id: string;
134
+ url?: string | null;
135
+ userId?: string | null;
136
+ userName?: string | null;
137
+ organisationId?: string | null;
138
+ createdAtUTC?: string | null;
139
+ } | null>;
81
140
  };
82
141
  buyer: {
83
142
  organisationId: string;
84
143
  businessId: string;
144
+ userId?: string;
85
145
  organisationName: string;
86
- businessName: string;
87
- userId: string;
88
- userName: string;
146
+ businessName: string | null;
147
+ userName?: string | null;
89
148
  };
90
149
  seller: {
91
150
  organisationId: string;
92
151
  businessId: string;
152
+ userId?: string;
93
153
  organisationName: string;
94
- businessName: string;
95
- userId: string;
96
- userName: string;
154
+ businessName: string | null;
155
+ userName?: string | null;
97
156
  };
98
- sellerNotes: string;
99
- buyerNotes: string;
157
+ buyerNotes?: string;
158
+ sellerNotes?: string;
100
159
  regionISO: string;
160
+ saleType: 'on-platform' | 'off-platform';
101
161
  bid?: {
102
162
  id: string;
103
163
  listingId: string;
@@ -115,8 +175,10 @@ export type ContractDetail = {
115
175
  organisationName: string;
116
176
  organisationLogo: string;
117
177
  organisationVetted: boolean;
118
- businessUnitId: string;
119
- businessUnitName: string;
178
+ businessId: string;
179
+ businessName: string;
180
+ businessUnitId?: string;
181
+ businessUnitName?: string;
120
182
  businessCollectionAddressId: number | null;
121
183
  businessCollectionAddress: {
122
184
  id: number | null;
@@ -190,17 +252,6 @@ export type ContractDetail = {
190
252
  endDateUTC: string | null;
191
253
  reviewEndDateUTC: string | null;
192
254
  postReviewEndDateUTC: string | null;
193
- price: {
194
- amount: number;
195
- currency: string;
196
- } | null;
197
- movementPeriod: {
198
- startDateUTC: string;
199
- endDateUTC: string;
200
- type: 'date' | 'month';
201
- excludedDatesUTC?: Array<string> | null;
202
- asAvailable?: boolean | null;
203
- };
204
255
  movement: {
205
256
  months: Array<string>;
206
257
  asAvailable: boolean | null;
@@ -219,25 +270,11 @@ export type ContractDetail = {
219
270
  amount: number;
220
271
  currency: string;
221
272
  } | null;
222
- guidePrice: {
223
- amount: number;
224
- currency: string;
225
- } | null;
226
- guidePriceMin: {
227
- amount: number;
228
- currency: string;
229
- } | null;
230
- guidePriceMax: {
231
- amount: number;
232
- currency: string;
233
- } | null;
234
- isBasePremOnly?: boolean;
235
273
  contractType: 'base' | 'fixed' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
236
274
  haulageType: 'ex-farm' | 'delivered' | 'both' | null;
237
275
  haulageTypeTASCC?: boolean | null;
238
276
  };
239
277
  inventory: {
240
- id?: string;
241
278
  type: 'crop' | 'produce';
242
279
  harvestYear: string;
243
280
  commodity: {
@@ -253,7 +290,6 @@ export type ContractDetail = {
253
290
  id: number;
254
291
  name: string;
255
292
  };
256
- variety?: string;
257
293
  varieties: Array<string>;
258
294
  attributes: Array<{
259
295
  id: number;
@@ -266,6 +302,27 @@ export type ContractDetail = {
266
302
  weight?: number;
267
303
  };
268
304
  };
305
+ measures: Array<{
306
+ specification: {
307
+ id: number;
308
+ name: string;
309
+ unit: string;
310
+ };
311
+ min: number | null;
312
+ max: number | null;
313
+ }> | null;
314
+ hasSampled: boolean;
315
+ customMeasures: boolean | null;
316
+ files?: Array<{
317
+ name?: string;
318
+ id: string;
319
+ url?: string | null;
320
+ userId?: string | null;
321
+ userName?: string | null;
322
+ organisationId?: string | null;
323
+ createdAtUTC?: string | null;
324
+ } | null>;
325
+ id?: string;
269
326
  weight: {
270
327
  min: {
271
328
  name: string;
@@ -278,17 +335,6 @@ export type ContractDetail = {
278
335
  weight?: number;
279
336
  };
280
337
  };
281
- measures: Array<{
282
- specification: {
283
- id: number;
284
- name: string;
285
- unit: string;
286
- };
287
- min: number | null;
288
- max: number | null;
289
- }> | null;
290
- hasSampled: boolean | null;
291
- customMeasures: boolean | null;
292
338
  };
293
339
  activeBids: number;
294
340
  bidInfo: {
@@ -383,23 +429,13 @@ export type ContractDetail = {
383
429
  vatNumber?: string | null;
384
430
  };
385
431
  userId: string;
386
- userFullName?: string;
387
432
  organisationId?: string;
388
- organisationCreatedAtUTC?: string;
389
- organisationName?: string;
390
- organisationLogo?: string;
391
- organisationVetted?: boolean;
392
433
  createdAtUTC: string;
393
434
  status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
394
435
  expiresAtUTC: string;
395
436
  options: Array<{
396
437
  id: number;
397
438
  status: 'active' | 'accepted' | 'inactive';
398
- movementPeriod: {
399
- startDateUTC: string;
400
- endDateUTC: string;
401
- type: 'date' | 'month';
402
- };
403
439
  movement: {
404
440
  months: Array<string>;
405
441
  asAvailable: boolean | null;
@@ -1,26 +1,7 @@
1
1
  export type CreateBid = {
2
2
  listingId: string;
3
- businessId?: string | null;
4
- expiresAtUTC?: string;
5
- options?: Array<{
6
- movementPeriod?: {
7
- startDateUTC: string;
8
- endDateUTC: string;
9
- type: 'date' | 'month';
10
- excludedDatesUTC?: Array<string> | null;
11
- asAvailable?: boolean | null;
12
- };
13
- movement?: {
14
- months: Array<string>;
15
- asAvailable: boolean | null;
16
- };
17
- pricePerUnit: {
18
- amount: number;
19
- currency: string;
20
- };
21
- haulageType?: 'ex-farm' | 'delivered';
22
- }>;
23
- offers?: Array<{
3
+ businessId: string;
4
+ offers: Array<{
24
5
  price: {
25
6
  amount: number;
26
7
  currency: string;
@@ -39,7 +20,6 @@ export type CreateBid = {
39
20
  paymentDays: number;
40
21
  paymentDayType?: 'fixed' | 'dayOfMonth' | null;
41
22
  paymentType: 'base' | 'fixed' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
42
- haulageType?: 'ex-farm' | 'delivered';
43
23
  deliveryPostcode?: string | null;
44
24
  cropHome?: string | null;
45
25
  sellerNotes?: string | null;
@@ -0,0 +1,32 @@
1
+ export type CreateContractSchema = {
2
+ buyerBusinessId?: string | null;
3
+ sellerBusinessId: string;
4
+ details: {
5
+ reference: string | null;
6
+ contractType?: 'base' | 'fixed' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
7
+ paymentDays?: number;
8
+ haulageType?: 'ex-farm' | 'delivered';
9
+ contractDateUTC: string;
10
+ movement?: {
11
+ months: Array<string>;
12
+ asAvailable: boolean | null;
13
+ };
14
+ files?: Array<{
15
+ name?: string;
16
+ id: string;
17
+ url?: string | null;
18
+ userId?: string | null;
19
+ userName?: string | null;
20
+ organisationId?: string | null;
21
+ createdAtUTC?: string | null;
22
+ } | null>;
23
+ terms?: string | null;
24
+ pricePerUnit: {
25
+ amount: number;
26
+ currency: string;
27
+ };
28
+ soldWeight: number;
29
+ };
30
+ inventoryId: string;
31
+ sellerNotes?: string;
32
+ };
@@ -1,15 +1,17 @@
1
1
  export type CreateInventorySchema = {
2
- organisationId?: string | null;
3
- organisationName?: string;
2
+ organisationId: string | null;
3
+ organisationName: string;
4
4
  businessId: string;
5
5
  businessName: string;
6
- businessUnitId?: string | null;
7
- businessUnitName?: string;
8
6
  harvestWeight?: number | null;
9
7
  targetPrice?: {
10
8
  amount: number;
11
9
  currency: string;
12
10
  } | null;
11
+ breakevenPrice?: {
12
+ amount: number;
13
+ currency: string;
14
+ } | null;
13
15
  crop: {
14
16
  type?: 'crop' | 'produce';
15
17
  harvestYear: string;
@@ -17,7 +19,6 @@ export type CreateInventorySchema = {
17
19
  id: number;
18
20
  type: number;
19
21
  grade: number | null;
20
- variety?: string | null;
21
22
  varieties?: Array<string> | null;
22
23
  tags?: Array<number> | null;
23
24
  };
@@ -38,11 +39,12 @@ export type CreateInventorySchema = {
38
39
  } | null>;
39
40
  };
40
41
  offPlatformSales?: Array<{
41
- tonnage: number;
42
- pricePerTonne: number;
42
+ soldWeight: number;
43
+ pricePerUnit: number;
43
44
  buyerId?: string | null;
44
45
  buyerName?: string | null;
45
46
  reference?: string | null;
47
+ tradeDateUTC?: string | null;
46
48
  }> | null;
47
49
  tags?: Array<string> | null;
48
50
  };
@@ -1,14 +1,6 @@
1
1
  export type CreateListing = {
2
- public?: boolean | null;
3
- bidAlerts?: Array<{
4
- authPlatformId: string;
5
- emailAddress: string;
6
- fullName: string;
7
- mobileNumber: string | null;
8
- organisationId?: string | null;
9
- userId: string;
10
- }> | null;
11
- businessUnitId: string | null;
2
+ businessUnitId?: string | null;
3
+ businessId?: string;
12
4
  collectionAddressId?: number | null;
13
5
  details: {
14
6
  buyerNotes?: string | null;
@@ -21,29 +13,12 @@ export type CreateListing = {
21
13
  organisationId?: string | null;
22
14
  createdAtUTC?: string | null;
23
15
  } | null>;
24
- movementPeriod?: {
25
- startDateUTC: string;
26
- endDateUTC: string;
27
- type: 'date' | 'month';
28
- excludedDatesUTC?: Array<string> | null;
29
- asAvailable?: boolean | null;
30
- };
31
16
  movement?: {
32
17
  months: Array<string>;
33
18
  asAvailable: boolean | null;
34
19
  };
35
- price?: {
36
- amount: number;
37
- currency: string;
38
- } | null;
39
- targetPrice?: {
40
- amount: number;
41
- currency: string;
42
- } | null;
43
- isBasePremOnly?: boolean;
44
20
  contractType?: 'base' | 'fixed' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
45
21
  startDateUTC?: string | null;
46
- endDateUTC?: string | null;
47
22
  haulageType?: 'ex-farm' | 'delivered' | 'both' | null;
48
23
  haulageTypeTASCC?: boolean | null;
49
24
  };
@@ -54,7 +29,6 @@ export type CreateListing = {
54
29
  id: number;
55
30
  type: number;
56
31
  grade: number | null;
57
- variety?: string | null;
58
32
  varieties?: Array<string> | null;
59
33
  tags?: Array<number> | null;
60
34
  };
@@ -3,7 +3,6 @@ export type CreateMarketingPlanSchema = {
3
3
  userName: string;
4
4
  inventoryId: string | null;
5
5
  details: {
6
- isBasePremOnly?: boolean;
7
6
  contractType?: 'base' | 'fixed' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
8
7
  targetPrice?: {
9
8
  amount: number;