@hectare/platform.clients.trading 1.1.91 → 1.1.93

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