@deepintel-ltd/farmpro-contracts 1.7.13 → 1.7.19

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.
Files changed (78) hide show
  1. package/dist/index.d.ts +3 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -0
  4. package/dist/routes/agent-workflows.routes.d.ts +88 -88
  5. package/dist/routes/agents.routes.d.ts +3260 -0
  6. package/dist/routes/agents.routes.d.ts.map +1 -1
  7. package/dist/routes/agents.routes.js +130 -1
  8. package/dist/routes/analytics.routes.d.ts +20 -20
  9. package/dist/routes/documents.routes.d.ts +855 -58
  10. package/dist/routes/documents.routes.d.ts.map +1 -1
  11. package/dist/routes/documents.routes.js +43 -1
  12. package/dist/routes/equipment.routes.d.ts +38 -38
  13. package/dist/routes/farm-status.routes.d.ts +315 -0
  14. package/dist/routes/farm-status.routes.d.ts.map +1 -0
  15. package/dist/routes/farm-status.routes.js +26 -0
  16. package/dist/routes/fertigation.routes.d.ts +148 -148
  17. package/dist/routes/field-monitoring.routes.d.ts +52 -52
  18. package/dist/routes/field-observations.routes.d.ts +56 -56
  19. package/dist/routes/finance.routes.d.ts +3493 -0
  20. package/dist/routes/finance.routes.d.ts.map +1 -1
  21. package/dist/routes/finance.routes.js +158 -1
  22. package/dist/routes/geofences.routes.d.ts.map +1 -1
  23. package/dist/routes/index.d.ts +3 -0
  24. package/dist/routes/index.d.ts.map +1 -1
  25. package/dist/routes/index.js +2 -0
  26. package/dist/routes/irrigation.routes.d.ts +6 -6
  27. package/dist/routes/measurements.routes.d.ts +13 -4
  28. package/dist/routes/measurements.routes.d.ts.map +1 -1
  29. package/dist/routes/monitoring-visualization.routes.d.ts +43 -36
  30. package/dist/routes/monitoring-visualization.routes.d.ts.map +1 -1
  31. package/dist/routes/monitoring-visualization.routes.js +7 -4
  32. package/dist/routes/pest-disease-risk.routes.d.ts +20 -20
  33. package/dist/routes/prescription-maps.routes.d.ts +570 -23
  34. package/dist/routes/prescription-maps.routes.d.ts.map +1 -1
  35. package/dist/routes/prescription-maps.routes.js +18 -1
  36. package/dist/routes/soil-tests.routes.d.ts +30 -30
  37. package/dist/routes/subscriptions.routes.d.ts +14 -14
  38. package/dist/routes/weather.routes.d.ts +545 -52
  39. package/dist/routes/weather.routes.d.ts.map +1 -1
  40. package/dist/routes/weather.routes.js +13 -1
  41. package/dist/routes/yield-prediction.routes.d.ts +30 -30
  42. package/dist/schemas/agent-workflows.schemas.d.ts +92 -92
  43. package/dist/schemas/agents.schemas.d.ts +1120 -0
  44. package/dist/schemas/agents.schemas.d.ts.map +1 -1
  45. package/dist/schemas/agents.schemas.js +181 -0
  46. package/dist/schemas/analytics.schemas.d.ts +56 -56
  47. package/dist/schemas/documents.schemas.d.ts +248 -48
  48. package/dist/schemas/documents.schemas.d.ts.map +1 -1
  49. package/dist/schemas/documents.schemas.js +38 -0
  50. package/dist/schemas/equipment.schemas.d.ts +30 -30
  51. package/dist/schemas/farm-status.schemas.d.ts +451 -0
  52. package/dist/schemas/farm-status.schemas.d.ts.map +1 -0
  53. package/dist/schemas/farm-status.schemas.js +44 -0
  54. package/dist/schemas/fertigation.schemas.d.ts +50 -50
  55. package/dist/schemas/field-monitoring.schemas.d.ts +42 -42
  56. package/dist/schemas/field-observations.schemas.d.ts +44 -44
  57. package/dist/schemas/finance.schemas.d.ts +1057 -0
  58. package/dist/schemas/finance.schemas.d.ts.map +1 -1
  59. package/dist/schemas/finance.schemas.js +170 -0
  60. package/dist/schemas/irrigation.schemas.d.ts +8 -8
  61. package/dist/schemas/measurements.schemas.d.ts +21 -8
  62. package/dist/schemas/measurements.schemas.d.ts.map +1 -1
  63. package/dist/schemas/measurements.schemas.js +13 -6
  64. package/dist/schemas/monitoring-visualization.schemas.d.ts +50 -43
  65. package/dist/schemas/monitoring-visualization.schemas.d.ts.map +1 -1
  66. package/dist/schemas/monitoring-visualization.schemas.js +27 -17
  67. package/dist/schemas/pest-disease-risk.schemas.d.ts +18 -18
  68. package/dist/schemas/prescription-maps.schemas.d.ts +45 -22
  69. package/dist/schemas/prescription-maps.schemas.d.ts.map +1 -1
  70. package/dist/schemas/prescription-maps.schemas.js +9 -1
  71. package/dist/schemas/recommendations.schemas.d.ts +2 -2
  72. package/dist/schemas/soil-tests.schemas.d.ts +28 -28
  73. package/dist/schemas/subscriptions.schemas.d.ts +22 -22
  74. package/dist/schemas/weather.schemas.d.ts +789 -112
  75. package/dist/schemas/weather.schemas.d.ts.map +1 -1
  76. package/dist/schemas/weather.schemas.js +37 -0
  77. package/dist/schemas/yield-prediction.schemas.d.ts +12 -12
  78. package/package.json +1 -1
@@ -6956,5 +6956,3498 @@ export declare const financeRouter: {
6956
6956
  }>;
6957
6957
  };
6958
6958
  };
