@hectare/platform.clients.trading 1.1.232 → 1.1.234

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.
@@ -230,6 +230,7 @@ export type BidDetail = {
230
230
  } | null;
231
231
  soldWeight: number | null;
232
232
  bids: Record<string, {
233
+ organisationId: string;
233
234
  userId: string;
234
235
  userFullName: string;
235
236
  status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
@@ -97,4 +97,393 @@ export type ContractDetail = {
97
97
  sellerNotes: string;
98
98
  buyerNotes: string;
99
99
  regionISO: string;
100
+ bid?: {
101
+ id: string;
102
+ listingId: string;
103
+ listing?: {
104
+ id: string;
105
+ isMyListing: boolean;
106
+ isMyOrganisationsListing: boolean;
107
+ createdAtUTC: string;
108
+ status: 'active' | 'closed' | 'traded';
109
+ substatus: 'unsold' | 'archived' | 'scheduled' | 'open' | 'in-review' | 'post-review' | null;
110
+ tradingStatus: 'with-buyers' | 'scheduled' | 'review' | 'request-trade' | 'expired' | 'no-offers' | 'ended';
111
+ business: {
112
+ organisationId: string;
113
+ organisationCreatedAtUTC?: string;
114
+ organisationName: string;
115
+ organisationLogo?: string;
116
+ organisationVetted: boolean;
117
+ businessUnitId: string;
118
+ businessUnitName: string;
119
+ businessCollectionAddressId: number | null;
120
+ businessCollectionAddress: {
121
+ id: number | null;
122
+ reference: string | null;
123
+ location: {
124
+ what3words: string | null;
125
+ address: {
126
+ name?: string | null;
127
+ line1: string;
128
+ line2?: string | null;
129
+ line3?: string | null;
130
+ city?: string | null;
131
+ region?: string | null;
132
+ regionISO?: string | null;
133
+ postcode: string;
134
+ countryName?: string | null;
135
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
136
+ };
137
+ coordinates: {
138
+ lat: number;
139
+ lon: number;
140
+ } | null;
141
+ } | null;
142
+ email?: string | null;
143
+ givenName: string | null;
144
+ familyName: string | null;
145
+ phone: {
146
+ callingCode: string;
147
+ number: string;
148
+ };
149
+ type: 'collection' | 'business' | 'delivery' | 'business-collection';
150
+ } | null;
151
+ id: string;
152
+ userId: string;
153
+ name: string;
154
+ email: string;
155
+ phone: {
156
+ callingCode: string;
157
+ number: string;
158
+ };
159
+ location: {
160
+ what3words: string | null;
161
+ address: {
162
+ name?: string | null;
163
+ line1: string;
164
+ line2?: string | null;
165
+ line3?: string | null;
166
+ city?: string | null;
167
+ region?: string | null;
168
+ regionISO?: string | null;
169
+ postcode: string;
170
+ countryName?: string | null;
171
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
172
+ };
173
+ coordinates: {
174
+ lat: number;
175
+ lon: number;
176
+ } | null;
177
+ } | null;
178
+ assurance: {
179
+ id: string | null;
180
+ key?: string | null;
181
+ body: 'RT' | 'SQC';
182
+ name?: string | null;
183
+ location?: string | null;
184
+ } | null;
185
+ holdingNumber?: string;
186
+ collectionLocation?: {
187
+ what3words: string | null;
188
+ address: {
189
+ name?: string | null;
190
+ line1: string;
191
+ line2?: string | null;
192
+ line3?: string | null;
193
+ city?: string | null;
194
+ region?: string | null;
195
+ regionISO?: string | null;
196
+ postcode: string;
197
+ countryName?: string | null;
198
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
199
+ };
200
+ coordinates: {
201
+ lat: number;
202
+ lon: number;
203
+ } | null;
204
+ } | null;
205
+ assuranceScheme?: 'RT' | 'SQC';
206
+ assuranceId?: string;
207
+ };
208
+ details: {
209
+ startDateUTC: string;
210
+ endDateUTC: string | null;
211
+ reviewEndDateUTC: string | null;
212
+ postReviewEndDateUTC: string | null;
213
+ price: {
214
+ amount: number;
215
+ currency: string;
216
+ } | null;
217
+ movementPeriod: {
218
+ startDateUTC: string;
219
+ endDateUTC: string;
220
+ type: 'date' | 'month';
221
+ excludedDatesUTC?: Array<string> | null;
222
+ asAvailable?: boolean | null;
223
+ };
224
+ movement: {
225
+ months: Array<string>;
226
+ asAvailable: boolean | null;
227
+ };
228
+ buyerNotes: string | null;
229
+ files?: Array<{
230
+ name?: string;
231
+ id: string;
232
+ url?: string | null;
233
+ userId?: string | null;
234
+ userName?: string | null;
235
+ organisationId?: string | null;
236
+ createdAtUTC?: string | null;
237
+ } | null>;
238
+ targetPrice: {
239
+ amount: number;
240
+ currency: string;
241
+ } | null;
242
+ guidePrice: {
243
+ amount: number;
244
+ currency: string;
245
+ } | null;
246
+ guidePriceMin: {
247
+ amount: number;
248
+ currency: string;
249
+ } | null;
250
+ guidePriceMax: {
251
+ amount: number;
252
+ currency: string;
253
+ } | null;
254
+ isBasePremOnly?: boolean;
255
+ contractType: 'base' | 'fixed' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
256
+ haulageType: 'ex-farm' | 'delivered' | 'both' | null;
257
+ haulageTypeTASCC?: boolean | null;
258
+ };
259
+ inventory: {
260
+ id?: string;
261
+ type: 'crop' | 'produce';
262
+ harvestYear: string;
263
+ commodity: {
264
+ commodity: {
265
+ id: number;
266
+ name: string;
267
+ };
268
+ type: {
269
+ id: number;
270
+ name: string;
271
+ };
272
+ grade: {
273
+ id: number;
274
+ name: string;
275
+ };
276
+ variety?: string;
277
+ varieties: Array<string>;
278
+ attributes: Array<{
279
+ id: number;
280
+ name: string;
281
+ }>;
282
+ tags?: Array<number>;
283
+ weight: {
284
+ name: string;
285
+ conversion: number;
286
+ weight?: number;
287
+ };
288
+ };
289
+ weight: {
290
+ min: {
291
+ name: string;
292
+ conversion: number;
293
+ weight?: number;
294
+ };
295
+ max: {
296
+ name: string;
297
+ conversion: number;
298
+ weight?: number;
299
+ };
300
+ };
301
+ measures: Array<{
302
+ specification: {
303
+ id: number;
304
+ name: string;
305
+ unit: string;
306
+ };
307
+ min: number | null;
308
+ max: number | null;
309
+ }> | null;
310
+ hasSampled: boolean | null;
311
+ customMeasures: boolean | null;
312
+ };
313
+ activeBids: number;
314
+ bidInfo: {
315
+ count: number;
316
+ acceptedCount: number;
317
+ activeCount: number;
318
+ expiredCount: number;
319
+ withdrawnCount?: number;
320
+ nextExpiryUTC: string | null;
321
+ prevExpiryUTC: string | null;
322
+ minPrice: {
323
+ amount: number;
324
+ currency: string;
325
+ } | null;
326
+ maxPrice: {
327
+ amount: number;
328
+ currency: string;
329
+ } | null;
330
+ soldWeight: number | null;
331
+ bids: Record<string, {
332
+ organisationId: string;
333
+ userId: string;
334
+ userFullName: string;
335
+ status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
336
+ weight: {
337
+ min: number;
338
+ max: number;
339
+ };
340
+ options: Array<{
341
+ id: number;
342
+ soldWeightKG?: number | null;
343
+ soldWeight: number | null;
344
+ pricePerUnit?: {
345
+ amount: number;
346
+ currency: string;
347
+ };
348
+ }>;
349
+ createdAtUTC: string;
350
+ updatedAtUTC: string;
351
+ }>;
352
+ };
353
+ tradeRequestId: string | null;
354
+ tradeRequestUserId: string | null;
355
+ wantedAdId: string | null;
356
+ wantedAdUserId: string | null;
357
+ relistedFromListingId?: string;
358
+ preferences: Array<string>;
359
+ pending?: boolean;
360
+ feedback?: {
361
+ user: string;
362
+ note: string | null;
363
+ createdAtUTC: string | null;
364
+ noBidReason: string | null;
365
+ noConversionReason: string;
366
+ sellerTargetPrice: {
367
+ amount: number;
368
+ currency: string;
369
+ } | null;
370
+ sellerTargetPriceAutoOpen: boolean | null;
371
+ sellerListingReasonIds: Array<number> | null;
372
+ sellerListingReasonDetail: string | null;
373
+ } | null;
374
+ marketingPlanId?: string;
375
+ };
376
+ business: {
377
+ id: string | null;
378
+ name: string | null;
379
+ vetted: boolean;
380
+ organisationId: string;
381
+ organisationName: string;
382
+ createdAtUTC: string;
383
+ logo: string | null;
384
+ location?: {
385
+ what3words: string | null;
386
+ address: {
387
+ name?: string | null;
388
+ line1: string;
389
+ line2?: string | null;
390
+ line3?: string | null;
391
+ city?: string | null;
392
+ region?: string | null;
393
+ regionISO?: string | null;
394
+ postcode: string;
395
+ countryName?: string | null;
396
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
397
+ };
398
+ coordinates: {
399
+ lat: number;
400
+ lon: number;
401
+ } | null;
402
+ } | null;
403
+ bio?: string | null;
404
+ companyNumber?: string | null;
405
+ vatNumber?: string | null;
406
+ };
407
+ userId: string;
408
+ userFullName?: string;
409
+ organisationId?: string;
410
+ organisationCreatedAtUTC?: string;
411
+ organisationName?: string;
412
+ organisationLogo?: string;
413
+ organisationVetted?: boolean;
414
+ createdAtUTC: string;
415
+ status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
416
+ expiresAtUTC: string;
417
+ options: Array<{
418
+ id: number;
419
+ status: 'active' | 'accepted' | 'inactive';
420
+ movementPeriod: {
421
+ startDateUTC: string;
422
+ endDateUTC: string;
423
+ type: 'date' | 'month';
424
+ };
425
+ movement: {
426
+ months: Array<string>;
427
+ asAvailable: boolean | null;
428
+ };
429
+ pricePerUnit: {
430
+ amount: number;
431
+ currency: string;
432
+ };
433
+ expiredOffer: {
434
+ name: string;
435
+ conversion: number;
436
+ weight?: number;
437
+ } | null;
438
+ expiredOfferExpireAtUTC: string | null;
439
+ acceptedAtUTC: string | null;
440
+ soldWeight: number | null;
441
+ haulageType: 'ex-farm' | 'delivered';
442
+ buyerNotes: string | null;
443
+ }>;
444
+ terms: {
445
+ weight: {
446
+ min: {
447
+ name: string;
448
+ conversion: number;
449
+ weight?: number;
450
+ };
451
+ max: {
452
+ name: string;
453
+ conversion: number;
454
+ weight?: number;
455
+ };
456
+ };
457
+ paymentDays: number;
458
+ paymentDayType?: 'fixed' | 'dayOfMonth' | null;
459
+ paymentType: 'base' | 'fixed' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
460
+ haulageType?: 'ex-farm' | 'delivered';
461
+ cropHome?: string | null;
462
+ sellerNotes: string | null;
463
+ deliveryPostcode: string | null;
464
+ };
465
+ contract?: {
466
+ id: string | null;
467
+ files: Array<{
468
+ name?: string;
469
+ id: string;
470
+ url?: string | null;
471
+ userId?: string | null;
472
+ userName?: string | null;
473
+ organisationId?: string | null;
474
+ createdAtUTC?: string | null;
475
+ } | null> | null;
476
+ reference: string | null;
477
+ };
478
+ buyerContact: {
479
+ email: string;
480
+ phone: {
481
+ callingCode: string;
482
+ number: string;
483
+ };
484
+ familyName: string;
485
+ givenName: string;
486
+ };
487
+ requiresContract: boolean;
488
+ };
100
489
  };
@@ -1,4 +1,5 @@
1
1
  export type ListingBidInfoBid = {
2
+ organisationId: string;
2
3
  userId: string;
3
4
  userFullName: string;
4
5
  status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
@@ -227,6 +227,7 @@ export type ListingDetail = {
227
227
  } | null;
228
228
  soldWeight: number | null;
229
229
  bids: Record<string, {
230
+ organisationId: string;
230
231
  userId: string;
231
232
  userFullName: string;
232
233
  status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
@@ -531,6 +532,7 @@ export type ListingDetail = {
531
532
  } | null;
532
533
  soldWeight: number | null;
533
534
  bids: Record<string, {
535
+ organisationId: string;
534
536
  userId: string;
535
537
  userFullName: string;
536
538
  status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
@@ -227,6 +227,7 @@ export type ListingSummary = {
227
227
  } | null;
228
228
  soldWeight: number | null;
229
229
  bids: Record<string, {
230
+ organisationId: string;
230
231
  userId: string;
231
232
  userFullName: string;
232
233
  status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
@@ -231,6 +231,7 @@ export type SearchResultsBidSchema = {
231
231
  } | null;
232
232
  soldWeight: number | null;
233
233
  bids: Record<string, {
234
+ organisationId: string;
234
235
  userId: string;
235
236
  userFullName: string;
236
237
  status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
@@ -228,6 +228,7 @@ export type SearchResultsListingSchema = {
228
228
  } | null;
229
229
  soldWeight: number | null;
230
230
  bids: Record<string, {
231
+ organisationId: string;
231
232
  userId: string;
232
233
  userFullName: string;
233
234
  status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hectare/platform.clients.trading",
3
- "version": "1.1.232",
3
+ "version": "1.1.234",
4
4
  "main": "index.js",
5
5
  "exported": true,
6
6
  "types": "index.d.ts",