@hectare/platform.clients.trading 1.1.270 → 1.1.272

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/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export type { AcceptBid } from './models/AcceptBid.js';
2
2
  export type { AskAnExpertBuyerRallyReportSchema } from './models/AskAnExpertBuyerRallyReportSchema.js';
3
3
  export type { AskAnExpertDraftContractSchema } from './models/AskAnExpertDraftContractSchema.js';
4
4
  export type { BidDetail } from './models/BidDetail.js';
5
+ export type { BuyerBenchmarkSchema } from './models/BuyerBenchmarkSchema.js';
5
6
  export type { CloseListingReasonSchema } from './models/CloseListingReasonSchema.js';
6
7
  export type { CommodityPrices } from './models/CommodityPrices.js';
7
8
  export type { CompleteMarketingPlanSchema } from './models/CompleteMarketingPlanSchema.js';
@@ -0,0 +1,486 @@
1
+ export type BuyerBenchmarkSchema = {
2
+ listing: {
3
+ id: string;
4
+ isMyListing: boolean;
5
+ isMyOrganisationsListing: boolean;
6
+ createdAtUTC: string;
7
+ status: 'active' | 'closed' | 'traded';
8
+ substatus: 'unsold' | 'archived' | 'scheduled' | 'open' | 'in-review' | 'post-review' | null;
9
+ tradingStatus: 'with-buyers' | 'scheduled' | 'review' | 'request-trade' | 'expired' | 'no-offers' | 'ended';
10
+ business: {
11
+ organisationId: string;
12
+ organisationCreatedAtUTC: string;
13
+ organisationName: string;
14
+ organisationVetted: boolean;
15
+ businessId: string;
16
+ businessName: string;
17
+ businessCollectionAddressId: number | null;
18
+ businessCollectionAddress: {
19
+ id: number | null;
20
+ reference: string | null;
21
+ location: {
22
+ what3words: string | null;
23
+ address: {
24
+ name?: string | null;
25
+ line1: string;
26
+ line2?: string | null;
27
+ line3?: string | null;
28
+ city?: string | null;
29
+ region?: string | null;
30
+ regionISO?: string | null;
31
+ postcode: string;
32
+ countryName?: string | null;
33
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
34
+ };
35
+ coordinates: {
36
+ lat: number;
37
+ lon: number;
38
+ } | null;
39
+ } | null;
40
+ email?: string | null;
41
+ givenName: string | null;
42
+ familyName: string | null;
43
+ phone: {
44
+ callingCode: string;
45
+ number: string;
46
+ };
47
+ type: 'collection' | 'business' | 'delivery';
48
+ } | null;
49
+ id: string;
50
+ userId: string;
51
+ name: string;
52
+ email: string;
53
+ ukRegion: string;
54
+ phone: {
55
+ callingCode: string;
56
+ number: string;
57
+ };
58
+ location: {
59
+ what3words: string | null;
60
+ address: {
61
+ name?: string | null;
62
+ line1: string;
63
+ line2?: string | null;
64
+ line3?: string | null;
65
+ city?: string | null;
66
+ region?: string | null;
67
+ regionISO?: string | null;
68
+ postcode: string;
69
+ countryName?: string | null;
70
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
71
+ };
72
+ coordinates: {
73
+ lat: number;
74
+ lon: number;
75
+ } | null;
76
+ } | null;
77
+ assurance: {
78
+ id: string | null;
79
+ key?: string | null;
80
+ body: 'RT' | 'SQC';
81
+ name?: string | null;
82
+ location?: string | null;
83
+ } | null;
84
+ };
85
+ details: {
86
+ startDateUTC: string;
87
+ endDateUTC: string | null;
88
+ reviewEndDateUTC: string | null;
89
+ postReviewEndDateUTC: string | null;
90
+ movement: {
91
+ months: Array<string>;
92
+ asAvailable: boolean | null;
93
+ };
94
+ buyerNotes: string | null;
95
+ files?: Array<{
96
+ name?: string;
97
+ id: string;
98
+ url?: string | null;
99
+ userId?: string | null;
100
+ userName?: string | null;
101
+ organisationId?: string | null;
102
+ createdAtUTC?: string | null;
103
+ } | null>;
104
+ targetPrice: {
105
+ amount: number | null;
106
+ currency: string;
107
+ } | null;
108
+ contractType: 'base' | 'fixed' | 'premium-only' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
109
+ haulageType: 'ex-farm' | 'delivered' | 'both' | null;
110
+ haulageTypeTASCC?: boolean | null;
111
+ };
112
+ inventory: {
113
+ type: 'crop' | 'produce';
114
+ harvestYear: string;
115
+ commodity: {
116
+ commodity: {
117
+ id: number;
118
+ name: string;
119
+ };
120
+ type: {
121
+ id: number;
122
+ name: string;
123
+ };
124
+ grade: {
125
+ id: number;
126
+ name: string;
127
+ };
128
+ varieties: Array<string>;
129
+ attributes: Array<{
130
+ id: number;
131
+ name: string;
132
+ }>;
133
+ tags?: Array<number>;
134
+ weight: {
135
+ name: string;
136
+ conversion: number;
137
+ weight?: number;
138
+ };
139
+ };
140
+ measures: Array<{
141
+ specification: {
142
+ id: number;
143
+ name: string;
144
+ unit: string;
145
+ };
146
+ min: number | null;
147
+ max: number | null;
148
+ }> | null;
149
+ hasSampled: boolean;
150
+ customMeasures: boolean | null;
151
+ files?: Array<{
152
+ name?: string;
153
+ id: string;
154
+ url?: string | null;
155
+ userId?: string | null;
156
+ userName?: string | null;
157
+ organisationId?: string | null;
158
+ createdAtUTC?: string | null;
159
+ } | null>;
160
+ id?: string;
161
+ weight: {
162
+ min: {
163
+ name: string;
164
+ conversion: number;
165
+ weight?: number;
166
+ };
167
+ max: {
168
+ name: string;
169
+ conversion: number;
170
+ weight?: number;
171
+ };
172
+ };
173
+ };
174
+ bidInfo: {
175
+ count: number;
176
+ acceptedCount: number;
177
+ activeCount: number;
178
+ expiredCount: number;
179
+ withdrawnCount?: number;
180
+ nextExpiryUTC: string | null;
181
+ prevExpiryUTC: string | null;
182
+ minPrice: {
183
+ amount: number | null;
184
+ currency: string;
185
+ } | null;
186
+ maxPrice: {
187
+ amount: number | null;
188
+ currency: string;
189
+ } | null;
190
+ soldWeight: number | null;
191
+ spreadMin: number | null;
192
+ spreadMax: number | null;
193
+ bids: Record<string, {
194
+ organisationId: string | null;
195
+ userId: string;
196
+ userFullName: string;
197
+ status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
198
+ weight: {
199
+ min: number;
200
+ max: number;
201
+ };
202
+ createdAtUTC: string;
203
+ updatedAtUTC: string;
204
+ }>;
205
+ };
206
+ wantedAdId: string | null;
207
+ wantedAdUserId: string | null;
208
+ relistedFromListingId?: string;
209
+ preferences: Array<string>;
210
+ pending?: boolean;
211
+ feedback?: {
212
+ user: string;
213
+ note: string | null;
214
+ createdAtUTC: string | null;
215
+ noBidReason: string | null;
216
+ noConversionReason: string;
217
+ sellerTargetPrice: {
218
+ amount: number | null;
219
+ currency: string;
220
+ } | null;
221
+ sellerTargetPriceAutoOpen: boolean | null;
222
+ sellerListingReasonIds: Array<number> | null;
223
+ sellerListingReasonDetail: string | null;
224
+ } | null;
225
+ marketingPlanId?: string;
226
+ tags: Array<string>;
227
+ bids: Array<{
228
+ id: string;
229
+ listingId: string;
230
+ business: {
231
+ id: string | null;
232
+ name: string | null;
233
+ vetted: boolean;
234
+ organisationId: string;
235
+ organisationName: string;
236
+ createdAtUTC: string;
237
+ location?: {
238
+ what3words: string | null;
239
+ address: {
240
+ name?: string | null;
241
+ line1: string;
242
+ line2?: string | null;
243
+ line3?: string | null;
244
+ city?: string | null;
245
+ region?: string | null;
246
+ regionISO?: string | null;
247
+ postcode: string;
248
+ countryName?: string | null;
249
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
250
+ };
251
+ coordinates: {
252
+ lat: number;
253
+ lon: number;
254
+ } | null;
255
+ } | null;
256
+ deliveryLocation?: {
257
+ what3words: string | null;
258
+ address: {
259
+ name?: string | null;
260
+ line1: string;
261
+ line2?: string | null;
262
+ line3?: string | null;
263
+ city?: string | null;
264
+ region?: string | null;
265
+ regionISO?: string | null;
266
+ postcode: string;
267
+ countryName?: string | null;
268
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
269
+ };
270
+ coordinates: {
271
+ lat: number;
272
+ lon: number;
273
+ } | null;
274
+ } | null;
275
+ bio?: string | null;
276
+ companyNumber?: string | null;
277
+ vatNumber?: string | null;
278
+ };
279
+ userId: string;
280
+ organisationId?: string;
281
+ createdAtUTC: string;
282
+ status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
283
+ expiresAtUTC: string;
284
+ options: Array<{
285
+ id: number;
286
+ status: 'active' | 'accepted' | 'inactive';
287
+ movement: {
288
+ months: Array<string>;
289
+ asAvailable: boolean | null;
290
+ };
291
+ pricePerUnit?: {
292
+ amount: number | null;
293
+ currency: string;
294
+ } | null;
295
+ pricing: {
296
+ exFarm: {
297
+ amount: number | null;
298
+ currency: string;
299
+ } | null;
300
+ delivered: {
301
+ amount: number | null;
302
+ currency: string;
303
+ } | null;
304
+ min: {
305
+ amount: number | null;
306
+ currency: string;
307
+ } | null;
308
+ max: {
309
+ amount: number | null;
310
+ currency: string;
311
+ } | null;
312
+ fixedPremium: {
313
+ amount: number | null;
314
+ currency: string;
315
+ } | null;
316
+ };
317
+ expiredOffer: {
318
+ name: string;
319
+ conversion: number;
320
+ weight?: number;
321
+ } | null;
322
+ expiredOfferExpireAtUTC: string | null;
323
+ acceptedAtUTC: string | null;
324
+ soldWeight: number | null;
325
+ haulageType: 'ex-farm' | 'delivered' | null;
326
+ buyerNotes: string | null;
327
+ }>;
328
+ terms: {
329
+ weight: {
330
+ min: {
331
+ name: string;
332
+ conversion: number;
333
+ weight?: number;
334
+ };
335
+ max: {
336
+ name: string;
337
+ conversion: number;
338
+ weight?: number;
339
+ };
340
+ };
341
+ paymentDays: number;
342
+ paymentDayType?: 'fixed' | 'dayOfMonth' | null;
343
+ paymentType: 'base' | 'fixed' | 'premium-only' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
344
+ haulageType?: 'ex-farm' | 'delivered' | null;
345
+ cropHome?: string | null;
346
+ sellerNotes: string | null;
347
+ deliveryPostcode: string | null;
348
+ };
349
+ contract?: {
350
+ id: string | null;
351
+ files?: Array<{
352
+ name?: string;
353
+ id: string;
354
+ url?: string | null;
355
+ userId?: string | null;
356
+ userName?: string | null;
357
+ organisationId?: string | null;
358
+ createdAtUTC?: string | null;
359
+ } | null> | null;
360
+ reference: string | null;
361
+ };
362
+ buyerContact: {
363
+ email: string;
364
+ phone: {
365
+ callingCode: string;
366
+ number: string;
367
+ };
368
+ familyName: string;
369
+ givenName: string;
370
+ };
371
+ requiresContract: boolean;
372
+ }>;
373
+ };
374
+ listingUserBids: Array<{
375
+ status: 'active' | 'accepted' | 'inactive';
376
+ pricePerUnit: {
377
+ amount: number | null;
378
+ currency: string;
379
+ } | null;
380
+ pricing: {
381
+ exFarm: {
382
+ amount: number | null;
383
+ currency: string;
384
+ } | null;
385
+ delivered: {
386
+ amount: number | null;
387
+ currency: string;
388
+ } | null;
389
+ min: {
390
+ amount: number | null;
391
+ currency: string;
392
+ } | null;
393
+ max: {
394
+ amount: number | null;
395
+ currency: string;
396
+ } | null;
397
+ fixedPremium: {
398
+ amount: number | null;
399
+ currency: string;
400
+ } | null;
401
+ };
402
+ movement: {
403
+ months: Array<string>;
404
+ asAvailable: boolean | null;
405
+ };
406
+ haulageType: 'ex-farm' | 'delivered' | null;
407
+ paymentType: 'base' | 'fixed' | 'premium-only' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
408
+ commodityId: number;
409
+ }>;
410
+ listingAcceptedBids: Array<{
411
+ status: 'active' | 'accepted' | 'inactive';
412
+ pricePerUnit: {
413
+ amount: number | null;
414
+ currency: string;
415
+ } | null;
416
+ pricing: {
417
+ exFarm: {
418
+ amount: number | null;
419
+ currency: string;
420
+ } | null;
421
+ delivered: {
422
+ amount: number | null;
423
+ currency: string;
424
+ } | null;
425
+ min: {
426
+ amount: number | null;
427
+ currency: string;
428
+ } | null;
429
+ max: {
430
+ amount: number | null;
431
+ currency: string;
432
+ } | null;
433
+ fixedPremium: {
434
+ amount: number | null;
435
+ currency: string;
436
+ } | null;
437
+ };
438
+ movement: {
439
+ months: Array<string>;
440
+ asAvailable: boolean | null;
441
+ };
442
+ haulageType: 'ex-farm' | 'delivered' | null;
443
+ paymentType: 'base' | 'fixed' | 'premium-only' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
444
+ commodityId: number;
445
+ }>;
446
+ bidMovementPriceRanges: {
447
+ baseFixed: {
448
+ count: number;
449
+ prices: Array<{
450
+ month: string;
451
+ haulageType: 'ex-farm' | 'delivered' | null;
452
+ minPrice: {
453
+ amount: number;
454
+ currency: string;
455
+ };
456
+ maxPrice: {
457
+ amount: number;
458
+ currency: string;
459
+ };
460
+ }>;
461
+ };
462
+ premiumOnly: {
463
+ count: number;
464
+ minPrice: {
465
+ amount: number | null;
466
+ currency: string;
467
+ } | null;
468
+ maxPrice: {
469
+ amount: number | null;
470
+ currency: string;
471
+ } | null;
472
+ minFixedPremium: {
473
+ amount: number | null;
474
+ currency: string;
475
+ } | null;
476
+ maxFixedPremium: {
477
+ amount: number | null;
478
+ currency: string;
479
+ } | null;
480
+ };
481
+ };
482
+ hasAcceptedOffer: boolean;
483
+ hasNotAcceptedOffer: boolean;
484
+ hasBaseFixedOffers: boolean;
485
+ hasPremiumOnlyOffers: boolean;
486
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -52,6 +52,11 @@ export type ContractDetail = {
52
52
  months: Array<string>;
53
53
  asAvailable: boolean | null;
54
54
  };
55
+ movementMonths?: Array<{
56
+ month: string;
57
+ weightKG: number | null;
58
+ asAvailable: boolean;
59
+ }>;
55
60
  files: Array<{
56
61
  name?: string;
57
62
  id: string;
@@ -61,7 +66,6 @@ export type ContractDetail = {
61
66
  organisationId?: string | null;
62
67
  createdAtUTC?: string | null;
63
68
  } | null>;
64
- terms: string | null;
65
69
  };
66
70
  crop: {
67
71
  type: 'crop' | 'produce';
@@ -12,6 +12,11 @@ export type CreateContractSchema = {
12
12
  months: Array<string>;
13
13
  asAvailable: boolean | null;
14
14
  };
15
+ movementMonths?: Array<{
16
+ month: string;
17
+ weightKG: number;
18
+ asAvailable: boolean;
19
+ }>;
15
20
  files?: Array<{
16
21
  name?: string;
17
22
  id: string;
@@ -21,7 +26,6 @@ export type CreateContractSchema = {
21
26
  organisationId?: string | null;
22
27
  createdAtUTC?: string | null;
23
28
  } | null>;
24
- terms?: string | null;
25
29
  pricePerUnit?: {
26
30
  amount: number | null;
27
31
  currency: string;
@@ -11,6 +11,11 @@ export type PatchContractSchema = {
11
11
  months: Array<string>;
12
12
  asAvailable: boolean | null;
13
13
  };
14
+ movementMonths?: Array<{
15
+ month: string;
16
+ weightKG: number;
17
+ asAvailable: boolean;
18
+ }>;
14
19
  files?: Array<{
15
20
  name?: string;
16
21
  id: string;
@@ -20,7 +25,6 @@ export type PatchContractSchema = {
20
25
  organisationId?: string | null;
21
26
  createdAtUTC?: string | null;
22
27
  } | null>;
23
- terms?: string | null;
24
28
  pricePerUnit?: {
25
29
  amount: number | null;
26
30
  currency: string;
@@ -53,6 +53,11 @@ export type SearchResultsContractSchema = {
53
53
  months: Array<string>;
54
54
  asAvailable: boolean | null;
55
55
  };
56
+ movementMonths?: Array<{
57
+ month: string;
58
+ weightKG: number | null;
59
+ asAvailable: boolean;
60
+ }>;
56
61
  files: Array<{
57
62
  name?: string;
58
63
  id: string;
@@ -62,7 +67,6 @@ export type SearchResultsContractSchema = {
62
67
  organisationId?: string | null;
63
68
  createdAtUTC?: string | null;
64
69
  } | null>;
65
- terms: string | null;
66
70
  };
67
71
  crop: {
68
72
  type: 'crop' | 'produce';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hectare/platform.clients.trading",
3
- "version": "1.1.270",
3
+ "version": "1.1.272",
4
4
  "main": "index.js",
5
5
  "exported": true,
6
6
  "types": "index.d.ts",