@deepintel-ltd/farmpro-contracts 1.15.4 → 1.15.6
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/dist/routes/agent-workflows.routes.d.ts +56 -56
- package/dist/routes/commodity-deals.routes.d.ts +561 -6
- package/dist/routes/commodity-deals.routes.d.ts.map +1 -1
- package/dist/routes/commodity-deals.routes.js +17 -1
- package/dist/routes/fertigation.routes.d.ts +160 -160
- package/dist/routes/field-activities.routes.d.ts +172 -172
- package/dist/routes/field-monitoring.routes.d.ts +50 -50
- package/dist/routes/field-observations.routes.d.ts +40 -40
- package/dist/routes/fields.routes.d.ts +461 -0
- package/dist/routes/fields.routes.d.ts.map +1 -1
- package/dist/routes/fields.routes.js +19 -1
- package/dist/routes/finance.routes.d.ts +78 -78
- package/dist/routes/harvest.routes.d.ts +72 -72
- package/dist/routes/inventory.routes.d.ts +42 -42
- package/dist/routes/live-monitor.routes.d.ts +6 -6
- package/dist/routes/measurements.routes.d.ts +6 -6
- package/dist/routes/monitoring-visualization.routes.d.ts +12 -12
- package/dist/routes/prescription-maps.routes.d.ts +28 -28
- package/dist/routes/soil-tests.routes.d.ts +80 -80
- package/dist/routes/suppliers.routes.d.ts +80 -80
- package/dist/routes/waybills.routes.d.ts +56 -56
- package/dist/routes/weather.routes.d.ts +24 -24
- package/dist/routes/yield-prediction.routes.d.ts +36 -36
- package/dist/schemas/agent-workflows.schemas.d.ts +64 -64
- package/dist/schemas/commodity-deals.schemas.d.ts +728 -13
- package/dist/schemas/commodity-deals.schemas.d.ts.map +1 -1
- package/dist/schemas/commodity-deals.schemas.js +68 -1
- package/dist/schemas/fertigation.schemas.d.ts +72 -72
- package/dist/schemas/field-activities.schemas.d.ts +148 -148
- package/dist/schemas/field-monitoring.schemas.d.ts +30 -30
- package/dist/schemas/field-observations.schemas.d.ts +34 -34
- package/dist/schemas/fields.schemas.d.ts +286 -0
- package/dist/schemas/fields.schemas.d.ts.map +1 -1
- package/dist/schemas/fields.schemas.js +26 -0
- package/dist/schemas/finance.schemas.d.ts +94 -94
- package/dist/schemas/harvest.schemas.d.ts +80 -80
- package/dist/schemas/inventory.schemas.d.ts +46 -46
- package/dist/schemas/live-monitor.schemas.d.ts +10 -10
- package/dist/schemas/measurements.schemas.d.ts +6 -6
- package/dist/schemas/monitoring-visualization.schemas.d.ts +14 -14
- package/dist/schemas/prescription-maps.schemas.d.ts +22 -22
- package/dist/schemas/recommendations.schemas.d.ts +6 -6
- package/dist/schemas/soil-tests.schemas.d.ts +84 -84
- package/dist/schemas/suppliers.schemas.d.ts +84 -84
- package/dist/schemas/waybills.schemas.d.ts +48 -48
- package/dist/schemas/weather.schemas.d.ts +68 -68
- package/dist/schemas/yield-prediction.schemas.d.ts +24 -24
- package/package.json +1 -1
|
@@ -4128,6 +4128,467 @@ export declare const fieldsRouter: {
|
|
|
4128
4128
|
}>;
|
|
4129
4129
|
};
|
|
4130
4130
|
};
|
|
4131
|
+
listSeasonTimeline: {
|
|
4132
|
+
pathParams: z.ZodObject<{
|
|
4133
|
+
farmId: z.ZodString;
|
|
4134
|
+
id: z.ZodString;
|
|
4135
|
+
}, "strip", z.ZodTypeAny, {
|
|
4136
|
+
id: string;
|
|
4137
|
+
farmId: string;
|
|
4138
|
+
}, {
|
|
4139
|
+
id: string;
|
|
4140
|
+
farmId: string;
|
|
4141
|
+
}>;
|
|
4142
|
+
query: z.ZodObject<{
|
|
4143
|
+
'page[number]': z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
4144
|
+
'page[size]': z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
4145
|
+
}, "strip", z.ZodTypeAny, {
|
|
4146
|
+
'page[number]'?: number | undefined;
|
|
4147
|
+
'page[size]'?: number | undefined;
|
|
4148
|
+
}, {
|
|
4149
|
+
'page[number]'?: number | undefined;
|
|
4150
|
+
'page[size]'?: number | undefined;
|
|
4151
|
+
}>;
|
|
4152
|
+
summary: "List field season timeline";
|
|
4153
|
+
description: "Chronological (newest first) merge of harvests, soil tests, field activities, and the current planting for a field, with JSON:API pagination";
|
|
4154
|
+
method: "GET";
|
|
4155
|
+
path: "/farms/:farmId/fields/:id/season-timeline";
|
|
4156
|
+
responses: {
|
|
4157
|
+
200: z.ZodObject<{
|
|
4158
|
+
data: z.ZodArray<z.ZodObject<{
|
|
4159
|
+
type: z.ZodLiteral<string>;
|
|
4160
|
+
id: z.ZodString;
|
|
4161
|
+
attributes: z.ZodObject<{
|
|
4162
|
+
eventKind: z.ZodEnum<["harvest", "soil-test", "field-activity", "planting"]>;
|
|
4163
|
+
occurredAt: z.ZodString;
|
|
4164
|
+
crop: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4165
|
+
quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4166
|
+
unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4167
|
+
qualityGrade: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4168
|
+
activityType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["weeding", "fertilizer"]>>>;
|
|
4169
|
+
method: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4170
|
+
productName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4171
|
+
cropLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4172
|
+
}, "strip", z.ZodTypeAny, {
|
|
4173
|
+
eventKind: "harvest" | "soil-test" | "field-activity" | "planting";
|
|
4174
|
+
occurredAt: string;
|
|
4175
|
+
method?: string | null | undefined;
|
|
4176
|
+
crop?: string | null | undefined;
|
|
4177
|
+
quantity?: number | null | undefined;
|
|
4178
|
+
unit?: string | null | undefined;
|
|
4179
|
+
qualityGrade?: string | null | undefined;
|
|
4180
|
+
activityType?: "weeding" | "fertilizer" | null | undefined;
|
|
4181
|
+
productName?: string | null | undefined;
|
|
4182
|
+
cropLabel?: string | null | undefined;
|
|
4183
|
+
}, {
|
|
4184
|
+
eventKind: "harvest" | "soil-test" | "field-activity" | "planting";
|
|
4185
|
+
occurredAt: string;
|
|
4186
|
+
method?: string | null | undefined;
|
|
4187
|
+
crop?: string | null | undefined;
|
|
4188
|
+
quantity?: number | null | undefined;
|
|
4189
|
+
unit?: string | null | undefined;
|
|
4190
|
+
qualityGrade?: string | null | undefined;
|
|
4191
|
+
activityType?: "weeding" | "fertilizer" | null | undefined;
|
|
4192
|
+
productName?: string | null | undefined;
|
|
4193
|
+
cropLabel?: string | null | undefined;
|
|
4194
|
+
}>;
|
|
4195
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4196
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4197
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4198
|
+
}, "strip", z.ZodTypeAny, {
|
|
4199
|
+
type: string;
|
|
4200
|
+
id: string;
|
|
4201
|
+
attributes: {
|
|
4202
|
+
eventKind: "harvest" | "soil-test" | "field-activity" | "planting";
|
|
4203
|
+
occurredAt: string;
|
|
4204
|
+
method?: string | null | undefined;
|
|
4205
|
+
crop?: string | null | undefined;
|
|
4206
|
+
quantity?: number | null | undefined;
|
|
4207
|
+
unit?: string | null | undefined;
|
|
4208
|
+
qualityGrade?: string | null | undefined;
|
|
4209
|
+
activityType?: "weeding" | "fertilizer" | null | undefined;
|
|
4210
|
+
productName?: string | null | undefined;
|
|
4211
|
+
cropLabel?: string | null | undefined;
|
|
4212
|
+
};
|
|
4213
|
+
relationships?: Record<string, unknown> | undefined;
|
|
4214
|
+
links?: Record<string, string> | undefined;
|
|
4215
|
+
meta?: Record<string, unknown> | undefined;
|
|
4216
|
+
}, {
|
|
4217
|
+
type: string;
|
|
4218
|
+
id: string;
|
|
4219
|
+
attributes: {
|
|
4220
|
+
eventKind: "harvest" | "soil-test" | "field-activity" | "planting";
|
|
4221
|
+
occurredAt: string;
|
|
4222
|
+
method?: string | null | undefined;
|
|
4223
|
+
crop?: string | null | undefined;
|
|
4224
|
+
quantity?: number | null | undefined;
|
|
4225
|
+
unit?: string | null | undefined;
|
|
4226
|
+
qualityGrade?: string | null | undefined;
|
|
4227
|
+
activityType?: "weeding" | "fertilizer" | null | undefined;
|
|
4228
|
+
productName?: string | null | undefined;
|
|
4229
|
+
cropLabel?: string | null | undefined;
|
|
4230
|
+
};
|
|
4231
|
+
relationships?: Record<string, unknown> | undefined;
|
|
4232
|
+
links?: Record<string, string> | undefined;
|
|
4233
|
+
meta?: Record<string, unknown> | undefined;
|
|
4234
|
+
}>, "many">;
|
|
4235
|
+
included: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4236
|
+
type: z.ZodString;
|
|
4237
|
+
id: z.ZodString;
|
|
4238
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4239
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4240
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4241
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4242
|
+
}, "strip", z.ZodTypeAny, {
|
|
4243
|
+
type: string;
|
|
4244
|
+
id: string;
|
|
4245
|
+
attributes?: Record<string, unknown> | undefined;
|
|
4246
|
+
relationships?: Record<string, unknown> | undefined;
|
|
4247
|
+
links?: Record<string, string> | undefined;
|
|
4248
|
+
meta?: Record<string, unknown> | undefined;
|
|
4249
|
+
}, {
|
|
4250
|
+
type: string;
|
|
4251
|
+
id: string;
|
|
4252
|
+
attributes?: Record<string, unknown> | undefined;
|
|
4253
|
+
relationships?: Record<string, unknown> | undefined;
|
|
4254
|
+
links?: Record<string, string> | undefined;
|
|
4255
|
+
meta?: Record<string, unknown> | undefined;
|
|
4256
|
+
}>, "many">>;
|
|
4257
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4258
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4259
|
+
}, "strip", z.ZodTypeAny, {
|
|
4260
|
+
data: {
|
|
4261
|
+
type: string;
|
|
4262
|
+
id: string;
|
|
4263
|
+
attributes: {
|
|
4264
|
+
eventKind: "harvest" | "soil-test" | "field-activity" | "planting";
|
|
4265
|
+
occurredAt: string;
|
|
4266
|
+
method?: string | null | undefined;
|
|
4267
|
+
crop?: string | null | undefined;
|
|
4268
|
+
quantity?: number | null | undefined;
|
|
4269
|
+
unit?: string | null | undefined;
|
|
4270
|
+
qualityGrade?: string | null | undefined;
|
|
4271
|
+
activityType?: "weeding" | "fertilizer" | null | undefined;
|
|
4272
|
+
productName?: string | null | undefined;
|
|
4273
|
+
cropLabel?: string | null | undefined;
|
|
4274
|
+
};
|
|
4275
|
+
relationships?: Record<string, unknown> | undefined;
|
|
4276
|
+
links?: Record<string, string> | undefined;
|
|
4277
|
+
meta?: Record<string, unknown> | undefined;
|
|
4278
|
+
}[];
|
|
4279
|
+
links?: Record<string, string> | undefined;
|
|
4280
|
+
meta?: Record<string, unknown> | undefined;
|
|
4281
|
+
included?: {
|
|
4282
|
+
type: string;
|
|
4283
|
+
id: string;
|
|
4284
|
+
attributes?: Record<string, unknown> | undefined;
|
|
4285
|
+
relationships?: Record<string, unknown> | undefined;
|
|
4286
|
+
links?: Record<string, string> | undefined;
|
|
4287
|
+
meta?: Record<string, unknown> | undefined;
|
|
4288
|
+
}[] | undefined;
|
|
4289
|
+
}, {
|
|
4290
|
+
data: {
|
|
4291
|
+
type: string;
|
|
4292
|
+
id: string;
|
|
4293
|
+
attributes: {
|
|
4294
|
+
eventKind: "harvest" | "soil-test" | "field-activity" | "planting";
|
|
4295
|
+
occurredAt: string;
|
|
4296
|
+
method?: string | null | undefined;
|
|
4297
|
+
crop?: string | null | undefined;
|
|
4298
|
+
quantity?: number | null | undefined;
|
|
4299
|
+
unit?: string | null | undefined;
|
|
4300
|
+
qualityGrade?: string | null | undefined;
|
|
4301
|
+
activityType?: "weeding" | "fertilizer" | null | undefined;
|
|
4302
|
+
productName?: string | null | undefined;
|
|
4303
|
+
cropLabel?: string | null | undefined;
|
|
4304
|
+
};
|
|
4305
|
+
relationships?: Record<string, unknown> | undefined;
|
|
4306
|
+
links?: Record<string, string> | undefined;
|
|
4307
|
+
meta?: Record<string, unknown> | undefined;
|
|
4308
|
+
}[];
|
|
4309
|
+
links?: Record<string, string> | undefined;
|
|
4310
|
+
meta?: Record<string, unknown> | undefined;
|
|
4311
|
+
included?: {
|
|
4312
|
+
type: string;
|
|
4313
|
+
id: string;
|
|
4314
|
+
attributes?: Record<string, unknown> | undefined;
|
|
4315
|
+
relationships?: Record<string, unknown> | undefined;
|
|
4316
|
+
links?: Record<string, string> | undefined;
|
|
4317
|
+
meta?: Record<string, unknown> | undefined;
|
|
4318
|
+
}[] | undefined;
|
|
4319
|
+
}>;
|
|
4320
|
+
400: z.ZodObject<{
|
|
4321
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
4322
|
+
id: z.ZodOptional<z.ZodString>;
|
|
4323
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
4324
|
+
about: z.ZodOptional<z.ZodString>;
|
|
4325
|
+
}, "strip", z.ZodTypeAny, {
|
|
4326
|
+
about?: string | undefined;
|
|
4327
|
+
}, {
|
|
4328
|
+
about?: string | undefined;
|
|
4329
|
+
}>>;
|
|
4330
|
+
status: z.ZodOptional<z.ZodString>;
|
|
4331
|
+
code: z.ZodOptional<z.ZodString>;
|
|
4332
|
+
title: z.ZodOptional<z.ZodString>;
|
|
4333
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
4334
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
4335
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
4336
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
4337
|
+
}, "strip", z.ZodTypeAny, {
|
|
4338
|
+
pointer?: string | undefined;
|
|
4339
|
+
parameter?: string | undefined;
|
|
4340
|
+
}, {
|
|
4341
|
+
pointer?: string | undefined;
|
|
4342
|
+
parameter?: string | undefined;
|
|
4343
|
+
}>>;
|
|
4344
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4345
|
+
}, "strip", z.ZodTypeAny, {
|
|
4346
|
+
status?: string | undefined;
|
|
4347
|
+
code?: string | undefined;
|
|
4348
|
+
id?: string | undefined;
|
|
4349
|
+
links?: {
|
|
4350
|
+
about?: string | undefined;
|
|
4351
|
+
} | undefined;
|
|
4352
|
+
meta?: Record<string, unknown> | undefined;
|
|
4353
|
+
title?: string | undefined;
|
|
4354
|
+
detail?: string | undefined;
|
|
4355
|
+
source?: {
|
|
4356
|
+
pointer?: string | undefined;
|
|
4357
|
+
parameter?: string | undefined;
|
|
4358
|
+
} | undefined;
|
|
4359
|
+
}, {
|
|
4360
|
+
status?: string | undefined;
|
|
4361
|
+
code?: string | undefined;
|
|
4362
|
+
id?: string | undefined;
|
|
4363
|
+
links?: {
|
|
4364
|
+
about?: string | undefined;
|
|
4365
|
+
} | undefined;
|
|
4366
|
+
meta?: Record<string, unknown> | undefined;
|
|
4367
|
+
title?: string | undefined;
|
|
4368
|
+
detail?: string | undefined;
|
|
4369
|
+
source?: {
|
|
4370
|
+
pointer?: string | undefined;
|
|
4371
|
+
parameter?: string | undefined;
|
|
4372
|
+
} | undefined;
|
|
4373
|
+
}>, "many">;
|
|
4374
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4375
|
+
}, "strip", z.ZodTypeAny, {
|
|
4376
|
+
errors: {
|
|
4377
|
+
status?: string | undefined;
|
|
4378
|
+
code?: string | undefined;
|
|
4379
|
+
id?: string | undefined;
|
|
4380
|
+
links?: {
|
|
4381
|
+
about?: string | undefined;
|
|
4382
|
+
} | undefined;
|
|
4383
|
+
meta?: Record<string, unknown> | undefined;
|
|
4384
|
+
title?: string | undefined;
|
|
4385
|
+
detail?: string | undefined;
|
|
4386
|
+
source?: {
|
|
4387
|
+
pointer?: string | undefined;
|
|
4388
|
+
parameter?: string | undefined;
|
|
4389
|
+
} | undefined;
|
|
4390
|
+
}[];
|
|
4391
|
+
meta?: Record<string, unknown> | undefined;
|
|
4392
|
+
}, {
|
|
4393
|
+
errors: {
|
|
4394
|
+
status?: string | undefined;
|
|
4395
|
+
code?: string | undefined;
|
|
4396
|
+
id?: string | undefined;
|
|
4397
|
+
links?: {
|
|
4398
|
+
about?: string | undefined;
|
|
4399
|
+
} | undefined;
|
|
4400
|
+
meta?: Record<string, unknown> | undefined;
|
|
4401
|
+
title?: string | undefined;
|
|
4402
|
+
detail?: string | undefined;
|
|
4403
|
+
source?: {
|
|
4404
|
+
pointer?: string | undefined;
|
|
4405
|
+
parameter?: string | undefined;
|
|
4406
|
+
} | undefined;
|
|
4407
|
+
}[];
|
|
4408
|
+
meta?: Record<string, unknown> | undefined;
|
|
4409
|
+
}>;
|
|
4410
|
+
404: z.ZodObject<{
|
|
4411
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
4412
|
+
id: z.ZodOptional<z.ZodString>;
|
|
4413
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
4414
|
+
about: z.ZodOptional<z.ZodString>;
|
|
4415
|
+
}, "strip", z.ZodTypeAny, {
|
|
4416
|
+
about?: string | undefined;
|
|
4417
|
+
}, {
|
|
4418
|
+
about?: string | undefined;
|
|
4419
|
+
}>>;
|
|
4420
|
+
status: z.ZodOptional<z.ZodString>;
|
|
4421
|
+
code: z.ZodOptional<z.ZodString>;
|
|
4422
|
+
title: z.ZodOptional<z.ZodString>;
|
|
4423
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
4424
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
4425
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
4426
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
4427
|
+
}, "strip", z.ZodTypeAny, {
|
|
4428
|
+
pointer?: string | undefined;
|
|
4429
|
+
parameter?: string | undefined;
|
|
4430
|
+
}, {
|
|
4431
|
+
pointer?: string | undefined;
|
|
4432
|
+
parameter?: string | undefined;
|
|
4433
|
+
}>>;
|
|
4434
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4435
|
+
}, "strip", z.ZodTypeAny, {
|
|
4436
|
+
status?: string | undefined;
|
|
4437
|
+
code?: string | undefined;
|
|
4438
|
+
id?: string | undefined;
|
|
4439
|
+
links?: {
|
|
4440
|
+
about?: string | undefined;
|
|
4441
|
+
} | undefined;
|
|
4442
|
+
meta?: Record<string, unknown> | undefined;
|
|
4443
|
+
title?: string | undefined;
|
|
4444
|
+
detail?: string | undefined;
|
|
4445
|
+
source?: {
|
|
4446
|
+
pointer?: string | undefined;
|
|
4447
|
+
parameter?: string | undefined;
|
|
4448
|
+
} | undefined;
|
|
4449
|
+
}, {
|
|
4450
|
+
status?: string | undefined;
|
|
4451
|
+
code?: string | undefined;
|
|
4452
|
+
id?: string | undefined;
|
|
4453
|
+
links?: {
|
|
4454
|
+
about?: string | undefined;
|
|
4455
|
+
} | undefined;
|
|
4456
|
+
meta?: Record<string, unknown> | undefined;
|
|
4457
|
+
title?: string | undefined;
|
|
4458
|
+
detail?: string | undefined;
|
|
4459
|
+
source?: {
|
|
4460
|
+
pointer?: string | undefined;
|
|
4461
|
+
parameter?: string | undefined;
|
|
4462
|
+
} | undefined;
|
|
4463
|
+
}>, "many">;
|
|
4464
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4465
|
+
}, "strip", z.ZodTypeAny, {
|
|
4466
|
+
errors: {
|
|
4467
|
+
status?: string | undefined;
|
|
4468
|
+
code?: string | undefined;
|
|
4469
|
+
id?: string | undefined;
|
|
4470
|
+
links?: {
|
|
4471
|
+
about?: string | undefined;
|
|
4472
|
+
} | undefined;
|
|
4473
|
+
meta?: Record<string, unknown> | undefined;
|
|
4474
|
+
title?: string | undefined;
|
|
4475
|
+
detail?: string | undefined;
|
|
4476
|
+
source?: {
|
|
4477
|
+
pointer?: string | undefined;
|
|
4478
|
+
parameter?: string | undefined;
|
|
4479
|
+
} | undefined;
|
|
4480
|
+
}[];
|
|
4481
|
+
meta?: Record<string, unknown> | undefined;
|
|
4482
|
+
}, {
|
|
4483
|
+
errors: {
|
|
4484
|
+
status?: string | undefined;
|
|
4485
|
+
code?: string | undefined;
|
|
4486
|
+
id?: string | undefined;
|
|
4487
|
+
links?: {
|
|
4488
|
+
about?: string | undefined;
|
|
4489
|
+
} | undefined;
|
|
4490
|
+
meta?: Record<string, unknown> | undefined;
|
|
4491
|
+
title?: string | undefined;
|
|
4492
|
+
detail?: string | undefined;
|
|
4493
|
+
source?: {
|
|
4494
|
+
pointer?: string | undefined;
|
|
4495
|
+
parameter?: string | undefined;
|
|
4496
|
+
} | undefined;
|
|
4497
|
+
}[];
|
|
4498
|
+
meta?: Record<string, unknown> | undefined;
|
|
4499
|
+
}>;
|
|
4500
|
+
401: z.ZodObject<{
|
|
4501
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
4502
|
+
id: z.ZodOptional<z.ZodString>;
|
|
4503
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
4504
|
+
about: z.ZodOptional<z.ZodString>;
|
|
4505
|
+
}, "strip", z.ZodTypeAny, {
|
|
4506
|
+
about?: string | undefined;
|
|
4507
|
+
}, {
|
|
4508
|
+
about?: string | undefined;
|
|
4509
|
+
}>>;
|
|
4510
|
+
status: z.ZodOptional<z.ZodString>;
|
|
4511
|
+
code: z.ZodOptional<z.ZodString>;
|
|
4512
|
+
title: z.ZodOptional<z.ZodString>;
|
|
4513
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
4514
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
4515
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
4516
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
4517
|
+
}, "strip", z.ZodTypeAny, {
|
|
4518
|
+
pointer?: string | undefined;
|
|
4519
|
+
parameter?: string | undefined;
|
|
4520
|
+
}, {
|
|
4521
|
+
pointer?: string | undefined;
|
|
4522
|
+
parameter?: string | undefined;
|
|
4523
|
+
}>>;
|
|
4524
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4525
|
+
}, "strip", z.ZodTypeAny, {
|
|
4526
|
+
status?: string | undefined;
|
|
4527
|
+
code?: string | undefined;
|
|
4528
|
+
id?: string | undefined;
|
|
4529
|
+
links?: {
|
|
4530
|
+
about?: string | undefined;
|
|
4531
|
+
} | undefined;
|
|
4532
|
+
meta?: Record<string, unknown> | undefined;
|
|
4533
|
+
title?: string | undefined;
|
|
4534
|
+
detail?: string | undefined;
|
|
4535
|
+
source?: {
|
|
4536
|
+
pointer?: string | undefined;
|
|
4537
|
+
parameter?: string | undefined;
|
|
4538
|
+
} | undefined;
|
|
4539
|
+
}, {
|
|
4540
|
+
status?: string | undefined;
|
|
4541
|
+
code?: string | undefined;
|
|
4542
|
+
id?: string | undefined;
|
|
4543
|
+
links?: {
|
|
4544
|
+
about?: string | undefined;
|
|
4545
|
+
} | undefined;
|
|
4546
|
+
meta?: Record<string, unknown> | undefined;
|
|
4547
|
+
title?: string | undefined;
|
|
4548
|
+
detail?: string | undefined;
|
|
4549
|
+
source?: {
|
|
4550
|
+
pointer?: string | undefined;
|
|
4551
|
+
parameter?: string | undefined;
|
|
4552
|
+
} | undefined;
|
|
4553
|
+
}>, "many">;
|
|
4554
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4555
|
+
}, "strip", z.ZodTypeAny, {
|
|
4556
|
+
errors: {
|
|
4557
|
+
status?: string | undefined;
|
|
4558
|
+
code?: string | undefined;
|
|
4559
|
+
id?: string | undefined;
|
|
4560
|
+
links?: {
|
|
4561
|
+
about?: string | undefined;
|
|
4562
|
+
} | undefined;
|
|
4563
|
+
meta?: Record<string, unknown> | undefined;
|
|
4564
|
+
title?: string | undefined;
|
|
4565
|
+
detail?: string | undefined;
|
|
4566
|
+
source?: {
|
|
4567
|
+
pointer?: string | undefined;
|
|
4568
|
+
parameter?: string | undefined;
|
|
4569
|
+
} | undefined;
|
|
4570
|
+
}[];
|
|
4571
|
+
meta?: Record<string, unknown> | undefined;
|
|
4572
|
+
}, {
|
|
4573
|
+
errors: {
|
|
4574
|
+
status?: string | undefined;
|
|
4575
|
+
code?: string | undefined;
|
|
4576
|
+
id?: string | undefined;
|
|
4577
|
+
links?: {
|
|
4578
|
+
about?: string | undefined;
|
|
4579
|
+
} | undefined;
|
|
4580
|
+
meta?: Record<string, unknown> | undefined;
|
|
4581
|
+
title?: string | undefined;
|
|
4582
|
+
detail?: string | undefined;
|
|
4583
|
+
source?: {
|
|
4584
|
+
pointer?: string | undefined;
|
|
4585
|
+
parameter?: string | undefined;
|
|
4586
|
+
} | undefined;
|
|
4587
|
+
}[];
|
|
4588
|
+
meta?: Record<string, unknown> | undefined;
|
|
4589
|
+
}>;
|
|
4590
|
+
};
|
|
4591
|
+
};
|
|
4131
4592
|
deleteField: {
|
|
4132
4593
|
pathParams: z.ZodObject<{
|
|
4133
4594
|
farmId: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.routes.d.ts","sourceRoot":"","sources":["../../src/routes/fields.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"fields.routes.d.ts","sourceRoot":"","sources":["../../src/routes/fields.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoIvB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { initContract } from '@ts-rest/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { createFieldSchema, updateFieldSchema, recordPlantingSchema, fieldResponseSchema, fieldDetailResponseSchema, fieldListResponseSchema, } from '../schemas/fields.schemas';
|
|
3
|
+
import { createFieldSchema, updateFieldSchema, recordPlantingSchema, fieldResponseSchema, fieldDetailResponseSchema, fieldListResponseSchema, seasonTimelineListResponseSchema, } from '../schemas/fields.schemas';
|
|
4
4
|
import { jsonApiErrorResponseSchema, jsonApiSuccessResponseSchema, jsonApiPaginationQuerySchema, jsonApiSortQuerySchema, jsonApiIncludeQuerySchema, jsonApiFilterQuerySchema } from '../schemas/common.schemas';
|
|
5
5
|
const c = initContract();
|
|
6
6
|
export const fieldsRouter = c.router({
|
|
@@ -93,6 +93,24 @@ export const fieldsRouter = c.router({
|
|
|
93
93
|
summary: 'Record planting',
|
|
94
94
|
description: 'Record a new planting on a field, archiving the prior season into cropHistory when present',
|
|
95
95
|
},
|
|
96
|
+
// Merged season timeline (harvests, soil tests, field activities, planting)
|
|
97
|
+
listSeasonTimeline: {
|
|
98
|
+
method: 'GET',
|
|
99
|
+
path: '/farms/:farmId/fields/:id/season-timeline',
|
|
100
|
+
pathParams: z.object({
|
|
101
|
+
farmId: z.string().uuid(),
|
|
102
|
+
id: z.string().uuid(),
|
|
103
|
+
}),
|
|
104
|
+
query: jsonApiPaginationQuerySchema,
|
|
105
|
+
responses: {
|
|
106
|
+
200: seasonTimelineListResponseSchema,
|
|
107
|
+
400: jsonApiErrorResponseSchema,
|
|
108
|
+
404: jsonApiErrorResponseSchema,
|
|
109
|
+
401: jsonApiErrorResponseSchema,
|
|
110
|
+
},
|
|
111
|
+
summary: 'List field season timeline',
|
|
112
|
+
description: 'Chronological (newest first) merge of harvests, soil tests, field activities, and the current planting for a field, with JSON:API pagination',
|
|
113
|
+
},
|
|
96
114
|
// Delete field
|
|
97
115
|
deleteField: {
|
|
98
116
|
method: 'DELETE',
|