@hectare/platform.clients.trading 1.1.72 → 1.1.74

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 { PatchListingSchema } from './models/PatchListingSchema.js';
57
58
  export type { PatchListingSubstatusSchema } from './models/PatchListingSubstatusSchema.js';
58
59
  export type { PatchMarketUpdateRequest } from './models/PatchMarketUpdateRequest.js';
59
60
  export type { PriceScoreSchema } from './models/PriceScoreSchema.js';
@@ -61,6 +62,7 @@ export type { PublishExFarmPricingSchema } from './models/PublishExFarmPricingSc
61
62
  export type { PutContractFile } from './models/PutContractFile.js';
62
63
  export type { RecentListingCommodities } from './models/RecentListingCommodities.js';
63
64
  export type { RecentListingCommodity } from './models/RecentListingCommodity.js';
65
+ export type { SearchResultsListingSchema } from './models/SearchResultsListingSchema.js';
64
66
  export type { TargetPriceDetailSchema } from './models/TargetPriceDetailSchema.js';
65
67
  export type { Templates } from './models/Templates.js';
66
68
  export type { TradeRequestDetail } from './models/TradeRequestDetail.js';
@@ -199,6 +199,11 @@ export type BidDetail = {
199
199
  tradeRequestId?: string;
200
200
  relistedFromListingId?: string;
201
201
  pending?: boolean;
202
+ notes?: Array<{
203
+ user: string;
204
+ note: string;
205
+ createdAtUTC?: string;
206
+ } | null>;
202
207
  };
203
208
  userId: string;
204
209
  userFullName: string;
