@hectare/platform.clients.trading 1.1.248 → 1.1.249

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
@@ -31,7 +31,6 @@ export type { InsightsRecommendedForwardSellingPremiumPredictionSchema } from '.
31
31
  export type { InsightsRegionalPricesPredictionSchema } from './models/InsightsRegionalPricesPredictionSchema.js';
32
32
  export type { InventoryDetailSchema } from './models/InventoryDetailSchema.js';
33
33
  export type { InventorySchema } from './models/InventorySchema.js';
34
- export type { InventorySearchResultsSchema } from './models/InventorySearchResultsSchema.js';
35
34
  export type { InventorySummarySchema } from './models/InventorySummarySchema.js';
36
35
  export type { ListingBidInfoBid } from './models/ListingBidInfoBid.js';
37
36
  export type { ListingDetail } from './models/ListingDetail.js';
@@ -40,7 +39,6 @@ export type { ListingNextAutoCloseDateSchema } from './models/ListingNextAutoClo
40
39
  export type { ListingSummary } from './models/ListingSummary.js';
41
40
  export type { MarketingPlanCheckSchema } from './models/MarketingPlanCheckSchema.js';
42
41
  export type { MarketingPlanDetailSchema } from './models/MarketingPlanDetailSchema.js';
43
- export type { MarketingPlanSearchResultsSchema } from './models/MarketingPlanSearchResultsSchema.js';
44
42
  export type { MarketingPlanSummarySchema } from './models/MarketingPlanSummarySchema.js';
45
43
  export type { NewsFeed } from './models/NewsFeed.js';
46
44
  export type { PatchBid } from './models/PatchBid.js';
@@ -58,8 +56,11 @@ export type { PatchWantedAdSchema } from './models/PatchWantedAdSchema.js';
58
56
  export type { PriceScoreSchema } from './models/PriceScoreSchema.js';
59
57
  export type { PublishExFarmPricingSchema } from './models/PublishExFarmPricingSchema.js';
60
58
  export type { SearchResultsBidSchema } from './models/SearchResultsBidSchema.js';
59
+ export type { SearchResultsContractSchema } from './models/SearchResultsContractSchema.js';
60
+ export type { SearchResultsInventorySchema } from './models/SearchResultsInventorySchema.js';
61
61
  export type { SearchResultsListingSchema } from './models/SearchResultsListingSchema.js';
62
+ export type { SearchResultsMarketingPlanSchema } from './models/SearchResultsMarketingPlanSchema.js';
63
+ export type { SearchResultsWantedAdSchema } from './models/SearchResultsWantedAdSchema.js';
62
64
  export type { Templates } from './models/Templates.js';
63
65
  export type { TradingConfig } from './models/TradingConfig.js';
64
66
  export type { WantedAdDetailSchema } from './models/WantedAdDetailSchema.js';