6959
+ importBulkFinance: {
6960
+ pathParams: z.ZodObject<{
6961
+ farmId: z.ZodString;
6962
+ }, "strip", z.ZodTypeAny, {
6963
+ farmId: string;
6964
+ }, {
6965
+ farmId: string;
6966
+ }>;
6967
+ summary: "Bulk import finance records";
6968
+ description: "Import expenses or revenue records from an Excel file.";
6969
+ method: "POST";
6970
+ contentType: "multipart/form-data";
6971
+ body: z.ZodObject<{
6972
+ type: z.ZodEnum<["expenses", "revenues"]>;
6973
+ file: z.ZodUnknown;
6974
+ }, "strip", z.ZodTypeAny, {
6975
+ type: "expenses" | "revenues";
6976
+ file?: unknown;
6977
+ }, {
6978
+ type: "expenses" | "revenues";
6979
+ file?: unknown;
6980
+ }>;
6981
+ path: "/farms/:farmId/finance/import";
6982
+ responses: {
6983
+ 200: z.ZodObject<{
6984
+ data: z.ZodObject<{
6985
+ type: z.ZodLiteral<"import-results">;
6986
+ attributes: z.ZodObject<{
6987
+ totalProcessed: z.ZodNumber;
6988
+ successfullyImported: z.ZodNumber;
6989
+ failedEntries: z.ZodArray<z.ZodUnknown, "many">;
6990
+ }, "strip", z.ZodTypeAny, {
6991
+ totalProcessed: number;
6992
+ successfullyImported: number;
6993
+ failedEntries: unknown[];
6994
+ }, {
6995
+ totalProcessed: number;
6996
+ successfullyImported: number;
6997
+ failedEntries: unknown[];
6998
+ }>;
6999
+ }, "strip", z.ZodTypeAny, {
7000
+ type: "import-results";
7001
+ attributes: {
7002
+ totalProcessed: number;
7003
+ successfullyImported: number;
7004
+ failedEntries: unknown[];
7005
+ };
7006
+ }, {
7007
+ type: "import-results";
7008
+ attributes: {
7009
+ totalProcessed: number;
7010
+ successfullyImported: number;
7011
+ failedEntries: unknown[];
7012
+ };
7013
+ }>;
7014
+ }, "strip", z.ZodTypeAny, {
7015
+ data: {
7016
+ type: "import-results";
7017
+ attributes: {
7018
+ totalProcessed: number;
7019
+ successfullyImported: number;
7020
+ failedEntries: unknown[];
7021
+ };
7022
+ };
7023
+ }, {
7024
+ data: {
7025
+ type: "import-results";
7026
+ attributes: {
7027
+ totalProcessed: number;
7028
+ successfullyImported: number;
7029
+ failedEntries: unknown[];
7030
+ };
7031
+ };
7032
+ }>;
7033
+ 400: z.ZodObject<{
7034
+ errors: z.ZodArray<z.ZodObject<{
7035
+ id: z.ZodOptional<z.ZodString>;
7036
+ links: z.ZodOptional<z.ZodObject<{
7037
+ about: z.ZodOptional<z.ZodString>;
7038
+ }, "strip", z.ZodTypeAny, {
7039
+ about?: string | undefined;
7040
+ }, {
7041
+ about?: string | undefined;
7042
+ }>>;
7043
+ status: z.ZodOptional<z.ZodString>;
7044
+ code: z.ZodOptional<z.ZodString>;
7045
+ title: z.ZodOptional<z.ZodString>;
7046
+ detail: z.ZodOptional<z.ZodString>;
7047
+ source: z.ZodOptional<z.ZodObject<{
7048
+ pointer: z.ZodOptional<z.ZodString>;
7049
+ parameter: z.ZodOptional<z.ZodString>;
7050
+ }, "strip", z.ZodTypeAny, {
7051
+ pointer?: string | undefined;
7052
+ parameter?: string | undefined;
7053
+ }, {
7054
+ pointer?: string | undefined;
7055
+ parameter?: string | undefined;
7056
+ }>>;
7057
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7058
+ }, "strip", z.ZodTypeAny, {
7059
+ status?: string | undefined;
7060
+ code?: string | undefined;
7061
+ id?: string | undefined;
7062
+ links?: {
7063
+ about?: string | undefined;
7064
+ } | undefined;
7065
+ meta?: Record<string, unknown> | undefined;
7066
+ title?: string | undefined;
7067
+ detail?: string | undefined;
7068
+ source?: {
7069
+ pointer?: string | undefined;
7070
+ parameter?: string | undefined;
7071
+ } | undefined;
7072
+ }, {
7073
+ status?: string | undefined;
7074
+ code?: string | undefined;
7075
+ id?: string | undefined;
7076
+ links?: {
7077
+ about?: string | undefined;
7078
+ } | undefined;
7079
+ meta?: Record<string, unknown> | undefined;
7080
+ title?: string | undefined;
7081
+ detail?: string | undefined;
7082
+ source?: {
7083
+ pointer?: string | undefined;
7084
+ parameter?: string | undefined;
7085
+ } | undefined;
7086
+ }>, "many">;
7087
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7088
+ }, "strip", z.ZodTypeAny, {
7089
+ errors: {
7090
+ status?: string | undefined;
7091
+ code?: string | undefined;
7092
+ id?: string | undefined;
7093
+ links?: {
7094
+ about?: string | undefined;
7095
+ } | undefined;
7096
+ meta?: Record<string, unknown> | undefined;
7097
+ title?: string | undefined;
7098
+ detail?: string | undefined;
7099
+ source?: {
7100
+ pointer?: string | undefined;
7101
+ parameter?: string | undefined;
7102
+ } | undefined;
7103
+ }[];
7104
+ meta?: Record<string, unknown> | undefined;
7105
+ }, {
7106
+ errors: {
7107
+ status?: string | undefined;
7108
+ code?: string | undefined;
7109
+ id?: string | undefined;
7110
+ links?: {
7111
+ about?: string | undefined;
7112
+ } | undefined;
7113
+ meta?: Record<string, unknown> | undefined;
7114
+ title?: string | undefined;
7115
+ detail?: string | undefined;
7116
+ source?: {
7117
+ pointer?: string | undefined;
7118
+ parameter?: string | undefined;
7119
+ } | undefined;
7120
+ }[];
7121
+ meta?: Record<string, unknown> | undefined;
7122
+ }>;
7123
+ 401: z.ZodObject<{
7124
+ errors: z.ZodArray<z.ZodObject<{
7125
+ id: z.ZodOptional<z.ZodString>;
7126
+ links: z.ZodOptional<z.ZodObject<{
7127
+ about: z.ZodOptional<z.ZodString>;
7128
+ }, "strip", z.ZodTypeAny, {
7129
+ about?: string | undefined;
7130
+ }, {
7131
+ about?: string | undefined;
7132
+ }>>;
7133
+ status: z.ZodOptional<z.ZodString>;
7134
+ code: z.ZodOptional<z.ZodString>;
7135
+ title: z.ZodOptional<z.ZodString>;
7136
+ detail: z.ZodOptional<z.ZodString>;
7137
+ source: z.ZodOptional<z.ZodObject<{
7138
+ pointer: z.ZodOptional<z.ZodString>;
7139
+ parameter: z.ZodOptional<z.ZodString>;
7140
+ }, "strip", z.ZodTypeAny, {
7141
+ pointer?: string | undefined;
7142
+ parameter?: string | undefined;
7143
+ }, {
7144
+ pointer?: string | undefined;
7145
+ parameter?: string | undefined;
7146
+ }>>;
7147
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7148
+ }, "strip", z.ZodTypeAny, {
7149
+ status?: string | undefined;
7150
+ code?: string | undefined;
7151
+ id?: string | undefined;
7152
+ links?: {
7153
+ about?: string | undefined;
7154
+ } | undefined;
7155
+ meta?: Record<string, unknown> | undefined;
7156
+ title?: string | undefined;
7157
+ detail?: string | undefined;
7158
+ source?: {
7159
+ pointer?: string | undefined;
7160
+ parameter?: string | undefined;
7161
+ } | undefined;
7162
+ }, {
7163
+ status?: string | undefined;
7164
+ code?: string | undefined;
7165
+ id?: string | undefined;
7166
+ links?: {
7167
+ about?: string | undefined;
7168
+ } | undefined;
7169
+ meta?: Record<string, unknown> | undefined;
7170
+ title?: string | undefined;
7171
+ detail?: string | undefined;
7172
+ source?: {
7173
+ pointer?: string | undefined;
7174
+ parameter?: string | undefined;
7175
+ } | undefined;
7176
+ }>, "many">;
7177
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7178
+ }, "strip", z.ZodTypeAny, {
7179
+ errors: {
7180
+ status?: string | undefined;
7181
+ code?: string | undefined;
7182
+ id?: string | undefined;
7183
+ links?: {
7184
+ about?: string | undefined;
7185
+ } | undefined;
7186
+ meta?: Record<string, unknown> | undefined;
7187
+ title?: string | undefined;
7188
+ detail?: string | undefined;
7189
+ source?: {
7190
+ pointer?: string | undefined;
7191
+ parameter?: string | undefined;
7192
+ } | undefined;
7193
+ }[];
7194
+ meta?: Record<string, unknown> | undefined;
7195
+ }, {
7196
+ errors: {
7197
+ status?: string | undefined;
7198
+ code?: string | undefined;
7199
+ id?: string | undefined;
7200
+ links?: {
7201
+ about?: string | undefined;
7202
+ } | undefined;
7203
+ meta?: Record<string, unknown> | undefined;
7204
+ title?: string | undefined;
7205
+ detail?: string | undefined;
7206
+ source?: {
7207
+ pointer?: string | undefined;
7208
+ parameter?: string | undefined;
7209
+ } | undefined;
7210
+ }[];
7211
+ meta?: Record<string, unknown> | undefined;
7212
+ }>;
7213
+ 404: z.ZodObject<{
7214
+ errors: z.ZodArray<z.ZodObject<{
7215
+ id: z.ZodOptional<z.ZodString>;
7216
+ links: z.ZodOptional<z.ZodObject<{
7217
+ about: z.ZodOptional<z.ZodString>;
7218
+ }, "strip", z.ZodTypeAny, {
7219
+ about?: string | undefined;
7220
+ }, {
7221
+ about?: string | undefined;
7222
+ }>>;
7223
+ status: z.ZodOptional<z.ZodString>;
7224
+ code: z.ZodOptional<z.ZodString>;
7225
+ title: z.ZodOptional<z.ZodString>;
7226
+ detail: z.ZodOptional<z.ZodString>;
7227
+ source: z.ZodOptional<z.ZodObject<{
7228
+ pointer: z.ZodOptional<z.ZodString>;
7229
+ parameter: z.ZodOptional<z.ZodString>;
7230
+ }, "strip", z.ZodTypeAny, {
7231
+ pointer?: string | undefined;
7232
+ parameter?: string | undefined;
7233
+ }, {
7234
+ pointer?: string | undefined;
7235
+ parameter?: string | undefined;
7236
+ }>>;
7237
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7238
+ }, "strip", z.ZodTypeAny, {
7239
+ status?: string | undefined;
7240
+ code?: string | undefined;
7241
+ id?: string | undefined;
7242
+ links?: {
7243
+ about?: string | undefined;
7244
+ } | undefined;
7245
+ meta?: Record<string, unknown> | undefined;
7246
+ title?: string | undefined;
7247
+ detail?: string | undefined;
7248
+ source?: {
7249
+ pointer?: string | undefined;
7250
+ parameter?: string | undefined;
7251
+ } | undefined;
7252
+ }, {
7253
+ status?: string | undefined;
7254
+ code?: string | undefined;
7255
+ id?: string | undefined;
7256
+ links?: {
7257
+ about?: string | undefined;
7258
+ } | undefined;
7259
+ meta?: Record<string, unknown> | undefined;
7260
+ title?: string | undefined;
7261
+ detail?: string | undefined;
7262
+ source?: {
7263
+ pointer?: string | undefined;
7264
+ parameter?: string | undefined;
7265
+ } | undefined;
7266
+ }>, "many">;
7267
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7268
+ }, "strip", z.ZodTypeAny, {
7269
+ errors: {
7270
+ status?: string | undefined;
7271
+ code?: string | undefined;
7272
+ id?: string | undefined;
7273
+ links?: {
7274
+ about?: string | undefined;
7275
+ } | undefined;
7276
+ meta?: Record<string, unknown> | undefined;
7277
+ title?: string | undefined;
7278
+ detail?: string | undefined;
7279
+ source?: {
7280
+ pointer?: string | undefined;
7281
+ parameter?: string | undefined;
7282
+ } | undefined;
7283
+ }[];
7284
+ meta?: Record<string, unknown> | undefined;
7285
+ }, {
7286
+ errors: {
7287
+ status?: string | undefined;
7288
+ code?: string | undefined;
7289
+ id?: string | undefined;
7290
+ links?: {
7291
+ about?: string | undefined;
7292
+ } | undefined;
7293
+ meta?: Record<string, unknown> | undefined;
7294
+ title?: string | undefined;
7295
+ detail?: string | undefined;
7296
+ source?: {
7297
+ pointer?: string | undefined;
7298
+ parameter?: string | undefined;
7299
+ } | undefined;
7300
+ }[];
7301
+ meta?: Record<string, unknown> | undefined;
7302
+ }>;
7303
+ };
7304
+ };
7305
+ financeMagicEntry: {
7306
+ pathParams: z.ZodObject<{
7307
+ farmId: z.ZodString;
7308
+ }, "strip", z.ZodTypeAny, {
7309
+ farmId: string;
7310
+ }, {
7311
+ farmId: string;
7312
+ }>;
7313
+ summary: "AI-powered financial record extraction";
7314
+ description: "Extract structured financial records from natural language input.";
7315
+ method: "POST";
7316
+ body: z.ZodObject<{
7317
+ input: z.ZodString;
7318
+ }, "strip", z.ZodTypeAny, {
7319
+ input: string;
7320
+ }, {
7321
+ input: string;
7322
+ }>;
7323
+ path: "/farms/:farmId/finance/magic-entry";
7324
+ responses: {
7325
+ 200: z.ZodObject<{
7326
+ data: z.ZodObject<{
7327
+ type: z.ZodLiteral<"finance-magic-result">;
7328
+ attributes: z.ZodObject<{
7329
+ type: z.ZodEnum<["expense", "revenue", "query"]>;
7330
+ data: z.ZodUnknown;
7331
+ confidence: z.ZodNumber;
7332
+ }, "strip", z.ZodTypeAny, {
7333
+ type: "query" | "revenue" | "expense";
7334
+ confidence: number;
7335
+ data?: unknown;
7336
+ }, {
7337
+ type: "query" | "revenue" | "expense";
7338
+ confidence: number;
7339
+ data?: unknown;
7340
+ }>;
7341
+ }, "strip", z.ZodTypeAny, {
7342
+ type: "finance-magic-result";
7343
+ attributes: {
7344
+ type: "query" | "revenue" | "expense";
7345
+ confidence: number;
7346
+ data?: unknown;
7347
+ };
7348
+ }, {
7349
+ type: "finance-magic-result";
7350
+ attributes: {
7351
+ type: "query" | "revenue" | "expense";
7352
+ confidence: number;
7353
+ data?: unknown;
7354
+ };
7355
+ }>;
7356
+ }, "strip", z.ZodTypeAny, {
7357
+ data: {
7358
+ type: "finance-magic-result";
7359
+ attributes: {
7360
+ type: "query" | "revenue" | "expense";
7361
+ confidence: number;
7362
+ data?: unknown;
7363
+ };
7364
+ };
7365
+ }, {
7366
+ data: {
7367
+ type: "finance-magic-result";
7368
+ attributes: {
7369
+ type: "query" | "revenue" | "expense";
7370
+ confidence: number;
7371
+ data?: unknown;
7372
+ };
7373
+ };
7374
+ }>;
7375
+ 400: z.ZodObject<{
7376
+ errors: z.ZodArray<z.ZodObject<{
7377
+ id: z.ZodOptional<z.ZodString>;
7378
+ links: z.ZodOptional<z.ZodObject<{
7379
+ about: z.ZodOptional<z.ZodString>;
7380
+ }, "strip", z.ZodTypeAny, {
7381
+ about?: string | undefined;
7382
+ }, {
7383
+ about?: string | undefined;
7384
+ }>>;
7385
+ status: z.ZodOptional<z.ZodString>;
7386
+ code: z.ZodOptional<z.ZodString>;
7387
+ title: z.ZodOptional<z.ZodString>;
7388
+ detail: z.ZodOptional<z.ZodString>;
7389
+ source: z.ZodOptional<z.ZodObject<{
7390
+ pointer: z.ZodOptional<z.ZodString>;
7391
+ parameter: z.ZodOptional<z.ZodString>;
7392
+ }, "strip", z.ZodTypeAny, {
7393
+ pointer?: string | undefined;
7394
+ parameter?: string | undefined;
7395
+ }, {
7396
+ pointer?: string | undefined;
7397
+ parameter?: string | undefined;
7398
+ }>>;
7399
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7400
+ }, "strip", z.ZodTypeAny, {
7401
+ status?: string | undefined;
7402
+ code?: string | undefined;
7403
+ id?: string | undefined;
7404
+ links?: {
7405
+ about?: string | undefined;
7406
+ } | undefined;
7407
+ meta?: Record<string, unknown> | undefined;
7408
+ title?: string | undefined;
7409
+ detail?: string | undefined;
7410
+ source?: {
7411
+ pointer?: string | undefined;
7412
+ parameter?: string | undefined;
7413
+ } | undefined;
7414
+ }, {
7415
+ status?: string | undefined;
7416
+ code?: string | undefined;
7417
+ id?: string | undefined;
7418
+ links?: {
7419
+ about?: string | undefined;
7420
+ } | undefined;
7421
+ meta?: Record<string, unknown> | undefined;
7422
+ title?: string | undefined;
7423
+ detail?: string | undefined;
7424
+ source?: {
7425
+ pointer?: string | undefined;
7426
+ parameter?: string | undefined;
7427
+ } | undefined;
7428
+ }>, "many">;
7429
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7430
+ }, "strip", z.ZodTypeAny, {
7431
+ errors: {
7432
+ status?: string | undefined;
7433
+ code?: string | undefined;
7434
+ id?: string | undefined;
7435
+ links?: {
7436
+ about?: string | undefined;
7437
+ } | undefined;
7438
+ meta?: Record<string, unknown> | undefined;
7439
+ title?: string | undefined;
7440
+ detail?: string | undefined;
7441
+ source?: {
7442
+ pointer?: string | undefined;
7443
+ parameter?: string | undefined;
7444
+ } | undefined;
7445
+ }[];
7446
+ meta?: Record<string, unknown> | undefined;
7447
+ }, {
7448
+ errors: {
7449
+ status?: string | undefined;
7450
+ code?: string | undefined;
7451
+ id?: string | undefined;
7452
+ links?: {
7453
+ about?: string | undefined;
7454
+ } | undefined;
7455
+ meta?: Record<string, unknown> | undefined;
7456
+ title?: string | undefined;
7457
+ detail?: string | undefined;
7458
+ source?: {
7459
+ pointer?: string | undefined;
7460
+ parameter?: string | undefined;
7461
+ } | undefined;
7462
+ }[];
7463
+ meta?: Record<string, unknown> | undefined;
7464
+ }>;
7465
+ 404: z.ZodObject<{
7466
+ errors: z.ZodArray<z.ZodObject<{
7467
+ id: z.ZodOptional<z.ZodString>;
7468
+ links: z.ZodOptional<z.ZodObject<{
7469
+ about: z.ZodOptional<z.ZodString>;
7470
+ }, "strip", z.ZodTypeAny, {
7471
+ about?: string | undefined;
7472
+ }, {
7473
+ about?: string | undefined;
7474
+ }>>;
7475
+ status: z.ZodOptional<z.ZodString>;
7476
+ code: z.ZodOptional<z.ZodString>;
7477
+ title: z.ZodOptional<z.ZodString>;
7478
+ detail: z.ZodOptional<z.ZodString>;
7479
+ source: z.ZodOptional<z.ZodObject<{
7480
+ pointer: z.ZodOptional<z.ZodString>;
7481
+ parameter: z.ZodOptional<z.ZodString>;
7482
+ }, "strip", z.ZodTypeAny, {
7483
+ pointer?: string | undefined;
7484
+ parameter?: string | undefined;
7485
+ }, {
7486
+ pointer?: string | undefined;
7487
+ parameter?: string | undefined;
7488
+ }>>;
7489
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7490
+ }, "strip", z.ZodTypeAny, {
7491
+ status?: string | undefined;
7492
+ code?: string | undefined;
7493
+ id?: string | undefined;
7494
+ links?: {
7495
+ about?: string | undefined;
7496
+ } | undefined;
7497
+ meta?: Record<string, unknown> | undefined;
7498
+ title?: string | undefined;
7499
+ detail?: string | undefined;
7500
+ source?: {
7501
+ pointer?: string | undefined;
7502
+ parameter?: string | undefined;
7503
+ } | undefined;
7504
+ }, {
7505
+ status?: string | undefined;
7506
+ code?: string | undefined;
7507
+ id?: string | undefined;
7508
+ links?: {
7509
+ about?: string | undefined;
7510
+ } | undefined;
7511
+ meta?: Record<string, unknown> | undefined;
7512
+ title?: string | undefined;
7513
+ detail?: string | undefined;
7514
+ source?: {
7515
+ pointer?: string | undefined;
7516
+ parameter?: string | undefined;
7517
+ } | undefined;
7518
+ }>, "many">;
7519
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7520
+ }, "strip", z.ZodTypeAny, {
7521
+ errors: {
7522
+ status?: string | undefined;
7523
+ code?: string | undefined;
7524
+ id?: string | undefined;
7525
+ links?: {
7526
+ about?: string | undefined;
7527
+ } | undefined;
7528
+ meta?: Record<string, unknown> | undefined;
7529
+ title?: string | undefined;
7530
+ detail?: string | undefined;
7531
+ source?: {
7532
+ pointer?: string | undefined;
7533
+ parameter?: string | undefined;
7534
+ } | undefined;
7535
+ }[];
7536
+ meta?: Record<string, unknown> | undefined;
7537
+ }, {
7538
+ errors: {
7539
+ status?: string | undefined;
7540
+ code?: string | undefined;
7541
+ id?: string | undefined;
7542
+ links?: {
7543
+ about?: string | undefined;
7544
+ } | undefined;
7545
+ meta?: Record<string, unknown> | undefined;
7546
+ title?: string | undefined;
7547
+ detail?: string | undefined;
7548
+ source?: {
7549
+ pointer?: string | undefined;
7550
+ parameter?: string | undefined;
7551
+ } | undefined;
7552
+ }[];
7553
+ meta?: Record<string, unknown> | undefined;
7554
+ }>;
7555
+ };
7556
+ };
7557
+ getPnlDashboard: {
7558
+ pathParams: z.ZodObject<{
7559
+ farmId: z.ZodString;
7560
+ }, "strip", z.ZodTypeAny, {
7561
+ farmId: string;
7562
+ }, {
7563
+ farmId: string;
7564
+ }>;
7565
+ query: z.ZodObject<{
7566
+ 'filter[startDate]': z.ZodOptional<z.ZodString>;
7567
+ 'filter[endDate]': z.ZodOptional<z.ZodString>;
7568
+ 'filter[status]': z.ZodOptional<z.ZodString>;
7569
+ 'filter[crop]': z.ZodOptional<z.ZodString>;
7570
+ }, "strip", z.ZodTypeAny, {
7571
+ 'filter[startDate]'?: string | undefined;
7572
+ 'filter[endDate]'?: string | undefined;
7573
+ 'filter[status]'?: string | undefined;
7574
+ 'filter[crop]'?: string | undefined;
7575
+ }, {
7576
+ 'filter[startDate]'?: string | undefined;
7577
+ 'filter[endDate]'?: string | undefined;
7578
+ 'filter[status]'?: string | undefined;
7579
+ 'filter[crop]'?: string | undefined;
7580
+ }>;
7581
+ summary: "Get P&L dashboard";
7582
+ method: "GET";
7583
+ path: "/farms/:farmId/finance/intelligence/pnl";
7584
+ responses: {
7585
+ 200: z.ZodObject<{
7586
+ data: z.ZodObject<{
7587
+ type: z.ZodLiteral<"finance-pnl-dashboard">;
7588
+ id: z.ZodString;
7589
+ attributes: z.ZodObject<{
7590
+ totalRevenue: z.ZodNumber;
7591
+ totalExpenses: z.ZodNumber;
7592
+ netProfit: z.ZodNumber;
7593
+ profitMargin: z.ZodNumber;
7594
+ roi: z.ZodNumber;
7595
+ periodComparison: z.ZodOptional<z.ZodObject<{
7596
+ previousPeriod: z.ZodObject<{
7597
+ revenue: z.ZodNumber;
7598
+ expenses: z.ZodNumber;
7599
+ profit: z.ZodNumber;
7600
+ }, "strip", z.ZodTypeAny, {
7601
+ expenses: number;
7602
+ revenue: number;
7603
+ profit: number;
7604
+ }, {
7605
+ expenses: number;
7606
+ revenue: number;
7607
+ profit: number;
7608
+ }>;
7609
+ revenueChange: z.ZodNumber;
7610
+ expenseChange: z.ZodNumber;
7611
+ profitChange: z.ZodNumber;
7612
+ }, "strip", z.ZodTypeAny, {
7613
+ previousPeriod: {
7614
+ expenses: number;
7615
+ revenue: number;
7616
+ profit: number;
7617
+ };
7618
+ revenueChange: number;
7619
+ expenseChange: number;
7620
+ profitChange: number;
7621
+ }, {
7622
+ previousPeriod: {
7623
+ expenses: number;
7624
+ revenue: number;
7625
+ profit: number;
7626
+ };
7627
+ revenueChange: number;
7628
+ expenseChange: number;
7629
+ profitChange: number;
7630
+ }>>;
7631
+ }, "strip", z.ZodTypeAny, {
7632
+ totalRevenue: number;
7633
+ netProfit: number;
7634
+ profitMargin: number;
7635
+ totalExpenses: number;
7636
+ roi: number;
7637
+ periodComparison?: {
7638
+ previousPeriod: {
7639
+ expenses: number;
7640
+ revenue: number;
7641
+ profit: number;
7642
+ };
7643
+ revenueChange: number;
7644
+ expenseChange: number;
7645
+ profitChange: number;
7646
+ } | undefined;
7647
+ }, {
7648
+ totalRevenue: number;
7649
+ netProfit: number;
7650
+ profitMargin: number;
7651
+ totalExpenses: number;
7652
+ roi: number;
7653
+ periodComparison?: {
7654
+ previousPeriod: {
7655
+ expenses: number;
7656
+ revenue: number;
7657
+ profit: number;
7658
+ };
7659
+ revenueChange: number;
7660
+ expenseChange: number;
7661
+ profitChange: number;
7662
+ } | undefined;
7663
+ }>;
7664
+ }, "strip", z.ZodTypeAny, {
7665
+ type: "finance-pnl-dashboard";
7666
+ id: string;
7667
+ attributes: {
7668
+ totalRevenue: number;
7669
+ netProfit: number;
7670
+ profitMargin: number;
7671
+ totalExpenses: number;
7672
+ roi: number;
7673
+ periodComparison?: {
7674
+ previousPeriod: {
7675
+ expenses: number;
7676
+ revenue: number;
7677
+ profit: number;
7678
+ };
7679
+ revenueChange: number;
7680
+ expenseChange: number;
7681
+ profitChange: number;
7682
+ } | undefined;
7683
+ };
7684
+ }, {
7685
+ type: "finance-pnl-dashboard";
7686
+ id: string;
7687
+ attributes: {
7688
+ totalRevenue: number;
7689
+ netProfit: number;
7690
+ profitMargin: number;
7691
+ totalExpenses: number;
7692
+ roi: number;
7693
+ periodComparison?: {
7694
+ previousPeriod: {
7695
+ expenses: number;
7696
+ revenue: number;
7697
+ profit: number;
7698
+ };
7699
+ revenueChange: number;
7700
+ expenseChange: number;
7701
+ profitChange: number;
7702
+ } | undefined;
7703
+ };
7704
+ }>;
7705
+ }, "strip", z.ZodTypeAny, {
7706
+ data: {
7707
+ type: "finance-pnl-dashboard";
7708
+ id: string;
7709
+ attributes: {
7710
+ totalRevenue: number;
7711
+ netProfit: number;
7712
+ profitMargin: number;
7713
+ totalExpenses: number;
7714
+ roi: number;
7715
+ periodComparison?: {
7716
+ previousPeriod: {
7717
+ expenses: number;
7718
+ revenue: number;
7719
+ profit: number;
7720
+ };
7721
+ revenueChange: number;
7722
+ expenseChange: number;
7723
+ profitChange: number;
7724
+ } | undefined;
7725
+ };
7726
+ };
7727
+ }, {
7728
+ data: {
7729
+ type: "finance-pnl-dashboard";
7730
+ id: string;
7731
+ attributes: {
7732
+ totalRevenue: number;
7733
+ netProfit: number;
7734
+ profitMargin: number;
7735
+ totalExpenses: number;
7736
+ roi: number;
7737
+ periodComparison?: {
7738
+ previousPeriod: {
7739
+ expenses: number;
7740
+ revenue: number;
7741
+ profit: number;
7742
+ };
7743
+ revenueChange: number;
7744
+ expenseChange: number;
7745
+ profitChange: number;
7746
+ } | undefined;
7747
+ };
7748
+ };
7749
+ }>;
7750
+ 404: z.ZodObject<{
7751
+ errors: z.ZodArray<z.ZodObject<{
7752
+ id: z.ZodOptional<z.ZodString>;
7753
+ links: z.ZodOptional<z.ZodObject<{
7754
+ about: z.ZodOptional<z.ZodString>;
7755
+ }, "strip", z.ZodTypeAny, {
7756
+ about?: string | undefined;
7757
+ }, {
7758
+ about?: string | undefined;
7759
+ }>>;
7760
+ status: z.ZodOptional<z.ZodString>;
7761
+ code: z.ZodOptional<z.ZodString>;
7762
+ title: z.ZodOptional<z.ZodString>;
7763
+ detail: z.ZodOptional<z.ZodString>;
7764
+ source: z.ZodOptional<z.ZodObject<{
7765
+ pointer: z.ZodOptional<z.ZodString>;
7766
+ parameter: z.ZodOptional<z.ZodString>;
7767
+ }, "strip", z.ZodTypeAny, {
7768
+ pointer?: string | undefined;
7769
+ parameter?: string | undefined;
7770
+ }, {
7771
+ pointer?: string | undefined;
7772
+ parameter?: string | undefined;
7773
+ }>>;
7774
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7775
+ }, "strip", z.ZodTypeAny, {
7776
+ status?: string | undefined;
7777
+ code?: string | undefined;
7778
+ id?: string | undefined;
7779
+ links?: {
7780
+ about?: string | undefined;
7781
+ } | undefined;
7782
+ meta?: Record<string, unknown> | undefined;
7783
+ title?: string | undefined;
7784
+ detail?: string | undefined;
7785
+ source?: {
7786
+ pointer?: string | undefined;
7787
+ parameter?: string | undefined;
7788
+ } | undefined;
7789
+ }, {
7790
+ status?: string | undefined;
7791
+ code?: string | undefined;
7792
+ id?: string | undefined;
7793
+ links?: {
7794
+ about?: string | undefined;
7795
+ } | undefined;
7796
+ meta?: Record<string, unknown> | undefined;
7797
+ title?: string | undefined;
7798
+ detail?: string | undefined;
7799
+ source?: {
7800
+ pointer?: string | undefined;
7801
+ parameter?: string | undefined;
7802
+ } | undefined;
7803
+ }>, "many">;
7804
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7805
+ }, "strip", z.ZodTypeAny, {
7806
+ errors: {
7807
+ status?: string | undefined;
7808
+ code?: string | undefined;
7809
+ id?: string | undefined;
7810
+ links?: {
7811
+ about?: string | undefined;
7812
+ } | undefined;
7813
+ meta?: Record<string, unknown> | undefined;
7814
+ title?: string | undefined;
7815
+ detail?: string | undefined;
7816
+ source?: {
7817
+ pointer?: string | undefined;
7818
+ parameter?: string | undefined;
7819
+ } | undefined;
7820
+ }[];
7821
+ meta?: Record<string, unknown> | undefined;
7822
+ }, {
7823
+ errors: {
7824
+ status?: string | undefined;
7825
+ code?: string | undefined;
7826
+ id?: string | undefined;
7827
+ links?: {
7828
+ about?: string | undefined;
7829
+ } | undefined;
7830
+ meta?: Record<string, unknown> | undefined;
7831
+ title?: string | undefined;
7832
+ detail?: string | undefined;
7833
+ source?: {
7834
+ pointer?: string | undefined;
7835
+ parameter?: string | undefined;
7836
+ } | undefined;
7837
+ }[];
7838
+ meta?: Record<string, unknown> | undefined;
7839
+ }>;
7840
+ 401: z.ZodObject<{
7841
+ errors: z.ZodArray<z.ZodObject<{
7842
+ id: z.ZodOptional<z.ZodString>;
7843
+ links: z.ZodOptional<z.ZodObject<{
7844
+ about: z.ZodOptional<z.ZodString>;
7845
+ }, "strip", z.ZodTypeAny, {
7846
+ about?: string | undefined;
7847
+ }, {
7848
+ about?: string | undefined;
7849
+ }>>;
7850
+ status: z.ZodOptional<z.ZodString>;
7851
+ code: z.ZodOptional<z.ZodString>;
7852
+ title: z.ZodOptional<z.ZodString>;
7853
+ detail: z.ZodOptional<z.ZodString>;
7854
+ source: z.ZodOptional<z.ZodObject<{
7855
+ pointer: z.ZodOptional<z.ZodString>;
7856
+ parameter: z.ZodOptional<z.ZodString>;
7857
+ }, "strip", z.ZodTypeAny, {
7858
+ pointer?: string | undefined;
7859
+ parameter?: string | undefined;
7860
+ }, {
7861
+ pointer?: string | undefined;
7862
+ parameter?: string | undefined;
7863
+ }>>;
7864
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7865
+ }, "strip", z.ZodTypeAny, {
7866
+ status?: string | undefined;
7867
+ code?: string | undefined;
7868
+ id?: string | undefined;
7869
+ links?: {
7870
+ about?: string | undefined;
7871
+ } | undefined;
7872
+ meta?: Record<string, unknown> | undefined;
7873
+ title?: string | undefined;
7874
+ detail?: string | undefined;
7875
+ source?: {
7876
+ pointer?: string | undefined;
7877
+ parameter?: string | undefined;
7878
+ } | undefined;
7879
+ }, {
7880
+ status?: string | undefined;
7881
+ code?: string | undefined;
7882
+ id?: string | undefined;
7883
+ links?: {
7884
+ about?: string | undefined;
7885
+ } | undefined;
7886
+ meta?: Record<string, unknown> | undefined;
7887
+ title?: string | undefined;
7888
+ detail?: string | undefined;
7889
+ source?: {
7890
+ pointer?: string | undefined;
7891
+ parameter?: string | undefined;
7892
+ } | undefined;
7893
+ }>, "many">;
7894
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7895
+ }, "strip", z.ZodTypeAny, {
7896
+ errors: {
7897
+ status?: string | undefined;
7898
+ code?: string | undefined;
7899
+ id?: string | undefined;
7900
+ links?: {
7901
+ about?: string | undefined;
7902
+ } | undefined;
7903
+ meta?: Record<string, unknown> | undefined;
7904
+ title?: string | undefined;
7905
+ detail?: string | undefined;
7906
+ source?: {
7907
+ pointer?: string | undefined;
7908
+ parameter?: string | undefined;
7909
+ } | undefined;
7910
+ }[];
7911
+ meta?: Record<string, unknown> | undefined;
7912
+ }, {
7913
+ errors: {
7914
+ status?: string | undefined;
7915
+ code?: string | undefined;
7916
+ id?: string | undefined;
7917
+ links?: {
7918
+ about?: string | undefined;
7919
+ } | undefined;
7920
+ meta?: Record<string, unknown> | undefined;
7921
+ title?: string | undefined;
7922
+ detail?: string | undefined;
7923
+ source?: {
7924
+ pointer?: string | undefined;
7925
+ parameter?: string | undefined;
7926
+ } | undefined;
7927
+ }[];
7928
+ meta?: Record<string, unknown> | undefined;
7929
+ }>;
7930
+ };
7931
+ };
7932
+ getCashFlowForecast: {
7933
+ pathParams: z.ZodObject<{
7934
+ farmId: z.ZodString;
7935
+ }, "strip", z.ZodTypeAny, {
7936
+ farmId: string;
7937
+ }, {
7938
+ farmId: string;
7939
+ }>;
7940
+ query: z.ZodObject<{
7941
+ 'filter[startDate]': z.ZodOptional<z.ZodString>;
7942
+ 'filter[endDate]': z.ZodOptional<z.ZodString>;
7943
+ 'filter[status]': z.ZodOptional<z.ZodString>;
7944
+ 'filter[crop]': z.ZodOptional<z.ZodString>;
7945
+ } & {
7946
+ months: z.ZodOptional<z.ZodNumber>;
7947
+ }, "strip", z.ZodTypeAny, {
7948
+ 'filter[startDate]'?: string | undefined;
7949
+ 'filter[endDate]'?: string | undefined;
7950
+ 'filter[status]'?: string | undefined;
7951
+ 'filter[crop]'?: string | undefined;
7952
+ months?: number | undefined;
7953
+ }, {
7954
+ 'filter[startDate]'?: string | undefined;
7955
+ 'filter[endDate]'?: string | undefined;
7956
+ 'filter[status]'?: string | undefined;
7957
+ 'filter[crop]'?: string | undefined;
7958
+ months?: number | undefined;
7959
+ }>;
7960
+ summary: "Get cash-flow forecast";
7961
+ method: "GET";
7962
+ path: "/farms/:farmId/finance/intelligence/cash-flow-forecast";
7963
+ responses: {
7964
+ 200: z.ZodObject<{
7965
+ data: z.ZodObject<{
7966
+ type: z.ZodLiteral<"finance-cashflow-forecast">;
7967
+ id: z.ZodString;
7968
+ attributes: z.ZodObject<{
7969
+ projections: z.ZodArray<z.ZodObject<{
7970
+ month: z.ZodString;
7971
+ projectedRevenue: z.ZodNumber;
7972
+ projectedExpenses: z.ZodNumber;
7973
+ projectedCashFlow: z.ZodNumber;
7974
+ cumulativeCashFlow: z.ZodNumber;
7975
+ }, "strip", z.ZodTypeAny, {
7976
+ month: string;
7977
+ projectedRevenue: number;
7978
+ projectedExpenses: number;
7979
+ projectedCashFlow: number;
7980
+ cumulativeCashFlow: number;
7981
+ }, {
7982
+ month: string;
7983
+ projectedRevenue: number;
7984
+ projectedExpenses: number;
7985
+ projectedCashFlow: number;
7986
+ cumulativeCashFlow: number;
7987
+ }>, "many">;
7988
+ assumptions: z.ZodObject<{
7989
+ averageMonthlyRevenue: z.ZodNumber;
7990
+ averageMonthlyExpenses: z.ZodNumber;
7991
+ seasonalFactors: z.ZodRecord<z.ZodString, z.ZodObject<{
7992
+ expense: z.ZodNumber;
7993
+ revenue: z.ZodNumber;
7994
+ }, "strip", z.ZodTypeAny, {
7995
+ revenue: number;
7996
+ expense: number;
7997
+ }, {
7998
+ revenue: number;
7999
+ expense: number;
8000
+ }>>;
8001
+ }, "strip", z.ZodTypeAny, {
8002
+ averageMonthlyRevenue: number;
8003
+ averageMonthlyExpenses: number;
8004
+ seasonalFactors: Record<string, {
8005
+ revenue: number;
8006
+ expense: number;
8007
+ }>;
8008
+ }, {
8009
+ averageMonthlyRevenue: number;
8010
+ averageMonthlyExpenses: number;
8011
+ seasonalFactors: Record<string, {
8012
+ revenue: number;
8013
+ expense: number;
8014
+ }>;
8015
+ }>;
8016
+ }, "strip", z.ZodTypeAny, {
8017
+ projections: {
8018
+ month: string;
8019
+ projectedRevenue: number;
8020
+ projectedExpenses: number;
8021
+ projectedCashFlow: number;
8022
+ cumulativeCashFlow: number;
8023
+ }[];
8024
+ assumptions: {
8025
+ averageMonthlyRevenue: number;
8026
+ averageMonthlyExpenses: number;
8027
+ seasonalFactors: Record<string, {
8028
+ revenue: number;
8029
+ expense: number;
8030
+ }>;
8031
+ };
8032
+ }, {
8033
+ projections: {
8034
+ month: string;
8035
+ projectedRevenue: number;
8036
+ projectedExpenses: number;
8037
+ projectedCashFlow: number;
8038
+ cumulativeCashFlow: number;
8039
+ }[];
8040
+ assumptions: {
8041
+ averageMonthlyRevenue: number;
8042
+ averageMonthlyExpenses: number;
8043
+ seasonalFactors: Record<string, {
8044
+ revenue: number;
8045
+ expense: number;
8046
+ }>;
8047
+ };
8048
+ }>;
8049
+ }, "strip", z.ZodTypeAny, {
8050
+ type: "finance-cashflow-forecast";
8051
+ id: string;
8052
+ attributes: {
8053
+ projections: {
8054
+ month: string;
8055
+ projectedRevenue: number;
8056
+ projectedExpenses: number;
8057
+ projectedCashFlow: number;
8058
+ cumulativeCashFlow: number;
8059
+ }[];
8060
+ assumptions: {
8061
+ averageMonthlyRevenue: number;
8062
+ averageMonthlyExpenses: number;
8063
+ seasonalFactors: Record<string, {
8064
+ revenue: number;
8065
+ expense: number;
8066
+ }>;
8067
+ };
8068
+ };
8069
+ }, {
8070
+ type: "finance-cashflow-forecast";
8071
+ id: string;
8072
+ attributes: {
8073
+ projections: {
8074
+ month: string;
8075
+ projectedRevenue: number;
8076
+ projectedExpenses: number;
8077
+ projectedCashFlow: number;
8078
+ cumulativeCashFlow: number;
8079
+ }[];
8080
+ assumptions: {
8081
+ averageMonthlyRevenue: number;
8082
+ averageMonthlyExpenses: number;
8083
+ seasonalFactors: Record<string, {
8084
+ revenue: number;
8085
+ expense: number;
8086
+ }>;
8087
+ };
8088
+ };
8089
+ }>;
8090
+ }, "strip", z.ZodTypeAny, {
8091
+ data: {
8092
+ type: "finance-cashflow-forecast";
8093
+ id: string;
8094
+ attributes: {
8095
+ projections: {
8096
+ month: string;
8097
+ projectedRevenue: number;
8098
+ projectedExpenses: number;
8099
+ projectedCashFlow: number;
8100
+ cumulativeCashFlow: number;
8101
+ }[];
8102
+ assumptions: {
8103
+ averageMonthlyRevenue: number;
8104
+ averageMonthlyExpenses: number;
8105
+ seasonalFactors: Record<string, {
8106
+ revenue: number;
8107
+ expense: number;
8108
+ }>;
8109
+ };
8110
+ };
8111
+ };
8112
+ }, {
8113
+ data: {
8114
+ type: "finance-cashflow-forecast";
8115
+ id: string;
8116
+ attributes: {
8117
+ projections: {
8118
+ month: string;
8119
+ projectedRevenue: number;
8120
+ projectedExpenses: number;
8121
+ projectedCashFlow: number;
8122
+ cumulativeCashFlow: number;
8123
+ }[];
8124
+ assumptions: {
8125
+ averageMonthlyRevenue: number;
8126
+ averageMonthlyExpenses: number;
8127
+ seasonalFactors: Record<string, {
8128
+ revenue: number;
8129
+ expense: number;
8130
+ }>;
8131
+ };
8132
+ };
8133
+ };
8134
+ }>;
8135
+ 404: z.ZodObject<{
8136
+ errors: z.ZodArray<z.ZodObject<{
8137
+ id: z.ZodOptional<z.ZodString>;
8138
+ links: z.ZodOptional<z.ZodObject<{
8139
+ about: z.ZodOptional<z.ZodString>;
8140
+ }, "strip", z.ZodTypeAny, {
8141
+ about?: string | undefined;
8142
+ }, {
8143
+ about?: string | undefined;
8144
+ }>>;
8145
+ status: z.ZodOptional<z.ZodString>;
8146
+ code: z.ZodOptional<z.ZodString>;
8147
+ title: z.ZodOptional<z.ZodString>;
8148
+ detail: z.ZodOptional<z.ZodString>;
8149
+ source: z.ZodOptional<z.ZodObject<{
8150
+ pointer: z.ZodOptional<z.ZodString>;
8151
+ parameter: z.ZodOptional<z.ZodString>;
8152
+ }, "strip", z.ZodTypeAny, {
8153
+ pointer?: string | undefined;
8154
+ parameter?: string | undefined;
8155
+ }, {
8156
+ pointer?: string | undefined;
8157
+ parameter?: string | undefined;
8158
+ }>>;
8159
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8160
+ }, "strip", z.ZodTypeAny, {
8161
+ status?: string | undefined;
8162
+ code?: string | undefined;
8163
+ id?: string | undefined;
8164
+ links?: {
8165
+ about?: string | undefined;
8166
+ } | undefined;
8167
+ meta?: Record<string, unknown> | undefined;
8168
+ title?: string | undefined;
8169
+ detail?: string | undefined;
8170
+ source?: {
8171
+ pointer?: string | undefined;
8172
+ parameter?: string | undefined;
8173
+ } | undefined;
8174
+ }, {
8175
+ status?: string | undefined;
8176
+ code?: string | undefined;
8177
+ id?: string | undefined;
8178
+ links?: {
8179
+ about?: string | undefined;
8180
+ } | undefined;
8181
+ meta?: Record<string, unknown> | undefined;
8182
+ title?: string | undefined;
8183
+ detail?: string | undefined;
8184
+ source?: {
8185
+ pointer?: string | undefined;
8186
+ parameter?: string | undefined;
8187
+ } | undefined;
8188
+ }>, "many">;
8189
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8190
+ }, "strip", z.ZodTypeAny, {
8191
+ errors: {
8192
+ status?: string | undefined;
8193
+ code?: string | undefined;
8194
+ id?: string | undefined;
8195
+ links?: {
8196
+ about?: string | undefined;
8197
+ } | undefined;
8198
+ meta?: Record<string, unknown> | undefined;
8199
+ title?: string | undefined;
8200
+ detail?: string | undefined;
8201
+ source?: {
8202
+ pointer?: string | undefined;
8203
+ parameter?: string | undefined;
8204
+ } | undefined;
8205
+ }[];
8206
+ meta?: Record<string, unknown> | undefined;
8207
+ }, {
8208
+ errors: {
8209
+ status?: string | undefined;
8210
+ code?: string | undefined;
8211
+ id?: string | undefined;
8212
+ links?: {
8213
+ about?: string | undefined;
8214
+ } | undefined;
8215
+ meta?: Record<string, unknown> | undefined;
8216
+ title?: string | undefined;
8217
+ detail?: string | undefined;
8218
+ source?: {
8219
+ pointer?: string | undefined;
8220
+ parameter?: string | undefined;
8221
+ } | undefined;
8222
+ }[];
8223
+ meta?: Record<string, unknown> | undefined;
8224
+ }>;
8225
+ 401: z.ZodObject<{
8226
+ errors: z.ZodArray<z.ZodObject<{
8227
+ id: z.ZodOptional<z.ZodString>;
8228
+ links: z.ZodOptional<z.ZodObject<{
8229
+ about: z.ZodOptional<z.ZodString>;
8230
+ }, "strip", z.ZodTypeAny, {
8231
+ about?: string | undefined;
8232
+ }, {
8233
+ about?: string | undefined;
8234
+ }>>;
8235
+ status: z.ZodOptional<z.ZodString>;
8236
+ code: z.ZodOptional<z.ZodString>;
8237
+ title: z.ZodOptional<z.ZodString>;
8238
+ detail: z.ZodOptional<z.ZodString>;
8239
+ source: z.ZodOptional<z.ZodObject<{
8240
+ pointer: z.ZodOptional<z.ZodString>;
8241
+ parameter: z.ZodOptional<z.ZodString>;
8242
+ }, "strip", z.ZodTypeAny, {
8243
+ pointer?: string | undefined;
8244
+ parameter?: string | undefined;
8245
+ }, {
8246
+ pointer?: string | undefined;
8247
+ parameter?: string | undefined;
8248
+ }>>;
8249
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8250
+ }, "strip", z.ZodTypeAny, {
8251
+ status?: string | undefined;
8252
+ code?: string | undefined;
8253
+ id?: string | undefined;
8254
+ links?: {
8255
+ about?: string | undefined;
8256
+ } | undefined;
8257
+ meta?: Record<string, unknown> | undefined;
8258
+ title?: string | undefined;
8259
+ detail?: string | undefined;
8260
+ source?: {
8261
+ pointer?: string | undefined;
8262
+ parameter?: string | undefined;
8263
+ } | undefined;
8264
+ }, {
8265
+ status?: string | undefined;
8266
+ code?: string | undefined;
8267
+ id?: string | undefined;
8268
+ links?: {
8269
+ about?: string | undefined;
8270
+ } | undefined;
8271
+ meta?: Record<string, unknown> | undefined;
8272
+ title?: string | undefined;
8273
+ detail?: string | undefined;
8274
+ source?: {
8275
+ pointer?: string | undefined;
8276
+ parameter?: string | undefined;
8277
+ } | undefined;
8278
+ }>, "many">;
8279
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8280
+ }, "strip", z.ZodTypeAny, {
8281
+ errors: {
8282
+ status?: string | undefined;
8283
+ code?: string | undefined;
8284
+ id?: string | undefined;
8285
+ links?: {
8286
+ about?: string | undefined;
8287
+ } | undefined;
8288
+ meta?: Record<string, unknown> | undefined;
8289
+ title?: string | undefined;
8290
+ detail?: string | undefined;
8291
+ source?: {
8292
+ pointer?: string | undefined;
8293
+ parameter?: string | undefined;
8294
+ } | undefined;
8295
+ }[];
8296
+ meta?: Record<string, unknown> | undefined;
8297
+ }, {
8298
+ errors: {
8299
+ status?: string | undefined;
8300
+ code?: string | undefined;
8301
+ id?: string | undefined;
8302
+ links?: {
8303
+ about?: string | undefined;
8304
+ } | undefined;
8305
+ meta?: Record<string, unknown> | undefined;
8306
+ title?: string | undefined;
8307
+ detail?: string | undefined;
8308
+ source?: {
8309
+ pointer?: string | undefined;
8310
+ parameter?: string | undefined;
8311
+ } | undefined;
8312
+ }[];
8313
+ meta?: Record<string, unknown> | undefined;
8314
+ }>;
8315
+ };
8316
+ };
8317
+ getBudgetVsActuals: {
8318
+ pathParams: z.ZodObject<{
8319
+ farmId: z.ZodString;
8320
+ }, "strip", z.ZodTypeAny, {
8321
+ farmId: string;
8322
+ }, {
8323
+ farmId: string;
8324
+ }>;
8325
+ query: z.ZodObject<{
8326
+ 'filter[startDate]': z.ZodOptional<z.ZodString>;
8327
+ 'filter[endDate]': z.ZodOptional<z.ZodString>;
8328
+ 'filter[status]': z.ZodOptional<z.ZodString>;
8329
+ 'filter[crop]': z.ZodOptional<z.ZodString>;
8330
+ }, "strip", z.ZodTypeAny, {
8331
+ 'filter[startDate]'?: string | undefined;
8332
+ 'filter[endDate]'?: string | undefined;
8333
+ 'filter[status]'?: string | undefined;
8334
+ 'filter[crop]'?: string | undefined;
8335
+ }, {
8336
+ 'filter[startDate]'?: string | undefined;
8337
+ 'filter[endDate]'?: string | undefined;
8338
+ 'filter[status]'?: string | undefined;
8339
+ 'filter[crop]'?: string | undefined;
8340
+ }>;
8341
+ summary: "Get budget vs actuals intelligence";
8342
+ method: "GET";
8343
+ path: "/farms/:farmId/finance/intelligence/budget-vs-actuals";
8344
+ responses: {
8345
+ 200: z.ZodObject<{
8346
+ data: z.ZodObject<{
8347
+ type: z.ZodLiteral<"finance-budget-vs-actuals">;
8348
+ id: z.ZodString;
8349
+ attributes: z.ZodObject<{
8350
+ totalPlanned: z.ZodNumber;
8351
+ totalActual: z.ZodNumber;
8352
+ variance: z.ZodNumber;
8353
+ variancePercentage: z.ZodNumber;
8354
+ categoryBreakdown: z.ZodArray<z.ZodObject<{
8355
+ category: z.ZodString;
8356
+ planned: z.ZodNumber;
8357
+ actual: z.ZodNumber;
8358
+ variance: z.ZodNumber;
8359
+ variancePercentage: z.ZodNumber;
8360
+ status: z.ZodEnum<["on_track", "over_budget", "under_budget"]>;
8361
+ }, "strip", z.ZodTypeAny, {
8362
+ status: "on_track" | "over_budget" | "under_budget";
8363
+ category: string;
8364
+ planned: number;
8365
+ actual: number;
8366
+ variance: number;
8367
+ variancePercentage: number;
8368
+ }, {
8369
+ status: "on_track" | "over_budget" | "under_budget";
8370
+ category: string;
8371
+ planned: number;
8372
+ actual: number;
8373
+ variance: number;
8374
+ variancePercentage: number;
8375
+ }>, "many">;
8376
+ forecast: z.ZodObject<{
8377
+ projectedSpending: z.ZodNumber;
8378
+ projectedVariance: z.ZodNumber;
8379
+ projectedEndDate: z.ZodString;
8380
+ }, "strip", z.ZodTypeAny, {
8381
+ projectedSpending: number;
8382
+ projectedVariance: number;
8383
+ projectedEndDate: string;
8384
+ }, {
8385
+ projectedSpending: number;
8386
+ projectedVariance: number;
8387
+ projectedEndDate: string;
8388
+ }>;
8389
+ }, "strip", z.ZodTypeAny, {
8390
+ totalPlanned: number;
8391
+ totalActual: number;
8392
+ variance: number;
8393
+ variancePercentage: number;
8394
+ categoryBreakdown: {
8395
+ status: "on_track" | "over_budget" | "under_budget";
8396
+ category: string;
8397
+ planned: number;
8398
+ actual: number;
8399
+ variance: number;
8400
+ variancePercentage: number;
8401
+ }[];
8402
+ forecast: {
8403
+ projectedSpending: number;
8404
+ projectedVariance: number;
8405
+ projectedEndDate: string;
8406
+ };
8407
+ }, {
8408
+ totalPlanned: number;
8409
+ totalActual: number;
8410
+ variance: number;
8411
+ variancePercentage: number;
8412
+ categoryBreakdown: {
8413
+ status: "on_track" | "over_budget" | "under_budget";
8414
+ category: string;
8415
+ planned: number;
8416
+ actual: number;
8417
+ variance: number;
8418
+ variancePercentage: number;
8419
+ }[];
8420
+ forecast: {
8421
+ projectedSpending: number;
8422
+ projectedVariance: number;
8423
+ projectedEndDate: string;
8424
+ };
8425
+ }>;
8426
+ }, "strip", z.ZodTypeAny, {
8427
+ type: "finance-budget-vs-actuals";
8428
+ id: string;
8429
+ attributes: {
8430
+ totalPlanned: number;
8431
+ totalActual: number;
8432
+ variance: number;
8433
+ variancePercentage: number;
8434
+ categoryBreakdown: {
8435
+ status: "on_track" | "over_budget" | "under_budget";
8436
+ category: string;
8437
+ planned: number;
8438
+ actual: number;
8439
+ variance: number;
8440
+ variancePercentage: number;
8441
+ }[];
8442
+ forecast: {
8443
+ projectedSpending: number;
8444
+ projectedVariance: number;
8445
+ projectedEndDate: string;
8446
+ };
8447
+ };
8448
+ }, {
8449
+ type: "finance-budget-vs-actuals";
8450
+ id: string;
8451
+ attributes: {
8452
+ totalPlanned: number;
8453
+ totalActual: number;
8454
+ variance: number;
8455
+ variancePercentage: number;
8456
+ categoryBreakdown: {
8457
+ status: "on_track" | "over_budget" | "under_budget";
8458
+ category: string;
8459
+ planned: number;
8460
+ actual: number;
8461
+ variance: number;
8462
+ variancePercentage: number;
8463
+ }[];
8464
+ forecast: {
8465
+ projectedSpending: number;
8466
+ projectedVariance: number;
8467
+ projectedEndDate: string;
8468
+ };
8469
+ };
8470
+ }>;
8471
+ }, "strip", z.ZodTypeAny, {
8472
+ data: {
8473
+ type: "finance-budget-vs-actuals";
8474
+ id: string;
8475
+ attributes: {
8476
+ totalPlanned: number;
8477
+ totalActual: number;
8478
+ variance: number;
8479
+ variancePercentage: number;
8480
+ categoryBreakdown: {
8481
+ status: "on_track" | "over_budget" | "under_budget";
8482
+ category: string;
8483
+ planned: number;
8484
+ actual: number;
8485
+ variance: number;
8486
+ variancePercentage: number;
8487
+ }[];
8488
+ forecast: {
8489
+ projectedSpending: number;
8490
+ projectedVariance: number;
8491
+ projectedEndDate: string;
8492
+ };
8493
+ };
8494
+ };
8495
+ }, {
8496
+ data: {
8497
+ type: "finance-budget-vs-actuals";
8498
+ id: string;
8499
+ attributes: {
8500
+ totalPlanned: number;
8501
+ totalActual: number;
8502
+ variance: number;
8503
+ variancePercentage: number;
8504
+ categoryBreakdown: {
8505
+ status: "on_track" | "over_budget" | "under_budget";
8506
+ category: string;
8507
+ planned: number;
8508
+ actual: number;
8509
+ variance: number;
8510
+ variancePercentage: number;
8511
+ }[];
8512
+ forecast: {
8513
+ projectedSpending: number;
8514
+ projectedVariance: number;
8515
+ projectedEndDate: string;
8516
+ };
8517
+ };
8518
+ };
8519
+ }>;
8520
+ 404: z.ZodObject<{
8521
+ errors: z.ZodArray<z.ZodObject<{
8522
+ id: z.ZodOptional<z.ZodString>;
8523
+ links: z.ZodOptional<z.ZodObject<{
8524
+ about: z.ZodOptional<z.ZodString>;
8525
+ }, "strip", z.ZodTypeAny, {
8526
+ about?: string | undefined;
8527
+ }, {
8528
+ about?: string | undefined;
8529
+ }>>;
8530
+ status: z.ZodOptional<z.ZodString>;
8531
+ code: z.ZodOptional<z.ZodString>;
8532
+ title: z.ZodOptional<z.ZodString>;
8533
+ detail: z.ZodOptional<z.ZodString>;
8534
+ source: z.ZodOptional<z.ZodObject<{
8535
+ pointer: z.ZodOptional<z.ZodString>;
8536
+ parameter: z.ZodOptional<z.ZodString>;
8537
+ }, "strip", z.ZodTypeAny, {
8538
+ pointer?: string | undefined;
8539
+ parameter?: string | undefined;
8540
+ }, {
8541
+ pointer?: string | undefined;
8542
+ parameter?: string | undefined;
8543
+ }>>;
8544
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8545
+ }, "strip", z.ZodTypeAny, {
8546
+ status?: string | undefined;
8547
+ code?: string | undefined;
8548
+ id?: string | undefined;
8549
+ links?: {
8550
+ about?: string | undefined;
8551
+ } | undefined;
8552
+ meta?: Record<string, unknown> | undefined;
8553
+ title?: string | undefined;
8554
+ detail?: string | undefined;
8555
+ source?: {
8556
+ pointer?: string | undefined;
8557
+ parameter?: string | undefined;
8558
+ } | undefined;
8559
+ }, {
8560
+ status?: string | undefined;
8561
+ code?: string | undefined;
8562
+ id?: string | undefined;
8563
+ links?: {
8564
+ about?: string | undefined;
8565
+ } | undefined;
8566
+ meta?: Record<string, unknown> | undefined;
8567
+ title?: string | undefined;
8568
+ detail?: string | undefined;
8569
+ source?: {
8570
+ pointer?: string | undefined;
8571
+ parameter?: string | undefined;
8572
+ } | undefined;
8573
+ }>, "many">;
8574
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8575
+ }, "strip", z.ZodTypeAny, {
8576
+ errors: {
8577
+ status?: string | undefined;
8578
+ code?: string | undefined;
8579
+ id?: string | undefined;
8580
+ links?: {
8581
+ about?: string | undefined;
8582
+ } | undefined;
8583
+ meta?: Record<string, unknown> | undefined;
8584
+ title?: string | undefined;
8585
+ detail?: string | undefined;
8586
+ source?: {
8587
+ pointer?: string | undefined;
8588
+ parameter?: string | undefined;
8589
+ } | undefined;
8590
+ }[];
8591
+ meta?: Record<string, unknown> | undefined;
8592
+ }, {
8593
+ errors: {
8594
+ status?: string | undefined;
8595
+ code?: string | undefined;
8596
+ id?: string | undefined;
8597
+ links?: {
8598
+ about?: string | undefined;
8599
+ } | undefined;
8600
+ meta?: Record<string, unknown> | undefined;
8601
+ title?: string | undefined;
8602
+ detail?: string | undefined;
8603
+ source?: {
8604
+ pointer?: string | undefined;
8605
+ parameter?: string | undefined;
8606
+ } | undefined;
8607
+ }[];
8608
+ meta?: Record<string, unknown> | undefined;
8609
+ }>;
8610
+ 401: z.ZodObject<{
8611
+ errors: z.ZodArray<z.ZodObject<{
8612
+ id: z.ZodOptional<z.ZodString>;
8613
+ links: z.ZodOptional<z.ZodObject<{
8614
+ about: z.ZodOptional<z.ZodString>;
8615
+ }, "strip", z.ZodTypeAny, {
8616
+ about?: string | undefined;
8617
+ }, {
8618
+ about?: string | undefined;
8619
+ }>>;
8620
+ status: z.ZodOptional<z.ZodString>;
8621
+ code: z.ZodOptional<z.ZodString>;
8622
+ title: z.ZodOptional<z.ZodString>;
8623
+ detail: z.ZodOptional<z.ZodString>;
8624
+ source: z.ZodOptional<z.ZodObject<{
8625
+ pointer: z.ZodOptional<z.ZodString>;
8626
+ parameter: z.ZodOptional<z.ZodString>;
8627
+ }, "strip", z.ZodTypeAny, {
8628
+ pointer?: string | undefined;
8629
+ parameter?: string | undefined;
8630
+ }, {
8631
+ pointer?: string | undefined;
8632
+ parameter?: string | undefined;
8633
+ }>>;
8634
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8635
+ }, "strip", z.ZodTypeAny, {
8636
+ status?: string | undefined;
8637
+ code?: string | undefined;
8638
+ id?: string | undefined;
8639
+ links?: {
8640
+ about?: string | undefined;
8641
+ } | undefined;
8642
+ meta?: Record<string, unknown> | undefined;
8643
+ title?: string | undefined;
8644
+ detail?: string | undefined;
8645
+ source?: {
8646
+ pointer?: string | undefined;
8647
+ parameter?: string | undefined;
8648
+ } | undefined;
8649
+ }, {
8650
+ status?: string | undefined;
8651
+ code?: string | undefined;
8652
+ id?: string | undefined;
8653
+ links?: {
8654
+ about?: string | undefined;
8655
+ } | undefined;
8656
+ meta?: Record<string, unknown> | undefined;
8657
+ title?: string | undefined;
8658
+ detail?: string | undefined;
8659
+ source?: {
8660
+ pointer?: string | undefined;
8661
+ parameter?: string | undefined;
8662
+ } | undefined;
8663
+ }>, "many">;
8664
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8665
+ }, "strip", z.ZodTypeAny, {
8666
+ errors: {
8667
+ status?: string | undefined;
8668
+ code?: string | undefined;
8669
+ id?: string | undefined;
8670
+ links?: {
8671
+ about?: string | undefined;
8672
+ } | undefined;
8673
+ meta?: Record<string, unknown> | undefined;
8674
+ title?: string | undefined;
8675
+ detail?: string | undefined;
8676
+ source?: {
8677
+ pointer?: string | undefined;
8678
+ parameter?: string | undefined;
8679
+ } | undefined;
8680
+ }[];
8681
+ meta?: Record<string, unknown> | undefined;
8682
+ }, {
8683
+ errors: {
8684
+ status?: string | undefined;
8685
+ code?: string | undefined;
8686
+ id?: string | undefined;
8687
+ links?: {
8688
+ about?: string | undefined;
8689
+ } | undefined;
8690
+ meta?: Record<string, unknown> | undefined;
8691
+ title?: string | undefined;
8692
+ detail?: string | undefined;
8693
+ source?: {
8694
+ pointer?: string | undefined;
8695
+ parameter?: string | undefined;
8696
+ } | undefined;
8697
+ }[];
8698
+ meta?: Record<string, unknown> | undefined;
8699
+ }>;
8700
+ };
8701
+ };
8702
+ getCostBenchmark: {
8703
+ pathParams: z.ZodObject<{
8704
+ farmId: z.ZodString;
8705
+ }, "strip", z.ZodTypeAny, {
8706
+ farmId: string;
8707
+ }, {
8708
+ farmId: string;
8709
+ }>;
8710
+ query: z.ZodObject<{
8711
+ 'filter[startDate]': z.ZodOptional<z.ZodString>;
8712
+ 'filter[endDate]': z.ZodOptional<z.ZodString>;
8713
+ 'filter[status]': z.ZodOptional<z.ZodString>;
8714
+ 'filter[crop]': z.ZodOptional<z.ZodString>;
8715
+ }, "strip", z.ZodTypeAny, {
8716
+ 'filter[startDate]'?: string | undefined;
8717
+ 'filter[endDate]'?: string | undefined;
8718
+ 'filter[status]'?: string | undefined;
8719
+ 'filter[crop]'?: string | undefined;
8720
+ }, {
8721
+ 'filter[startDate]'?: string | undefined;
8722
+ 'filter[endDate]'?: string | undefined;
8723
+ 'filter[status]'?: string | undefined;
8724
+ 'filter[crop]'?: string | undefined;
8725
+ }>;
8726
+ summary: "Get cost benchmarking by field";
8727
+ method: "GET";
8728
+ path: "/farms/:farmId/finance/intelligence/cost-benchmark";
8729
+ responses: {
8730
+ 200: z.ZodObject<{
8731
+ data: z.ZodObject<{
8732
+ type: z.ZodLiteral<"finance-cost-benchmark">;
8733
+ id: z.ZodString;
8734
+ attributes: z.ZodObject<{
8735
+ farmAverageCostPerHectare: z.ZodNumber;
8736
+ fields: z.ZodArray<z.ZodObject<{
8737
+ fieldId: z.ZodString;
8738
+ fieldName: z.ZodString;
8739
+ costPerHectare: z.ZodNumber;
8740
+ revenuePerHectare: z.ZodNumber;
8741
+ netPerHectare: z.ZodNumber;
8742
+ benchmarkDeltaPercent: z.ZodNumber;
8743
+ }, "strip", z.ZodTypeAny, {
8744
+ fieldId: string;
8745
+ fieldName: string;
8746
+ costPerHectare: number;
8747
+ revenuePerHectare: number;
8748
+ netPerHectare: number;
8749
+ benchmarkDeltaPercent: number;
8750
+ }, {
8751
+ fieldId: string;
8752
+ fieldName: string;
8753
+ costPerHectare: number;
8754
+ revenuePerHectare: number;
8755
+ netPerHectare: number;
8756
+ benchmarkDeltaPercent: number;
8757
+ }>, "many">;
8758
+ }, "strip", z.ZodTypeAny, {
8759
+ fields: {
8760
+ fieldId: string;
8761
+ fieldName: string;
8762
+ costPerHectare: number;
8763
+ revenuePerHectare: number;
8764
+ netPerHectare: number;
8765
+ benchmarkDeltaPercent: number;
8766
+ }[];
8767
+ farmAverageCostPerHectare: number;
8768
+ }, {
8769
+ fields: {
8770
+ fieldId: string;
8771
+ fieldName: string;
8772
+ costPerHectare: number;
8773
+ revenuePerHectare: number;
8774
+ netPerHectare: number;
8775
+ benchmarkDeltaPercent: number;
8776
+ }[];
8777
+ farmAverageCostPerHectare: number;
8778
+ }>;
8779
+ }, "strip", z.ZodTypeAny, {
8780
+ type: "finance-cost-benchmark";
8781
+ id: string;
8782
+ attributes: {
8783
+ fields: {
8784
+ fieldId: string;
8785
+ fieldName: string;
8786
+ costPerHectare: number;
8787
+ revenuePerHectare: number;
8788
+ netPerHectare: number;
8789
+ benchmarkDeltaPercent: number;
8790
+ }[];
8791
+ farmAverageCostPerHectare: number;
8792
+ };
8793
+ }, {
8794
+ type: "finance-cost-benchmark";
8795
+ id: string;
8796
+ attributes: {
8797
+ fields: {
8798
+ fieldId: string;
8799
+ fieldName: string;
8800
+ costPerHectare: number;
8801
+ revenuePerHectare: number;
8802
+ netPerHectare: number;
8803
+ benchmarkDeltaPercent: number;
8804
+ }[];
8805
+ farmAverageCostPerHectare: number;
8806
+ };
8807
+ }>;
8808
+ }, "strip", z.ZodTypeAny, {
8809
+ data: {
8810
+ type: "finance-cost-benchmark";
8811
+ id: string;
8812
+ attributes: {
8813
+ fields: {
8814
+ fieldId: string;
8815
+ fieldName: string;
8816
+ costPerHectare: number;
8817
+ revenuePerHectare: number;
8818
+ netPerHectare: number;
8819
+ benchmarkDeltaPercent: number;
8820
+ }[];
8821
+ farmAverageCostPerHectare: number;
8822
+ };
8823
+ };
8824
+ }, {
8825
+ data: {
8826
+ type: "finance-cost-benchmark";
8827
+ id: string;
8828
+ attributes: {
8829
+ fields: {
8830
+ fieldId: string;
8831
+ fieldName: string;
8832
+ costPerHectare: number;
8833
+ revenuePerHectare: number;
8834
+ netPerHectare: number;
8835
+ benchmarkDeltaPercent: number;
8836
+ }[];
8837
+ farmAverageCostPerHectare: number;
8838
+ };
8839
+ };
8840
+ }>;
8841
+ 404: z.ZodObject<{
8842
+ errors: z.ZodArray<z.ZodObject<{
8843
+ id: z.ZodOptional<z.ZodString>;
8844
+ links: z.ZodOptional<z.ZodObject<{
8845
+ about: z.ZodOptional<z.ZodString>;
8846
+ }, "strip", z.ZodTypeAny, {
8847
+ about?: string | undefined;
8848
+ }, {
8849
+ about?: string | undefined;
8850
+ }>>;
8851
+ status: z.ZodOptional<z.ZodString>;
8852
+ code: z.ZodOptional<z.ZodString>;
8853
+ title: z.ZodOptional<z.ZodString>;
8854
+ detail: z.ZodOptional<z.ZodString>;
8855
+ source: z.ZodOptional<z.ZodObject<{
8856
+ pointer: z.ZodOptional<z.ZodString>;
8857
+ parameter: z.ZodOptional<z.ZodString>;
8858
+ }, "strip", z.ZodTypeAny, {
8859
+ pointer?: string | undefined;
8860
+ parameter?: string | undefined;
8861
+ }, {
8862
+ pointer?: string | undefined;
8863
+ parameter?: string | undefined;
8864
+ }>>;
8865
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8866
+ }, "strip", z.ZodTypeAny, {
8867
+ status?: string | undefined;
8868
+ code?: string | undefined;
8869
+ id?: string | undefined;
8870
+ links?: {
8871
+ about?: string | undefined;
8872
+ } | undefined;
8873
+ meta?: Record<string, unknown> | undefined;
8874
+ title?: string | undefined;
8875
+ detail?: string | undefined;
8876
+ source?: {
8877
+ pointer?: string | undefined;
8878
+ parameter?: string | undefined;
8879
+ } | undefined;
8880
+ }, {
8881
+ status?: string | undefined;
8882
+ code?: string | undefined;
8883
+ id?: string | undefined;
8884
+ links?: {
8885
+ about?: string | undefined;
8886
+ } | undefined;
8887
+ meta?: Record<string, unknown> | undefined;
8888
+ title?: string | undefined;
8889
+ detail?: string | undefined;
8890
+ source?: {
8891
+ pointer?: string | undefined;
8892
+ parameter?: string | undefined;
8893
+ } | undefined;
8894
+ }>, "many">;
8895
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8896
+ }, "strip", z.ZodTypeAny, {
8897
+ errors: {
8898
+ status?: string | undefined;
8899
+ code?: string | undefined;
8900
+ id?: string | undefined;
8901
+ links?: {
8902
+ about?: string | undefined;
8903
+ } | undefined;
8904
+ meta?: Record<string, unknown> | undefined;
8905
+ title?: string | undefined;
8906
+ detail?: string | undefined;
8907
+ source?: {
8908
+ pointer?: string | undefined;
8909
+ parameter?: string | undefined;
8910
+ } | undefined;
8911
+ }[];
8912
+ meta?: Record<string, unknown> | undefined;
8913
+ }, {
8914
+ errors: {
8915
+ status?: string | undefined;
8916
+ code?: string | undefined;
8917
+ id?: string | undefined;
8918
+ links?: {
8919
+ about?: string | undefined;
8920
+ } | undefined;
8921
+ meta?: Record<string, unknown> | undefined;
8922
+ title?: string | undefined;
8923
+ detail?: string | undefined;
8924
+ source?: {
8925
+ pointer?: string | undefined;
8926
+ parameter?: string | undefined;
8927
+ } | undefined;
8928
+ }[];
8929
+ meta?: Record<string, unknown> | undefined;
8930
+ }>;
8931
+ 401: z.ZodObject<{
8932
+ errors: z.ZodArray<z.ZodObject<{
8933
+ id: z.ZodOptional<z.ZodString>;
8934
+ links: z.ZodOptional<z.ZodObject<{
8935
+ about: z.ZodOptional<z.ZodString>;
8936
+ }, "strip", z.ZodTypeAny, {
8937
+ about?: string | undefined;
8938
+ }, {
8939
+ about?: string | undefined;
8940
+ }>>;
8941
+ status: z.ZodOptional<z.ZodString>;
8942
+ code: z.ZodOptional<z.ZodString>;
8943
+ title: z.ZodOptional<z.ZodString>;
8944
+ detail: z.ZodOptional<z.ZodString>;
8945
+ source: z.ZodOptional<z.ZodObject<{
8946
+ pointer: z.ZodOptional<z.ZodString>;
8947
+ parameter: z.ZodOptional<z.ZodString>;
8948
+ }, "strip", z.ZodTypeAny, {
8949
+ pointer?: string | undefined;
8950
+ parameter?: string | undefined;
8951
+ }, {
8952
+ pointer?: string | undefined;
8953
+ parameter?: string | undefined;
8954
+ }>>;
8955
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8956
+ }, "strip", z.ZodTypeAny, {
8957
+ status?: string | undefined;
8958
+ code?: string | undefined;
8959
+ id?: string | undefined;
8960
+ links?: {
8961
+ about?: string | undefined;
8962
+ } | undefined;
8963
+ meta?: Record<string, unknown> | undefined;
8964
+ title?: string | undefined;
8965
+ detail?: string | undefined;
8966
+ source?: {
8967
+ pointer?: string | undefined;
8968
+ parameter?: string | undefined;
8969
+ } | undefined;
8970
+ }, {
8971
+ status?: string | undefined;
8972
+ code?: string | undefined;
8973
+ id?: string | undefined;
8974
+ links?: {
8975
+ about?: string | undefined;
8976
+ } | undefined;
8977
+ meta?: Record<string, unknown> | undefined;
8978
+ title?: string | undefined;
8979
+ detail?: string | undefined;
8980
+ source?: {
8981
+ pointer?: string | undefined;
8982
+ parameter?: string | undefined;
8983
+ } | undefined;
8984
+ }>, "many">;
8985
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8986
+ }, "strip", z.ZodTypeAny, {
8987
+ errors: {
8988
+ status?: string | undefined;
8989
+ code?: string | undefined;
8990
+ id?: string | undefined;
8991
+ links?: {
8992
+ about?: string | undefined;
8993
+ } | undefined;
8994
+ meta?: Record<string, unknown> | undefined;
8995
+ title?: string | undefined;
8996
+ detail?: string | undefined;
8997
+ source?: {
8998
+ pointer?: string | undefined;
8999
+ parameter?: string | undefined;
9000
+ } | undefined;
9001
+ }[];
9002
+ meta?: Record<string, unknown> | undefined;
9003
+ }, {
9004
+ errors: {
9005
+ status?: string | undefined;
9006
+ code?: string | undefined;
9007
+ id?: string | undefined;
9008
+ links?: {
9009
+ about?: string | undefined;
9010
+ } | undefined;
9011
+ meta?: Record<string, unknown> | undefined;
9012
+ title?: string | undefined;
9013
+ detail?: string | undefined;
9014
+ source?: {
9015
+ pointer?: string | undefined;
9016
+ parameter?: string | undefined;
9017
+ } | undefined;
9018
+ }[];
9019
+ meta?: Record<string, unknown> | undefined;
9020
+ }>;
9021
+ };
9022
+ };
9023
+ rankBuyerOffers: {
9024
+ pathParams: z.ZodObject<{
9025
+ farmId: z.ZodString;
9026
+ }, "strip", z.ZodTypeAny, {
9027
+ farmId: string;
9028
+ }, {
9029
+ farmId: string;
9030
+ }>;
9031
+ summary: "Rank buyer offers by net value";
9032
+ method: "POST";
9033
+ body: z.ZodObject<{
9034
+ offers: z.ZodArray<z.ZodObject<{
9035
+ buyerName: z.ZodString;
9036
+ crop: z.ZodString;
9037
+ quantity: z.ZodNumber;
9038
+ unitPrice: z.ZodNumber;
9039
+ transportCost: z.ZodDefault<z.ZodNumber>;
9040
+ paymentTermsDays: z.ZodDefault<z.ZodNumber>;
9041
+ advanceRate: z.ZodDefault<z.ZodNumber>;
9042
+ }, "strip", z.ZodTypeAny, {
9043
+ crop: string;
9044
+ quantity: number;
9045
+ buyerName: string;
9046
+ unitPrice: number;
9047
+ transportCost: number;
9048
+ paymentTermsDays: number;
9049
+ advanceRate: number;
9050
+ }, {
9051
+ crop: string;
9052
+ quantity: number;
9053
+ buyerName: string;
9054
+ unitPrice: number;
9055
+ transportCost?: number | undefined;
9056
+ paymentTermsDays?: number | undefined;
9057
+ advanceRate?: number | undefined;
9058
+ }>, "many">;
9059
+ }, "strip", z.ZodTypeAny, {
9060
+ offers: {
9061
+ crop: string;
9062
+ quantity: number;
9063
+ buyerName: string;
9064
+ unitPrice: number;
9065
+ transportCost: number;
9066
+ paymentTermsDays: number;
9067
+ advanceRate: number;
9068
+ }[];
9069
+ }, {
9070
+ offers: {
9071
+ crop: string;
9072
+ quantity: number;
9073
+ buyerName: string;
9074
+ unitPrice: number;
9075
+ transportCost?: number | undefined;
9076
+ paymentTermsDays?: number | undefined;
9077
+ advanceRate?: number | undefined;
9078
+ }[];
9079
+ }>;
9080
+ path: "/farms/:farmId/finance/intelligence/buyer-offers/rank";
9081
+ responses: {
9082
+ 200: z.ZodObject<{
9083
+ data: z.ZodObject<{
9084
+ type: z.ZodLiteral<"finance-buyer-offer-rank">;
9085
+ id: z.ZodString;
9086
+ attributes: z.ZodObject<{
9087
+ rankedOffers: z.ZodArray<z.ZodObject<{
9088
+ buyerName: z.ZodString;
9089
+ score: z.ZodNumber;
9090
+ netValue: z.ZodNumber;
9091
+ riskAdjustedValue: z.ZodNumber;
9092
+ rationale: z.ZodString;
9093
+ }, "strip", z.ZodTypeAny, {
9094
+ buyerName: string;
9095
+ score: number;
9096
+ netValue: number;
9097
+ riskAdjustedValue: number;
9098
+ rationale: string;
9099
+ }, {
9100
+ buyerName: string;
9101
+ score: number;
9102
+ netValue: number;
9103
+ riskAdjustedValue: number;
9104
+ rationale: string;
9105
+ }>, "many">;
9106
+ }, "strip", z.ZodTypeAny, {
9107
+ rankedOffers: {
9108
+ buyerName: string;
9109
+ score: number;
9110
+ netValue: number;
9111
+ riskAdjustedValue: number;
9112
+ rationale: string;
9113
+ }[];
9114
+ }, {
9115
+ rankedOffers: {
9116
+ buyerName: string;
9117
+ score: number;
9118
+ netValue: number;
9119
+ riskAdjustedValue: number;
9120
+ rationale: string;
9121
+ }[];
9122
+ }>;
9123
+ }, "strip", z.ZodTypeAny, {
9124
+ type: "finance-buyer-offer-rank";
9125
+ id: string;
9126
+ attributes: {
9127
+ rankedOffers: {
9128
+ buyerName: string;
9129
+ score: number;
9130
+ netValue: number;
9131
+ riskAdjustedValue: number;
9132
+ rationale: string;
9133
+ }[];
9134
+ };
9135
+ }, {
9136
+ type: "finance-buyer-offer-rank";
9137
+ id: string;
9138
+ attributes: {
9139
+ rankedOffers: {
9140
+ buyerName: string;
9141
+ score: number;
9142
+ netValue: number;
9143
+ riskAdjustedValue: number;
9144
+ rationale: string;
9145
+ }[];
9146
+ };
9147
+ }>;
9148
+ }, "strip", z.ZodTypeAny, {
9149
+ data: {
9150
+ type: "finance-buyer-offer-rank";
9151
+ id: string;
9152
+ attributes: {
9153
+ rankedOffers: {
9154
+ buyerName: string;
9155
+ score: number;
9156
+ netValue: number;
9157
+ riskAdjustedValue: number;
9158
+ rationale: string;
9159
+ }[];
9160
+ };
9161
+ };
9162
+ }, {
9163
+ data: {
9164
+ type: "finance-buyer-offer-rank";
9165
+ id: string;
9166
+ attributes: {
9167
+ rankedOffers: {
9168
+ buyerName: string;
9169
+ score: number;
9170
+ netValue: number;
9171
+ riskAdjustedValue: number;
9172
+ rationale: string;
9173
+ }[];
9174
+ };
9175
+ };
9176
+ }>;
9177
+ 400: z.ZodObject<{
9178
+ errors: z.ZodArray<z.ZodObject<{
9179
+ id: z.ZodOptional<z.ZodString>;
9180
+ links: z.ZodOptional<z.ZodObject<{
9181
+ about: z.ZodOptional<z.ZodString>;
9182
+ }, "strip", z.ZodTypeAny, {
9183
+ about?: string | undefined;
9184
+ }, {
9185
+ about?: string | undefined;
9186
+ }>>;
9187
+ status: z.ZodOptional<z.ZodString>;
9188
+ code: z.ZodOptional<z.ZodString>;
9189
+ title: z.ZodOptional<z.ZodString>;
9190
+ detail: z.ZodOptional<z.ZodString>;
9191
+ source: z.ZodOptional<z.ZodObject<{
9192
+ pointer: z.ZodOptional<z.ZodString>;
9193
+ parameter: z.ZodOptional<z.ZodString>;
9194
+ }, "strip", z.ZodTypeAny, {
9195
+ pointer?: string | undefined;
9196
+ parameter?: string | undefined;
9197
+ }, {
9198
+ pointer?: string | undefined;
9199
+ parameter?: string | undefined;
9200
+ }>>;
9201
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9202
+ }, "strip", z.ZodTypeAny, {
9203
+ status?: string | undefined;
9204
+ code?: string | undefined;
9205
+ id?: string | undefined;
9206
+ links?: {
9207
+ about?: string | undefined;
9208
+ } | undefined;
9209
+ meta?: Record<string, unknown> | undefined;
9210
+ title?: string | undefined;
9211
+ detail?: string | undefined;
9212
+ source?: {
9213
+ pointer?: string | undefined;
9214
+ parameter?: string | undefined;
9215
+ } | undefined;
9216
+ }, {
9217
+ status?: string | undefined;
9218
+ code?: string | undefined;
9219
+ id?: string | undefined;
9220
+ links?: {
9221
+ about?: string | undefined;
9222
+ } | undefined;
9223
+ meta?: Record<string, unknown> | undefined;
9224
+ title?: string | undefined;
9225
+ detail?: string | undefined;
9226
+ source?: {
9227
+ pointer?: string | undefined;
9228
+ parameter?: string | undefined;
9229
+ } | undefined;
9230
+ }>, "many">;
9231
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9232
+ }, "strip", z.ZodTypeAny, {
9233
+ errors: {
9234
+ status?: string | undefined;
9235
+ code?: string | undefined;
9236
+ id?: string | undefined;
9237
+ links?: {
9238
+ about?: string | undefined;
9239
+ } | undefined;
9240
+ meta?: Record<string, unknown> | undefined;
9241
+ title?: string | undefined;
9242
+ detail?: string | undefined;
9243
+ source?: {
9244
+ pointer?: string | undefined;
9245
+ parameter?: string | undefined;
9246
+ } | undefined;
9247
+ }[];
9248
+ meta?: Record<string, unknown> | undefined;
9249
+ }, {
9250
+ errors: {
9251
+ status?: string | undefined;
9252
+ code?: string | undefined;
9253
+ id?: string | undefined;
9254
+ links?: {
9255
+ about?: string | undefined;
9256
+ } | undefined;
9257
+ meta?: Record<string, unknown> | undefined;
9258
+ title?: string | undefined;
9259
+ detail?: string | undefined;
9260
+ source?: {
9261
+ pointer?: string | undefined;
9262
+ parameter?: string | undefined;
9263
+ } | undefined;
9264
+ }[];
9265
+ meta?: Record<string, unknown> | undefined;
9266
+ }>;
9267
+ 404: z.ZodObject<{
9268
+ errors: z.ZodArray<z.ZodObject<{
9269
+ id: z.ZodOptional<z.ZodString>;
9270
+ links: z.ZodOptional<z.ZodObject<{
9271
+ about: z.ZodOptional<z.ZodString>;
9272
+ }, "strip", z.ZodTypeAny, {
9273
+ about?: string | undefined;
9274
+ }, {
9275
+ about?: string | undefined;
9276
+ }>>;
9277
+ status: z.ZodOptional<z.ZodString>;
9278
+ code: z.ZodOptional<z.ZodString>;
9279
+ title: z.ZodOptional<z.ZodString>;
9280
+ detail: z.ZodOptional<z.ZodString>;
9281
+ source: z.ZodOptional<z.ZodObject<{
9282
+ pointer: z.ZodOptional<z.ZodString>;
9283
+ parameter: z.ZodOptional<z.ZodString>;
9284
+ }, "strip", z.ZodTypeAny, {
9285
+ pointer?: string | undefined;
9286
+ parameter?: string | undefined;
9287
+ }, {
9288
+ pointer?: string | undefined;
9289
+ parameter?: string | undefined;
9290
+ }>>;
9291
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9292
+ }, "strip", z.ZodTypeAny, {
9293
+ status?: string | undefined;
9294
+ code?: string | undefined;
9295
+ id?: string | undefined;
9296
+ links?: {
9297
+ about?: string | undefined;
9298
+ } | undefined;
9299
+ meta?: Record<string, unknown> | undefined;
9300
+ title?: string | undefined;
9301
+ detail?: string | undefined;
9302
+ source?: {
9303
+ pointer?: string | undefined;
9304
+ parameter?: string | undefined;
9305
+ } | undefined;
9306
+ }, {
9307
+ status?: string | undefined;
9308
+ code?: string | undefined;
9309
+ id?: string | undefined;
9310
+ links?: {
9311
+ about?: string | undefined;
9312
+ } | undefined;
9313
+ meta?: Record<string, unknown> | undefined;
9314
+ title?: string | undefined;
9315
+ detail?: string | undefined;
9316
+ source?: {
9317
+ pointer?: string | undefined;
9318
+ parameter?: string | undefined;
9319
+ } | undefined;
9320
+ }>, "many">;
9321
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9322
+ }, "strip", z.ZodTypeAny, {
9323
+ errors: {
9324
+ status?: string | undefined;
9325
+ code?: string | undefined;
9326
+ id?: string | undefined;
9327
+ links?: {
9328
+ about?: string | undefined;
9329
+ } | undefined;
9330
+ meta?: Record<string, unknown> | undefined;
9331
+ title?: string | undefined;
9332
+ detail?: string | undefined;
9333
+ source?: {
9334
+ pointer?: string | undefined;
9335
+ parameter?: string | undefined;
9336
+ } | undefined;
9337
+ }[];
9338
+ meta?: Record<string, unknown> | undefined;
9339
+ }, {
9340
+ errors: {
9341
+ status?: string | undefined;
9342
+ code?: string | undefined;
9343
+ id?: string | undefined;
9344
+ links?: {
9345
+ about?: string | undefined;
9346
+ } | undefined;
9347
+ meta?: Record<string, unknown> | undefined;
9348
+ title?: string | undefined;
9349
+ detail?: string | undefined;
9350
+ source?: {
9351
+ pointer?: string | undefined;
9352
+ parameter?: string | undefined;
9353
+ } | undefined;
9354
+ }[];
9355
+ meta?: Record<string, unknown> | undefined;
9356
+ }>;
9357
+ 401: z.ZodObject<{
9358
+ errors: z.ZodArray<z.ZodObject<{
9359
+ id: z.ZodOptional<z.ZodString>;
9360
+ links: z.ZodOptional<z.ZodObject<{
9361
+ about: z.ZodOptional<z.ZodString>;
9362
+ }, "strip", z.ZodTypeAny, {
9363
+ about?: string | undefined;
9364
+ }, {
9365
+ about?: string | undefined;
9366
+ }>>;
9367
+ status: z.ZodOptional<z.ZodString>;
9368
+ code: z.ZodOptional<z.ZodString>;
9369
+ title: z.ZodOptional<z.ZodString>;
9370
+ detail: z.ZodOptional<z.ZodString>;
9371
+ source: z.ZodOptional<z.ZodObject<{
9372
+ pointer: z.ZodOptional<z.ZodString>;
9373
+ parameter: z.ZodOptional<z.ZodString>;
9374
+ }, "strip", z.ZodTypeAny, {
9375
+ pointer?: string | undefined;
9376
+ parameter?: string | undefined;
9377
+ }, {
9378
+ pointer?: string | undefined;
9379
+ parameter?: string | undefined;
9380
+ }>>;
9381
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9382
+ }, "strip", z.ZodTypeAny, {
9383
+ status?: string | undefined;
9384
+ code?: string | undefined;
9385
+ id?: string | undefined;
9386
+ links?: {
9387
+ about?: string | undefined;
9388
+ } | undefined;
9389
+ meta?: Record<string, unknown> | undefined;
9390
+ title?: string | undefined;
9391
+ detail?: string | undefined;
9392
+ source?: {
9393
+ pointer?: string | undefined;
9394
+ parameter?: string | undefined;
9395
+ } | undefined;
9396
+ }, {
9397
+ status?: string | undefined;
9398
+ code?: string | undefined;
9399
+ id?: string | undefined;
9400
+ links?: {
9401
+ about?: string | undefined;
9402
+ } | undefined;
9403
+ meta?: Record<string, unknown> | undefined;
9404
+ title?: string | undefined;
9405
+ detail?: string | undefined;
9406
+ source?: {
9407
+ pointer?: string | undefined;
9408
+ parameter?: string | undefined;
9409
+ } | undefined;
9410
+ }>, "many">;
9411
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9412
+ }, "strip", z.ZodTypeAny, {
9413
+ errors: {
9414
+ status?: string | undefined;
9415
+ code?: string | undefined;
9416
+ id?: string | undefined;
9417
+ links?: {
9418
+ about?: string | undefined;
9419
+ } | undefined;
9420
+ meta?: Record<string, unknown> | undefined;
9421
+ title?: string | undefined;
9422
+ detail?: string | undefined;
9423
+ source?: {
9424
+ pointer?: string | undefined;
9425
+ parameter?: string | undefined;
9426
+ } | undefined;
9427
+ }[];
9428
+ meta?: Record<string, unknown> | undefined;
9429
+ }, {
9430
+ errors: {
9431
+ status?: string | undefined;
9432
+ code?: string | undefined;
9433
+ id?: string | undefined;
9434
+ links?: {
9435
+ about?: string | undefined;
9436
+ } | undefined;
9437
+ meta?: Record<string, unknown> | undefined;
9438
+ title?: string | undefined;
9439
+ detail?: string | undefined;
9440
+ source?: {
9441
+ pointer?: string | undefined;
9442
+ parameter?: string | undefined;
9443
+ } | undefined;
9444
+ }[];
9445
+ meta?: Record<string, unknown> | undefined;
9446
+ }>;
9447
+ };
9448
+ };
9449
+ getROIAdvice: {
9450
+ pathParams: z.ZodObject<{
9451
+ farmId: z.ZodString;
9452
+ }, "strip", z.ZodTypeAny, {
9453
+ farmId: string;
9454
+ }, {
9455
+ farmId: string;
9456
+ }>;
9457
+ summary: "Get ROI recommendation for planned investment";
9458
+ method: "POST";
9459
+ body: z.ZodObject<{
9460
+ investmentName: z.ZodString;
9461
+ upfrontCost: z.ZodNumber;
9462
+ expectedAnnualBenefit: z.ZodNumber;
9463
+ expectedAnnualOperatingCost: z.ZodDefault<z.ZodNumber>;
9464
+ years: z.ZodDefault<z.ZodNumber>;
9465
+ }, "strip", z.ZodTypeAny, {
9466
+ investmentName: string;
9467
+ upfrontCost: number;
9468
+ expectedAnnualBenefit: number;
9469
+ expectedAnnualOperatingCost: number;
9470
+ years: number;
9471
+ }, {
9472
+ investmentName: string;
9473
+ upfrontCost: number;
9474
+ expectedAnnualBenefit: number;
9475
+ expectedAnnualOperatingCost?: number | undefined;
9476
+ years?: number | undefined;
9477
+ }>;
9478
+ path: "/farms/:farmId/finance/intelligence/roi-advice";
9479
+ responses: {
9480
+ 200: z.ZodObject<{
9481
+ data: z.ZodObject<{
9482
+ type: z.ZodLiteral<"finance-roi-advice">;
9483
+ id: z.ZodString;
9484
+ attributes: z.ZodObject<{
9485
+ investmentName: z.ZodString;
9486
+ totalBenefit: z.ZodNumber;
9487
+ totalCost: z.ZodNumber;
9488
+ netReturn: z.ZodNumber;
9489
+ roiPercent: z.ZodNumber;
9490
+ paybackYears: z.ZodNullable<z.ZodNumber>;
9491
+ recommendation: z.ZodEnum<["strong_yes", "yes", "cautious", "no"]>;
9492
+ }, "strip", z.ZodTypeAny, {
9493
+ totalCost: number;
9494
+ investmentName: string;
9495
+ totalBenefit: number;
9496
+ netReturn: number;
9497
+ roiPercent: number;
9498
+ paybackYears: number | null;
9499
+ recommendation: "strong_yes" | "yes" | "cautious" | "no";
9500
+ }, {
9501
+ totalCost: number;
9502
+ investmentName: string;
9503
+ totalBenefit: number;
9504
+ netReturn: number;
9505
+ roiPercent: number;
9506
+ paybackYears: number | null;
9507
+ recommendation: "strong_yes" | "yes" | "cautious" | "no";
9508
+ }>;
9509
+ }, "strip", z.ZodTypeAny, {
9510
+ type: "finance-roi-advice";
9511
+ id: string;
9512
+ attributes: {
9513
+ totalCost: number;
9514
+ investmentName: string;
9515
+ totalBenefit: number;
9516
+ netReturn: number;
9517
+ roiPercent: number;
9518
+ paybackYears: number | null;
9519
+ recommendation: "strong_yes" | "yes" | "cautious" | "no";
9520
+ };
9521
+ }, {
9522
+ type: "finance-roi-advice";
9523
+ id: string;
9524
+ attributes: {
9525
+ totalCost: number;
9526
+ investmentName: string;
9527
+ totalBenefit: number;
9528
+ netReturn: number;
9529
+ roiPercent: number;
9530
+ paybackYears: number | null;
9531
+ recommendation: "strong_yes" | "yes" | "cautious" | "no";
9532
+ };
9533
+ }>;
9534
+ }, "strip", z.ZodTypeAny, {
9535
+ data: {
9536
+ type: "finance-roi-advice";
9537
+ id: string;
9538
+ attributes: {
9539
+ totalCost: number;
9540
+ investmentName: string;
9541
+ totalBenefit: number;
9542
+ netReturn: number;
9543
+ roiPercent: number;
9544
+ paybackYears: number | null;
9545
+ recommendation: "strong_yes" | "yes" | "cautious" | "no";
9546
+ };
9547
+ };
9548
+ }, {
9549
+ data: {
9550
+ type: "finance-roi-advice";
9551
+ id: string;
9552
+ attributes: {
9553
+ totalCost: number;
9554
+ investmentName: string;
9555
+ totalBenefit: number;
9556
+ netReturn: number;
9557
+ roiPercent: number;
9558
+ paybackYears: number | null;
9559
+ recommendation: "strong_yes" | "yes" | "cautious" | "no";
9560
+ };
9561
+ };
9562
+ }>;
9563
+ 400: z.ZodObject<{
9564
+ errors: z.ZodArray<z.ZodObject<{
9565
+ id: z.ZodOptional<z.ZodString>;
9566
+ links: z.ZodOptional<z.ZodObject<{
9567
+ about: z.ZodOptional<z.ZodString>;
9568
+ }, "strip", z.ZodTypeAny, {
9569
+ about?: string | undefined;
9570
+ }, {
9571
+ about?: string | undefined;
9572
+ }>>;
9573
+ status: z.ZodOptional<z.ZodString>;
9574
+ code: z.ZodOptional<z.ZodString>;
9575
+ title: z.ZodOptional<z.ZodString>;
9576
+ detail: z.ZodOptional<z.ZodString>;
9577
+ source: z.ZodOptional<z.ZodObject<{
9578
+ pointer: z.ZodOptional<z.ZodString>;
9579
+ parameter: z.ZodOptional<z.ZodString>;
9580
+ }, "strip", z.ZodTypeAny, {
9581
+ pointer?: string | undefined;
9582
+ parameter?: string | undefined;
9583
+ }, {
9584
+ pointer?: string | undefined;
9585
+ parameter?: string | undefined;
9586
+ }>>;
9587
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9588
+ }, "strip", z.ZodTypeAny, {
9589
+ status?: string | undefined;
9590
+ code?: string | undefined;
9591
+ id?: string | undefined;
9592
+ links?: {
9593
+ about?: string | undefined;
9594
+ } | undefined;
9595
+ meta?: Record<string, unknown> | undefined;
9596
+ title?: string | undefined;
9597
+ detail?: string | undefined;
9598
+ source?: {
9599
+ pointer?: string | undefined;
9600
+ parameter?: string | undefined;
9601
+ } | undefined;
9602
+ }, {
9603
+ status?: string | undefined;
9604
+ code?: string | undefined;
9605
+ id?: string | undefined;
9606
+ links?: {
9607
+ about?: string | undefined;
9608
+ } | undefined;
9609
+ meta?: Record<string, unknown> | undefined;
9610
+ title?: string | undefined;
9611
+ detail?: string | undefined;
9612
+ source?: {
9613
+ pointer?: string | undefined;
9614
+ parameter?: string | undefined;
9615
+ } | undefined;
9616
+ }>, "many">;
9617
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9618
+ }, "strip", z.ZodTypeAny, {
9619
+ errors: {
9620
+ status?: string | undefined;
9621
+ code?: string | undefined;
9622
+ id?: string | undefined;
9623
+ links?: {
9624
+ about?: string | undefined;
9625
+ } | undefined;
9626
+ meta?: Record<string, unknown> | undefined;
9627
+ title?: string | undefined;
9628
+ detail?: string | undefined;
9629
+ source?: {
9630
+ pointer?: string | undefined;
9631
+ parameter?: string | undefined;
9632
+ } | undefined;
9633
+ }[];
9634
+ meta?: Record<string, unknown> | undefined;
9635
+ }, {
9636
+ errors: {
9637
+ status?: string | undefined;
9638
+ code?: string | undefined;
9639
+ id?: string | undefined;
9640
+ links?: {
9641
+ about?: string | undefined;
9642
+ } | undefined;
9643
+ meta?: Record<string, unknown> | undefined;
9644
+ title?: string | undefined;
9645
+ detail?: string | undefined;
9646
+ source?: {
9647
+ pointer?: string | undefined;
9648
+ parameter?: string | undefined;
9649
+ } | undefined;
9650
+ }[];
9651
+ meta?: Record<string, unknown> | undefined;
9652
+ }>;
9653
+ 404: z.ZodObject<{
9654
+ errors: z.ZodArray<z.ZodObject<{
9655
+ id: z.ZodOptional<z.ZodString>;
9656
+ links: z.ZodOptional<z.ZodObject<{
9657
+ about: z.ZodOptional<z.ZodString>;
9658
+ }, "strip", z.ZodTypeAny, {
9659
+ about?: string | undefined;
9660
+ }, {
9661
+ about?: string | undefined;
9662
+ }>>;
9663
+ status: z.ZodOptional<z.ZodString>;
9664
+ code: z.ZodOptional<z.ZodString>;
9665
+ title: z.ZodOptional<z.ZodString>;
9666
+ detail: z.ZodOptional<z.ZodString>;
9667
+ source: z.ZodOptional<z.ZodObject<{
9668
+ pointer: z.ZodOptional<z.ZodString>;
9669
+ parameter: z.ZodOptional<z.ZodString>;
9670
+ }, "strip", z.ZodTypeAny, {
9671
+ pointer?: string | undefined;
9672
+ parameter?: string | undefined;
9673
+ }, {
9674
+ pointer?: string | undefined;
9675
+ parameter?: string | undefined;
9676
+ }>>;
9677
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9678
+ }, "strip", z.ZodTypeAny, {
9679
+ status?: string | undefined;
9680
+ code?: string | undefined;
9681
+ id?: string | undefined;
9682
+ links?: {
9683
+ about?: string | undefined;
9684
+ } | undefined;
9685
+ meta?: Record<string, unknown> | undefined;
9686
+ title?: string | undefined;
9687
+ detail?: string | undefined;
9688
+ source?: {
9689
+ pointer?: string | undefined;
9690
+ parameter?: string | undefined;
9691
+ } | undefined;
9692
+ }, {
9693
+ status?: string | undefined;
9694
+ code?: string | undefined;
9695
+ id?: string | undefined;
9696
+ links?: {
9697
+ about?: string | undefined;
9698
+ } | undefined;
9699
+ meta?: Record<string, unknown> | undefined;
9700
+ title?: string | undefined;
9701
+ detail?: string | undefined;
9702
+ source?: {
9703
+ pointer?: string | undefined;
9704
+ parameter?: string | undefined;
9705
+ } | undefined;
9706
+ }>, "many">;
9707
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9708
+ }, "strip", z.ZodTypeAny, {
9709
+ errors: {
9710
+ status?: string | undefined;
9711
+ code?: string | undefined;
9712
+ id?: string | undefined;
9713
+ links?: {
9714
+ about?: string | undefined;
9715
+ } | undefined;
9716
+ meta?: Record<string, unknown> | undefined;
9717
+ title?: string | undefined;
9718
+ detail?: string | undefined;
9719
+ source?: {
9720
+ pointer?: string | undefined;
9721
+ parameter?: string | undefined;
9722
+ } | undefined;
9723
+ }[];
9724
+ meta?: Record<string, unknown> | undefined;
9725
+ }, {
9726
+ errors: {
9727
+ status?: string | undefined;
9728
+ code?: string | undefined;
9729
+ id?: string | undefined;
9730
+ links?: {
9731
+ about?: string | undefined;
9732
+ } | undefined;
9733
+ meta?: Record<string, unknown> | undefined;
9734
+ title?: string | undefined;
9735
+ detail?: string | undefined;
9736
+ source?: {
9737
+ pointer?: string | undefined;
9738
+ parameter?: string | undefined;
9739
+ } | undefined;
9740
+ }[];
9741
+ meta?: Record<string, unknown> | undefined;
9742
+ }>;
9743
+ 401: z.ZodObject<{
9744
+ errors: z.ZodArray<z.ZodObject<{
9745
+ id: z.ZodOptional<z.ZodString>;
9746
+ links: z.ZodOptional<z.ZodObject<{
9747
+ about: z.ZodOptional<z.ZodString>;
9748
+ }, "strip", z.ZodTypeAny, {
9749
+ about?: string | undefined;
9750
+ }, {
9751
+ about?: string | undefined;
9752
+ }>>;
9753
+ status: z.ZodOptional<z.ZodString>;
9754
+ code: z.ZodOptional<z.ZodString>;
9755
+ title: z.ZodOptional<z.ZodString>;
9756
+ detail: z.ZodOptional<z.ZodString>;
9757
+ source: z.ZodOptional<z.ZodObject<{
9758
+ pointer: z.ZodOptional<z.ZodString>;
9759
+ parameter: z.ZodOptional<z.ZodString>;
9760
+ }, "strip", z.ZodTypeAny, {
9761
+ pointer?: string | undefined;
9762
+ parameter?: string | undefined;
9763
+ }, {
9764
+ pointer?: string | undefined;
9765
+ parameter?: string | undefined;
9766
+ }>>;
9767
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9768
+ }, "strip", z.ZodTypeAny, {
9769
+ status?: string | undefined;
9770
+ code?: string | undefined;
9771
+ id?: string | undefined;
9772
+ links?: {
9773
+ about?: string | undefined;
9774
+ } | undefined;
9775
+ meta?: Record<string, unknown> | undefined;
9776
+ title?: string | undefined;
9777
+ detail?: string | undefined;
9778
+ source?: {
9779
+ pointer?: string | undefined;
9780
+ parameter?: string | undefined;
9781
+ } | undefined;
9782
+ }, {
9783
+ status?: string | undefined;
9784
+ code?: string | undefined;
9785
+ id?: string | undefined;
9786
+ links?: {
9787
+ about?: string | undefined;
9788
+ } | undefined;
9789
+ meta?: Record<string, unknown> | undefined;
9790
+ title?: string | undefined;
9791
+ detail?: string | undefined;
9792
+ source?: {
9793
+ pointer?: string | undefined;
9794
+ parameter?: string | undefined;
9795
+ } | undefined;
9796
+ }>, "many">;
9797
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9798
+ }, "strip", z.ZodTypeAny, {
9799
+ errors: {
9800
+ status?: string | undefined;
9801
+ code?: string | undefined;
9802
+ id?: string | undefined;
9803
+ links?: {
9804
+ about?: string | undefined;
9805
+ } | undefined;
9806
+ meta?: Record<string, unknown> | undefined;
9807
+ title?: string | undefined;
9808
+ detail?: string | undefined;
9809
+ source?: {
9810
+ pointer?: string | undefined;
9811
+ parameter?: string | undefined;
9812
+ } | undefined;
9813
+ }[];
9814
+ meta?: Record<string, unknown> | undefined;
9815
+ }, {
9816
+ errors: {
9817
+ status?: string | undefined;
9818
+ code?: string | undefined;
9819
+ id?: string | undefined;
9820
+ links?: {
9821
+ about?: string | undefined;
9822
+ } | undefined;
9823
+ meta?: Record<string, unknown> | undefined;
9824
+ title?: string | undefined;
9825
+ detail?: string | undefined;
9826
+ source?: {
9827
+ pointer?: string | undefined;
9828
+ parameter?: string | undefined;
9829
+ } | undefined;
9830
+ }[];
9831
+ meta?: Record<string, unknown> | undefined;
9832
+ }>;
9833
+ };
9834
+ };
9835
+ getTaxSummary: {
9836
+ pathParams: z.ZodObject<{
9837
+ farmId: z.ZodString;
9838
+ }, "strip", z.ZodTypeAny, {
9839
+ farmId: string;
9840
+ }, {
9841
+ farmId: string;
9842
+ }>;
9843
+ query: z.ZodObject<{
9844
+ 'filter[startDate]': z.ZodOptional<z.ZodString>;
9845
+ 'filter[endDate]': z.ZodOptional<z.ZodString>;
9846
+ 'filter[status]': z.ZodOptional<z.ZodString>;
9847
+ 'filter[crop]': z.ZodOptional<z.ZodString>;
9848
+ }, "strip", z.ZodTypeAny, {
9849
+ 'filter[startDate]'?: string | undefined;
9850
+ 'filter[endDate]'?: string | undefined;
9851
+ 'filter[status]'?: string | undefined;
9852
+ 'filter[crop]'?: string | undefined;
9853
+ }, {
9854
+ 'filter[startDate]'?: string | undefined;
9855
+ 'filter[endDate]'?: string | undefined;
9856
+ 'filter[status]'?: string | undefined;
9857
+ 'filter[crop]'?: string | undefined;
9858
+ }>;
9859
+ summary: "Get tax-ready financial summary";
9860
+ method: "GET";
9861
+ path: "/farms/:farmId/finance/intelligence/tax-summary";
9862
+ responses: {
9863
+ 200: z.ZodObject<{
9864
+ data: z.ZodObject<{
9865
+ type: z.ZodLiteral<"finance-tax-summary">;
9866
+ id: z.ZodString;
9867
+ attributes: z.ZodObject<{
9868
+ periodStart: z.ZodNullable<z.ZodString>;
9869
+ periodEnd: z.ZodNullable<z.ZodString>;
9870
+ totalRevenue: z.ZodNumber;
9871
+ totalExpenses: z.ZodNumber;
9872
+ netIncome: z.ZodNumber;
9873
+ deductibleByCategory: z.ZodArray<z.ZodObject<{
9874
+ category: z.ZodString;
9875
+ amount: z.ZodNumber;
9876
+ }, "strip", z.ZodTypeAny, {
9877
+ category: string;
9878
+ amount: number;
9879
+ }, {
9880
+ category: string;
9881
+ amount: number;
9882
+ }>, "many">;
9883
+ }, "strip", z.ZodTypeAny, {
9884
+ totalRevenue: number;
9885
+ totalExpenses: number;
9886
+ periodStart: string | null;
9887
+ periodEnd: string | null;
9888
+ netIncome: number;
9889
+ deductibleByCategory: {
9890
+ category: string;
9891
+ amount: number;
9892
+ }[];
9893
+ }, {
9894
+ totalRevenue: number;
9895
+ totalExpenses: number;
9896
+ periodStart: string | null;
9897
+ periodEnd: string | null;
9898
+ netIncome: number;
9899
+ deductibleByCategory: {
9900
+ category: string;
9901
+ amount: number;
9902
+ }[];
9903
+ }>;
9904
+ }, "strip", z.ZodTypeAny, {
9905
+ type: "finance-tax-summary";
9906
+ id: string;
9907
+ attributes: {
9908
+ totalRevenue: number;
9909
+ totalExpenses: number;
9910
+ periodStart: string | null;
9911
+ periodEnd: string | null;
9912
+ netIncome: number;
9913
+ deductibleByCategory: {
9914
+ category: string;
9915
+ amount: number;
9916
+ }[];
9917
+ };
9918
+ }, {
9919
+ type: "finance-tax-summary";
9920
+ id: string;
9921
+ attributes: {
9922
+ totalRevenue: number;
9923
+ totalExpenses: number;
9924
+ periodStart: string | null;
9925
+ periodEnd: string | null;
9926
+ netIncome: number;
9927
+ deductibleByCategory: {
9928
+ category: string;
9929
+ amount: number;
9930
+ }[];
9931
+ };
9932
+ }>;
9933
+ }, "strip", z.ZodTypeAny, {
9934
+ data: {
9935
+ type: "finance-tax-summary";
9936
+ id: string;
9937
+ attributes: {
9938
+ totalRevenue: number;
9939
+ totalExpenses: number;
9940
+ periodStart: string | null;
9941
+ periodEnd: string | null;
9942
+ netIncome: number;
9943
+ deductibleByCategory: {
9944
+ category: string;
9945
+ amount: number;
9946
+ }[];
9947
+ };
9948
+ };
9949
+ }, {
9950
+ data: {
9951
+ type: "finance-tax-summary";
9952
+ id: string;
9953
+ attributes: {
9954
+ totalRevenue: number;
9955
+ totalExpenses: number;
9956
+ periodStart: string | null;
9957
+ periodEnd: string | null;
9958
+ netIncome: number;
9959
+ deductibleByCategory: {
9960
+ category: string;
9961
+ amount: number;
9962
+ }[];
9963
+ };
9964
+ };
9965
+ }>;
9966
+ 404: z.ZodObject<{
9967
+ errors: z.ZodArray<z.ZodObject<{
9968
+ id: z.ZodOptional<z.ZodString>;
9969
+ links: z.ZodOptional<z.ZodObject<{
9970
+ about: z.ZodOptional<z.ZodString>;
9971
+ }, "strip", z.ZodTypeAny, {
9972
+ about?: string | undefined;
9973
+ }, {
9974
+ about?: string | undefined;
9975
+ }>>;
9976
+ status: z.ZodOptional<z.ZodString>;
9977
+ code: z.ZodOptional<z.ZodString>;
9978
+ title: z.ZodOptional<z.ZodString>;
9979
+ detail: z.ZodOptional<z.ZodString>;
9980
+ source: z.ZodOptional<z.ZodObject<{
9981
+ pointer: z.ZodOptional<z.ZodString>;
9982
+ parameter: z.ZodOptional<z.ZodString>;
9983
+ }, "strip", z.ZodTypeAny, {
9984
+ pointer?: string | undefined;
9985
+ parameter?: string | undefined;
9986
+ }, {
9987
+ pointer?: string | undefined;
9988
+ parameter?: string | undefined;
9989
+ }>>;
9990
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9991
+ }, "strip", z.ZodTypeAny, {
9992
+ status?: string | undefined;
9993
+ code?: string | undefined;
9994
+ id?: string | undefined;
9995
+ links?: {
9996
+ about?: string | undefined;
9997
+ } | undefined;
9998
+ meta?: Record<string, unknown> | undefined;
9999
+ title?: string | undefined;
10000
+ detail?: string | undefined;
10001
+ source?: {
10002
+ pointer?: string | undefined;
10003
+ parameter?: string | undefined;
10004
+ } | undefined;
10005
+ }, {
10006
+ status?: string | undefined;
10007
+ code?: string | undefined;
10008
+ id?: string | undefined;
10009
+ links?: {
10010
+ about?: string | undefined;
10011
+ } | undefined;
10012
+ meta?: Record<string, unknown> | undefined;
10013
+ title?: string | undefined;
10014
+ detail?: string | undefined;
10015
+ source?: {
10016
+ pointer?: string | undefined;
10017
+ parameter?: string | undefined;
10018
+ } | undefined;
10019
+ }>, "many">;
10020
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10021
+ }, "strip", z.ZodTypeAny, {
10022
+ errors: {
10023
+ status?: string | undefined;
10024
+ code?: string | undefined;
10025
+ id?: string | undefined;
10026
+ links?: {
10027
+ about?: string | undefined;
10028
+ } | undefined;
10029
+ meta?: Record<string, unknown> | undefined;
10030
+ title?: string | undefined;
10031
+ detail?: string | undefined;
10032
+ source?: {
10033
+ pointer?: string | undefined;
10034
+ parameter?: string | undefined;
10035
+ } | undefined;
10036
+ }[];
10037
+ meta?: Record<string, unknown> | undefined;
10038
+ }, {
10039
+ errors: {
10040
+ status?: string | undefined;
10041
+ code?: string | undefined;
10042
+ id?: string | undefined;
10043
+ links?: {
10044
+ about?: string | undefined;
10045
+ } | undefined;
10046
+ meta?: Record<string, unknown> | undefined;
10047
+ title?: string | undefined;
10048
+ detail?: string | undefined;
10049
+ source?: {
10050
+ pointer?: string | undefined;
10051
+ parameter?: string | undefined;
10052
+ } | undefined;
10053
+ }[];
10054
+ meta?: Record<string, unknown> | undefined;
10055
+ }>;
10056
+ 401: z.ZodObject<{
10057
+ errors: z.ZodArray<z.ZodObject<{
10058
+ id: z.ZodOptional<z.ZodString>;
10059
+ links: z.ZodOptional<z.ZodObject<{
10060
+ about: z.ZodOptional<z.ZodString>;
10061
+ }, "strip", z.ZodTypeAny, {
10062
+ about?: string | undefined;
10063
+ }, {
10064
+ about?: string | undefined;
10065
+ }>>;
10066
+ status: z.ZodOptional<z.ZodString>;
10067
+ code: z.ZodOptional<z.ZodString>;
10068
+ title: z.ZodOptional<z.ZodString>;
10069
+ detail: z.ZodOptional<z.ZodString>;
10070
+ source: z.ZodOptional<z.ZodObject<{
10071
+ pointer: z.ZodOptional<z.ZodString>;
10072
+ parameter: z.ZodOptional<z.ZodString>;
10073
+ }, "strip", z.ZodTypeAny, {
10074
+ pointer?: string | undefined;
10075
+ parameter?: string | undefined;
10076
+ }, {
10077
+ pointer?: string | undefined;
10078
+ parameter?: string | undefined;
10079
+ }>>;
10080
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10081
+ }, "strip", z.ZodTypeAny, {
10082
+ status?: string | undefined;
10083
+ code?: string | undefined;
10084
+ id?: string | undefined;
10085
+ links?: {
10086
+ about?: string | undefined;
10087
+ } | undefined;
10088
+ meta?: Record<string, unknown> | undefined;
10089
+ title?: string | undefined;
10090
+ detail?: string | undefined;
10091
+ source?: {
10092
+ pointer?: string | undefined;
10093
+ parameter?: string | undefined;
10094
+ } | undefined;
10095
+ }, {
10096
+ status?: string | undefined;
10097
+ code?: string | undefined;
10098
+ id?: string | undefined;
10099
+ links?: {
10100
+ about?: string | undefined;
10101
+ } | undefined;
10102
+ meta?: Record<string, unknown> | undefined;
10103
+ title?: string | undefined;
10104
+ detail?: string | undefined;
10105
+ source?: {
10106
+ pointer?: string | undefined;
10107
+ parameter?: string | undefined;
10108
+ } | undefined;
10109
+ }>, "many">;
10110
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10111
+ }, "strip", z.ZodTypeAny, {
10112
+ errors: {
10113
+ status?: string | undefined;
10114
+ code?: string | undefined;
10115
+ id?: string | undefined;
10116
+ links?: {
10117
+ about?: string | undefined;
10118
+ } | undefined;
10119
+ meta?: Record<string, unknown> | undefined;
10120
+ title?: string | undefined;
10121
+ detail?: string | undefined;
10122
+ source?: {
10123
+ pointer?: string | undefined;
10124
+ parameter?: string | undefined;
10125
+ } | undefined;
10126
+ }[];
10127
+ meta?: Record<string, unknown> | undefined;
10128
+ }, {
10129
+ errors: {
10130
+ status?: string | undefined;
10131
+ code?: string | undefined;
10132
+ id?: string | undefined;
10133
+ links?: {
10134
+ about?: string | undefined;
10135
+ } | undefined;
10136
+ meta?: Record<string, unknown> | undefined;
10137
+ title?: string | undefined;
10138
+ detail?: string | undefined;
10139
+ source?: {
10140
+ pointer?: string | undefined;
10141
+ parameter?: string | undefined;
10142
+ } | undefined;
10143
+ }[];
10144
+ meta?: Record<string, unknown> | undefined;
10145
+ }>;
10146
+ };
10147
+ };
10148
+ getInputCostOptimizer: {
10149
+ pathParams: z.ZodObject<{
10150
+ farmId: z.ZodString;
10151
+ }, "strip", z.ZodTypeAny, {
10152
+ farmId: string;
10153
+ }, {
10154
+ farmId: string;
10155
+ }>;
10156
+ query: z.ZodObject<{
10157
+ crop: z.ZodString;
10158
+ targetQuantity: z.ZodDefault<z.ZodNumber>;
10159
+ }, "strip", z.ZodTypeAny, {
10160
+ crop: string;
10161
+ targetQuantity: number;
10162
+ }, {
10163
+ crop: string;
10164
+ targetQuantity?: number | undefined;
10165
+ }>;
10166
+ summary: "Get lowest-cost input recommendation";
10167
+ method: "GET";
10168
+ path: "/farms/:farmId/finance/intelligence/input-cost-optimizer";
10169
+ responses: {
10170
+ 200: z.ZodObject<{
10171
+ data: z.ZodObject<{
10172
+ type: z.ZodLiteral<"finance-input-cost-optimizer">;
10173
+ id: z.ZodString;
10174
+ attributes: z.ZodObject<{
10175
+ crop: z.ZodString;
10176
+ recommendations: z.ZodArray<z.ZodObject<{
10177
+ inputName: z.ZodString;
10178
+ estimatedUnitCost: z.ZodNumber;
10179
+ suggestedQuantity: z.ZodNumber;
10180
+ estimatedTotalCost: z.ZodNumber;
10181
+ }, "strip", z.ZodTypeAny, {
10182
+ inputName: string;
10183
+ estimatedUnitCost: number;
10184
+ suggestedQuantity: number;
10185
+ estimatedTotalCost: number;
10186
+ }, {
10187
+ inputName: string;
10188
+ estimatedUnitCost: number;
10189
+ suggestedQuantity: number;
10190
+ estimatedTotalCost: number;
10191
+ }>, "many">;
10192
+ estimatedTotalCost: z.ZodNumber;
10193
+ }, "strip", z.ZodTypeAny, {
10194
+ crop: string;
10195
+ recommendations: {
10196
+ inputName: string;
10197
+ estimatedUnitCost: number;
10198
+ suggestedQuantity: number;
10199
+ estimatedTotalCost: number;
10200
+ }[];
10201
+ estimatedTotalCost: number;
10202
+ }, {
10203
+ crop: string;
10204
+ recommendations: {
10205
+ inputName: string;
10206
+ estimatedUnitCost: number;
10207
+ suggestedQuantity: number;
10208
+ estimatedTotalCost: number;
10209
+ }[];
10210
+ estimatedTotalCost: number;
10211
+ }>;
10212
+ }, "strip", z.ZodTypeAny, {
10213
+ type: "finance-input-cost-optimizer";
10214
+ id: string;
10215
+ attributes: {
10216
+ crop: string;
10217
+ recommendations: {
10218
+ inputName: string;
10219
+ estimatedUnitCost: number;
10220
+ suggestedQuantity: number;
10221
+ estimatedTotalCost: number;
10222
+ }[];
10223
+ estimatedTotalCost: number;
10224
+ };
10225
+ }, {
10226
+ type: "finance-input-cost-optimizer";
10227
+ id: string;
10228
+ attributes: {
10229
+ crop: string;
10230
+ recommendations: {
10231
+ inputName: string;
10232
+ estimatedUnitCost: number;
10233
+ suggestedQuantity: number;
10234
+ estimatedTotalCost: number;
10235
+ }[];
10236
+ estimatedTotalCost: number;
10237
+ };
10238
+ }>;
10239
+ }, "strip", z.ZodTypeAny, {
10240
+ data: {
10241
+ type: "finance-input-cost-optimizer";
10242
+ id: string;
10243
+ attributes: {
10244
+ crop: string;
10245
+ recommendations: {
10246
+ inputName: string;
10247
+ estimatedUnitCost: number;
10248
+ suggestedQuantity: number;
10249
+ estimatedTotalCost: number;
10250
+ }[];
10251
+ estimatedTotalCost: number;
10252
+ };
10253
+ };
10254
+ }, {
10255
+ data: {
10256
+ type: "finance-input-cost-optimizer";
10257
+ id: string;
10258
+ attributes: {
10259
+ crop: string;
10260
+ recommendations: {
10261
+ inputName: string;
10262
+ estimatedUnitCost: number;
10263
+ suggestedQuantity: number;
10264
+ estimatedTotalCost: number;
10265
+ }[];
10266
+ estimatedTotalCost: number;
10267
+ };
10268
+ };
10269
+ }>;
10270
+ 404: z.ZodObject<{
10271
+ errors: z.ZodArray<z.ZodObject<{
10272
+ id: z.ZodOptional<z.ZodString>;
10273
+ links: z.ZodOptional<z.ZodObject<{
10274
+ about: z.ZodOptional<z.ZodString>;
10275
+ }, "strip", z.ZodTypeAny, {
10276
+ about?: string | undefined;
10277
+ }, {
10278
+ about?: string | undefined;
10279
+ }>>;
10280
+ status: z.ZodOptional<z.ZodString>;
10281
+ code: z.ZodOptional<z.ZodString>;
10282
+ title: z.ZodOptional<z.ZodString>;
10283
+ detail: z.ZodOptional<z.ZodString>;
10284
+ source: z.ZodOptional<z.ZodObject<{
10285
+ pointer: z.ZodOptional<z.ZodString>;
10286
+ parameter: z.ZodOptional<z.ZodString>;
10287
+ }, "strip", z.ZodTypeAny, {
10288
+ pointer?: string | undefined;
10289
+ parameter?: string | undefined;
10290
+ }, {
10291
+ pointer?: string | undefined;
10292
+ parameter?: string | undefined;
10293
+ }>>;
10294
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10295
+ }, "strip", z.ZodTypeAny, {
10296
+ status?: string | undefined;
10297
+ code?: string | undefined;
10298
+ id?: string | undefined;
10299
+ links?: {
10300
+ about?: string | undefined;
10301
+ } | undefined;
10302
+ meta?: Record<string, unknown> | undefined;
10303
+ title?: string | undefined;
10304
+ detail?: string | undefined;
10305
+ source?: {
10306
+ pointer?: string | undefined;
10307
+ parameter?: string | undefined;
10308
+ } | undefined;
10309
+ }, {
10310
+ status?: string | undefined;
10311
+ code?: string | undefined;
10312
+ id?: string | undefined;
10313
+ links?: {
10314
+ about?: string | undefined;
10315
+ } | undefined;
10316
+ meta?: Record<string, unknown> | undefined;
10317
+ title?: string | undefined;
10318
+ detail?: string | undefined;
10319
+ source?: {
10320
+ pointer?: string | undefined;
10321
+ parameter?: string | undefined;
10322
+ } | undefined;
10323
+ }>, "many">;
10324
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10325
+ }, "strip", z.ZodTypeAny, {
10326
+ errors: {
10327
+ status?: string | undefined;
10328
+ code?: string | undefined;
10329
+ id?: string | undefined;
10330
+ links?: {
10331
+ about?: string | undefined;
10332
+ } | undefined;
10333
+ meta?: Record<string, unknown> | undefined;
10334
+ title?: string | undefined;
10335
+ detail?: string | undefined;
10336
+ source?: {
10337
+ pointer?: string | undefined;
10338
+ parameter?: string | undefined;
10339
+ } | undefined;
10340
+ }[];
10341
+ meta?: Record<string, unknown> | undefined;
10342
+ }, {
10343
+ errors: {
10344
+ status?: string | undefined;
10345
+ code?: string | undefined;
10346
+ id?: string | undefined;
10347
+ links?: {
10348
+ about?: string | undefined;
10349
+ } | undefined;
10350
+ meta?: Record<string, unknown> | undefined;
10351
+ title?: string | undefined;
10352
+ detail?: string | undefined;
10353
+ source?: {
10354
+ pointer?: string | undefined;
10355
+ parameter?: string | undefined;
10356
+ } | undefined;
10357
+ }[];
10358
+ meta?: Record<string, unknown> | undefined;
10359
+ }>;
10360
+ 401: z.ZodObject<{
10361
+ errors: z.ZodArray<z.ZodObject<{
10362
+ id: z.ZodOptional<z.ZodString>;
10363
+ links: z.ZodOptional<z.ZodObject<{
10364
+ about: z.ZodOptional<z.ZodString>;
10365
+ }, "strip", z.ZodTypeAny, {
10366
+ about?: string | undefined;
10367
+ }, {
10368
+ about?: string | undefined;
10369
+ }>>;
10370
+ status: z.ZodOptional<z.ZodString>;
10371
+ code: z.ZodOptional<z.ZodString>;
10372
+ title: z.ZodOptional<z.ZodString>;
10373
+ detail: z.ZodOptional<z.ZodString>;
10374
+ source: z.ZodOptional<z.ZodObject<{
10375
+ pointer: z.ZodOptional<z.ZodString>;
10376
+ parameter: z.ZodOptional<z.ZodString>;
10377
+ }, "strip", z.ZodTypeAny, {
10378
+ pointer?: string | undefined;
10379
+ parameter?: string | undefined;
10380
+ }, {
10381
+ pointer?: string | undefined;
10382
+ parameter?: string | undefined;
10383
+ }>>;
10384
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10385
+ }, "strip", z.ZodTypeAny, {
10386
+ status?: string | undefined;
10387
+ code?: string | undefined;
10388
+ id?: string | undefined;
10389
+ links?: {
10390
+ about?: string | undefined;
10391
+ } | undefined;
10392
+ meta?: Record<string, unknown> | undefined;
10393
+ title?: string | undefined;
10394
+ detail?: string | undefined;
10395
+ source?: {
10396
+ pointer?: string | undefined;
10397
+ parameter?: string | undefined;
10398
+ } | undefined;
10399
+ }, {
10400
+ status?: string | undefined;
10401
+ code?: string | undefined;
10402
+ id?: string | undefined;
10403
+ links?: {
10404
+ about?: string | undefined;
10405
+ } | undefined;
10406
+ meta?: Record<string, unknown> | undefined;
10407
+ title?: string | undefined;
10408
+ detail?: string | undefined;
10409
+ source?: {
10410
+ pointer?: string | undefined;
10411
+ parameter?: string | undefined;
10412
+ } | undefined;
10413
+ }>, "many">;
10414
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10415
+ }, "strip", z.ZodTypeAny, {
10416
+ errors: {
10417
+ status?: string | undefined;
10418
+ code?: string | undefined;
10419
+ id?: string | undefined;
10420
+ links?: {
10421
+ about?: string | undefined;
10422
+ } | undefined;
10423
+ meta?: Record<string, unknown> | undefined;
10424
+ title?: string | undefined;
10425
+ detail?: string | undefined;
10426
+ source?: {
10427
+ pointer?: string | undefined;
10428
+ parameter?: string | undefined;
10429
+ } | undefined;
10430
+ }[];
10431
+ meta?: Record<string, unknown> | undefined;
10432
+ }, {
10433
+ errors: {
10434
+ status?: string | undefined;
10435
+ code?: string | undefined;
10436
+ id?: string | undefined;
10437
+ links?: {
10438
+ about?: string | undefined;
10439
+ } | undefined;
10440
+ meta?: Record<string, unknown> | undefined;
10441
+ title?: string | undefined;
10442
+ detail?: string | undefined;
10443
+ source?: {
10444
+ pointer?: string | undefined;
10445
+ parameter?: string | undefined;
10446
+ } | undefined;
10447
+ }[];
10448
+ meta?: Record<string, unknown> | undefined;
10449
+ }>;
10450
+ };
10451
+ };
6959
10452
  };
6960
10453
  //# sourceMappingURL=finance.routes.d.ts.map