@@ -196,6 +196,11 @@ export type ListingDetail = {
196
196
  tradeRequestId?: string;
197
197
  relistedFromListingId?: string;
198
198
  pending?: boolean;
199
+ notes?: Array<{
200
+ user: string;
201
+ note: string;
202
+ createdAtUTC?: string;
203
+ } | null>;
199
204
  marketBuyers: Array<{
200
205
  authPlatformId?: string;
201
206
  emailAddress?: string;
@@ -439,6 +444,11 @@ export type ListingDetail = {
439
444
  tradeRequestId?: string;
440
445
  relistedFromListingId?: string;
441
446
  pending?: boolean;
447
+ notes?: Array<{
448
+ user: string;
449
+ note: string;
450
+ createdAtUTC?: string;
451
+ } | null>;
442
452
  };
443
453
  userId: string;
444
454
  userFullName: string;
@@ -196,4 +196,9 @@ export type ListingSummary = {
196
196
  tradeRequestId?: string;
197
197
  relistedFromListingId?: string;
198
198
  pending?: boolean;
199
+ notes?: Array<{
200
+ user: string;
201
+ note: string;
202
+ createdAtUTC?: string;
203
+ } | null>;
199
204
  };
@@ -0,0 +1,3 @@
1
+ export type PatchListingSchema = {
2
+ note: string;
3
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,252 @@
1
+ export type SearchResultsListingSchema = {
2
+ docs?: Array<{
3
+ id: string;
4
+ createdAtUTC: string;
5
+ status: 'active' | 'closed' | 'traded';
6
+ substatus: 'unsold' | 'archived' | 'scheduled' | 'open' | 'in-review' | 'post-review' | null;
7
+ business: {
8
+ organisationId?: string;
9
+ organisationCreatedAtUTC?: string;
10
+ organisationName?: string;
11
+ organisationLogo?: string;
12
+ organisationVetted?: boolean;
13
+ businessUnitId?: string;
14
+ businessUnitName?: string;
15
+ id?: string;
16
+ name: string;
17
+ email: string;
18
+ phone: {
19
+ callingCode: string;
20
+ number: string;
21
+ };
22
+ location: {
23
+ what3words: string | null;
24
+ address: {
25
+ name?: string | null;
26
+ line1: string;
27
+ line2?: string | null;
28
+ line3?: string | null;
29
+ city?: string | null;
30
+ region?: string | null;
31
+ regionISO?: string | null;
32
+ postcode: string;
33
+ countryName?: string | null;
34
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
35
+ };
36
+ coordinates: {
37
+ lat: number;
38
+ lon: number;
39
+ } | null;
40
+ } | null;
41
+ assurance?: {
42
+ id: string | null;
43
+ key?: string | null;
44
+ body: 'RT' | 'SQC';
45
+ location?: string | null;
46
+ } | null;
47
+ holdingNumber?: string;
48
+ collectionLocation?: {
49
+ what3words: string | null;
50
+ address: {
51
+ name?: string | null;
52
+ line1: string;
53
+ line2?: string | null;
54
+ line3?: string | null;
55
+ city?: string | null;
56
+ region?: string | null;
57
+ regionISO?: string | null;
58
+ postcode: string;
59
+ countryName?: string | null;
60
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
61
+ };
62
+ coordinates: {
63
+ lat: number;
64
+ lon: number;
65
+ } | null;
66
+ } | null;
67
+ assuranceScheme?: 'RT' | 'SQC';
68
+ assuranceId?: string;
69
+ };
70
+ details: {
71
+ startDateUTC: string;
72
+ endDateUTC: string | null;
73
+ reviewEndDateUTC: string | null;
74
+ postReviewEndDateUTC: string | null;
75
+ price: {
76
+ amount: number;
77
+ currency: string;
78
+ } | null;
79
+ movementPeriod: {
80
+ startDateUTC: string;
81
+ endDateUTC: string;
82
+ type: 'date' | 'month';
83
+ asAvailable?: boolean | null;
84
+ };
85
+ buyerNotes: string | null;
86
+ files?: Array<{
87
+ name?: string;
88
+ id: string;
89
+ url?: string | null;
90
+ userId?: string | null;
91
+ userName?: string | null;
92
+ organisationId?: string | null;
93
+ createdAtUTC?: string | null;
94
+ } | null>;
95
+ targetPrice: {
96
+ amount: number;
97
+ currency: string;
98
+ } | null;
99
+ guidePrice: {
100
+ amount: number;
101
+ currency: string;
102
+ } | null;
103
+ guidePriceMin: {
104
+ amount: number;
105
+ currency: string;
106
+ } | null;
107
+ guidePriceMax: {
108
+ amount: number;
109
+ currency: string;
110
+ } | null;
111
+ isBasePremOnly: boolean;
112
+ };
113
+ inventory: {
114
+ type: 'crop' | 'produce';
115
+ harvestYear: string;
116
+ commodity: {
117
+ commodity: {
118
+ id: number;
119
+ name: string;
120
+ };
121
+ type: {
122
+ id: number;
123
+ name: string;
124
+ };
125
+ grade: {
126
+ id: number;
127
+ name: string;
128
+ };
129
+ variety: string;
130
+ tags: Array<number>;
131
+ weight: {
132
+ name: string;
133
+ conversion: number;
134
+ weight?: number;
135
+ };
136
+ };
137
+ weight: {
138
+ min: {
139
+ name: string;
140
+ conversion: number;
141
+ weight?: number;
142
+ };
143
+ max: {
144
+ name: string;
145
+ conversion: number;
146
+ weight?: number;
147
+ };
148
+ };
149
+ measures: Array<{
150
+ specification: {
151
+ id: number;
152
+ name: string;
153
+ unit: string;
154
+ };
155
+ min: number | null;
156
+ max: number | null;
157
+ }> | null;
158
+ };
159
+ activeBids: number;
160
+ bidInfo?: {
161
+ count: number;
162
+ acceptedCount: number;
163
+ activeCount: number;
164
+ expiredCount: number;
165
+ nextExpiryUTC: string | null;
166
+ prevExpiryUTC: string | null;
167
+ minPrice: {
168
+ amount: number;
169
+ currency: string;
170
+ } | null;
171
+ maxPrice: {
172
+ amount: number;
173
+ currency: string;
174
+ } | null;
175
+ soldWeight: number | null;
176
+ bids: Record<string, {
177
+ userId: string;
178
+ userFullName: string;
179
+ status: 'active' | 'accepted' | 'withdrawn' | 'expired' | 'expiredOffered' | 'expiredOfferDeclined' | 'closed';
180
+ weight: {
181
+ min: number;
182
+ max: number;
183
+ };
184
+ options: Array<{
185
+ id: number;
186
+ soldWeightKG?: number | null;
187
+ soldWeight: number | null;
188
+ pricePerUnit?: {
189
+ amount: number;
190
+ currency: string;
191
+ };
192
+ }>;
193
+ createdAtUTC: string;
194
+ updatedAtUTC: string;
195
+ }>;
196
+ };
197
+ tradeRequestId?: string;
198
+ relistedFromListingId?: string;
199
+ pending?: boolean;
200
+ notes?: Array<{
201
+ user: string;
202
+ note: string;
203
+ createdAtUTC?: string;
204
+ } | null>;
205
+ }>;
206
+ custom?: any;
207
+ totalDocs?: number;
208
+ limit?: number;
209
+ offset?: number;
210
+ clearUrl?: string;
211
+ activeFilters?: Array<{
212
+ name?: string;
213
+ clearUrl?: string;
214
+ terms?: Array<{
215
+ name?: string;
216
+ clearUrl?: string;
217
+ }>;
218
+ }>;
219
+ facets?: Array<{
220
+ displayName?: string;
221
+ clearUrl?: string;
222
+ disabled?: boolean;
223
+ name?: string;
224
+ selected?: boolean;
225
+ active?: boolean;
226
+ terms?: Array<{
227
+ name?: string;
228
+ url?: string;
229
+ hits?: string;
230
+ selected?: string;
231
+ id?: string;
232
+ state?: 'checked disabled' | 'checked' | 'disabled' | '';
233
+ aggregations?: Record<string, {
234
+ sum?: number;
235
+ min?: number;
236
+ max?: number;
237
+ average?: number;
238
+ }>;
239
+ }>;
240
+ }>;
241
+ aggregations?: Array<{
242
+ name?: string;
243
+ sum?: number;
244
+ min?: number;
245
+ max?: number;
246
+ average?: number;
247
+ count?: number;
248
+ range?: string;
249
+ hits?: number;
250
+ unit?: string;
251
+ }>;
252
+ };
@@ -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.72",
3
+ "version": "1.1.74",
4
4
  "main": "index.js",
5
5
  "exported": true,
6
6
  "types": "index.d.ts",