65
- export type { WantedAdSearchResultsSchema } from './models/WantedAdSearchResultsSchema.js';
@@ -0,0 +1,620 @@
1
+ export type SearchResultsContractSchema = {
2
+ docs: Array<{
3
+ id: string;
4
+ createdAtUTC: string;
5
+ details: {
6
+ bidId: string | null;
7
+ bidOptionId: number | null;
8
+ userId: string;
9
+ listingId: string | null;
10
+ inventoryId: string;
11
+ reference: string | null;
12
+ totalWeight: {
13
+ name: string;
14
+ conversion: number;
15
+ weight?: number;
16
+ };
17
+ priceType: 'base' | 'fixed' | 'premium-only' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
18
+ totalPrice: {
19
+ amount: number;
20
+ currency: string;
21
+ } | null;
22
+ pricePerUnit?: {
23
+ amount: number;
24
+ currency: string;
25
+ } | null;
26
+ pricing: {
27
+ exFarm: {
28
+ amount: number;
29
+ currency: string;
30
+ } | null;
31
+ delivered: {
32
+ amount: number;
33
+ currency: string;
34
+ } | null;
35
+ min: {
36
+ amount: number;
37
+ currency: string;
38
+ } | null;
39
+ max: {
40
+ amount: number;
41
+ currency: string;
42
+ } | null;
43
+ fixedPremium: {
44
+ amount: number;
45
+ currency: string;
46
+ } | null;
47
+ };
48
+ paymentDays: number;
49
+ haulageType: 'ex-farm' | 'delivered' | 'both' | null;
50
+ contractDateUTC: string;
51
+ movement: {
52
+ months: Array<string>;
53
+ asAvailable: boolean | null;
54
+ };
55
+ files: Array<{
56
+ name?: string;
57
+ id: string;
58
+ url?: string | null;
59
+ userId?: string | null;
60
+ userName?: string | null;
61
+ organisationId?: string | null;
62
+ createdAtUTC?: string | null;
63
+ } | null>;
64
+ terms: string | null;
65
+ };
66
+ crop: {
67
+ type: 'crop' | 'produce';
68
+ harvestYear: string;
69
+ commodity: {
70
+ commodity: {
71
+ id: number;
72
+ name: string;
73
+ };
74
+ type: {
75
+ id: number;
76
+ name: string;
77
+ };
78
+ grade: {
79
+ id: number;
80
+ name: string;
81
+ };
82
+ varieties: Array<string>;
83
+ attributes: Array<{
84
+ id: number;
85
+ name: string;
86
+ }>;
87
+ tags?: Array<number>;
88
+ weight: {
89
+ name: string;
90
+ conversion: number;
91
+ weight?: number;
92
+ };
93
+ };
94
+ measures: Array<{
95
+ specification: {
96
+ id: number;
97
+ name: string;
98
+ unit: string;
99
+ };
100
+ min: number | null;
101
+ max: number | null;
102
+ }> | null;
103
+ hasSampled: boolean;
104
+ customMeasures?: boolean | null;
105
+ files: Array<{
106
+ name?: string;
107
+ id: string;
108
+ url?: string | null;
109
+ userId?: string | null;
110
+ userName?: string | null;
111
+ organisationId?: string | null;
112
+ createdAtUTC?: string | null;
113
+ } | null>;
114
+ };
115
+ inventory?: {
116
+ type: 'crop' | 'produce';
117
+ harvestYear: string;
118
+ commodity: {
119
+ commodity: {
120
+ id: number;
121
+ name: string;
122
+ };
123
+ type: {
124
+ id: number;
125
+ name: string;
126
+ };
127
+ grade: {
128
+ id: number;
129
+ name: string;
130
+ };
131
+ varieties: Array<string>;
132
+ attributes: Array<{
133
+ id: number;
134
+ name: string;
135
+ }>;
136
+ tags?: Array<number>;
137
+ weight: {
138
+ name: string;
139
+ conversion: number;
140
+ weight?: number;
141
+ };
142
+ };
143
+ measures: Array<{
144
+ specification: {
145
+ id: number;
146
+ name: string;
147
+ unit: string;
148
+ };
149
+ min: number | null;
150
+ max: number | null;
151
+ }> | null;
152
+ hasSampled: boolean;
153
+ customMeasures?: boolean | null;
154
+ files: Array<{
155
+ name?: string;
156
+ id: string;
157
+ url?: string | null;
158
+ userId?: string | null;
159
+ userName?: string | null;
160
+ organisationId?: string | null;
161
+ createdAtUTC?: string | null;
162
+ } | null>;
163
+ };
164
+ buyer: {
165
+ organisationId: string;
166
+ businessId: string;
167
+ userId?: string;
168
+ organisationName: string;
169
+ businessName: string | null;
170
+ userName?: string | null;
171
+ };
172
+ seller: {
173
+ organisationId: string;
174
+ businessId: string;
175
+ userId?: string;
176
+ organisationName: string;
177
+ businessName: string | null;
178
+ userName?: string | null;
179
+ };
180
+ buyerNotes?: string;
181
+ sellerNotes?: string;
182
+ regionISO: string;
183
+ saleType: 'on-platform' | 'off-platform';
184
+ bid?: {
185
+ id: string;
186
+ listingId: string;
187
+ listing?: {
188
+ id: string;
189
+ isMyListing: boolean;
190
+ isMyOrganisationsListing: boolean;
191
+ createdAtUTC: string;
192
+ status: 'active' | 'closed' | 'traded';
193
+ substatus: 'unsold' | 'archived' | 'scheduled' | 'open' | 'in-review' | 'post-review' | null;
194
+ tradingStatus: 'with-buyers' | 'scheduled' | 'review' | 'request-trade' | 'expired' | 'no-offers' | 'ended';
195
+ business: {
196
+ organisationId: string;
197
+ organisationCreatedAtUTC: string;
198
+ organisationName: string;
199
+ organisationLogo: string;
200
+ organisationVetted: boolean;
201
+ businessId: string;
202
+ businessName: string;
203
+ businessUnitId?: string;
204
+ businessUnitName?: string;
205
+ businessCollectionAddressId: number | null;
206
+ businessCollectionAddress: {
207
+ id: number | null;
208
+ reference: string | null;
209
+ location: {
210
+ what3words: string | null;
211
+ address: {
212
+ name?: string | null;
213
+ line1: string;
214
+ line2?: string | null;
215
+ line3?: string | null;
216
+ city?: string | null;
217
+ region?: string | null;
218
+ regionISO?: string | null;
219
+ postcode: string;
220
+ countryName?: string | null;
221
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
222
+ };
223
+ coordinates: {
224
+ lat: number;
225
+ lon: number;
226
+ } | null;
227
+ } | null;
228
+ email?: string | null;
229
+ givenName: string | null;
230
+ familyName: string | null;
231
+ phone: {
232
+ callingCode: string;
233
+ number: string;
234
+ };
235
+ type: 'collection' | 'business' | 'delivery';
236
+ } | null;
237
+ id: string;
238
+ userId: string;
239
+ name: string;
240
+ email: string;
241
+ ukRegion: string;
242
+ phone: {
243
+ callingCode: string;
244
+ number: string;
245
+ };
246
+ location: {
247
+ what3words: string | null;
248
+ address: {
249
+ name?: string | null;
250
+ line1: string;
251
+ line2?: string | null;
252
+ line3?: string | null;
253
+ city?: string | null;
254
+ region?: string | null;
255
+ regionISO?: string | null;
256
+ postcode: string;
257
+ countryName?: string | null;
258
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
259
+ };
260
+ coordinates: {
261
+ lat: number;
262
+ lon: number;
263
+ } | null;
264
+ } | null;
265
+ assurance: {
266
+ id: string | null;
267
+ key?: string | null;
268
+ body: 'RT' | 'SQC';
269
+ name?: string | null;
270
+ location?: string | null;
271
+ } | null;
272
+ };
273
+ details: {
274
+ startDateUTC: string;
275
+ endDateUTC: string | null;
276
+ reviewEndDateUTC: string | null;
277
+ postReviewEndDateUTC: string | null;
278
+ movement: {
279
+ months: Array<string>;
280
+ asAvailable: boolean | null;
281
+ };
282
+ buyerNotes: string | null;
283
+ files?: Array<{
284
+ name?: string;
285
+ id: string;
286
+ url?: string | null;
287
+ userId?: string | null;
288
+ userName?: string | null;
289
+ organisationId?: string | null;
290
+ createdAtUTC?: string | null;
291
+ } | null>;
292
+ targetPrice: {
293
+ amount: number;
294
+ currency: string;
295
+ } | null;
296
+ contractType: 'base' | 'fixed' | 'premium-only' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
297
+ haulageType: 'ex-farm' | 'delivered' | 'both' | null;
298
+ haulageTypeTASCC?: boolean | null;
299
+ };
300
+ inventory: {
301
+ type: 'crop' | 'produce';
302
+ harvestYear: string;
303
+ commodity: {
304
+ commodity: {
305
+ id: number;
306
+ name: string;
307
+ };
308
+ type: {
309
+ id: number;
310
+ name: string;
311
+ };
312
+ grade: {
313
+ id: number;
314
+ name: string;
315
+ };
316
+ varieties: Array<string>;
317
+ attributes: Array<{
318
+ id: number;
319
+ name: string;
320
+ }>;
321
+ tags?: Array<number>;
322
+ weight: {
323
+ name: string;
324
+ conversion: number;
325
+ weight?: number;
326
+ };
327
+ };
328
+ measures: Array<{
329
+ specification: {
330
+ id: number;
331
+ name: string;
332
+ unit: string;
333
+ };
334
+ min: number | null;
335
+ max: number | null;
336
+ }> | null;
337
+ hasSampled: boolean;
338
+ customMeasures: boolean | null;
339
+ files?: Array<{
340
+ name?: string;
341
+ id: string;
342
+ url?: string | null;
343
+ userId?: string | null;
344
+ userName?: string | null;
345
+ organisationId?: string | null;
346
+ createdAtUTC?: string | null;
347
+ } | null>;
348
+ id?: string;
349
+ weight: {
350
+ min: {
351
+ name: string;
352
+ conversion: number;
353
+ weight?: number;
354
+ };
355
+ max: {
356
+ name: string;
357
+ conversion: number;
358
+ weight?: number;
359
+ };
360
+ };
361
+ };
362
+ activeBids: number;
363
+ bidInfo: {
364
+ count: number;
365
+ acceptedCount: number;
366
+ activeCount: number;
367
+ expiredCount: number;
368
+ withdrawnCount?: number;
369
+ nextExpiryUTC: string | null;
370
+ prevExpiryUTC: string | null;
371
+ minPrice: {
372
+ amount: number;
373
+ currency: string;
374
+ } | null;
375
+ maxPrice: {
376
+ amount: number;
377
+ currency: string;
378
+ } | null;
379
+ soldWeight: number | null;
380
+ bids: Record<string, {
381
+ organisationId: string | null;
382
+ userId: string;
383
+ userFullName: string;
384
+ status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
385
+ weight: {
386
+ min: number;
387
+ max: number;
388
+ };
389
+ options: Array<{
390
+ id: number;
391
+ soldWeightKG?: number | null;
392
+ soldWeight: number | null;
393
+ pricePerUnit?: {
394
+ amount: number;
395
+ currency: string;
396
+ } | null;
397
+ pricing?: {
398
+ exFarm: {
399
+ amount: number;
400
+ currency: string;
401
+ } | null;
402
+ delivered: {
403
+ amount: number;
404
+ currency: string;
405
+ } | null;
406
+ min: {
407
+ amount: number;
408
+ currency: string;
409
+ } | null;
410
+ max: {
411
+ amount: number;
412
+ currency: string;
413
+ } | null;
414
+ fixedPremium: {
415
+ amount: number;
416
+ currency: string;
417
+ } | null;
418
+ };
419
+ }>;
420
+ createdAtUTC: string;
421
+ updatedAtUTC: string;
422
+ }>;
423
+ };
424
+ wantedAdId: string | null;
425
+ wantedAdUserId: string | null;
426
+ relistedFromListingId?: string;
427
+ preferences: Array<string>;
428
+ pending?: boolean;
429
+ feedback?: {
430
+ user: string;
431
+ note: string | null;
432
+ createdAtUTC: string | null;
433
+ noBidReason: string | null;
434
+ noConversionReason: string;
435
+ sellerTargetPrice: {
436
+ amount: number;
437
+ currency: string;
438
+ } | null;
439
+ sellerTargetPriceAutoOpen: boolean | null;
440
+ sellerListingReasonIds: Array<number> | null;
441
+ sellerListingReasonDetail: string | null;
442
+ } | null;
443
+ marketingPlanId?: string;
444
+ };
445
+ business: {
446
+ id: string | null;
447
+ name: string | null;
448
+ vetted: boolean;
449
+ organisationId: string;
450
+ organisationName: string;
451
+ createdAtUTC: string;
452
+ logo: string | null;
453
+ location?: {
454
+ what3words: string | null;
455
+ address: {
456
+ name?: string | null;
457
+ line1: string;
458
+ line2?: string | null;
459
+ line3?: string | null;
460
+ city?: string | null;
461
+ region?: string | null;
462
+ regionISO?: string | null;
463
+ postcode: string;
464
+ countryName?: string | null;
465
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
466
+ };
467
+ coordinates: {
468
+ lat: number;
469
+ lon: number;
470
+ } | null;
471
+ } | null;
472
+ bio?: string | null;
473
+ companyNumber?: string | null;
474
+ vatNumber?: string | null;
475
+ };
476
+ userId: string;
477
+ organisationId?: string;
478
+ createdAtUTC: string;
479
+ status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
480
+ expiresAtUTC: string;
481
+ options: Array<{
482
+ id: number;
483
+ status: 'active' | 'accepted' | 'inactive';
484
+ movement: {
485
+ months: Array<string>;
486
+ asAvailable: boolean | null;
487
+ };
488
+ pricePerUnit?: {
489
+ amount: number;
490
+ currency: string;
491
+ } | null;
492
+ pricing: {
493
+ exFarm: {
494
+ amount: number;
495
+ currency: string;
496
+ } | null;
497
+ delivered: {
498
+ amount: number;
499
+ currency: string;
500
+ } | null;
501
+ min: {
502
+ amount: number;
503
+ currency: string;
504
+ } | null;
505
+ max: {
506
+ amount: number;
507
+ currency: string;
508
+ } | null;
509
+ fixedPremium: {
510
+ amount: number;
511
+ currency: string;
512
+ } | null;
513
+ };
514
+ expiredOffer: {
515
+ name: string;
516
+ conversion: number;
517
+ weight?: number;
518
+ } | null;
519
+ expiredOfferExpireAtUTC: string | null;
520
+ acceptedAtUTC: string | null;
521
+ soldWeight: number | null;
522
+ haulageType: 'ex-farm' | 'delivered' | null;
523
+ buyerNotes: string | null;
524
+ }>;
525
+ terms: {
526
+ weight: {
527
+ min: {
528
+ name: string;
529
+ conversion: number;
530
+ weight?: number;
531
+ };
532
+ max: {
533
+ name: string;
534
+ conversion: number;
535
+ weight?: number;
536
+ };
537
+ };
538
+ paymentDays: number;
539
+ paymentDayType?: 'fixed' | 'dayOfMonth' | null;
540
+ paymentType: 'base' | 'fixed' | 'premium-only' | 'unpriced' | 'premium' | 'base-plus-oil-bonus';
541
+ haulageType?: 'ex-farm' | 'delivered' | null;
542
+ cropHome?: string | null;
543
+ sellerNotes: string | null;
544
+ deliveryPostcode: string | null;
545
+ };
546
+ contract?: {
547
+ id: string | null;
548
+ files: Array<{
549
+ name?: string;
550
+ id: string;
551
+ url?: string | null;
552
+ userId?: string | null;
553
+ userName?: string | null;
554
+ organisationId?: string | null;
555
+ createdAtUTC?: string | null;
556
+ } | null> | null;
557
+ reference: string | null;
558
+ };
559
+ buyerContact: {
560
+ email: string;
561
+ phone: {
562
+ callingCode: string;
563
+ number: string;
564
+ };
565
+ familyName: string;
566
+ givenName: string;
567
+ };
568
+ requiresContract: boolean;
569
+ };
570
+ }>;
571
+ custom?: any;
572
+ totalDocs: number;
573
+ limit: number;
574
+ offset: number;
575
+ clearUrl: string;
576
+ activeFilters: Array<{
577
+ name: string;
578
+ displayName: string;
579
+ clearUrl: string;
580
+ terms: Array<{
581
+ name: string;
582
+ id: string;
583
+ hits: string;
584
+ clearUrl: string;
585
+ }>;
586
+ }>;
587
+ facets: Array<{
588
+ displayName: string;
589
+ clearUrl: string;
590
+ disabled: boolean;
591
+ name: string;
592
+ selected: boolean;
593
+ active: boolean;
594
+ terms: Array<{
595
+ name: string;
596
+ url: string;
597
+ hits: number;
598
+ selected: boolean;
599
+ id: string;
600
+ state: 'checked disabled' | 'checked' | 'disabled' | '';
601
+ aggregations?: Record<string, {
602
+ sum?: number;
603
+ min?: number;
604
+ max?: number;
605
+ average?: number;
606
+ }>;
607
+ }>;
608
+ }>;
609
+ aggregations?: Array<{
610
+ name?: string;
611
+ sum?: number;
612
+ min?: number;
613
+ max?: number;
614
+ average?: number;
615
+ count?: number;
616
+ range?: string;
617
+ hits?: number;
618
+ unit?: string;
619
+ }>;
620
+ };
@@ -1,4 +1,4 @@
1
- export type InventorySearchResultsSchema = {
1
+ export type SearchResultsInventorySchema = {
2
2
  docs: Array<{
3
3
  id: string;
4
4
  createdAtUTC: string;
@@ -1,4 +1,4 @@
1
- export type MarketingPlanSearchResultsSchema = {
1
+ export type SearchResultsMarketingPlanSchema = {
2
2
  docs: Array<{
3
3
  id: string;
4
4
  createdAtUTC?: string;
@@ -1,4 +1,4 @@
1
- export type WantedAdSearchResultsSchema = {
1
+ export type SearchResultsWantedAdSchema = {
2
2
  docs: Array<{
3
3
  id: string;
4
4
  status: 'active' | 'closed';
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hectare/platform.clients.trading",
3
- "version": "1.1.248",
3
+ "version": "1.1.249",
4
4
  "main": "index.js",
5
5
  "exported": true,
6
6
  "types": "index.d.ts",