@hectare/platform.clients.trading 1.1.72 → 1.1.73

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
@@ -61,6 +61,7 @@ export type { PublishExFarmPricingSchema } from './models/PublishExFarmPricingSc
61
61
  export type { PutContractFile } from './models/PutContractFile.js';
62
62
  export type { RecentListingCommodities } from './models/RecentListingCommodities.js';
63
63
  export type { RecentListingCommodity } from './models/RecentListingCommodity.js';
64
+ export type { SearchResultsListingSchema } from './models/SearchResultsListingSchema.js';
64
65
  export type { TargetPriceDetailSchema } from './models/TargetPriceDetailSchema.js';
65
66
  export type { Templates } from './models/Templates.js';
66
67
  export type { TradeRequestDetail } from './models/TradeRequestDetail.js';
@@ -0,0 +1,247 @@
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
+ }>;
201
+ custom?: any;
202
+ totalDocs?: number;
203
+ limit?: number;
204
+ offset?: number;
205
+ clearUrl?: string;
206
+ activeFilters?: Array<{
207
+ name?: string;
208
+ clearUrl?: string;
209
+ terms?: Array<{
210
+ name?: string;
211
+ clearUrl?: string;
212
+ }>;
213
+ }>;
214
+ facets?: Array<{
215
+ displayName?: string;
216
+ clearUrl?: string;
217
+ disabled?: boolean;
218
+ name?: string;
219
+ selected?: boolean;
220
+ active?: boolean;
221
+ terms?: Array<{
222
+ name?: string;
223
+ url?: string;
224
+ hits?: string;
225
+ selected?: string;
226
+ id?: string;
227
+ state?: 'checked disabled' | 'checked' | 'disabled' | '';
228
+ aggregations?: Record<string, {
229
+ sum?: number;
230
+ min?: number;
231
+ max?: number;
232
+ average?: number;
233
+ }>;
234
+ }>;
235
+ }>;
236
+ aggregations?: Array<{
237
+ name?: string;
238
+ sum?: number;
239
+ min?: number;
240
+ max?: number;
241
+ average?: number;
242
+ count?: number;
243
+ range?: string;
244
+ hits?: number;
245
+ unit?: string;
246
+ }>;
247
+ };
@@ -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.73",
4
4
  "main": "index.js",
5
5
  "exported": true,
6
6
  "types": "index.d.ts",