@hectare/platform.clients.trading 1.1.276 → 1.1.277

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
@@ -17,6 +17,7 @@ export type { CreateInventorySchema } from './models/CreateInventorySchema.js';
17
17
  export type { CreateListing } from './models/CreateListing.js';
18
18
  export type { CreateMarketingPlanSchema } from './models/CreateMarketingPlanSchema.js';
19
19
  export type { CreateWantedAd } from './models/CreateWantedAd.js';
20
+ export type { CropContractSearchSchema } from './models/CropContractSearchSchema.js';
20
21
  export type { DeleteMarketingPlanSchema } from './models/DeleteMarketingPlanSchema.js';
21
22
  export type { ExFarmPriceCommodity } from './models/ExFarmPriceCommodity.js';
22
23
  export type { ExFarmPricesRegionSchema } from './models/ExFarmPricesRegionSchema.js';
@@ -4,10 +4,10 @@ export type ContractDetail = {
4
4
  details: {
5
5
  bidId: string | null;
6
6
  bidOptionId: number | null;
7
- userId: string;
8
7
  listingId: string | null;
9
8
  inventoryId: string;
10
9
  reference: string | null;
10
+ cropHome: string | null;
11
11
  totalWeight: {
12
12
  name: string;
13
13
  conversion: number;
@@ -46,6 +46,7 @@ export type ContractDetail = {
46
46
  } | null;
47
47
  };
48
48
  paymentDays: number;
49
+ paymentDayType?: 'fixed' | 'dayOfMonth' | null;
49
50
  haulageType: 'ex-farm' | 'delivered' | 'both' | null;
50
51
  contractDateUTC: string;
51
52
  movement: {
@@ -119,47 +120,141 @@ export type ContractDetail = {
119
120
  buyer: {
120
121
  organisationId: string;
121
122
  businessId: string;
122
- userId?: string;
123
+ userId: string | null;
123
124
  organisationName: string;
124
125
  businessName: string | null;
125
- userName?: string | null;
126
+ userName: string | null;
127
+ email: string | null;
128
+ phone: {
129
+ callingCode: string;
130
+ number: string;
131
+ } | null;
132
+ businessLocation: {
133
+ what3words: string | null;
134
+ address: {
135
+ name?: string | null;
136
+ line1: string;
137
+ line2?: string | null;
138
+ line3?: string | null;
139
+ city?: string | null;
140
+ region?: string | null;
141
+ regionISO?: string | null;
142
+ postcode: string;
143
+ countryName?: string | null;
144
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
145
+ };
146
+ coordinates: {
147
+ lat: number;
148
+ lon: number;
149
+ } | null;
150
+ } | null;
151
+ deliveryLocation: {
152
+ what3words: string | null;
153
+ address: {
154
+ name?: string | null;
155
+ line1: string;
156
+ line2?: string | null;
157
+ line3?: string | null;
158
+ city?: string | null;
159
+ region?: string | null;
160
+ regionISO?: string | null;
161
+ postcode: string;
162
+ countryName?: string | null;
163
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
164
+ };
165
+ coordinates: {
166
+ lat: number;
167
+ lon: number;
168
+ } | null;
169
+ } | null;
170
+ companyNumber: string | null;
171
+ vatNumber: string | null;
172
+ bio: string | null;
126
173
  };
127
174
  seller: {
128
175
  organisationId: string;
129
176
  businessId: string;
130
- userId?: string;
177
+ userId: string | null;
131
178
  organisationName: string;
132
179
  businessName: string | null;
133
- userName?: string | null;
180
+ userName: string | null;
181
+ email: string | null;
182
+ phone: {
183
+ callingCode: string;
184
+ number: string;
185
+ } | null;
186
+ businessLocation: {
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
+ collectionLocation: {
206
+ id: number | null;
207
+ reference: string | null;
208
+ location: {
209
+ what3words: string | null;
210
+ address: {
211
+ name?: string | null;
212
+ line1: string;
213
+ line2?: string | null;
214
+ line3?: string | null;
215
+ city?: string | null;
216
+ region?: string | null;
217
+ regionISO?: string | null;
218
+ postcode: string;
219
+ countryName?: string | null;
220
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
221
+ };
222
+ coordinates: {
223
+ lat: number;
224
+ lon: number;
225
+ } | null;
226
+ } | null;
227
+ email?: string | null;
228
+ givenName: string | null;
229
+ familyName: string | null;
230
+ phone: {
231
+ callingCode: string;
232
+ number: string;
233
+ };
234
+ type: 'collection' | 'business' | 'delivery';
235
+ };
236
+ assurance: {
237
+ id: string | null;
238
+ key?: string | null;
239
+ body: 'RT' | 'SQC';
240
+ name?: string | null;
241
+ location?: string | null;
242
+ } | null;
134
243
  };
135
- buyerNotes?: string;
136
- sellerNotes?: string;
137
- regionISO: string;
244
+ notes?: {
245
+ listingBuyer: string | null;
246
+ bidSeller: string | null;
247
+ acceptedBidBuyer: string | null;
248
+ } | null;
138
249
  saleType: 'on-platform' | 'off-platform';
139
250
  movements: Array<{
140
251
  id: number;
141
252
  weight: number;
142
- paymentDueDate: string | null;
143
- status: 'pending' | 'delivered' | 'cancelled';
144
- pod: {
145
- deliveredOnUTC: string | null;
146
- vehicleRegistration: string | null;
147
- ticketNumber: string | null;
148
- uploadedBy: {
149
- id: string | null;
150
- name: string | null;
151
- };
152
- files: Array<{
153
- name?: string;
154
- id: string;
155
- url?: string | null;
156
- userId?: string | null;
157
- userName?: string | null;
158
- organisationId?: string | null;
159
- createdAtUTC?: string | null;
160
- } | null>;
161
- weightNet: number | null;
162
- } | null;
253
+ weightNet: number | null;
254
+ status: 'pending' | 'complete' | 'cancelled';
255
+ paymentDueUTC: string | null;
256
+ deliveredOnUTC: string | null;
257
+ paymentReceivedUTC: string | null;
163
258
  }>;
164
259
  payments: Array<{
165
260
  id: number;
@@ -1,25 +1,9 @@
1
1
  export type ContractMovementDetail = {
2
2
  id: number;
3
3
  weight: number;
4
- paymentDueDate: string | null;
5
- status: 'pending' | 'delivered' | 'cancelled';
6
- pod: {
7
- deliveredOnUTC: string | null;
8
- vehicleRegistration: string | null;
9
- ticketNumber: string | null;
10
- uploadedBy: {
11
- id: string | null;
12
- name: string | null;
13
- };
14
- files: Array<{
15
- name?: string;
16
- id: string;
17
- url?: string | null;
18
- userId?: string | null;
19
- userName?: string | null;
20
- organisationId?: string | null;
21
- createdAtUTC?: string | null;
22
- } | null>;
23
- weightNet: number | null;
24
- } | null;
4
+ weightNet: number | null;
5
+ status: 'pending' | 'complete' | 'cancelled';
6
+ paymentDueUTC: string | null;
7
+ deliveredOnUTC: string | null;
8
+ paymentReceivedUTC: string | null;
25
9
  };
@@ -6,6 +6,7 @@ export type CreateContractSchema = {
6
6
  contractType?: 'base' | 'fixed' | 'premium-only' | 'unpriced' | 'premium' | 'base-plus-oil-bonus' | null;
7
7
  compositionType?: 'individual' | 'multiple' | 'other';
8
8
  paymentDays?: number;
9
+ paymentDayType?: 'fixed' | 'dayOfMonth' | null;
9
10
  haulageType?: 'ex-farm' | 'delivered' | null;
10
11
  contractDateUTC?: string | null;
11
12
  movement?: {
@@ -0,0 +1,33 @@
1
+ export type CropContractSearchSchema = {
2
+ docs?: Array<{
3
+ id: string;
4
+ reference?: string | null;
5
+ contractDateUTC: string;
6
+ saleType: 'on-platform' | 'off-platform';
7
+ buyer: {
8
+ organisationName: string;
9
+ };
10
+ variety?: string | null;
11
+ haulageType?: 'ex-farm' | 'delivered' | 'both' | null;
12
+ movement?: string | null;
13
+ collection?: string | null;
14
+ movements: {
15
+ paid: number;
16
+ pending: number;
17
+ moved: number;
18
+ };
19
+ totalPrice?: {
20
+ amount: number | null;
21
+ currency: string;
22
+ } | null;
23
+ pricePerUnit?: {
24
+ amount: number | null;
25
+ currency: string;
26
+ } | null;
27
+ soldWeight?: number;
28
+ paymentDays?: number | null;
29
+ }>;
30
+ totalDocs?: number;
31
+ limit?: number;
32
+ offset?: number;
33
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,6 @@
1
1
  export type PatchContractMovementSchema = {
2
- status?: 'pending' | 'delivered' | 'cancelled';
2
+ status?: 'pending' | 'complete' | 'cancelled';
3
3
  weight?: number;
4
+ isMoved?: boolean;
5
+ isPaid?: boolean;
4
6
  };
@@ -5,6 +5,7 @@ export type PatchContractSchema = {
5
5
  contractType?: 'base' | 'fixed' | 'premium-only' | 'unpriced' | 'premium' | 'base-plus-oil-bonus' | null;
6
6
  compositionType?: 'individual' | 'multiple' | 'other';
7
7
  paymentDays?: number;
8
+ paymentDayType?: 'fixed' | 'dayOfMonth' | null;
8
9
  haulageType?: 'ex-farm' | 'delivered' | null;
9
10
  contractDateUTC?: string | null;
10
11
  movement?: {
@@ -5,10 +5,10 @@ export type SearchResultsContractSchema = {
5
5
  details: {
6
6
  bidId: string | null;
7
7
  bidOptionId: number | null;
8
- userId: string;
9
8
  listingId: string | null;
10
9
  inventoryId: string;
11
10
  reference: string | null;
11
+ cropHome: string | null;
12
12
  totalWeight: {
13
13
  name: string;
14
14
  conversion: number;
@@ -47,6 +47,7 @@ export type SearchResultsContractSchema = {
47
47
  } | null;
48
48
  };
49
49
  paymentDays: number;
50
+ paymentDayType?: 'fixed' | 'dayOfMonth' | null;
50
51
  haulageType: 'ex-farm' | 'delivered' | 'both' | null;
51
52
  contractDateUTC: string;
52
53
  movement: {
@@ -120,47 +121,141 @@ export type SearchResultsContractSchema = {
120
121
  buyer: {
121
122
  organisationId: string;
122
123
  businessId: string;
123
- userId?: string;
124
+ userId: string | null;
124
125
  organisationName: string;
125
126
  businessName: string | null;
126
- userName?: string | null;
127
+ userName: string | null;
128
+ email: string | null;
129
+ phone: {
130
+ callingCode: string;
131
+ number: string;
132
+ } | null;
133
+ businessLocation: {
134
+ what3words: string | null;
135
+ address: {
136
+ name?: string | null;
137
+ line1: string;
138
+ line2?: string | null;
139
+ line3?: string | null;
140
+ city?: string | null;
141
+ region?: string | null;
142
+ regionISO?: string | null;
143
+ postcode: string;
144
+ countryName?: string | null;
145
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
146
+ };
147
+ coordinates: {
148
+ lat: number;
149
+ lon: number;
150
+ } | null;
151
+ } | null;
152
+ deliveryLocation: {
153
+ what3words: string | null;
154
+ address: {
155
+ name?: string | null;
156
+ line1: string;
157
+ line2?: string | null;
158
+ line3?: string | null;
159
+ city?: string | null;
160
+ region?: string | null;
161
+ regionISO?: string | null;
162
+ postcode: string;
163
+ countryName?: string | null;
164
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
165
+ };
166
+ coordinates: {
167
+ lat: number;
168
+ lon: number;
169
+ } | null;
170
+ } | null;
171
+ companyNumber: string | null;
172
+ vatNumber: string | null;
173
+ bio: string | null;
127
174
  };
128
175
  seller: {
129
176
  organisationId: string;
130
177
  businessId: string;
131
- userId?: string;
178
+ userId: string | null;
132
179
  organisationName: string;
133
180
  businessName: string | null;
134
- userName?: string | null;
181
+ userName: string | null;
182
+ email: string | null;
183
+ phone: {
184
+ callingCode: string;
185
+ number: string;
186
+ } | null;
187
+ businessLocation: {
188
+ what3words: string | null;
189
+ address: {
190
+ name?: string | null;
191
+ line1: string;
192
+ line2?: string | null;
193
+ line3?: string | null;
194
+ city?: string | null;
195
+ region?: string | null;
196
+ regionISO?: string | null;
197
+ postcode: string;
198
+ countryName?: string | null;
199
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
200
+ };
201
+ coordinates: {
202
+ lat: number;
203
+ lon: number;
204
+ } | null;
205
+ } | null;
206
+ collectionLocation: {
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
+ };
237
+ assurance: {
238
+ id: string | null;
239
+ key?: string | null;
240
+ body: 'RT' | 'SQC';
241
+ name?: string | null;
242
+ location?: string | null;
243
+ } | null;
135
244
  };
136
- buyerNotes?: string;
137
- sellerNotes?: string;
138
- regionISO: string;
245
+ notes?: {
246
+ listingBuyer: string | null;
247
+ bidSeller: string | null;
248
+ acceptedBidBuyer: string | null;
249
+ } | null;
139
250
  saleType: 'on-platform' | 'off-platform';
140
251
  movements: Array<{
141
252
  id: number;
142
253
  weight: number;
143
- paymentDueDate: string | null;
144
- status: 'pending' | 'delivered' | 'cancelled';
145
- pod: {
146
- deliveredOnUTC: string | null;
147
- vehicleRegistration: string | null;
148
- ticketNumber: string | null;
149
- uploadedBy: {
150
- id: string | null;
151
- name: string | null;
152
- };
153
- files: Array<{
154
- name?: string;
155
- id: string;
156
- url?: string | null;
157
- userId?: string | null;
158
- userName?: string | null;
159
- organisationId?: string | null;
160
- createdAtUTC?: string | null;
161
- } | null>;
162
- weightNet: number | null;
163
- } | null;
254
+ weightNet: number | null;
255
+ status: 'pending' | 'complete' | 'cancelled';
256
+ paymentDueUTC: string | null;
257
+ deliveredOnUTC: string | null;
258
+ paymentReceivedUTC: string | null;
164
259
  }>;
165
260
  payments: Array<{
166
261
  id: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hectare/platform.clients.trading",
3
- "version": "1.1.276",
3
+ "version": "1.1.277",
4
4
  "main": "index.js",
5
5
  "exported": true,
6
6
  "types": "index.d.ts",