@deepintel-ltd/farmpro-contracts 1.7.1 → 1.7.2

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.
@@ -0,0 +1,3629 @@
1
+ import { z } from 'zod';
2
+ export declare const capitalRouter: {
3
+ listCapitalTransactions: {
4
+ pathParams: z.ZodObject<{
5
+ farmId: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ farmId: string;
8
+ }, {
9
+ farmId: string;
10
+ }>;
11
+ query: z.ZodObject<{
12
+ 'page[number]': z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
13
+ 'page[size]': z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
14
+ sort: z.ZodOptional<z.ZodString>;
15
+ include: z.ZodOptional<z.ZodString>;
16
+ 'filter[startDate]': z.ZodOptional<z.ZodString>;
17
+ 'filter[endDate]': z.ZodOptional<z.ZodString>;
18
+ 'filter[crop]': z.ZodOptional<z.ZodString>;
19
+ } & {
20
+ 'filter[type]': z.ZodOptional<z.ZodEnum<["OWNER_CONTRIBUTION", "LOAN", "GRANT", "INVESTOR", "WORKING_CAPITAL", "OTHER"]>>;
21
+ 'filter[status]': z.ZodOptional<z.ZodEnum<["received", "pending", "partially_repaid", "fully_repaid", "cancelled"]>>;
22
+ 'filter[isRepayable]': z.ZodOptional<z.ZodBoolean>;
23
+ 'filter[source]': z.ZodOptional<z.ZodString>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ sort?: string | undefined;
26
+ 'page[number]'?: number | undefined;
27
+ 'page[size]'?: number | undefined;
28
+ 'filter[startDate]'?: string | undefined;
29
+ 'filter[endDate]'?: string | undefined;
30
+ 'filter[status]'?: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid" | undefined;
31
+ 'filter[crop]'?: string | undefined;
32
+ include?: string | undefined;
33
+ 'filter[type]'?: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER" | undefined;
34
+ 'filter[isRepayable]'?: boolean | undefined;
35
+ 'filter[source]'?: string | undefined;
36
+ }, {
37
+ sort?: string | undefined;
38
+ 'page[number]'?: number | undefined;
39
+ 'page[size]'?: number | undefined;
40
+ 'filter[startDate]'?: string | undefined;
41
+ 'filter[endDate]'?: string | undefined;
42
+ 'filter[status]'?: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid" | undefined;
43
+ 'filter[crop]'?: string | undefined;
44
+ include?: string | undefined;
45
+ 'filter[type]'?: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER" | undefined;
46
+ 'filter[isRepayable]'?: boolean | undefined;
47
+ 'filter[source]'?: string | undefined;
48
+ }>;
49
+ summary: "List capital transactions";
50
+ description: "Get all capital transactions (injections, loans, grants, etc.) for a farm with optional filtering";
51
+ method: "GET";
52
+ path: "/farms/:farmId/capital";
53
+ responses: {
54
+ 200: z.ZodObject<{
55
+ data: z.ZodArray<z.ZodObject<{
56
+ type: z.ZodLiteral<string>;
57
+ id: z.ZodString;
58
+ attributes: z.ZodObject<{
59
+ type: z.ZodEnum<["OWNER_CONTRIBUTION", "LOAN", "GRANT", "INVESTOR", "WORKING_CAPITAL", "OTHER"]>;
60
+ amount: z.ZodNumber;
61
+ currency: z.ZodEnum<["NGN", "USD"]>;
62
+ description: z.ZodNullable<z.ZodString>;
63
+ source: z.ZodNullable<z.ZodString>;
64
+ reference: z.ZodNullable<z.ZodString>;
65
+ transactionDate: z.ZodString;
66
+ isRepayable: z.ZodBoolean;
67
+ repaymentTerms: z.ZodNullable<z.ZodString>;
68
+ interestRate: z.ZodNullable<z.ZodNumber>;
69
+ repaymentDueDate: z.ZodNullable<z.ZodString>;
70
+ status: z.ZodEnum<["received", "pending", "partially_repaid", "fully_repaid", "cancelled"]>;
71
+ amountRepaid: z.ZodNumber;
72
+ outstandingBalance: z.ZodOptional<z.ZodNumber>;
73
+ notes: z.ZodNullable<z.ZodString>;
74
+ } & {
75
+ createdAt: z.ZodString;
76
+ updatedAt: z.ZodString;
77
+ }, "strip", z.ZodTypeAny, {
78
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
79
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
80
+ source: string | null;
81
+ createdAt: string;
82
+ updatedAt: string;
83
+ description: string | null;
84
+ currency: "NGN" | "USD";
85
+ notes: string | null;
86
+ amount: number;
87
+ reference: string | null;
88
+ transactionDate: string;
89
+ isRepayable: boolean;
90
+ repaymentTerms: string | null;
91
+ interestRate: number | null;
92
+ repaymentDueDate: string | null;
93
+ amountRepaid: number;
94
+ outstandingBalance?: number | undefined;
95
+ }, {
96
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
97
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
98
+ source: string | null;
99
+ createdAt: string;
100
+ updatedAt: string;
101
+ description: string | null;
102
+ currency: "NGN" | "USD";
103
+ notes: string | null;
104
+ amount: number;
105
+ reference: string | null;
106
+ transactionDate: string;
107
+ isRepayable: boolean;
108
+ repaymentTerms: string | null;
109
+ interestRate: number | null;
110
+ repaymentDueDate: string | null;
111
+ amountRepaid: number;
112
+ outstandingBalance?: number | undefined;
113
+ }>;
114
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
115
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
116
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ type: string;
119
+ id: string;
120
+ attributes: {
121
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
122
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
123
+ source: string | null;
124
+ createdAt: string;
125
+ updatedAt: string;
126
+ description: string | null;
127
+ currency: "NGN" | "USD";
128
+ notes: string | null;
129
+ amount: number;
130
+ reference: string | null;
131
+ transactionDate: string;
132
+ isRepayable: boolean;
133
+ repaymentTerms: string | null;
134
+ interestRate: number | null;
135
+ repaymentDueDate: string | null;
136
+ amountRepaid: number;
137
+ outstandingBalance?: number | undefined;
138
+ };
139
+ relationships?: Record<string, unknown> | undefined;
140
+ links?: Record<string, string> | undefined;
141
+ meta?: Record<string, unknown> | undefined;
142
+ }, {
143
+ type: string;
144
+ id: string;
145
+ attributes: {
146
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
147
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
148
+ source: string | null;
149
+ createdAt: string;
150
+ updatedAt: string;
151
+ description: string | null;
152
+ currency: "NGN" | "USD";
153
+ notes: string | null;
154
+ amount: number;
155
+ reference: string | null;
156
+ transactionDate: string;
157
+ isRepayable: boolean;
158
+ repaymentTerms: string | null;
159
+ interestRate: number | null;
160
+ repaymentDueDate: string | null;
161
+ amountRepaid: number;
162
+ outstandingBalance?: number | undefined;
163
+ };
164
+ relationships?: Record<string, unknown> | undefined;
165
+ links?: Record<string, string> | undefined;
166
+ meta?: Record<string, unknown> | undefined;
167
+ }>, "many">;
168
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
169
+ type: z.ZodString;
170
+ id: z.ZodString;
171
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
172
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
173
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
174
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
175
+ }, "strip", z.ZodTypeAny, {
176
+ type: string;
177
+ id: string;
178
+ attributes?: Record<string, unknown> | undefined;
179
+ relationships?: Record<string, unknown> | undefined;
180
+ links?: Record<string, string> | undefined;
181
+ meta?: Record<string, unknown> | undefined;
182
+ }, {
183
+ type: string;
184
+ id: string;
185
+ attributes?: Record<string, unknown> | undefined;
186
+ relationships?: Record<string, unknown> | undefined;
187
+ links?: Record<string, string> | undefined;
188
+ meta?: Record<string, unknown> | undefined;
189
+ }>, "many">>;
190
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
191
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ data: {
194
+ type: string;
195
+ id: string;
196
+ attributes: {
197
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
198
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
199
+ source: string | null;
200
+ createdAt: string;
201
+ updatedAt: string;
202
+ description: string | null;
203
+ currency: "NGN" | "USD";
204
+ notes: string | null;
205
+ amount: number;
206
+ reference: string | null;
207
+ transactionDate: string;
208
+ isRepayable: boolean;
209
+ repaymentTerms: string | null;
210
+ interestRate: number | null;
211
+ repaymentDueDate: string | null;
212
+ amountRepaid: number;
213
+ outstandingBalance?: number | undefined;
214
+ };
215
+ relationships?: Record<string, unknown> | undefined;
216
+ links?: Record<string, string> | undefined;
217
+ meta?: Record<string, unknown> | undefined;
218
+ }[];
219
+ links?: Record<string, string> | undefined;
220
+ meta?: Record<string, unknown> | undefined;
221
+ included?: {
222
+ type: string;
223
+ id: string;
224
+ attributes?: Record<string, unknown> | undefined;
225
+ relationships?: Record<string, unknown> | undefined;
226
+ links?: Record<string, string> | undefined;
227
+ meta?: Record<string, unknown> | undefined;
228
+ }[] | undefined;
229
+ }, {
230
+ data: {
231
+ type: string;
232
+ id: string;
233
+ attributes: {
234
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
235
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
236
+ source: string | null;
237
+ createdAt: string;
238
+ updatedAt: string;
239
+ description: string | null;
240
+ currency: "NGN" | "USD";
241
+ notes: string | null;
242
+ amount: number;
243
+ reference: string | null;
244
+ transactionDate: string;
245
+ isRepayable: boolean;
246
+ repaymentTerms: string | null;
247
+ interestRate: number | null;
248
+ repaymentDueDate: string | null;
249
+ amountRepaid: number;
250
+ outstandingBalance?: number | undefined;
251
+ };
252
+ relationships?: Record<string, unknown> | undefined;
253
+ links?: Record<string, string> | undefined;
254
+ meta?: Record<string, unknown> | undefined;
255
+ }[];
256
+ links?: Record<string, string> | undefined;
257
+ meta?: Record<string, unknown> | undefined;
258
+ included?: {
259
+ type: string;
260
+ id: string;
261
+ attributes?: Record<string, unknown> | undefined;
262
+ relationships?: Record<string, unknown> | undefined;
263
+ links?: Record<string, string> | undefined;
264
+ meta?: Record<string, unknown> | undefined;
265
+ }[] | undefined;
266
+ }>;
267
+ 404: z.ZodObject<{
268
+ errors: z.ZodArray<z.ZodObject<{
269
+ id: z.ZodOptional<z.ZodString>;
270
+ links: z.ZodOptional<z.ZodObject<{
271
+ about: z.ZodOptional<z.ZodString>;
272
+ }, "strip", z.ZodTypeAny, {
273
+ about?: string | undefined;
274
+ }, {
275
+ about?: string | undefined;
276
+ }>>;
277
+ status: z.ZodOptional<z.ZodString>;
278
+ code: z.ZodOptional<z.ZodString>;
279
+ title: z.ZodOptional<z.ZodString>;
280
+ detail: z.ZodOptional<z.ZodString>;
281
+ source: z.ZodOptional<z.ZodObject<{
282
+ pointer: z.ZodOptional<z.ZodString>;
283
+ parameter: z.ZodOptional<z.ZodString>;
284
+ }, "strip", z.ZodTypeAny, {
285
+ pointer?: string | undefined;
286
+ parameter?: string | undefined;
287
+ }, {
288
+ pointer?: string | undefined;
289
+ parameter?: string | undefined;
290
+ }>>;
291
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
292
+ }, "strip", z.ZodTypeAny, {
293
+ status?: string | undefined;
294
+ code?: string | undefined;
295
+ id?: string | undefined;
296
+ links?: {
297
+ about?: string | undefined;
298
+ } | undefined;
299
+ meta?: Record<string, unknown> | undefined;
300
+ title?: string | undefined;
301
+ detail?: string | undefined;
302
+ source?: {
303
+ pointer?: string | undefined;
304
+ parameter?: string | undefined;
305
+ } | undefined;
306
+ }, {
307
+ status?: string | undefined;
308
+ code?: string | undefined;
309
+ id?: string | undefined;
310
+ links?: {
311
+ about?: string | undefined;
312
+ } | undefined;
313
+ meta?: Record<string, unknown> | undefined;
314
+ title?: string | undefined;
315
+ detail?: string | undefined;
316
+ source?: {
317
+ pointer?: string | undefined;
318
+ parameter?: string | undefined;
319
+ } | undefined;
320
+ }>, "many">;
321
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
322
+ }, "strip", z.ZodTypeAny, {
323
+ errors: {
324
+ status?: string | undefined;
325
+ code?: string | undefined;
326
+ id?: string | undefined;
327
+ links?: {
328
+ about?: string | undefined;
329
+ } | undefined;
330
+ meta?: Record<string, unknown> | undefined;
331
+ title?: string | undefined;
332
+ detail?: string | undefined;
333
+ source?: {
334
+ pointer?: string | undefined;
335
+ parameter?: string | undefined;
336
+ } | undefined;
337
+ }[];
338
+ meta?: Record<string, unknown> | undefined;
339
+ }, {
340
+ errors: {
341
+ status?: string | undefined;
342
+ code?: string | undefined;
343
+ id?: string | undefined;
344
+ links?: {
345
+ about?: string | undefined;
346
+ } | undefined;
347
+ meta?: Record<string, unknown> | undefined;
348
+ title?: string | undefined;
349
+ detail?: string | undefined;
350
+ source?: {
351
+ pointer?: string | undefined;
352
+ parameter?: string | undefined;
353
+ } | undefined;
354
+ }[];
355
+ meta?: Record<string, unknown> | undefined;
356
+ }>;
357
+ 401: z.ZodObject<{
358
+ errors: z.ZodArray<z.ZodObject<{
359
+ id: z.ZodOptional<z.ZodString>;
360
+ links: z.ZodOptional<z.ZodObject<{
361
+ about: z.ZodOptional<z.ZodString>;
362
+ }, "strip", z.ZodTypeAny, {
363
+ about?: string | undefined;
364
+ }, {
365
+ about?: string | undefined;
366
+ }>>;
367
+ status: z.ZodOptional<z.ZodString>;
368
+ code: z.ZodOptional<z.ZodString>;
369
+ title: z.ZodOptional<z.ZodString>;
370
+ detail: z.ZodOptional<z.ZodString>;
371
+ source: z.ZodOptional<z.ZodObject<{
372
+ pointer: z.ZodOptional<z.ZodString>;
373
+ parameter: z.ZodOptional<z.ZodString>;
374
+ }, "strip", z.ZodTypeAny, {
375
+ pointer?: string | undefined;
376
+ parameter?: string | undefined;
377
+ }, {
378
+ pointer?: string | undefined;
379
+ parameter?: string | undefined;
380
+ }>>;
381
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
382
+ }, "strip", z.ZodTypeAny, {
383
+ status?: string | undefined;
384
+ code?: string | undefined;
385
+ id?: string | undefined;
386
+ links?: {
387
+ about?: string | undefined;
388
+ } | undefined;
389
+ meta?: Record<string, unknown> | undefined;
390
+ title?: string | undefined;
391
+ detail?: string | undefined;
392
+ source?: {
393
+ pointer?: string | undefined;
394
+ parameter?: string | undefined;
395
+ } | undefined;
396
+ }, {
397
+ status?: string | undefined;
398
+ code?: string | undefined;
399
+ id?: string | undefined;
400
+ links?: {
401
+ about?: string | undefined;
402
+ } | undefined;
403
+ meta?: Record<string, unknown> | undefined;
404
+ title?: string | undefined;
405
+ detail?: string | undefined;
406
+ source?: {
407
+ pointer?: string | undefined;
408
+ parameter?: string | undefined;
409
+ } | undefined;
410
+ }>, "many">;
411
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
412
+ }, "strip", z.ZodTypeAny, {
413
+ errors: {
414
+ status?: string | undefined;
415
+ code?: string | undefined;
416
+ id?: string | undefined;
417
+ links?: {
418
+ about?: string | undefined;
419
+ } | undefined;
420
+ meta?: Record<string, unknown> | undefined;
421
+ title?: string | undefined;
422
+ detail?: string | undefined;
423
+ source?: {
424
+ pointer?: string | undefined;
425
+ parameter?: string | undefined;
426
+ } | undefined;
427
+ }[];
428
+ meta?: Record<string, unknown> | undefined;
429
+ }, {
430
+ errors: {
431
+ status?: string | undefined;
432
+ code?: string | undefined;
433
+ id?: string | undefined;
434
+ links?: {
435
+ about?: string | undefined;
436
+ } | undefined;
437
+ meta?: Record<string, unknown> | undefined;
438
+ title?: string | undefined;
439
+ detail?: string | undefined;
440
+ source?: {
441
+ pointer?: string | undefined;
442
+ parameter?: string | undefined;
443
+ } | undefined;
444
+ }[];
445
+ meta?: Record<string, unknown> | undefined;
446
+ }>;
447
+ };
448
+ };
449
+ createCapitalTransaction: {
450
+ pathParams: z.ZodObject<{
451
+ farmId: z.ZodString;
452
+ }, "strip", z.ZodTypeAny, {
453
+ farmId: string;
454
+ }, {
455
+ farmId: string;
456
+ }>;
457
+ summary: "Create capital transaction";
458
+ description: "Record a new capital injection, loan, grant, or other funding source";
459
+ method: "POST";
460
+ body: z.ZodObject<{
461
+ data: z.ZodObject<{
462
+ type: z.ZodLiteral<"capital-transactions">;
463
+ attributes: z.ZodEffects<z.ZodObject<{
464
+ type: z.ZodEnum<["OWNER_CONTRIBUTION", "LOAN", "GRANT", "INVESTOR", "WORKING_CAPITAL", "OTHER"]>;
465
+ amount: z.ZodNumber;
466
+ currency: z.ZodDefault<z.ZodEnum<["NGN", "USD"]>>;
467
+ description: z.ZodOptional<z.ZodString>;
468
+ source: z.ZodOptional<z.ZodString>;
469
+ reference: z.ZodOptional<z.ZodString>;
470
+ transactionDate: z.ZodString;
471
+ isRepayable: z.ZodDefault<z.ZodBoolean>;
472
+ repaymentTerms: z.ZodOptional<z.ZodString>;
473
+ interestRate: z.ZodOptional<z.ZodNumber>;
474
+ repaymentDueDate: z.ZodOptional<z.ZodString>;
475
+ notes: z.ZodOptional<z.ZodString>;
476
+ }, "strip", z.ZodTypeAny, {
477
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
478
+ currency: "NGN" | "USD";
479
+ amount: number;
480
+ transactionDate: string;
481
+ isRepayable: boolean;
482
+ source?: string | undefined;
483
+ description?: string | undefined;
484
+ notes?: string | undefined;
485
+ reference?: string | undefined;
486
+ repaymentTerms?: string | undefined;
487
+ interestRate?: number | undefined;
488
+ repaymentDueDate?: string | undefined;
489
+ }, {
490
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
491
+ amount: number;
492
+ transactionDate: string;
493
+ source?: string | undefined;
494
+ description?: string | undefined;
495
+ currency?: "NGN" | "USD" | undefined;
496
+ notes?: string | undefined;
497
+ reference?: string | undefined;
498
+ isRepayable?: boolean | undefined;
499
+ repaymentTerms?: string | undefined;
500
+ interestRate?: number | undefined;
501
+ repaymentDueDate?: string | undefined;
502
+ }>, {
503
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
504
+ currency: "NGN" | "USD";
505
+ amount: number;
506
+ transactionDate: string;
507
+ isRepayable: boolean;
508
+ source?: string | undefined;
509
+ description?: string | undefined;
510
+ notes?: string | undefined;
511
+ reference?: string | undefined;
512
+ repaymentTerms?: string | undefined;
513
+ interestRate?: number | undefined;
514
+ repaymentDueDate?: string | undefined;
515
+ }, {
516
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
517
+ amount: number;
518
+ transactionDate: string;
519
+ source?: string | undefined;
520
+ description?: string | undefined;
521
+ currency?: "NGN" | "USD" | undefined;
522
+ notes?: string | undefined;
523
+ reference?: string | undefined;
524
+ isRepayable?: boolean | undefined;
525
+ repaymentTerms?: string | undefined;
526
+ interestRate?: number | undefined;
527
+ repaymentDueDate?: string | undefined;
528
+ }>;
529
+ }, "strip", z.ZodTypeAny, {
530
+ type: "capital-transactions";
531
+ attributes: {
532
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
533
+ currency: "NGN" | "USD";
534
+ amount: number;
535
+ transactionDate: string;
536
+ isRepayable: boolean;
537
+ source?: string | undefined;
538
+ description?: string | undefined;
539
+ notes?: string | undefined;
540
+ reference?: string | undefined;
541
+ repaymentTerms?: string | undefined;
542
+ interestRate?: number | undefined;
543
+ repaymentDueDate?: string | undefined;
544
+ };
545
+ }, {
546
+ type: "capital-transactions";
547
+ attributes: {
548
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
549
+ amount: number;
550
+ transactionDate: string;
551
+ source?: string | undefined;
552
+ description?: string | undefined;
553
+ currency?: "NGN" | "USD" | undefined;
554
+ notes?: string | undefined;
555
+ reference?: string | undefined;
556
+ isRepayable?: boolean | undefined;
557
+ repaymentTerms?: string | undefined;
558
+ interestRate?: number | undefined;
559
+ repaymentDueDate?: string | undefined;
560
+ };
561
+ }>;
562
+ }, "strip", z.ZodTypeAny, {
563
+ data: {
564
+ type: "capital-transactions";
565
+ attributes: {
566
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
567
+ currency: "NGN" | "USD";
568
+ amount: number;
569
+ transactionDate: string;
570
+ isRepayable: boolean;
571
+ source?: string | undefined;
572
+ description?: string | undefined;
573
+ notes?: string | undefined;
574
+ reference?: string | undefined;
575
+ repaymentTerms?: string | undefined;
576
+ interestRate?: number | undefined;
577
+ repaymentDueDate?: string | undefined;
578
+ };
579
+ };
580
+ }, {
581
+ data: {
582
+ type: "capital-transactions";
583
+ attributes: {
584
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
585
+ amount: number;
586
+ transactionDate: string;
587
+ source?: string | undefined;
588
+ description?: string | undefined;
589
+ currency?: "NGN" | "USD" | undefined;
590
+ notes?: string | undefined;
591
+ reference?: string | undefined;
592
+ isRepayable?: boolean | undefined;
593
+ repaymentTerms?: string | undefined;
594
+ interestRate?: number | undefined;
595
+ repaymentDueDate?: string | undefined;
596
+ };
597
+ };
598
+ }>;
599
+ path: "/farms/:farmId/capital";
600
+ responses: {
601
+ 201: z.ZodObject<{
602
+ data: z.ZodObject<{
603
+ type: z.ZodLiteral<string>;
604
+ id: z.ZodString;
605
+ attributes: z.ZodObject<{
606
+ type: z.ZodEnum<["OWNER_CONTRIBUTION", "LOAN", "GRANT", "INVESTOR", "WORKING_CAPITAL", "OTHER"]>;
607
+ amount: z.ZodNumber;
608
+ currency: z.ZodEnum<["NGN", "USD"]>;
609
+ description: z.ZodNullable<z.ZodString>;
610
+ source: z.ZodNullable<z.ZodString>;
611
+ reference: z.ZodNullable<z.ZodString>;
612
+ transactionDate: z.ZodString;
613
+ isRepayable: z.ZodBoolean;
614
+ repaymentTerms: z.ZodNullable<z.ZodString>;
615
+ interestRate: z.ZodNullable<z.ZodNumber>;
616
+ repaymentDueDate: z.ZodNullable<z.ZodString>;
617
+ status: z.ZodEnum<["received", "pending", "partially_repaid", "fully_repaid", "cancelled"]>;
618
+ amountRepaid: z.ZodNumber;
619
+ outstandingBalance: z.ZodOptional<z.ZodNumber>;
620
+ notes: z.ZodNullable<z.ZodString>;
621
+ } & {
622
+ createdAt: z.ZodString;
623
+ updatedAt: z.ZodString;
624
+ }, "strip", z.ZodTypeAny, {
625
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
626
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
627
+ source: string | null;
628
+ createdAt: string;
629
+ updatedAt: string;
630
+ description: string | null;
631
+ currency: "NGN" | "USD";
632
+ notes: string | null;
633
+ amount: number;
634
+ reference: string | null;
635
+ transactionDate: string;
636
+ isRepayable: boolean;
637
+ repaymentTerms: string | null;
638
+ interestRate: number | null;
639
+ repaymentDueDate: string | null;
640
+ amountRepaid: number;
641
+ outstandingBalance?: number | undefined;
642
+ }, {
643
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
644
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
645
+ source: string | null;
646
+ createdAt: string;
647
+ updatedAt: string;
648
+ description: string | null;
649
+ currency: "NGN" | "USD";
650
+ notes: string | null;
651
+ amount: number;
652
+ reference: string | null;
653
+ transactionDate: string;
654
+ isRepayable: boolean;
655
+ repaymentTerms: string | null;
656
+ interestRate: number | null;
657
+ repaymentDueDate: string | null;
658
+ amountRepaid: number;
659
+ outstandingBalance?: number | undefined;
660
+ }>;
661
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
662
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
663
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
664
+ }, "strip", z.ZodTypeAny, {
665
+ type: string;
666
+ id: string;
667
+ attributes: {
668
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
669
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
670
+ source: string | null;
671
+ createdAt: string;
672
+ updatedAt: string;
673
+ description: string | null;
674
+ currency: "NGN" | "USD";
675
+ notes: string | null;
676
+ amount: number;
677
+ reference: string | null;
678
+ transactionDate: string;
679
+ isRepayable: boolean;
680
+ repaymentTerms: string | null;
681
+ interestRate: number | null;
682
+ repaymentDueDate: string | null;
683
+ amountRepaid: number;
684
+ outstandingBalance?: number | undefined;
685
+ };
686
+ relationships?: Record<string, unknown> | undefined;
687
+ links?: Record<string, string> | undefined;
688
+ meta?: Record<string, unknown> | undefined;
689
+ }, {
690
+ type: string;
691
+ id: string;
692
+ attributes: {
693
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
694
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
695
+ source: string | null;
696
+ createdAt: string;
697
+ updatedAt: string;
698
+ description: string | null;
699
+ currency: "NGN" | "USD";
700
+ notes: string | null;
701
+ amount: number;
702
+ reference: string | null;
703
+ transactionDate: string;
704
+ isRepayable: boolean;
705
+ repaymentTerms: string | null;
706
+ interestRate: number | null;
707
+ repaymentDueDate: string | null;
708
+ amountRepaid: number;
709
+ outstandingBalance?: number | undefined;
710
+ };
711
+ relationships?: Record<string, unknown> | undefined;
712
+ links?: Record<string, string> | undefined;
713
+ meta?: Record<string, unknown> | undefined;
714
+ }>;
715
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
716
+ type: z.ZodString;
717
+ id: z.ZodString;
718
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
719
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
720
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
721
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
722
+ }, "strip", z.ZodTypeAny, {
723
+ type: string;
724
+ id: string;
725
+ attributes?: Record<string, unknown> | undefined;
726
+ relationships?: Record<string, unknown> | undefined;
727
+ links?: Record<string, string> | undefined;
728
+ meta?: Record<string, unknown> | undefined;
729
+ }, {
730
+ type: string;
731
+ id: string;
732
+ attributes?: Record<string, unknown> | undefined;
733
+ relationships?: Record<string, unknown> | undefined;
734
+ links?: Record<string, string> | undefined;
735
+ meta?: Record<string, unknown> | undefined;
736
+ }>, "many">>;
737
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
738
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
739
+ }, "strip", z.ZodTypeAny, {
740
+ data: {
741
+ type: string;
742
+ id: string;
743
+ attributes: {
744
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
745
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
746
+ source: string | null;
747
+ createdAt: string;
748
+ updatedAt: string;
749
+ description: string | null;
750
+ currency: "NGN" | "USD";
751
+ notes: string | null;
752
+ amount: number;
753
+ reference: string | null;
754
+ transactionDate: string;
755
+ isRepayable: boolean;
756
+ repaymentTerms: string | null;
757
+ interestRate: number | null;
758
+ repaymentDueDate: string | null;
759
+ amountRepaid: number;
760
+ outstandingBalance?: number | undefined;
761
+ };
762
+ relationships?: Record<string, unknown> | undefined;
763
+ links?: Record<string, string> | undefined;
764
+ meta?: Record<string, unknown> | undefined;
765
+ };
766
+ links?: Record<string, string> | undefined;
767
+ meta?: Record<string, unknown> | undefined;
768
+ included?: {
769
+ type: string;
770
+ id: string;
771
+ attributes?: Record<string, unknown> | undefined;
772
+ relationships?: Record<string, unknown> | undefined;
773
+ links?: Record<string, string> | undefined;
774
+ meta?: Record<string, unknown> | undefined;
775
+ }[] | undefined;
776
+ }, {
777
+ data: {
778
+ type: string;
779
+ id: string;
780
+ attributes: {
781
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
782
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
783
+ source: string | null;
784
+ createdAt: string;
785
+ updatedAt: string;
786
+ description: string | null;
787
+ currency: "NGN" | "USD";
788
+ notes: string | null;
789
+ amount: number;
790
+ reference: string | null;
791
+ transactionDate: string;
792
+ isRepayable: boolean;
793
+ repaymentTerms: string | null;
794
+ interestRate: number | null;
795
+ repaymentDueDate: string | null;
796
+ amountRepaid: number;
797
+ outstandingBalance?: number | undefined;
798
+ };
799
+ relationships?: Record<string, unknown> | undefined;
800
+ links?: Record<string, string> | undefined;
801
+ meta?: Record<string, unknown> | undefined;
802
+ };
803
+ links?: Record<string, string> | undefined;
804
+ meta?: Record<string, unknown> | undefined;
805
+ included?: {
806
+ type: string;
807
+ id: string;
808
+ attributes?: Record<string, unknown> | undefined;
809
+ relationships?: Record<string, unknown> | undefined;
810
+ links?: Record<string, string> | undefined;
811
+ meta?: Record<string, unknown> | undefined;
812
+ }[] | undefined;
813
+ }>;
814
+ 400: z.ZodObject<{
815
+ errors: z.ZodArray<z.ZodObject<{
816
+ id: z.ZodOptional<z.ZodString>;
817
+ links: z.ZodOptional<z.ZodObject<{
818
+ about: z.ZodOptional<z.ZodString>;
819
+ }, "strip", z.ZodTypeAny, {
820
+ about?: string | undefined;
821
+ }, {
822
+ about?: string | undefined;
823
+ }>>;
824
+ status: z.ZodOptional<z.ZodString>;
825
+ code: z.ZodOptional<z.ZodString>;
826
+ title: z.ZodOptional<z.ZodString>;
827
+ detail: z.ZodOptional<z.ZodString>;
828
+ source: z.ZodOptional<z.ZodObject<{
829
+ pointer: z.ZodOptional<z.ZodString>;
830
+ parameter: z.ZodOptional<z.ZodString>;
831
+ }, "strip", z.ZodTypeAny, {
832
+ pointer?: string | undefined;
833
+ parameter?: string | undefined;
834
+ }, {
835
+ pointer?: string | undefined;
836
+ parameter?: string | undefined;
837
+ }>>;
838
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
839
+ }, "strip", z.ZodTypeAny, {
840
+ status?: string | undefined;
841
+ code?: string | undefined;
842
+ id?: string | undefined;
843
+ links?: {
844
+ about?: string | undefined;
845
+ } | undefined;
846
+ meta?: Record<string, unknown> | undefined;
847
+ title?: string | undefined;
848
+ detail?: string | undefined;
849
+ source?: {
850
+ pointer?: string | undefined;
851
+ parameter?: string | undefined;
852
+ } | undefined;
853
+ }, {
854
+ status?: string | undefined;
855
+ code?: string | undefined;
856
+ id?: string | undefined;
857
+ links?: {
858
+ about?: string | undefined;
859
+ } | undefined;
860
+ meta?: Record<string, unknown> | undefined;
861
+ title?: string | undefined;
862
+ detail?: string | undefined;
863
+ source?: {
864
+ pointer?: string | undefined;
865
+ parameter?: string | undefined;
866
+ } | undefined;
867
+ }>, "many">;
868
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
869
+ }, "strip", z.ZodTypeAny, {
870
+ errors: {
871
+ status?: string | undefined;
872
+ code?: string | undefined;
873
+ id?: string | undefined;
874
+ links?: {
875
+ about?: string | undefined;
876
+ } | undefined;
877
+ meta?: Record<string, unknown> | undefined;
878
+ title?: string | undefined;
879
+ detail?: string | undefined;
880
+ source?: {
881
+ pointer?: string | undefined;
882
+ parameter?: string | undefined;
883
+ } | undefined;
884
+ }[];
885
+ meta?: Record<string, unknown> | undefined;
886
+ }, {
887
+ errors: {
888
+ status?: string | undefined;
889
+ code?: string | undefined;
890
+ id?: string | undefined;
891
+ links?: {
892
+ about?: string | undefined;
893
+ } | undefined;
894
+ meta?: Record<string, unknown> | undefined;
895
+ title?: string | undefined;
896
+ detail?: string | undefined;
897
+ source?: {
898
+ pointer?: string | undefined;
899
+ parameter?: string | undefined;
900
+ } | undefined;
901
+ }[];
902
+ meta?: Record<string, unknown> | undefined;
903
+ }>;
904
+ 404: z.ZodObject<{
905
+ errors: z.ZodArray<z.ZodObject<{
906
+ id: z.ZodOptional<z.ZodString>;
907
+ links: z.ZodOptional<z.ZodObject<{
908
+ about: z.ZodOptional<z.ZodString>;
909
+ }, "strip", z.ZodTypeAny, {
910
+ about?: string | undefined;
911
+ }, {
912
+ about?: string | undefined;
913
+ }>>;
914
+ status: z.ZodOptional<z.ZodString>;
915
+ code: z.ZodOptional<z.ZodString>;
916
+ title: z.ZodOptional<z.ZodString>;
917
+ detail: z.ZodOptional<z.ZodString>;
918
+ source: z.ZodOptional<z.ZodObject<{
919
+ pointer: z.ZodOptional<z.ZodString>;
920
+ parameter: z.ZodOptional<z.ZodString>;
921
+ }, "strip", z.ZodTypeAny, {
922
+ pointer?: string | undefined;
923
+ parameter?: string | undefined;
924
+ }, {
925
+ pointer?: string | undefined;
926
+ parameter?: string | undefined;
927
+ }>>;
928
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
929
+ }, "strip", z.ZodTypeAny, {
930
+ status?: string | undefined;
931
+ code?: string | undefined;
932
+ id?: string | undefined;
933
+ links?: {
934
+ about?: string | undefined;
935
+ } | undefined;
936
+ meta?: Record<string, unknown> | undefined;
937
+ title?: string | undefined;
938
+ detail?: string | undefined;
939
+ source?: {
940
+ pointer?: string | undefined;
941
+ parameter?: string | undefined;
942
+ } | undefined;
943
+ }, {
944
+ status?: string | undefined;
945
+ code?: string | undefined;
946
+ id?: string | undefined;
947
+ links?: {
948
+ about?: string | undefined;
949
+ } | undefined;
950
+ meta?: Record<string, unknown> | undefined;
951
+ title?: string | undefined;
952
+ detail?: string | undefined;
953
+ source?: {
954
+ pointer?: string | undefined;
955
+ parameter?: string | undefined;
956
+ } | undefined;
957
+ }>, "many">;
958
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
959
+ }, "strip", z.ZodTypeAny, {
960
+ errors: {
961
+ status?: string | undefined;
962
+ code?: string | undefined;
963
+ id?: string | undefined;
964
+ links?: {
965
+ about?: string | undefined;
966
+ } | undefined;
967
+ meta?: Record<string, unknown> | undefined;
968
+ title?: string | undefined;
969
+ detail?: string | undefined;
970
+ source?: {
971
+ pointer?: string | undefined;
972
+ parameter?: string | undefined;
973
+ } | undefined;
974
+ }[];
975
+ meta?: Record<string, unknown> | undefined;
976
+ }, {
977
+ errors: {
978
+ status?: string | undefined;
979
+ code?: string | undefined;
980
+ id?: string | undefined;
981
+ links?: {
982
+ about?: string | undefined;
983
+ } | undefined;
984
+ meta?: Record<string, unknown> | undefined;
985
+ title?: string | undefined;
986
+ detail?: string | undefined;
987
+ source?: {
988
+ pointer?: string | undefined;
989
+ parameter?: string | undefined;
990
+ } | undefined;
991
+ }[];
992
+ meta?: Record<string, unknown> | undefined;
993
+ }>;
994
+ 401: z.ZodObject<{
995
+ errors: z.ZodArray<z.ZodObject<{
996
+ id: z.ZodOptional<z.ZodString>;
997
+ links: z.ZodOptional<z.ZodObject<{
998
+ about: z.ZodOptional<z.ZodString>;
999
+ }, "strip", z.ZodTypeAny, {
1000
+ about?: string | undefined;
1001
+ }, {
1002
+ about?: string | undefined;
1003
+ }>>;
1004
+ status: z.ZodOptional<z.ZodString>;
1005
+ code: z.ZodOptional<z.ZodString>;
1006
+ title: z.ZodOptional<z.ZodString>;
1007
+ detail: z.ZodOptional<z.ZodString>;
1008
+ source: z.ZodOptional<z.ZodObject<{
1009
+ pointer: z.ZodOptional<z.ZodString>;
1010
+ parameter: z.ZodOptional<z.ZodString>;
1011
+ }, "strip", z.ZodTypeAny, {
1012
+ pointer?: string | undefined;
1013
+ parameter?: string | undefined;
1014
+ }, {
1015
+ pointer?: string | undefined;
1016
+ parameter?: string | undefined;
1017
+ }>>;
1018
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1019
+ }, "strip", z.ZodTypeAny, {
1020
+ status?: string | undefined;
1021
+ code?: string | undefined;
1022
+ id?: string | undefined;
1023
+ links?: {
1024
+ about?: string | undefined;
1025
+ } | undefined;
1026
+ meta?: Record<string, unknown> | undefined;
1027
+ title?: string | undefined;
1028
+ detail?: string | undefined;
1029
+ source?: {
1030
+ pointer?: string | undefined;
1031
+ parameter?: string | undefined;
1032
+ } | undefined;
1033
+ }, {
1034
+ status?: string | undefined;
1035
+ code?: string | undefined;
1036
+ id?: string | undefined;
1037
+ links?: {
1038
+ about?: string | undefined;
1039
+ } | undefined;
1040
+ meta?: Record<string, unknown> | undefined;
1041
+ title?: string | undefined;
1042
+ detail?: string | undefined;
1043
+ source?: {
1044
+ pointer?: string | undefined;
1045
+ parameter?: string | undefined;
1046
+ } | undefined;
1047
+ }>, "many">;
1048
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1049
+ }, "strip", z.ZodTypeAny, {
1050
+ errors: {
1051
+ status?: string | undefined;
1052
+ code?: string | undefined;
1053
+ id?: string | undefined;
1054
+ links?: {
1055
+ about?: string | undefined;
1056
+ } | undefined;
1057
+ meta?: Record<string, unknown> | undefined;
1058
+ title?: string | undefined;
1059
+ detail?: string | undefined;
1060
+ source?: {
1061
+ pointer?: string | undefined;
1062
+ parameter?: string | undefined;
1063
+ } | undefined;
1064
+ }[];
1065
+ meta?: Record<string, unknown> | undefined;
1066
+ }, {
1067
+ errors: {
1068
+ status?: string | undefined;
1069
+ code?: string | undefined;
1070
+ id?: string | undefined;
1071
+ links?: {
1072
+ about?: string | undefined;
1073
+ } | undefined;
1074
+ meta?: Record<string, unknown> | undefined;
1075
+ title?: string | undefined;
1076
+ detail?: string | undefined;
1077
+ source?: {
1078
+ pointer?: string | undefined;
1079
+ parameter?: string | undefined;
1080
+ } | undefined;
1081
+ }[];
1082
+ meta?: Record<string, unknown> | undefined;
1083
+ }>;
1084
+ 422: z.ZodObject<{
1085
+ errors: z.ZodArray<z.ZodObject<{
1086
+ id: z.ZodOptional<z.ZodString>;
1087
+ links: z.ZodOptional<z.ZodObject<{
1088
+ about: z.ZodOptional<z.ZodString>;
1089
+ }, "strip", z.ZodTypeAny, {
1090
+ about?: string | undefined;
1091
+ }, {
1092
+ about?: string | undefined;
1093
+ }>>;
1094
+ status: z.ZodOptional<z.ZodString>;
1095
+ code: z.ZodOptional<z.ZodString>;
1096
+ title: z.ZodOptional<z.ZodString>;
1097
+ detail: z.ZodOptional<z.ZodString>;
1098
+ source: z.ZodOptional<z.ZodObject<{
1099
+ pointer: z.ZodOptional<z.ZodString>;
1100
+ parameter: z.ZodOptional<z.ZodString>;
1101
+ }, "strip", z.ZodTypeAny, {
1102
+ pointer?: string | undefined;
1103
+ parameter?: string | undefined;
1104
+ }, {
1105
+ pointer?: string | undefined;
1106
+ parameter?: string | undefined;
1107
+ }>>;
1108
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1109
+ }, "strip", z.ZodTypeAny, {
1110
+ status?: string | undefined;
1111
+ code?: string | undefined;
1112
+ id?: string | undefined;
1113
+ links?: {
1114
+ about?: string | undefined;
1115
+ } | undefined;
1116
+ meta?: Record<string, unknown> | undefined;
1117
+ title?: string | undefined;
1118
+ detail?: string | undefined;
1119
+ source?: {
1120
+ pointer?: string | undefined;
1121
+ parameter?: string | undefined;
1122
+ } | undefined;
1123
+ }, {
1124
+ status?: string | undefined;
1125
+ code?: string | undefined;
1126
+ id?: string | undefined;
1127
+ links?: {
1128
+ about?: string | undefined;
1129
+ } | undefined;
1130
+ meta?: Record<string, unknown> | undefined;
1131
+ title?: string | undefined;
1132
+ detail?: string | undefined;
1133
+ source?: {
1134
+ pointer?: string | undefined;
1135
+ parameter?: string | undefined;
1136
+ } | undefined;
1137
+ }>, "many">;
1138
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1139
+ }, "strip", z.ZodTypeAny, {
1140
+ errors: {
1141
+ status?: string | undefined;
1142
+ code?: string | undefined;
1143
+ id?: string | undefined;
1144
+ links?: {
1145
+ about?: string | undefined;
1146
+ } | undefined;
1147
+ meta?: Record<string, unknown> | undefined;
1148
+ title?: string | undefined;
1149
+ detail?: string | undefined;
1150
+ source?: {
1151
+ pointer?: string | undefined;
1152
+ parameter?: string | undefined;
1153
+ } | undefined;
1154
+ }[];
1155
+ meta?: Record<string, unknown> | undefined;
1156
+ }, {
1157
+ errors: {
1158
+ status?: string | undefined;
1159
+ code?: string | undefined;
1160
+ id?: string | undefined;
1161
+ links?: {
1162
+ about?: string | undefined;
1163
+ } | undefined;
1164
+ meta?: Record<string, unknown> | undefined;
1165
+ title?: string | undefined;
1166
+ detail?: string | undefined;
1167
+ source?: {
1168
+ pointer?: string | undefined;
1169
+ parameter?: string | undefined;
1170
+ } | undefined;
1171
+ }[];
1172
+ meta?: Record<string, unknown> | undefined;
1173
+ }>;
1174
+ };
1175
+ };
1176
+ getCapitalTransaction: {
1177
+ pathParams: z.ZodObject<{
1178
+ farmId: z.ZodString;
1179
+ id: z.ZodString;
1180
+ }, "strip", z.ZodTypeAny, {
1181
+ id: string;
1182
+ farmId: string;
1183
+ }, {
1184
+ id: string;
1185
+ farmId: string;
1186
+ }>;
1187
+ query: z.ZodObject<{
1188
+ include: z.ZodOptional<z.ZodString>;
1189
+ }, "strip", z.ZodTypeAny, {
1190
+ include?: string | undefined;
1191
+ }, {
1192
+ include?: string | undefined;
1193
+ }>;
1194
+ summary: "Get capital transaction by ID";
1195
+ description: "Get detailed information about a specific capital transaction";
1196
+ method: "GET";
1197
+ path: "/farms/:farmId/capital/:id";
1198
+ responses: {
1199
+ 200: z.ZodObject<{
1200
+ data: z.ZodObject<{
1201
+ type: z.ZodLiteral<string>;
1202
+ id: z.ZodString;
1203
+ attributes: z.ZodObject<{
1204
+ type: z.ZodEnum<["OWNER_CONTRIBUTION", "LOAN", "GRANT", "INVESTOR", "WORKING_CAPITAL", "OTHER"]>;
1205
+ amount: z.ZodNumber;
1206
+ currency: z.ZodEnum<["NGN", "USD"]>;
1207
+ description: z.ZodNullable<z.ZodString>;
1208
+ source: z.ZodNullable<z.ZodString>;
1209
+ reference: z.ZodNullable<z.ZodString>;
1210
+ transactionDate: z.ZodString;
1211
+ isRepayable: z.ZodBoolean;
1212
+ repaymentTerms: z.ZodNullable<z.ZodString>;
1213
+ interestRate: z.ZodNullable<z.ZodNumber>;
1214
+ repaymentDueDate: z.ZodNullable<z.ZodString>;
1215
+ status: z.ZodEnum<["received", "pending", "partially_repaid", "fully_repaid", "cancelled"]>;
1216
+ amountRepaid: z.ZodNumber;
1217
+ outstandingBalance: z.ZodOptional<z.ZodNumber>;
1218
+ notes: z.ZodNullable<z.ZodString>;
1219
+ } & {
1220
+ createdAt: z.ZodString;
1221
+ updatedAt: z.ZodString;
1222
+ }, "strip", z.ZodTypeAny, {
1223
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
1224
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
1225
+ source: string | null;
1226
+ createdAt: string;
1227
+ updatedAt: string;
1228
+ description: string | null;
1229
+ currency: "NGN" | "USD";
1230
+ notes: string | null;
1231
+ amount: number;
1232
+ reference: string | null;
1233
+ transactionDate: string;
1234
+ isRepayable: boolean;
1235
+ repaymentTerms: string | null;
1236
+ interestRate: number | null;
1237
+ repaymentDueDate: string | null;
1238
+ amountRepaid: number;
1239
+ outstandingBalance?: number | undefined;
1240
+ }, {
1241
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
1242
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
1243
+ source: string | null;
1244
+ createdAt: string;
1245
+ updatedAt: string;
1246
+ description: string | null;
1247
+ currency: "NGN" | "USD";
1248
+ notes: string | null;
1249
+ amount: number;
1250
+ reference: string | null;
1251
+ transactionDate: string;
1252
+ isRepayable: boolean;
1253
+ repaymentTerms: string | null;
1254
+ interestRate: number | null;
1255
+ repaymentDueDate: string | null;
1256
+ amountRepaid: number;
1257
+ outstandingBalance?: number | undefined;
1258
+ }>;
1259
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1260
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1261
+ } & {
1262
+ relationships: z.ZodOptional<z.ZodObject<{
1263
+ farm: z.ZodOptional<z.ZodObject<{
1264
+ links: z.ZodObject<{
1265
+ related: z.ZodString;
1266
+ }, "strip", z.ZodTypeAny, {
1267
+ related: string;
1268
+ }, {
1269
+ related: string;
1270
+ }>;
1271
+ }, "strip", z.ZodTypeAny, {
1272
+ links: {
1273
+ related: string;
1274
+ };
1275
+ }, {
1276
+ links: {
1277
+ related: string;
1278
+ };
1279
+ }>>;
1280
+ }, "strip", z.ZodTypeAny, {
1281
+ farm?: {
1282
+ links: {
1283
+ related: string;
1284
+ };
1285
+ } | undefined;
1286
+ }, {
1287
+ farm?: {
1288
+ links: {
1289
+ related: string;
1290
+ };
1291
+ } | undefined;
1292
+ }>>;
1293
+ }, "strip", z.ZodTypeAny, {
1294
+ type: string;
1295
+ id: string;
1296
+ attributes: {
1297
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
1298
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
1299
+ source: string | null;
1300
+ createdAt: string;
1301
+ updatedAt: string;
1302
+ description: string | null;
1303
+ currency: "NGN" | "USD";
1304
+ notes: string | null;
1305
+ amount: number;
1306
+ reference: string | null;
1307
+ transactionDate: string;
1308
+ isRepayable: boolean;
1309
+ repaymentTerms: string | null;
1310
+ interestRate: number | null;
1311
+ repaymentDueDate: string | null;
1312
+ amountRepaid: number;
1313
+ outstandingBalance?: number | undefined;
1314
+ };
1315
+ relationships?: {
1316
+ farm?: {
1317
+ links: {
1318
+ related: string;
1319
+ };
1320
+ } | undefined;
1321
+ } | undefined;
1322
+ links?: Record<string, string> | undefined;
1323
+ meta?: Record<string, unknown> | undefined;
1324
+ }, {
1325
+ type: string;
1326
+ id: string;
1327
+ attributes: {
1328
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
1329
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
1330
+ source: string | null;
1331
+ createdAt: string;
1332
+ updatedAt: string;
1333
+ description: string | null;
1334
+ currency: "NGN" | "USD";
1335
+ notes: string | null;
1336
+ amount: number;
1337
+ reference: string | null;
1338
+ transactionDate: string;
1339
+ isRepayable: boolean;
1340
+ repaymentTerms: string | null;
1341
+ interestRate: number | null;
1342
+ repaymentDueDate: string | null;
1343
+ amountRepaid: number;
1344
+ outstandingBalance?: number | undefined;
1345
+ };
1346
+ relationships?: {
1347
+ farm?: {
1348
+ links: {
1349
+ related: string;
1350
+ };
1351
+ } | undefined;
1352
+ } | undefined;
1353
+ links?: Record<string, string> | undefined;
1354
+ meta?: Record<string, unknown> | undefined;
1355
+ }>;
1356
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
1357
+ type: z.ZodString;
1358
+ id: z.ZodString;
1359
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1360
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1361
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1362
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1363
+ }, "strip", z.ZodTypeAny, {
1364
+ type: string;
1365
+ id: string;
1366
+ attributes?: Record<string, unknown> | undefined;
1367
+ relationships?: Record<string, unknown> | undefined;
1368
+ links?: Record<string, string> | undefined;
1369
+ meta?: Record<string, unknown> | undefined;
1370
+ }, {
1371
+ type: string;
1372
+ id: string;
1373
+ attributes?: Record<string, unknown> | undefined;
1374
+ relationships?: Record<string, unknown> | undefined;
1375
+ links?: Record<string, string> | undefined;
1376
+ meta?: Record<string, unknown> | undefined;
1377
+ }>, "many">>;
1378
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1379
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1380
+ }, "strip", z.ZodTypeAny, {
1381
+ data: {
1382
+ type: string;
1383
+ id: string;
1384
+ attributes: {
1385
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
1386
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
1387
+ source: string | null;
1388
+ createdAt: string;
1389
+ updatedAt: string;
1390
+ description: string | null;
1391
+ currency: "NGN" | "USD";
1392
+ notes: string | null;
1393
+ amount: number;
1394
+ reference: string | null;
1395
+ transactionDate: string;
1396
+ isRepayable: boolean;
1397
+ repaymentTerms: string | null;
1398
+ interestRate: number | null;
1399
+ repaymentDueDate: string | null;
1400
+ amountRepaid: number;
1401
+ outstandingBalance?: number | undefined;
1402
+ };
1403
+ relationships?: {
1404
+ farm?: {
1405
+ links: {
1406
+ related: string;
1407
+ };
1408
+ } | undefined;
1409
+ } | undefined;
1410
+ links?: Record<string, string> | undefined;
1411
+ meta?: Record<string, unknown> | undefined;
1412
+ };
1413
+ links?: Record<string, string> | undefined;
1414
+ meta?: Record<string, unknown> | undefined;
1415
+ included?: {
1416
+ type: string;
1417
+ id: string;
1418
+ attributes?: Record<string, unknown> | undefined;
1419
+ relationships?: Record<string, unknown> | undefined;
1420
+ links?: Record<string, string> | undefined;
1421
+ meta?: Record<string, unknown> | undefined;
1422
+ }[] | undefined;
1423
+ }, {
1424
+ data: {
1425
+ type: string;
1426
+ id: string;
1427
+ attributes: {
1428
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
1429
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
1430
+ source: string | null;
1431
+ createdAt: string;
1432
+ updatedAt: string;
1433
+ description: string | null;
1434
+ currency: "NGN" | "USD";
1435
+ notes: string | null;
1436
+ amount: number;
1437
+ reference: string | null;
1438
+ transactionDate: string;
1439
+ isRepayable: boolean;
1440
+ repaymentTerms: string | null;
1441
+ interestRate: number | null;
1442
+ repaymentDueDate: string | null;
1443
+ amountRepaid: number;
1444
+ outstandingBalance?: number | undefined;
1445
+ };
1446
+ relationships?: {
1447
+ farm?: {
1448
+ links: {
1449
+ related: string;
1450
+ };
1451
+ } | undefined;
1452
+ } | undefined;
1453
+ links?: Record<string, string> | undefined;
1454
+ meta?: Record<string, unknown> | undefined;
1455
+ };
1456
+ links?: Record<string, string> | undefined;
1457
+ meta?: Record<string, unknown> | undefined;
1458
+ included?: {
1459
+ type: string;
1460
+ id: string;
1461
+ attributes?: Record<string, unknown> | undefined;
1462
+ relationships?: Record<string, unknown> | undefined;
1463
+ links?: Record<string, string> | undefined;
1464
+ meta?: Record<string, unknown> | undefined;
1465
+ }[] | undefined;
1466
+ }>;
1467
+ 404: z.ZodObject<{
1468
+ errors: z.ZodArray<z.ZodObject<{
1469
+ id: z.ZodOptional<z.ZodString>;
1470
+ links: z.ZodOptional<z.ZodObject<{
1471
+ about: z.ZodOptional<z.ZodString>;
1472
+ }, "strip", z.ZodTypeAny, {
1473
+ about?: string | undefined;
1474
+ }, {
1475
+ about?: string | undefined;
1476
+ }>>;
1477
+ status: z.ZodOptional<z.ZodString>;
1478
+ code: z.ZodOptional<z.ZodString>;
1479
+ title: z.ZodOptional<z.ZodString>;
1480
+ detail: z.ZodOptional<z.ZodString>;
1481
+ source: z.ZodOptional<z.ZodObject<{
1482
+ pointer: z.ZodOptional<z.ZodString>;
1483
+ parameter: z.ZodOptional<z.ZodString>;
1484
+ }, "strip", z.ZodTypeAny, {
1485
+ pointer?: string | undefined;
1486
+ parameter?: string | undefined;
1487
+ }, {
1488
+ pointer?: string | undefined;
1489
+ parameter?: string | undefined;
1490
+ }>>;
1491
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1492
+ }, "strip", z.ZodTypeAny, {
1493
+ status?: string | undefined;
1494
+ code?: string | undefined;
1495
+ id?: string | undefined;
1496
+ links?: {
1497
+ about?: string | undefined;
1498
+ } | undefined;
1499
+ meta?: Record<string, unknown> | undefined;
1500
+ title?: string | undefined;
1501
+ detail?: string | undefined;
1502
+ source?: {
1503
+ pointer?: string | undefined;
1504
+ parameter?: string | undefined;
1505
+ } | undefined;
1506
+ }, {
1507
+ status?: string | undefined;
1508
+ code?: string | undefined;
1509
+ id?: string | undefined;
1510
+ links?: {
1511
+ about?: string | undefined;
1512
+ } | undefined;
1513
+ meta?: Record<string, unknown> | undefined;
1514
+ title?: string | undefined;
1515
+ detail?: string | undefined;
1516
+ source?: {
1517
+ pointer?: string | undefined;
1518
+ parameter?: string | undefined;
1519
+ } | undefined;
1520
+ }>, "many">;
1521
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1522
+ }, "strip", z.ZodTypeAny, {
1523
+ errors: {
1524
+ status?: string | undefined;
1525
+ code?: string | undefined;
1526
+ id?: string | undefined;
1527
+ links?: {
1528
+ about?: string | undefined;
1529
+ } | undefined;
1530
+ meta?: Record<string, unknown> | undefined;
1531
+ title?: string | undefined;
1532
+ detail?: string | undefined;
1533
+ source?: {
1534
+ pointer?: string | undefined;
1535
+ parameter?: string | undefined;
1536
+ } | undefined;
1537
+ }[];
1538
+ meta?: Record<string, unknown> | undefined;
1539
+ }, {
1540
+ errors: {
1541
+ status?: string | undefined;
1542
+ code?: string | undefined;
1543
+ id?: string | undefined;
1544
+ links?: {
1545
+ about?: string | undefined;
1546
+ } | undefined;
1547
+ meta?: Record<string, unknown> | undefined;
1548
+ title?: string | undefined;
1549
+ detail?: string | undefined;
1550
+ source?: {
1551
+ pointer?: string | undefined;
1552
+ parameter?: string | undefined;
1553
+ } | undefined;
1554
+ }[];
1555
+ meta?: Record<string, unknown> | undefined;
1556
+ }>;
1557
+ 401: z.ZodObject<{
1558
+ errors: z.ZodArray<z.ZodObject<{
1559
+ id: z.ZodOptional<z.ZodString>;
1560
+ links: z.ZodOptional<z.ZodObject<{
1561
+ about: z.ZodOptional<z.ZodString>;
1562
+ }, "strip", z.ZodTypeAny, {
1563
+ about?: string | undefined;
1564
+ }, {
1565
+ about?: string | undefined;
1566
+ }>>;
1567
+ status: z.ZodOptional<z.ZodString>;
1568
+ code: z.ZodOptional<z.ZodString>;
1569
+ title: z.ZodOptional<z.ZodString>;
1570
+ detail: z.ZodOptional<z.ZodString>;
1571
+ source: z.ZodOptional<z.ZodObject<{
1572
+ pointer: z.ZodOptional<z.ZodString>;
1573
+ parameter: z.ZodOptional<z.ZodString>;
1574
+ }, "strip", z.ZodTypeAny, {
1575
+ pointer?: string | undefined;
1576
+ parameter?: string | undefined;
1577
+ }, {
1578
+ pointer?: string | undefined;
1579
+ parameter?: string | undefined;
1580
+ }>>;
1581
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1582
+ }, "strip", z.ZodTypeAny, {
1583
+ status?: string | undefined;
1584
+ code?: string | undefined;
1585
+ id?: string | undefined;
1586
+ links?: {
1587
+ about?: string | undefined;
1588
+ } | undefined;
1589
+ meta?: Record<string, unknown> | undefined;
1590
+ title?: string | undefined;
1591
+ detail?: string | undefined;
1592
+ source?: {
1593
+ pointer?: string | undefined;
1594
+ parameter?: string | undefined;
1595
+ } | undefined;
1596
+ }, {
1597
+ status?: string | undefined;
1598
+ code?: string | undefined;
1599
+ id?: string | undefined;
1600
+ links?: {
1601
+ about?: string | undefined;
1602
+ } | undefined;
1603
+ meta?: Record<string, unknown> | undefined;
1604
+ title?: string | undefined;
1605
+ detail?: string | undefined;
1606
+ source?: {
1607
+ pointer?: string | undefined;
1608
+ parameter?: string | undefined;
1609
+ } | undefined;
1610
+ }>, "many">;
1611
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1612
+ }, "strip", z.ZodTypeAny, {
1613
+ errors: {
1614
+ status?: string | undefined;
1615
+ code?: string | undefined;
1616
+ id?: string | undefined;
1617
+ links?: {
1618
+ about?: string | undefined;
1619
+ } | undefined;
1620
+ meta?: Record<string, unknown> | undefined;
1621
+ title?: string | undefined;
1622
+ detail?: string | undefined;
1623
+ source?: {
1624
+ pointer?: string | undefined;
1625
+ parameter?: string | undefined;
1626
+ } | undefined;
1627
+ }[];
1628
+ meta?: Record<string, unknown> | undefined;
1629
+ }, {
1630
+ errors: {
1631
+ status?: string | undefined;
1632
+ code?: string | undefined;
1633
+ id?: string | undefined;
1634
+ links?: {
1635
+ about?: string | undefined;
1636
+ } | undefined;
1637
+ meta?: Record<string, unknown> | undefined;
1638
+ title?: string | undefined;
1639
+ detail?: string | undefined;
1640
+ source?: {
1641
+ pointer?: string | undefined;
1642
+ parameter?: string | undefined;
1643
+ } | undefined;
1644
+ }[];
1645
+ meta?: Record<string, unknown> | undefined;
1646
+ }>;
1647
+ };
1648
+ };
1649
+ updateCapitalTransaction: {
1650
+ pathParams: z.ZodObject<{
1651
+ farmId: z.ZodString;
1652
+ id: z.ZodString;
1653
+ }, "strip", z.ZodTypeAny, {
1654
+ id: string;
1655
+ farmId: string;
1656
+ }, {
1657
+ id: string;
1658
+ farmId: string;
1659
+ }>;
1660
+ summary: "Update capital transaction";
1661
+ description: "Update a capital transaction record";
1662
+ method: "PATCH";
1663
+ body: z.ZodObject<{
1664
+ data: z.ZodObject<{
1665
+ type: z.ZodLiteral<"capital-transactions">;
1666
+ id: z.ZodString;
1667
+ attributes: z.ZodObject<{
1668
+ type: z.ZodOptional<z.ZodEnum<["OWNER_CONTRIBUTION", "LOAN", "GRANT", "INVESTOR", "WORKING_CAPITAL", "OTHER"]>>;
1669
+ amount: z.ZodOptional<z.ZodNumber>;
1670
+ currency: z.ZodOptional<z.ZodEnum<["NGN", "USD"]>>;
1671
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1672
+ source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1673
+ reference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1674
+ transactionDate: z.ZodOptional<z.ZodString>;
1675
+ isRepayable: z.ZodOptional<z.ZodBoolean>;
1676
+ repaymentTerms: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1677
+ interestRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1678
+ repaymentDueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1679
+ status: z.ZodOptional<z.ZodEnum<["received", "pending", "partially_repaid", "fully_repaid", "cancelled"]>>;
1680
+ amountRepaid: z.ZodOptional<z.ZodNumber>;
1681
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1682
+ }, "strip", z.ZodTypeAny, {
1683
+ type?: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER" | undefined;
1684
+ status?: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid" | undefined;
1685
+ source?: string | null | undefined;
1686
+ description?: string | null | undefined;
1687
+ currency?: "NGN" | "USD" | undefined;
1688
+ notes?: string | null | undefined;
1689
+ amount?: number | undefined;
1690
+ reference?: string | null | undefined;
1691
+ transactionDate?: string | undefined;
1692
+ isRepayable?: boolean | undefined;
1693
+ repaymentTerms?: string | null | undefined;
1694
+ interestRate?: number | null | undefined;
1695
+ repaymentDueDate?: string | null | undefined;
1696
+ amountRepaid?: number | undefined;
1697
+ }, {
1698
+ type?: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER" | undefined;
1699
+ status?: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid" | undefined;
1700
+ source?: string | null | undefined;
1701
+ description?: string | null | undefined;
1702
+ currency?: "NGN" | "USD" | undefined;
1703
+ notes?: string | null | undefined;
1704
+ amount?: number | undefined;
1705
+ reference?: string | null | undefined;
1706
+ transactionDate?: string | undefined;
1707
+ isRepayable?: boolean | undefined;
1708
+ repaymentTerms?: string | null | undefined;
1709
+ interestRate?: number | null | undefined;
1710
+ repaymentDueDate?: string | null | undefined;
1711
+ amountRepaid?: number | undefined;
1712
+ }>;
1713
+ }, "strip", z.ZodTypeAny, {
1714
+ type: "capital-transactions";
1715
+ id: string;
1716
+ attributes: {
1717
+ type?: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER" | undefined;
1718
+ status?: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid" | undefined;
1719
+ source?: string | null | undefined;
1720
+ description?: string | null | undefined;
1721
+ currency?: "NGN" | "USD" | undefined;
1722
+ notes?: string | null | undefined;
1723
+ amount?: number | undefined;
1724
+ reference?: string | null | undefined;
1725
+ transactionDate?: string | undefined;
1726
+ isRepayable?: boolean | undefined;
1727
+ repaymentTerms?: string | null | undefined;
1728
+ interestRate?: number | null | undefined;
1729
+ repaymentDueDate?: string | null | undefined;
1730
+ amountRepaid?: number | undefined;
1731
+ };
1732
+ }, {
1733
+ type: "capital-transactions";
1734
+ id: string;
1735
+ attributes: {
1736
+ type?: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER" | undefined;
1737
+ status?: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid" | undefined;
1738
+ source?: string | null | undefined;
1739
+ description?: string | null | undefined;
1740
+ currency?: "NGN" | "USD" | undefined;
1741
+ notes?: string | null | undefined;
1742
+ amount?: number | undefined;
1743
+ reference?: string | null | undefined;
1744
+ transactionDate?: string | undefined;
1745
+ isRepayable?: boolean | undefined;
1746
+ repaymentTerms?: string | null | undefined;
1747
+ interestRate?: number | null | undefined;
1748
+ repaymentDueDate?: string | null | undefined;
1749
+ amountRepaid?: number | undefined;
1750
+ };
1751
+ }>;
1752
+ }, "strip", z.ZodTypeAny, {
1753
+ data: {
1754
+ type: "capital-transactions";
1755
+ id: string;
1756
+ attributes: {
1757
+ type?: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER" | undefined;
1758
+ status?: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid" | undefined;
1759
+ source?: string | null | undefined;
1760
+ description?: string | null | undefined;
1761
+ currency?: "NGN" | "USD" | undefined;
1762
+ notes?: string | null | undefined;
1763
+ amount?: number | undefined;
1764
+ reference?: string | null | undefined;
1765
+ transactionDate?: string | undefined;
1766
+ isRepayable?: boolean | undefined;
1767
+ repaymentTerms?: string | null | undefined;
1768
+ interestRate?: number | null | undefined;
1769
+ repaymentDueDate?: string | null | undefined;
1770
+ amountRepaid?: number | undefined;
1771
+ };
1772
+ };
1773
+ }, {
1774
+ data: {
1775
+ type: "capital-transactions";
1776
+ id: string;
1777
+ attributes: {
1778
+ type?: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER" | undefined;
1779
+ status?: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid" | undefined;
1780
+ source?: string | null | undefined;
1781
+ description?: string | null | undefined;
1782
+ currency?: "NGN" | "USD" | undefined;
1783
+ notes?: string | null | undefined;
1784
+ amount?: number | undefined;
1785
+ reference?: string | null | undefined;
1786
+ transactionDate?: string | undefined;
1787
+ isRepayable?: boolean | undefined;
1788
+ repaymentTerms?: string | null | undefined;
1789
+ interestRate?: number | null | undefined;
1790
+ repaymentDueDate?: string | null | undefined;
1791
+ amountRepaid?: number | undefined;
1792
+ };
1793
+ };
1794
+ }>;
1795
+ path: "/farms/:farmId/capital/:id";
1796
+ responses: {
1797
+ 200: z.ZodObject<{
1798
+ data: z.ZodObject<{
1799
+ type: z.ZodLiteral<string>;
1800
+ id: z.ZodString;
1801
+ attributes: z.ZodObject<{
1802
+ type: z.ZodEnum<["OWNER_CONTRIBUTION", "LOAN", "GRANT", "INVESTOR", "WORKING_CAPITAL", "OTHER"]>;
1803
+ amount: z.ZodNumber;
1804
+ currency: z.ZodEnum<["NGN", "USD"]>;
1805
+ description: z.ZodNullable<z.ZodString>;
1806
+ source: z.ZodNullable<z.ZodString>;
1807
+ reference: z.ZodNullable<z.ZodString>;
1808
+ transactionDate: z.ZodString;
1809
+ isRepayable: z.ZodBoolean;
1810
+ repaymentTerms: z.ZodNullable<z.ZodString>;
1811
+ interestRate: z.ZodNullable<z.ZodNumber>;
1812
+ repaymentDueDate: z.ZodNullable<z.ZodString>;
1813
+ status: z.ZodEnum<["received", "pending", "partially_repaid", "fully_repaid", "cancelled"]>;
1814
+ amountRepaid: z.ZodNumber;
1815
+ outstandingBalance: z.ZodOptional<z.ZodNumber>;
1816
+ notes: z.ZodNullable<z.ZodString>;
1817
+ } & {
1818
+ createdAt: z.ZodString;
1819
+ updatedAt: z.ZodString;
1820
+ }, "strip", z.ZodTypeAny, {
1821
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
1822
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
1823
+ source: string | null;
1824
+ createdAt: string;
1825
+ updatedAt: string;
1826
+ description: string | null;
1827
+ currency: "NGN" | "USD";
1828
+ notes: string | null;
1829
+ amount: number;
1830
+ reference: string | null;
1831
+ transactionDate: string;
1832
+ isRepayable: boolean;
1833
+ repaymentTerms: string | null;
1834
+ interestRate: number | null;
1835
+ repaymentDueDate: string | null;
1836
+ amountRepaid: number;
1837
+ outstandingBalance?: number | undefined;
1838
+ }, {
1839
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
1840
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
1841
+ source: string | null;
1842
+ createdAt: string;
1843
+ updatedAt: string;
1844
+ description: string | null;
1845
+ currency: "NGN" | "USD";
1846
+ notes: string | null;
1847
+ amount: number;
1848
+ reference: string | null;
1849
+ transactionDate: string;
1850
+ isRepayable: boolean;
1851
+ repaymentTerms: string | null;
1852
+ interestRate: number | null;
1853
+ repaymentDueDate: string | null;
1854
+ amountRepaid: number;
1855
+ outstandingBalance?: number | undefined;
1856
+ }>;
1857
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1858
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1859
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1860
+ }, "strip", z.ZodTypeAny, {
1861
+ type: string;
1862
+ id: string;
1863
+ attributes: {
1864
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
1865
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
1866
+ source: string | null;
1867
+ createdAt: string;
1868
+ updatedAt: string;
1869
+ description: string | null;
1870
+ currency: "NGN" | "USD";
1871
+ notes: string | null;
1872
+ amount: number;
1873
+ reference: string | null;
1874
+ transactionDate: string;
1875
+ isRepayable: boolean;
1876
+ repaymentTerms: string | null;
1877
+ interestRate: number | null;
1878
+ repaymentDueDate: string | null;
1879
+ amountRepaid: number;
1880
+ outstandingBalance?: number | undefined;
1881
+ };
1882
+ relationships?: Record<string, unknown> | undefined;
1883
+ links?: Record<string, string> | undefined;
1884
+ meta?: Record<string, unknown> | undefined;
1885
+ }, {
1886
+ type: string;
1887
+ id: string;
1888
+ attributes: {
1889
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
1890
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
1891
+ source: string | null;
1892
+ createdAt: string;
1893
+ updatedAt: string;
1894
+ description: string | null;
1895
+ currency: "NGN" | "USD";
1896
+ notes: string | null;
1897
+ amount: number;
1898
+ reference: string | null;
1899
+ transactionDate: string;
1900
+ isRepayable: boolean;
1901
+ repaymentTerms: string | null;
1902
+ interestRate: number | null;
1903
+ repaymentDueDate: string | null;
1904
+ amountRepaid: number;
1905
+ outstandingBalance?: number | undefined;
1906
+ };
1907
+ relationships?: Record<string, unknown> | undefined;
1908
+ links?: Record<string, string> | undefined;
1909
+ meta?: Record<string, unknown> | undefined;
1910
+ }>;
1911
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
1912
+ type: z.ZodString;
1913
+ id: z.ZodString;
1914
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1915
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1916
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1917
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1918
+ }, "strip", z.ZodTypeAny, {
1919
+ type: string;
1920
+ id: string;
1921
+ attributes?: Record<string, unknown> | undefined;
1922
+ relationships?: Record<string, unknown> | undefined;
1923
+ links?: Record<string, string> | undefined;
1924
+ meta?: Record<string, unknown> | undefined;
1925
+ }, {
1926
+ type: string;
1927
+ id: string;
1928
+ attributes?: Record<string, unknown> | undefined;
1929
+ relationships?: Record<string, unknown> | undefined;
1930
+ links?: Record<string, string> | undefined;
1931
+ meta?: Record<string, unknown> | undefined;
1932
+ }>, "many">>;
1933
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1934
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1935
+ }, "strip", z.ZodTypeAny, {
1936
+ data: {
1937
+ type: string;
1938
+ id: string;
1939
+ attributes: {
1940
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
1941
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
1942
+ source: string | null;
1943
+ createdAt: string;
1944
+ updatedAt: string;
1945
+ description: string | null;
1946
+ currency: "NGN" | "USD";
1947
+ notes: string | null;
1948
+ amount: number;
1949
+ reference: string | null;
1950
+ transactionDate: string;
1951
+ isRepayable: boolean;
1952
+ repaymentTerms: string | null;
1953
+ interestRate: number | null;
1954
+ repaymentDueDate: string | null;
1955
+ amountRepaid: number;
1956
+ outstandingBalance?: number | undefined;
1957
+ };
1958
+ relationships?: Record<string, unknown> | undefined;
1959
+ links?: Record<string, string> | undefined;
1960
+ meta?: Record<string, unknown> | undefined;
1961
+ };
1962
+ links?: Record<string, string> | undefined;
1963
+ meta?: Record<string, unknown> | undefined;
1964
+ included?: {
1965
+ type: string;
1966
+ id: string;
1967
+ attributes?: Record<string, unknown> | undefined;
1968
+ relationships?: Record<string, unknown> | undefined;
1969
+ links?: Record<string, string> | undefined;
1970
+ meta?: Record<string, unknown> | undefined;
1971
+ }[] | undefined;
1972
+ }, {
1973
+ data: {
1974
+ type: string;
1975
+ id: string;
1976
+ attributes: {
1977
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
1978
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
1979
+ source: string | null;
1980
+ createdAt: string;
1981
+ updatedAt: string;
1982
+ description: string | null;
1983
+ currency: "NGN" | "USD";
1984
+ notes: string | null;
1985
+ amount: number;
1986
+ reference: string | null;
1987
+ transactionDate: string;
1988
+ isRepayable: boolean;
1989
+ repaymentTerms: string | null;
1990
+ interestRate: number | null;
1991
+ repaymentDueDate: string | null;
1992
+ amountRepaid: number;
1993
+ outstandingBalance?: number | undefined;
1994
+ };
1995
+ relationships?: Record<string, unknown> | undefined;
1996
+ links?: Record<string, string> | undefined;
1997
+ meta?: Record<string, unknown> | undefined;
1998
+ };
1999
+ links?: Record<string, string> | undefined;
2000
+ meta?: Record<string, unknown> | undefined;
2001
+ included?: {
2002
+ type: string;
2003
+ id: string;
2004
+ attributes?: Record<string, unknown> | undefined;
2005
+ relationships?: Record<string, unknown> | undefined;
2006
+ links?: Record<string, string> | undefined;
2007
+ meta?: Record<string, unknown> | undefined;
2008
+ }[] | undefined;
2009
+ }>;
2010
+ 400: z.ZodObject<{
2011
+ errors: z.ZodArray<z.ZodObject<{
2012
+ id: z.ZodOptional<z.ZodString>;
2013
+ links: z.ZodOptional<z.ZodObject<{
2014
+ about: z.ZodOptional<z.ZodString>;
2015
+ }, "strip", z.ZodTypeAny, {
2016
+ about?: string | undefined;
2017
+ }, {
2018
+ about?: string | undefined;
2019
+ }>>;
2020
+ status: z.ZodOptional<z.ZodString>;
2021
+ code: z.ZodOptional<z.ZodString>;
2022
+ title: z.ZodOptional<z.ZodString>;
2023
+ detail: z.ZodOptional<z.ZodString>;
2024
+ source: z.ZodOptional<z.ZodObject<{
2025
+ pointer: z.ZodOptional<z.ZodString>;
2026
+ parameter: z.ZodOptional<z.ZodString>;
2027
+ }, "strip", z.ZodTypeAny, {
2028
+ pointer?: string | undefined;
2029
+ parameter?: string | undefined;
2030
+ }, {
2031
+ pointer?: string | undefined;
2032
+ parameter?: string | undefined;
2033
+ }>>;
2034
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2035
+ }, "strip", z.ZodTypeAny, {
2036
+ status?: string | undefined;
2037
+ code?: string | undefined;
2038
+ id?: string | undefined;
2039
+ links?: {
2040
+ about?: string | undefined;
2041
+ } | undefined;
2042
+ meta?: Record<string, unknown> | undefined;
2043
+ title?: string | undefined;
2044
+ detail?: string | undefined;
2045
+ source?: {
2046
+ pointer?: string | undefined;
2047
+ parameter?: string | undefined;
2048
+ } | undefined;
2049
+ }, {
2050
+ status?: string | undefined;
2051
+ code?: string | undefined;
2052
+ id?: string | undefined;
2053
+ links?: {
2054
+ about?: string | undefined;
2055
+ } | undefined;
2056
+ meta?: Record<string, unknown> | undefined;
2057
+ title?: string | undefined;
2058
+ detail?: string | undefined;
2059
+ source?: {
2060
+ pointer?: string | undefined;
2061
+ parameter?: string | undefined;
2062
+ } | undefined;
2063
+ }>, "many">;
2064
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2065
+ }, "strip", z.ZodTypeAny, {
2066
+ errors: {
2067
+ status?: string | undefined;
2068
+ code?: string | undefined;
2069
+ id?: string | undefined;
2070
+ links?: {
2071
+ about?: string | undefined;
2072
+ } | undefined;
2073
+ meta?: Record<string, unknown> | undefined;
2074
+ title?: string | undefined;
2075
+ detail?: string | undefined;
2076
+ source?: {
2077
+ pointer?: string | undefined;
2078
+ parameter?: string | undefined;
2079
+ } | undefined;
2080
+ }[];
2081
+ meta?: Record<string, unknown> | undefined;
2082
+ }, {
2083
+ errors: {
2084
+ status?: string | undefined;
2085
+ code?: string | undefined;
2086
+ id?: string | undefined;
2087
+ links?: {
2088
+ about?: string | undefined;
2089
+ } | undefined;
2090
+ meta?: Record<string, unknown> | undefined;
2091
+ title?: string | undefined;
2092
+ detail?: string | undefined;
2093
+ source?: {
2094
+ pointer?: string | undefined;
2095
+ parameter?: string | undefined;
2096
+ } | undefined;
2097
+ }[];
2098
+ meta?: Record<string, unknown> | undefined;
2099
+ }>;
2100
+ 404: z.ZodObject<{
2101
+ errors: z.ZodArray<z.ZodObject<{
2102
+ id: z.ZodOptional<z.ZodString>;
2103
+ links: z.ZodOptional<z.ZodObject<{
2104
+ about: z.ZodOptional<z.ZodString>;
2105
+ }, "strip", z.ZodTypeAny, {
2106
+ about?: string | undefined;
2107
+ }, {
2108
+ about?: string | undefined;
2109
+ }>>;
2110
+ status: z.ZodOptional<z.ZodString>;
2111
+ code: z.ZodOptional<z.ZodString>;
2112
+ title: z.ZodOptional<z.ZodString>;
2113
+ detail: z.ZodOptional<z.ZodString>;
2114
+ source: z.ZodOptional<z.ZodObject<{
2115
+ pointer: z.ZodOptional<z.ZodString>;
2116
+ parameter: z.ZodOptional<z.ZodString>;
2117
+ }, "strip", z.ZodTypeAny, {
2118
+ pointer?: string | undefined;
2119
+ parameter?: string | undefined;
2120
+ }, {
2121
+ pointer?: string | undefined;
2122
+ parameter?: string | undefined;
2123
+ }>>;
2124
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2125
+ }, "strip", z.ZodTypeAny, {
2126
+ status?: string | undefined;
2127
+ code?: string | undefined;
2128
+ id?: string | undefined;
2129
+ links?: {
2130
+ about?: string | undefined;
2131
+ } | undefined;
2132
+ meta?: Record<string, unknown> | undefined;
2133
+ title?: string | undefined;
2134
+ detail?: string | undefined;
2135
+ source?: {
2136
+ pointer?: string | undefined;
2137
+ parameter?: string | undefined;
2138
+ } | undefined;
2139
+ }, {
2140
+ status?: string | undefined;
2141
+ code?: string | undefined;
2142
+ id?: string | undefined;
2143
+ links?: {
2144
+ about?: string | undefined;
2145
+ } | undefined;
2146
+ meta?: Record<string, unknown> | undefined;
2147
+ title?: string | undefined;
2148
+ detail?: string | undefined;
2149
+ source?: {
2150
+ pointer?: string | undefined;
2151
+ parameter?: string | undefined;
2152
+ } | undefined;
2153
+ }>, "many">;
2154
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2155
+ }, "strip", z.ZodTypeAny, {
2156
+ errors: {
2157
+ status?: string | undefined;
2158
+ code?: string | undefined;
2159
+ id?: string | undefined;
2160
+ links?: {
2161
+ about?: string | undefined;
2162
+ } | undefined;
2163
+ meta?: Record<string, unknown> | undefined;
2164
+ title?: string | undefined;
2165
+ detail?: string | undefined;
2166
+ source?: {
2167
+ pointer?: string | undefined;
2168
+ parameter?: string | undefined;
2169
+ } | undefined;
2170
+ }[];
2171
+ meta?: Record<string, unknown> | undefined;
2172
+ }, {
2173
+ errors: {
2174
+ status?: string | undefined;
2175
+ code?: string | undefined;
2176
+ id?: string | undefined;
2177
+ links?: {
2178
+ about?: string | undefined;
2179
+ } | undefined;
2180
+ meta?: Record<string, unknown> | undefined;
2181
+ title?: string | undefined;
2182
+ detail?: string | undefined;
2183
+ source?: {
2184
+ pointer?: string | undefined;
2185
+ parameter?: string | undefined;
2186
+ } | undefined;
2187
+ }[];
2188
+ meta?: Record<string, unknown> | undefined;
2189
+ }>;
2190
+ 401: z.ZodObject<{
2191
+ errors: z.ZodArray<z.ZodObject<{
2192
+ id: z.ZodOptional<z.ZodString>;
2193
+ links: z.ZodOptional<z.ZodObject<{
2194
+ about: z.ZodOptional<z.ZodString>;
2195
+ }, "strip", z.ZodTypeAny, {
2196
+ about?: string | undefined;
2197
+ }, {
2198
+ about?: string | undefined;
2199
+ }>>;
2200
+ status: z.ZodOptional<z.ZodString>;
2201
+ code: z.ZodOptional<z.ZodString>;
2202
+ title: z.ZodOptional<z.ZodString>;
2203
+ detail: z.ZodOptional<z.ZodString>;
2204
+ source: z.ZodOptional<z.ZodObject<{
2205
+ pointer: z.ZodOptional<z.ZodString>;
2206
+ parameter: z.ZodOptional<z.ZodString>;
2207
+ }, "strip", z.ZodTypeAny, {
2208
+ pointer?: string | undefined;
2209
+ parameter?: string | undefined;
2210
+ }, {
2211
+ pointer?: string | undefined;
2212
+ parameter?: string | undefined;
2213
+ }>>;
2214
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2215
+ }, "strip", z.ZodTypeAny, {
2216
+ status?: string | undefined;
2217
+ code?: string | undefined;
2218
+ id?: string | undefined;
2219
+ links?: {
2220
+ about?: string | undefined;
2221
+ } | undefined;
2222
+ meta?: Record<string, unknown> | undefined;
2223
+ title?: string | undefined;
2224
+ detail?: string | undefined;
2225
+ source?: {
2226
+ pointer?: string | undefined;
2227
+ parameter?: string | undefined;
2228
+ } | undefined;
2229
+ }, {
2230
+ status?: string | undefined;
2231
+ code?: string | undefined;
2232
+ id?: string | undefined;
2233
+ links?: {
2234
+ about?: string | undefined;
2235
+ } | undefined;
2236
+ meta?: Record<string, unknown> | undefined;
2237
+ title?: string | undefined;
2238
+ detail?: string | undefined;
2239
+ source?: {
2240
+ pointer?: string | undefined;
2241
+ parameter?: string | undefined;
2242
+ } | undefined;
2243
+ }>, "many">;
2244
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2245
+ }, "strip", z.ZodTypeAny, {
2246
+ errors: {
2247
+ status?: string | undefined;
2248
+ code?: string | undefined;
2249
+ id?: string | undefined;
2250
+ links?: {
2251
+ about?: string | undefined;
2252
+ } | undefined;
2253
+ meta?: Record<string, unknown> | undefined;
2254
+ title?: string | undefined;
2255
+ detail?: string | undefined;
2256
+ source?: {
2257
+ pointer?: string | undefined;
2258
+ parameter?: string | undefined;
2259
+ } | undefined;
2260
+ }[];
2261
+ meta?: Record<string, unknown> | undefined;
2262
+ }, {
2263
+ errors: {
2264
+ status?: string | undefined;
2265
+ code?: string | undefined;
2266
+ id?: string | undefined;
2267
+ links?: {
2268
+ about?: string | undefined;
2269
+ } | undefined;
2270
+ meta?: Record<string, unknown> | undefined;
2271
+ title?: string | undefined;
2272
+ detail?: string | undefined;
2273
+ source?: {
2274
+ pointer?: string | undefined;
2275
+ parameter?: string | undefined;
2276
+ } | undefined;
2277
+ }[];
2278
+ meta?: Record<string, unknown> | undefined;
2279
+ }>;
2280
+ 422: z.ZodObject<{
2281
+ errors: z.ZodArray<z.ZodObject<{
2282
+ id: z.ZodOptional<z.ZodString>;
2283
+ links: z.ZodOptional<z.ZodObject<{
2284
+ about: z.ZodOptional<z.ZodString>;
2285
+ }, "strip", z.ZodTypeAny, {
2286
+ about?: string | undefined;
2287
+ }, {
2288
+ about?: string | undefined;
2289
+ }>>;
2290
+ status: z.ZodOptional<z.ZodString>;
2291
+ code: z.ZodOptional<z.ZodString>;
2292
+ title: z.ZodOptional<z.ZodString>;
2293
+ detail: z.ZodOptional<z.ZodString>;
2294
+ source: z.ZodOptional<z.ZodObject<{
2295
+ pointer: z.ZodOptional<z.ZodString>;
2296
+ parameter: z.ZodOptional<z.ZodString>;
2297
+ }, "strip", z.ZodTypeAny, {
2298
+ pointer?: string | undefined;
2299
+ parameter?: string | undefined;
2300
+ }, {
2301
+ pointer?: string | undefined;
2302
+ parameter?: string | undefined;
2303
+ }>>;
2304
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2305
+ }, "strip", z.ZodTypeAny, {
2306
+ status?: string | undefined;
2307
+ code?: string | undefined;
2308
+ id?: string | undefined;
2309
+ links?: {
2310
+ about?: string | undefined;
2311
+ } | undefined;
2312
+ meta?: Record<string, unknown> | undefined;
2313
+ title?: string | undefined;
2314
+ detail?: string | undefined;
2315
+ source?: {
2316
+ pointer?: string | undefined;
2317
+ parameter?: string | undefined;
2318
+ } | undefined;
2319
+ }, {
2320
+ status?: string | undefined;
2321
+ code?: string | undefined;
2322
+ id?: string | undefined;
2323
+ links?: {
2324
+ about?: string | undefined;
2325
+ } | undefined;
2326
+ meta?: Record<string, unknown> | undefined;
2327
+ title?: string | undefined;
2328
+ detail?: string | undefined;
2329
+ source?: {
2330
+ pointer?: string | undefined;
2331
+ parameter?: string | undefined;
2332
+ } | undefined;
2333
+ }>, "many">;
2334
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2335
+ }, "strip", z.ZodTypeAny, {
2336
+ errors: {
2337
+ status?: string | undefined;
2338
+ code?: string | undefined;
2339
+ id?: string | undefined;
2340
+ links?: {
2341
+ about?: string | undefined;
2342
+ } | undefined;
2343
+ meta?: Record<string, unknown> | undefined;
2344
+ title?: string | undefined;
2345
+ detail?: string | undefined;
2346
+ source?: {
2347
+ pointer?: string | undefined;
2348
+ parameter?: string | undefined;
2349
+ } | undefined;
2350
+ }[];
2351
+ meta?: Record<string, unknown> | undefined;
2352
+ }, {
2353
+ errors: {
2354
+ status?: string | undefined;
2355
+ code?: string | undefined;
2356
+ id?: string | undefined;
2357
+ links?: {
2358
+ about?: string | undefined;
2359
+ } | undefined;
2360
+ meta?: Record<string, unknown> | undefined;
2361
+ title?: string | undefined;
2362
+ detail?: string | undefined;
2363
+ source?: {
2364
+ pointer?: string | undefined;
2365
+ parameter?: string | undefined;
2366
+ } | undefined;
2367
+ }[];
2368
+ meta?: Record<string, unknown> | undefined;
2369
+ }>;
2370
+ };
2371
+ };
2372
+ deleteCapitalTransaction: {
2373
+ pathParams: z.ZodObject<{
2374
+ farmId: z.ZodString;
2375
+ id: z.ZodString;
2376
+ }, "strip", z.ZodTypeAny, {
2377
+ id: string;
2378
+ farmId: string;
2379
+ }, {
2380
+ id: string;
2381
+ farmId: string;
2382
+ }>;
2383
+ summary: "Delete capital transaction";
2384
+ description: "Delete a capital transaction record";
2385
+ method: "DELETE";
2386
+ path: "/farms/:farmId/capital/:id";
2387
+ responses: {
2388
+ 204: z.ZodObject<{
2389
+ meta: z.ZodObject<{
2390
+ message: z.ZodString;
2391
+ }, "strip", z.ZodTypeAny, {
2392
+ message: string;
2393
+ }, {
2394
+ message: string;
2395
+ }>;
2396
+ }, "strip", z.ZodTypeAny, {
2397
+ meta: {
2398
+ message: string;
2399
+ };
2400
+ }, {
2401
+ meta: {
2402
+ message: string;
2403
+ };
2404
+ }>;
2405
+ 404: z.ZodObject<{
2406
+ errors: z.ZodArray<z.ZodObject<{
2407
+ id: z.ZodOptional<z.ZodString>;
2408
+ links: z.ZodOptional<z.ZodObject<{
2409
+ about: z.ZodOptional<z.ZodString>;
2410
+ }, "strip", z.ZodTypeAny, {
2411
+ about?: string | undefined;
2412
+ }, {
2413
+ about?: string | undefined;
2414
+ }>>;
2415
+ status: z.ZodOptional<z.ZodString>;
2416
+ code: z.ZodOptional<z.ZodString>;
2417
+ title: z.ZodOptional<z.ZodString>;
2418
+ detail: z.ZodOptional<z.ZodString>;
2419
+ source: z.ZodOptional<z.ZodObject<{
2420
+ pointer: z.ZodOptional<z.ZodString>;
2421
+ parameter: z.ZodOptional<z.ZodString>;
2422
+ }, "strip", z.ZodTypeAny, {
2423
+ pointer?: string | undefined;
2424
+ parameter?: string | undefined;
2425
+ }, {
2426
+ pointer?: string | undefined;
2427
+ parameter?: string | undefined;
2428
+ }>>;
2429
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2430
+ }, "strip", z.ZodTypeAny, {
2431
+ status?: string | undefined;
2432
+ code?: string | undefined;
2433
+ id?: string | undefined;
2434
+ links?: {
2435
+ about?: string | undefined;
2436
+ } | undefined;
2437
+ meta?: Record<string, unknown> | undefined;
2438
+ title?: string | undefined;
2439
+ detail?: string | undefined;
2440
+ source?: {
2441
+ pointer?: string | undefined;
2442
+ parameter?: string | undefined;
2443
+ } | undefined;
2444
+ }, {
2445
+ status?: string | undefined;
2446
+ code?: string | undefined;
2447
+ id?: string | undefined;
2448
+ links?: {
2449
+ about?: string | undefined;
2450
+ } | undefined;
2451
+ meta?: Record<string, unknown> | undefined;
2452
+ title?: string | undefined;
2453
+ detail?: string | undefined;
2454
+ source?: {
2455
+ pointer?: string | undefined;
2456
+ parameter?: string | undefined;
2457
+ } | undefined;
2458
+ }>, "many">;
2459
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2460
+ }, "strip", z.ZodTypeAny, {
2461
+ errors: {
2462
+ status?: string | undefined;
2463
+ code?: string | undefined;
2464
+ id?: string | undefined;
2465
+ links?: {
2466
+ about?: string | undefined;
2467
+ } | undefined;
2468
+ meta?: Record<string, unknown> | undefined;
2469
+ title?: string | undefined;
2470
+ detail?: string | undefined;
2471
+ source?: {
2472
+ pointer?: string | undefined;
2473
+ parameter?: string | undefined;
2474
+ } | undefined;
2475
+ }[];
2476
+ meta?: Record<string, unknown> | undefined;
2477
+ }, {
2478
+ errors: {
2479
+ status?: string | undefined;
2480
+ code?: string | undefined;
2481
+ id?: string | undefined;
2482
+ links?: {
2483
+ about?: string | undefined;
2484
+ } | undefined;
2485
+ meta?: Record<string, unknown> | undefined;
2486
+ title?: string | undefined;
2487
+ detail?: string | undefined;
2488
+ source?: {
2489
+ pointer?: string | undefined;
2490
+ parameter?: string | undefined;
2491
+ } | undefined;
2492
+ }[];
2493
+ meta?: Record<string, unknown> | undefined;
2494
+ }>;
2495
+ 401: z.ZodObject<{
2496
+ errors: z.ZodArray<z.ZodObject<{
2497
+ id: z.ZodOptional<z.ZodString>;
2498
+ links: z.ZodOptional<z.ZodObject<{
2499
+ about: z.ZodOptional<z.ZodString>;
2500
+ }, "strip", z.ZodTypeAny, {
2501
+ about?: string | undefined;
2502
+ }, {
2503
+ about?: string | undefined;
2504
+ }>>;
2505
+ status: z.ZodOptional<z.ZodString>;
2506
+ code: z.ZodOptional<z.ZodString>;
2507
+ title: z.ZodOptional<z.ZodString>;
2508
+ detail: z.ZodOptional<z.ZodString>;
2509
+ source: z.ZodOptional<z.ZodObject<{
2510
+ pointer: z.ZodOptional<z.ZodString>;
2511
+ parameter: z.ZodOptional<z.ZodString>;
2512
+ }, "strip", z.ZodTypeAny, {
2513
+ pointer?: string | undefined;
2514
+ parameter?: string | undefined;
2515
+ }, {
2516
+ pointer?: string | undefined;
2517
+ parameter?: string | undefined;
2518
+ }>>;
2519
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2520
+ }, "strip", z.ZodTypeAny, {
2521
+ status?: string | undefined;
2522
+ code?: string | undefined;
2523
+ id?: string | undefined;
2524
+ links?: {
2525
+ about?: string | undefined;
2526
+ } | undefined;
2527
+ meta?: Record<string, unknown> | undefined;
2528
+ title?: string | undefined;
2529
+ detail?: string | undefined;
2530
+ source?: {
2531
+ pointer?: string | undefined;
2532
+ parameter?: string | undefined;
2533
+ } | undefined;
2534
+ }, {
2535
+ status?: string | undefined;
2536
+ code?: string | undefined;
2537
+ id?: string | undefined;
2538
+ links?: {
2539
+ about?: string | undefined;
2540
+ } | undefined;
2541
+ meta?: Record<string, unknown> | undefined;
2542
+ title?: string | undefined;
2543
+ detail?: string | undefined;
2544
+ source?: {
2545
+ pointer?: string | undefined;
2546
+ parameter?: string | undefined;
2547
+ } | undefined;
2548
+ }>, "many">;
2549
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2550
+ }, "strip", z.ZodTypeAny, {
2551
+ errors: {
2552
+ status?: string | undefined;
2553
+ code?: string | undefined;
2554
+ id?: string | undefined;
2555
+ links?: {
2556
+ about?: string | undefined;
2557
+ } | undefined;
2558
+ meta?: Record<string, unknown> | undefined;
2559
+ title?: string | undefined;
2560
+ detail?: string | undefined;
2561
+ source?: {
2562
+ pointer?: string | undefined;
2563
+ parameter?: string | undefined;
2564
+ } | undefined;
2565
+ }[];
2566
+ meta?: Record<string, unknown> | undefined;
2567
+ }, {
2568
+ errors: {
2569
+ status?: string | undefined;
2570
+ code?: string | undefined;
2571
+ id?: string | undefined;
2572
+ links?: {
2573
+ about?: string | undefined;
2574
+ } | undefined;
2575
+ meta?: Record<string, unknown> | undefined;
2576
+ title?: string | undefined;
2577
+ detail?: string | undefined;
2578
+ source?: {
2579
+ pointer?: string | undefined;
2580
+ parameter?: string | undefined;
2581
+ } | undefined;
2582
+ }[];
2583
+ meta?: Record<string, unknown> | undefined;
2584
+ }>;
2585
+ };
2586
+ };
2587
+ recordRepayment: {
2588
+ pathParams: z.ZodObject<{
2589
+ farmId: z.ZodString;
2590
+ id: z.ZodString;
2591
+ }, "strip", z.ZodTypeAny, {
2592
+ id: string;
2593
+ farmId: string;
2594
+ }, {
2595
+ id: string;
2596
+ farmId: string;
2597
+ }>;
2598
+ summary: "Record loan repayment";
2599
+ description: "Record a repayment against a loan or repayable capital transaction";
2600
+ method: "POST";
2601
+ body: z.ZodObject<{
2602
+ data: z.ZodObject<{
2603
+ type: z.ZodLiteral<"capital-repayments">;
2604
+ attributes: z.ZodObject<{
2605
+ amount: z.ZodNumber;
2606
+ repaymentDate: z.ZodString;
2607
+ notes: z.ZodOptional<z.ZodString>;
2608
+ }, "strip", z.ZodTypeAny, {
2609
+ amount: number;
2610
+ repaymentDate: string;
2611
+ notes?: string | undefined;
2612
+ }, {
2613
+ amount: number;
2614
+ repaymentDate: string;
2615
+ notes?: string | undefined;
2616
+ }>;
2617
+ }, "strip", z.ZodTypeAny, {
2618
+ type: "capital-repayments";
2619
+ attributes: {
2620
+ amount: number;
2621
+ repaymentDate: string;
2622
+ notes?: string | undefined;
2623
+ };
2624
+ }, {
2625
+ type: "capital-repayments";
2626
+ attributes: {
2627
+ amount: number;
2628
+ repaymentDate: string;
2629
+ notes?: string | undefined;
2630
+ };
2631
+ }>;
2632
+ }, "strip", z.ZodTypeAny, {
2633
+ data: {
2634
+ type: "capital-repayments";
2635
+ attributes: {
2636
+ amount: number;
2637
+ repaymentDate: string;
2638
+ notes?: string | undefined;
2639
+ };
2640
+ };
2641
+ }, {
2642
+ data: {
2643
+ type: "capital-repayments";
2644
+ attributes: {
2645
+ amount: number;
2646
+ repaymentDate: string;
2647
+ notes?: string | undefined;
2648
+ };
2649
+ };
2650
+ }>;
2651
+ path: "/farms/:farmId/capital/:id/repayments";
2652
+ responses: {
2653
+ 200: z.ZodObject<{
2654
+ data: z.ZodObject<{
2655
+ type: z.ZodLiteral<string>;
2656
+ id: z.ZodString;
2657
+ attributes: z.ZodObject<{
2658
+ type: z.ZodEnum<["OWNER_CONTRIBUTION", "LOAN", "GRANT", "INVESTOR", "WORKING_CAPITAL", "OTHER"]>;
2659
+ amount: z.ZodNumber;
2660
+ currency: z.ZodEnum<["NGN", "USD"]>;
2661
+ description: z.ZodNullable<z.ZodString>;
2662
+ source: z.ZodNullable<z.ZodString>;
2663
+ reference: z.ZodNullable<z.ZodString>;
2664
+ transactionDate: z.ZodString;
2665
+ isRepayable: z.ZodBoolean;
2666
+ repaymentTerms: z.ZodNullable<z.ZodString>;
2667
+ interestRate: z.ZodNullable<z.ZodNumber>;
2668
+ repaymentDueDate: z.ZodNullable<z.ZodString>;
2669
+ status: z.ZodEnum<["received", "pending", "partially_repaid", "fully_repaid", "cancelled"]>;
2670
+ amountRepaid: z.ZodNumber;
2671
+ outstandingBalance: z.ZodOptional<z.ZodNumber>;
2672
+ notes: z.ZodNullable<z.ZodString>;
2673
+ } & {
2674
+ createdAt: z.ZodString;
2675
+ updatedAt: z.ZodString;
2676
+ }, "strip", z.ZodTypeAny, {
2677
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
2678
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
2679
+ source: string | null;
2680
+ createdAt: string;
2681
+ updatedAt: string;
2682
+ description: string | null;
2683
+ currency: "NGN" | "USD";
2684
+ notes: string | null;
2685
+ amount: number;
2686
+ reference: string | null;
2687
+ transactionDate: string;
2688
+ isRepayable: boolean;
2689
+ repaymentTerms: string | null;
2690
+ interestRate: number | null;
2691
+ repaymentDueDate: string | null;
2692
+ amountRepaid: number;
2693
+ outstandingBalance?: number | undefined;
2694
+ }, {
2695
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
2696
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
2697
+ source: string | null;
2698
+ createdAt: string;
2699
+ updatedAt: string;
2700
+ description: string | null;
2701
+ currency: "NGN" | "USD";
2702
+ notes: string | null;
2703
+ amount: number;
2704
+ reference: string | null;
2705
+ transactionDate: string;
2706
+ isRepayable: boolean;
2707
+ repaymentTerms: string | null;
2708
+ interestRate: number | null;
2709
+ repaymentDueDate: string | null;
2710
+ amountRepaid: number;
2711
+ outstandingBalance?: number | undefined;
2712
+ }>;
2713
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2714
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2715
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2716
+ }, "strip", z.ZodTypeAny, {
2717
+ type: string;
2718
+ id: string;
2719
+ attributes: {
2720
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
2721
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
2722
+ source: string | null;
2723
+ createdAt: string;
2724
+ updatedAt: string;
2725
+ description: string | null;
2726
+ currency: "NGN" | "USD";
2727
+ notes: string | null;
2728
+ amount: number;
2729
+ reference: string | null;
2730
+ transactionDate: string;
2731
+ isRepayable: boolean;
2732
+ repaymentTerms: string | null;
2733
+ interestRate: number | null;
2734
+ repaymentDueDate: string | null;
2735
+ amountRepaid: number;
2736
+ outstandingBalance?: number | undefined;
2737
+ };
2738
+ relationships?: Record<string, unknown> | undefined;
2739
+ links?: Record<string, string> | undefined;
2740
+ meta?: Record<string, unknown> | undefined;
2741
+ }, {
2742
+ type: string;
2743
+ id: string;
2744
+ attributes: {
2745
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
2746
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
2747
+ source: string | null;
2748
+ createdAt: string;
2749
+ updatedAt: string;
2750
+ description: string | null;
2751
+ currency: "NGN" | "USD";
2752
+ notes: string | null;
2753
+ amount: number;
2754
+ reference: string | null;
2755
+ transactionDate: string;
2756
+ isRepayable: boolean;
2757
+ repaymentTerms: string | null;
2758
+ interestRate: number | null;
2759
+ repaymentDueDate: string | null;
2760
+ amountRepaid: number;
2761
+ outstandingBalance?: number | undefined;
2762
+ };
2763
+ relationships?: Record<string, unknown> | undefined;
2764
+ links?: Record<string, string> | undefined;
2765
+ meta?: Record<string, unknown> | undefined;
2766
+ }>;
2767
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
2768
+ type: z.ZodString;
2769
+ id: z.ZodString;
2770
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2771
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2772
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2773
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2774
+ }, "strip", z.ZodTypeAny, {
2775
+ type: string;
2776
+ id: string;
2777
+ attributes?: Record<string, unknown> | undefined;
2778
+ relationships?: Record<string, unknown> | undefined;
2779
+ links?: Record<string, string> | undefined;
2780
+ meta?: Record<string, unknown> | undefined;
2781
+ }, {
2782
+ type: string;
2783
+ id: string;
2784
+ attributes?: Record<string, unknown> | undefined;
2785
+ relationships?: Record<string, unknown> | undefined;
2786
+ links?: Record<string, string> | undefined;
2787
+ meta?: Record<string, unknown> | undefined;
2788
+ }>, "many">>;
2789
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2790
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2791
+ }, "strip", z.ZodTypeAny, {
2792
+ data: {
2793
+ type: string;
2794
+ id: string;
2795
+ attributes: {
2796
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
2797
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
2798
+ source: string | null;
2799
+ createdAt: string;
2800
+ updatedAt: string;
2801
+ description: string | null;
2802
+ currency: "NGN" | "USD";
2803
+ notes: string | null;
2804
+ amount: number;
2805
+ reference: string | null;
2806
+ transactionDate: string;
2807
+ isRepayable: boolean;
2808
+ repaymentTerms: string | null;
2809
+ interestRate: number | null;
2810
+ repaymentDueDate: string | null;
2811
+ amountRepaid: number;
2812
+ outstandingBalance?: number | undefined;
2813
+ };
2814
+ relationships?: Record<string, unknown> | undefined;
2815
+ links?: Record<string, string> | undefined;
2816
+ meta?: Record<string, unknown> | undefined;
2817
+ };
2818
+ links?: Record<string, string> | undefined;
2819
+ meta?: Record<string, unknown> | undefined;
2820
+ included?: {
2821
+ type: string;
2822
+ id: string;
2823
+ attributes?: Record<string, unknown> | undefined;
2824
+ relationships?: Record<string, unknown> | undefined;
2825
+ links?: Record<string, string> | undefined;
2826
+ meta?: Record<string, unknown> | undefined;
2827
+ }[] | undefined;
2828
+ }, {
2829
+ data: {
2830
+ type: string;
2831
+ id: string;
2832
+ attributes: {
2833
+ type: "OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER";
2834
+ status: "received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid";
2835
+ source: string | null;
2836
+ createdAt: string;
2837
+ updatedAt: string;
2838
+ description: string | null;
2839
+ currency: "NGN" | "USD";
2840
+ notes: string | null;
2841
+ amount: number;
2842
+ reference: string | null;
2843
+ transactionDate: string;
2844
+ isRepayable: boolean;
2845
+ repaymentTerms: string | null;
2846
+ interestRate: number | null;
2847
+ repaymentDueDate: string | null;
2848
+ amountRepaid: number;
2849
+ outstandingBalance?: number | undefined;
2850
+ };
2851
+ relationships?: Record<string, unknown> | undefined;
2852
+ links?: Record<string, string> | undefined;
2853
+ meta?: Record<string, unknown> | undefined;
2854
+ };
2855
+ links?: Record<string, string> | undefined;
2856
+ meta?: Record<string, unknown> | undefined;
2857
+ included?: {
2858
+ type: string;
2859
+ id: string;
2860
+ attributes?: Record<string, unknown> | undefined;
2861
+ relationships?: Record<string, unknown> | undefined;
2862
+ links?: Record<string, string> | undefined;
2863
+ meta?: Record<string, unknown> | undefined;
2864
+ }[] | undefined;
2865
+ }>;
2866
+ 400: z.ZodObject<{
2867
+ errors: z.ZodArray<z.ZodObject<{
2868
+ id: z.ZodOptional<z.ZodString>;
2869
+ links: z.ZodOptional<z.ZodObject<{
2870
+ about: z.ZodOptional<z.ZodString>;
2871
+ }, "strip", z.ZodTypeAny, {
2872
+ about?: string | undefined;
2873
+ }, {
2874
+ about?: string | undefined;
2875
+ }>>;
2876
+ status: z.ZodOptional<z.ZodString>;
2877
+ code: z.ZodOptional<z.ZodString>;
2878
+ title: z.ZodOptional<z.ZodString>;
2879
+ detail: z.ZodOptional<z.ZodString>;
2880
+ source: z.ZodOptional<z.ZodObject<{
2881
+ pointer: z.ZodOptional<z.ZodString>;
2882
+ parameter: z.ZodOptional<z.ZodString>;
2883
+ }, "strip", z.ZodTypeAny, {
2884
+ pointer?: string | undefined;
2885
+ parameter?: string | undefined;
2886
+ }, {
2887
+ pointer?: string | undefined;
2888
+ parameter?: string | undefined;
2889
+ }>>;
2890
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2891
+ }, "strip", z.ZodTypeAny, {
2892
+ status?: string | undefined;
2893
+ code?: string | undefined;
2894
+ id?: string | undefined;
2895
+ links?: {
2896
+ about?: string | undefined;
2897
+ } | undefined;
2898
+ meta?: Record<string, unknown> | undefined;
2899
+ title?: string | undefined;
2900
+ detail?: string | undefined;
2901
+ source?: {
2902
+ pointer?: string | undefined;
2903
+ parameter?: string | undefined;
2904
+ } | undefined;
2905
+ }, {
2906
+ status?: string | undefined;
2907
+ code?: string | undefined;
2908
+ id?: string | undefined;
2909
+ links?: {
2910
+ about?: string | undefined;
2911
+ } | undefined;
2912
+ meta?: Record<string, unknown> | undefined;
2913
+ title?: string | undefined;
2914
+ detail?: string | undefined;
2915
+ source?: {
2916
+ pointer?: string | undefined;
2917
+ parameter?: string | undefined;
2918
+ } | undefined;
2919
+ }>, "many">;
2920
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2921
+ }, "strip", z.ZodTypeAny, {
2922
+ errors: {
2923
+ status?: string | undefined;
2924
+ code?: string | undefined;
2925
+ id?: string | undefined;
2926
+ links?: {
2927
+ about?: string | undefined;
2928
+ } | undefined;
2929
+ meta?: Record<string, unknown> | undefined;
2930
+ title?: string | undefined;
2931
+ detail?: string | undefined;
2932
+ source?: {
2933
+ pointer?: string | undefined;
2934
+ parameter?: string | undefined;
2935
+ } | undefined;
2936
+ }[];
2937
+ meta?: Record<string, unknown> | undefined;
2938
+ }, {
2939
+ errors: {
2940
+ status?: string | undefined;
2941
+ code?: string | undefined;
2942
+ id?: string | undefined;
2943
+ links?: {
2944
+ about?: string | undefined;
2945
+ } | undefined;
2946
+ meta?: Record<string, unknown> | undefined;
2947
+ title?: string | undefined;
2948
+ detail?: string | undefined;
2949
+ source?: {
2950
+ pointer?: string | undefined;
2951
+ parameter?: string | undefined;
2952
+ } | undefined;
2953
+ }[];
2954
+ meta?: Record<string, unknown> | undefined;
2955
+ }>;
2956
+ 404: z.ZodObject<{
2957
+ errors: z.ZodArray<z.ZodObject<{
2958
+ id: z.ZodOptional<z.ZodString>;
2959
+ links: z.ZodOptional<z.ZodObject<{
2960
+ about: z.ZodOptional<z.ZodString>;
2961
+ }, "strip", z.ZodTypeAny, {
2962
+ about?: string | undefined;
2963
+ }, {
2964
+ about?: string | undefined;
2965
+ }>>;
2966
+ status: z.ZodOptional<z.ZodString>;
2967
+ code: z.ZodOptional<z.ZodString>;
2968
+ title: z.ZodOptional<z.ZodString>;
2969
+ detail: z.ZodOptional<z.ZodString>;
2970
+ source: z.ZodOptional<z.ZodObject<{
2971
+ pointer: z.ZodOptional<z.ZodString>;
2972
+ parameter: z.ZodOptional<z.ZodString>;
2973
+ }, "strip", z.ZodTypeAny, {
2974
+ pointer?: string | undefined;
2975
+ parameter?: string | undefined;
2976
+ }, {
2977
+ pointer?: string | undefined;
2978
+ parameter?: string | undefined;
2979
+ }>>;
2980
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2981
+ }, "strip", z.ZodTypeAny, {
2982
+ status?: string | undefined;
2983
+ code?: string | undefined;
2984
+ id?: string | undefined;
2985
+ links?: {
2986
+ about?: string | undefined;
2987
+ } | undefined;
2988
+ meta?: Record<string, unknown> | undefined;
2989
+ title?: string | undefined;
2990
+ detail?: string | undefined;
2991
+ source?: {
2992
+ pointer?: string | undefined;
2993
+ parameter?: string | undefined;
2994
+ } | undefined;
2995
+ }, {
2996
+ status?: string | undefined;
2997
+ code?: string | undefined;
2998
+ id?: string | undefined;
2999
+ links?: {
3000
+ about?: string | undefined;
3001
+ } | undefined;
3002
+ meta?: Record<string, unknown> | undefined;
3003
+ title?: string | undefined;
3004
+ detail?: string | undefined;
3005
+ source?: {
3006
+ pointer?: string | undefined;
3007
+ parameter?: string | undefined;
3008
+ } | undefined;
3009
+ }>, "many">;
3010
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3011
+ }, "strip", z.ZodTypeAny, {
3012
+ errors: {
3013
+ status?: string | undefined;
3014
+ code?: string | undefined;
3015
+ id?: string | undefined;
3016
+ links?: {
3017
+ about?: string | undefined;
3018
+ } | undefined;
3019
+ meta?: Record<string, unknown> | undefined;
3020
+ title?: string | undefined;
3021
+ detail?: string | undefined;
3022
+ source?: {
3023
+ pointer?: string | undefined;
3024
+ parameter?: string | undefined;
3025
+ } | undefined;
3026
+ }[];
3027
+ meta?: Record<string, unknown> | undefined;
3028
+ }, {
3029
+ errors: {
3030
+ status?: string | undefined;
3031
+ code?: string | undefined;
3032
+ id?: string | undefined;
3033
+ links?: {
3034
+ about?: string | undefined;
3035
+ } | undefined;
3036
+ meta?: Record<string, unknown> | undefined;
3037
+ title?: string | undefined;
3038
+ detail?: string | undefined;
3039
+ source?: {
3040
+ pointer?: string | undefined;
3041
+ parameter?: string | undefined;
3042
+ } | undefined;
3043
+ }[];
3044
+ meta?: Record<string, unknown> | undefined;
3045
+ }>;
3046
+ 401: z.ZodObject<{
3047
+ errors: z.ZodArray<z.ZodObject<{
3048
+ id: z.ZodOptional<z.ZodString>;
3049
+ links: z.ZodOptional<z.ZodObject<{
3050
+ about: z.ZodOptional<z.ZodString>;
3051
+ }, "strip", z.ZodTypeAny, {
3052
+ about?: string | undefined;
3053
+ }, {
3054
+ about?: string | undefined;
3055
+ }>>;
3056
+ status: z.ZodOptional<z.ZodString>;
3057
+ code: z.ZodOptional<z.ZodString>;
3058
+ title: z.ZodOptional<z.ZodString>;
3059
+ detail: z.ZodOptional<z.ZodString>;
3060
+ source: z.ZodOptional<z.ZodObject<{
3061
+ pointer: z.ZodOptional<z.ZodString>;
3062
+ parameter: z.ZodOptional<z.ZodString>;
3063
+ }, "strip", z.ZodTypeAny, {
3064
+ pointer?: string | undefined;
3065
+ parameter?: string | undefined;
3066
+ }, {
3067
+ pointer?: string | undefined;
3068
+ parameter?: string | undefined;
3069
+ }>>;
3070
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3071
+ }, "strip", z.ZodTypeAny, {
3072
+ status?: string | undefined;
3073
+ code?: string | undefined;
3074
+ id?: string | undefined;
3075
+ links?: {
3076
+ about?: string | undefined;
3077
+ } | undefined;
3078
+ meta?: Record<string, unknown> | undefined;
3079
+ title?: string | undefined;
3080
+ detail?: string | undefined;
3081
+ source?: {
3082
+ pointer?: string | undefined;
3083
+ parameter?: string | undefined;
3084
+ } | undefined;
3085
+ }, {
3086
+ status?: string | undefined;
3087
+ code?: string | undefined;
3088
+ id?: string | undefined;
3089
+ links?: {
3090
+ about?: string | undefined;
3091
+ } | undefined;
3092
+ meta?: Record<string, unknown> | undefined;
3093
+ title?: string | undefined;
3094
+ detail?: string | undefined;
3095
+ source?: {
3096
+ pointer?: string | undefined;
3097
+ parameter?: string | undefined;
3098
+ } | undefined;
3099
+ }>, "many">;
3100
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3101
+ }, "strip", z.ZodTypeAny, {
3102
+ errors: {
3103
+ status?: string | undefined;
3104
+ code?: string | undefined;
3105
+ id?: string | undefined;
3106
+ links?: {
3107
+ about?: string | undefined;
3108
+ } | undefined;
3109
+ meta?: Record<string, unknown> | undefined;
3110
+ title?: string | undefined;
3111
+ detail?: string | undefined;
3112
+ source?: {
3113
+ pointer?: string | undefined;
3114
+ parameter?: string | undefined;
3115
+ } | undefined;
3116
+ }[];
3117
+ meta?: Record<string, unknown> | undefined;
3118
+ }, {
3119
+ errors: {
3120
+ status?: string | undefined;
3121
+ code?: string | undefined;
3122
+ id?: string | undefined;
3123
+ links?: {
3124
+ about?: string | undefined;
3125
+ } | undefined;
3126
+ meta?: Record<string, unknown> | undefined;
3127
+ title?: string | undefined;
3128
+ detail?: string | undefined;
3129
+ source?: {
3130
+ pointer?: string | undefined;
3131
+ parameter?: string | undefined;
3132
+ } | undefined;
3133
+ }[];
3134
+ meta?: Record<string, unknown> | undefined;
3135
+ }>;
3136
+ 422: z.ZodObject<{
3137
+ errors: z.ZodArray<z.ZodObject<{
3138
+ id: z.ZodOptional<z.ZodString>;
3139
+ links: z.ZodOptional<z.ZodObject<{
3140
+ about: z.ZodOptional<z.ZodString>;
3141
+ }, "strip", z.ZodTypeAny, {
3142
+ about?: string | undefined;
3143
+ }, {
3144
+ about?: string | undefined;
3145
+ }>>;
3146
+ status: z.ZodOptional<z.ZodString>;
3147
+ code: z.ZodOptional<z.ZodString>;
3148
+ title: z.ZodOptional<z.ZodString>;
3149
+ detail: z.ZodOptional<z.ZodString>;
3150
+ source: z.ZodOptional<z.ZodObject<{
3151
+ pointer: z.ZodOptional<z.ZodString>;
3152
+ parameter: z.ZodOptional<z.ZodString>;
3153
+ }, "strip", z.ZodTypeAny, {
3154
+ pointer?: string | undefined;
3155
+ parameter?: string | undefined;
3156
+ }, {
3157
+ pointer?: string | undefined;
3158
+ parameter?: string | undefined;
3159
+ }>>;
3160
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3161
+ }, "strip", z.ZodTypeAny, {
3162
+ status?: string | undefined;
3163
+ code?: string | undefined;
3164
+ id?: string | undefined;
3165
+ links?: {
3166
+ about?: string | undefined;
3167
+ } | undefined;
3168
+ meta?: Record<string, unknown> | undefined;
3169
+ title?: string | undefined;
3170
+ detail?: string | undefined;
3171
+ source?: {
3172
+ pointer?: string | undefined;
3173
+ parameter?: string | undefined;
3174
+ } | undefined;
3175
+ }, {
3176
+ status?: string | undefined;
3177
+ code?: string | undefined;
3178
+ id?: string | undefined;
3179
+ links?: {
3180
+ about?: string | undefined;
3181
+ } | undefined;
3182
+ meta?: Record<string, unknown> | undefined;
3183
+ title?: string | undefined;
3184
+ detail?: string | undefined;
3185
+ source?: {
3186
+ pointer?: string | undefined;
3187
+ parameter?: string | undefined;
3188
+ } | undefined;
3189
+ }>, "many">;
3190
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3191
+ }, "strip", z.ZodTypeAny, {
3192
+ errors: {
3193
+ status?: string | undefined;
3194
+ code?: string | undefined;
3195
+ id?: string | undefined;
3196
+ links?: {
3197
+ about?: string | undefined;
3198
+ } | undefined;
3199
+ meta?: Record<string, unknown> | undefined;
3200
+ title?: string | undefined;
3201
+ detail?: string | undefined;
3202
+ source?: {
3203
+ pointer?: string | undefined;
3204
+ parameter?: string | undefined;
3205
+ } | undefined;
3206
+ }[];
3207
+ meta?: Record<string, unknown> | undefined;
3208
+ }, {
3209
+ errors: {
3210
+ status?: string | undefined;
3211
+ code?: string | undefined;
3212
+ id?: string | undefined;
3213
+ links?: {
3214
+ about?: string | undefined;
3215
+ } | undefined;
3216
+ meta?: Record<string, unknown> | undefined;
3217
+ title?: string | undefined;
3218
+ detail?: string | undefined;
3219
+ source?: {
3220
+ pointer?: string | undefined;
3221
+ parameter?: string | undefined;
3222
+ } | undefined;
3223
+ }[];
3224
+ meta?: Record<string, unknown> | undefined;
3225
+ }>;
3226
+ };
3227
+ };
3228
+ getCapitalSummary: {
3229
+ pathParams: z.ZodObject<{
3230
+ farmId: z.ZodString;
3231
+ }, "strip", z.ZodTypeAny, {
3232
+ farmId: string;
3233
+ }, {
3234
+ farmId: string;
3235
+ }>;
3236
+ query: z.ZodObject<{
3237
+ 'filter[startDate]': z.ZodOptional<z.ZodString>;
3238
+ 'filter[endDate]': z.ZodOptional<z.ZodString>;
3239
+ 'filter[status]': z.ZodOptional<z.ZodString>;
3240
+ 'filter[crop]': z.ZodOptional<z.ZodString>;
3241
+ }, "strip", z.ZodTypeAny, {
3242
+ 'filter[startDate]'?: string | undefined;
3243
+ 'filter[endDate]'?: string | undefined;
3244
+ 'filter[status]'?: string | undefined;
3245
+ 'filter[crop]'?: string | undefined;
3246
+ }, {
3247
+ 'filter[startDate]'?: string | undefined;
3248
+ 'filter[endDate]'?: string | undefined;
3249
+ 'filter[status]'?: string | undefined;
3250
+ 'filter[crop]'?: string | undefined;
3251
+ }>;
3252
+ summary: "Get capital summary";
3253
+ description: "Get aggregate summary of all capital transactions including totals, outstanding liabilities, and breakdowns by type/status";
3254
+ method: "GET";
3255
+ path: "/farms/:farmId/capital/summary";
3256
+ responses: {
3257
+ 200: z.ZodObject<{
3258
+ data: z.ZodObject<{
3259
+ type: z.ZodLiteral<string>;
3260
+ id: z.ZodString;
3261
+ attributes: z.ZodObject<{
3262
+ totalCapitalReceived: z.ZodNumber;
3263
+ totalRepayableAmount: z.ZodNumber;
3264
+ totalAmountRepaid: z.ZodNumber;
3265
+ outstandingLiabilities: z.ZodNumber;
3266
+ byType: z.ZodRecord<z.ZodEnum<["OWNER_CONTRIBUTION", "LOAN", "GRANT", "INVESTOR", "WORKING_CAPITAL", "OTHER"]>, z.ZodObject<{
3267
+ count: z.ZodNumber;
3268
+ totalAmount: z.ZodNumber;
3269
+ }, "strip", z.ZodTypeAny, {
3270
+ count: number;
3271
+ totalAmount: number;
3272
+ }, {
3273
+ count: number;
3274
+ totalAmount: number;
3275
+ }>>;
3276
+ byStatus: z.ZodRecord<z.ZodEnum<["received", "pending", "partially_repaid", "fully_repaid", "cancelled"]>, z.ZodObject<{
3277
+ count: z.ZodNumber;
3278
+ totalAmount: z.ZodNumber;
3279
+ }, "strip", z.ZodTypeAny, {
3280
+ count: number;
3281
+ totalAmount: number;
3282
+ }, {
3283
+ count: number;
3284
+ totalAmount: number;
3285
+ }>>;
3286
+ }, "strip", z.ZodTypeAny, {
3287
+ byType: Partial<Record<"OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER", {
3288
+ count: number;
3289
+ totalAmount: number;
3290
+ }>>;
3291
+ totalCapitalReceived: number;
3292
+ totalRepayableAmount: number;
3293
+ totalAmountRepaid: number;
3294
+ outstandingLiabilities: number;
3295
+ byStatus: Partial<Record<"received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid", {
3296
+ count: number;
3297
+ totalAmount: number;
3298
+ }>>;
3299
+ }, {
3300
+ byType: Partial<Record<"OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER", {
3301
+ count: number;
3302
+ totalAmount: number;
3303
+ }>>;
3304
+ totalCapitalReceived: number;
3305
+ totalRepayableAmount: number;
3306
+ totalAmountRepaid: number;
3307
+ outstandingLiabilities: number;
3308
+ byStatus: Partial<Record<"received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid", {
3309
+ count: number;
3310
+ totalAmount: number;
3311
+ }>>;
3312
+ }>;
3313
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3314
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3315
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3316
+ }, "strip", z.ZodTypeAny, {
3317
+ type: string;
3318
+ id: string;
3319
+ attributes: {
3320
+ byType: Partial<Record<"OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER", {
3321
+ count: number;
3322
+ totalAmount: number;
3323
+ }>>;
3324
+ totalCapitalReceived: number;
3325
+ totalRepayableAmount: number;
3326
+ totalAmountRepaid: number;
3327
+ outstandingLiabilities: number;
3328
+ byStatus: Partial<Record<"received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid", {
3329
+ count: number;
3330
+ totalAmount: number;
3331
+ }>>;
3332
+ };
3333
+ relationships?: Record<string, unknown> | undefined;
3334
+ links?: Record<string, string> | undefined;
3335
+ meta?: Record<string, unknown> | undefined;
3336
+ }, {
3337
+ type: string;
3338
+ id: string;
3339
+ attributes: {
3340
+ byType: Partial<Record<"OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER", {
3341
+ count: number;
3342
+ totalAmount: number;
3343
+ }>>;
3344
+ totalCapitalReceived: number;
3345
+ totalRepayableAmount: number;
3346
+ totalAmountRepaid: number;
3347
+ outstandingLiabilities: number;
3348
+ byStatus: Partial<Record<"received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid", {
3349
+ count: number;
3350
+ totalAmount: number;
3351
+ }>>;
3352
+ };
3353
+ relationships?: Record<string, unknown> | undefined;
3354
+ links?: Record<string, string> | undefined;
3355
+ meta?: Record<string, unknown> | undefined;
3356
+ }>;
3357
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
3358
+ type: z.ZodString;
3359
+ id: z.ZodString;
3360
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3361
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3362
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3363
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3364
+ }, "strip", z.ZodTypeAny, {
3365
+ type: string;
3366
+ id: string;
3367
+ attributes?: Record<string, unknown> | undefined;
3368
+ relationships?: Record<string, unknown> | undefined;
3369
+ links?: Record<string, string> | undefined;
3370
+ meta?: Record<string, unknown> | undefined;
3371
+ }, {
3372
+ type: string;
3373
+ id: string;
3374
+ attributes?: Record<string, unknown> | undefined;
3375
+ relationships?: Record<string, unknown> | undefined;
3376
+ links?: Record<string, string> | undefined;
3377
+ meta?: Record<string, unknown> | undefined;
3378
+ }>, "many">>;
3379
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3380
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3381
+ }, "strip", z.ZodTypeAny, {
3382
+ data: {
3383
+ type: string;
3384
+ id: string;
3385
+ attributes: {
3386
+ byType: Partial<Record<"OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER", {
3387
+ count: number;
3388
+ totalAmount: number;
3389
+ }>>;
3390
+ totalCapitalReceived: number;
3391
+ totalRepayableAmount: number;
3392
+ totalAmountRepaid: number;
3393
+ outstandingLiabilities: number;
3394
+ byStatus: Partial<Record<"received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid", {
3395
+ count: number;
3396
+ totalAmount: number;
3397
+ }>>;
3398
+ };
3399
+ relationships?: Record<string, unknown> | undefined;
3400
+ links?: Record<string, string> | undefined;
3401
+ meta?: Record<string, unknown> | undefined;
3402
+ };
3403
+ links?: Record<string, string> | undefined;
3404
+ meta?: Record<string, unknown> | undefined;
3405
+ included?: {
3406
+ type: string;
3407
+ id: string;
3408
+ attributes?: Record<string, unknown> | undefined;
3409
+ relationships?: Record<string, unknown> | undefined;
3410
+ links?: Record<string, string> | undefined;
3411
+ meta?: Record<string, unknown> | undefined;
3412
+ }[] | undefined;
3413
+ }, {
3414
+ data: {
3415
+ type: string;
3416
+ id: string;
3417
+ attributes: {
3418
+ byType: Partial<Record<"OWNER_CONTRIBUTION" | "LOAN" | "GRANT" | "INVESTOR" | "WORKING_CAPITAL" | "OTHER", {
3419
+ count: number;
3420
+ totalAmount: number;
3421
+ }>>;
3422
+ totalCapitalReceived: number;
3423
+ totalRepayableAmount: number;
3424
+ totalAmountRepaid: number;
3425
+ outstandingLiabilities: number;
3426
+ byStatus: Partial<Record<"received" | "pending" | "cancelled" | "partially_repaid" | "fully_repaid", {
3427
+ count: number;
3428
+ totalAmount: number;
3429
+ }>>;
3430
+ };
3431
+ relationships?: Record<string, unknown> | undefined;
3432
+ links?: Record<string, string> | undefined;
3433
+ meta?: Record<string, unknown> | undefined;
3434
+ };
3435
+ links?: Record<string, string> | undefined;
3436
+ meta?: Record<string, unknown> | undefined;
3437
+ included?: {
3438
+ type: string;
3439
+ id: string;
3440
+ attributes?: Record<string, unknown> | undefined;
3441
+ relationships?: Record<string, unknown> | undefined;
3442
+ links?: Record<string, string> | undefined;
3443
+ meta?: Record<string, unknown> | undefined;
3444
+ }[] | undefined;
3445
+ }>;
3446
+ 404: z.ZodObject<{
3447
+ errors: z.ZodArray<z.ZodObject<{
3448
+ id: z.ZodOptional<z.ZodString>;
3449
+ links: z.ZodOptional<z.ZodObject<{
3450
+ about: z.ZodOptional<z.ZodString>;
3451
+ }, "strip", z.ZodTypeAny, {
3452
+ about?: string | undefined;
3453
+ }, {
3454
+ about?: string | undefined;
3455
+ }>>;
3456
+ status: z.ZodOptional<z.ZodString>;
3457
+ code: z.ZodOptional<z.ZodString>;
3458
+ title: z.ZodOptional<z.ZodString>;
3459
+ detail: z.ZodOptional<z.ZodString>;
3460
+ source: z.ZodOptional<z.ZodObject<{
3461
+ pointer: z.ZodOptional<z.ZodString>;
3462
+ parameter: z.ZodOptional<z.ZodString>;
3463
+ }, "strip", z.ZodTypeAny, {
3464
+ pointer?: string | undefined;
3465
+ parameter?: string | undefined;
3466
+ }, {
3467
+ pointer?: string | undefined;
3468
+ parameter?: string | undefined;
3469
+ }>>;
3470
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3471
+ }, "strip", z.ZodTypeAny, {
3472
+ status?: string | undefined;
3473
+ code?: string | undefined;
3474
+ id?: string | undefined;
3475
+ links?: {
3476
+ about?: string | undefined;
3477
+ } | undefined;
3478
+ meta?: Record<string, unknown> | undefined;
3479
+ title?: string | undefined;
3480
+ detail?: string | undefined;
3481
+ source?: {
3482
+ pointer?: string | undefined;
3483
+ parameter?: string | undefined;
3484
+ } | undefined;
3485
+ }, {
3486
+ status?: string | undefined;
3487
+ code?: string | undefined;
3488
+ id?: string | undefined;
3489
+ links?: {
3490
+ about?: string | undefined;
3491
+ } | undefined;
3492
+ meta?: Record<string, unknown> | undefined;
3493
+ title?: string | undefined;
3494
+ detail?: string | undefined;
3495
+ source?: {
3496
+ pointer?: string | undefined;
3497
+ parameter?: string | undefined;
3498
+ } | undefined;
3499
+ }>, "many">;
3500
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3501
+ }, "strip", z.ZodTypeAny, {
3502
+ errors: {
3503
+ status?: string | undefined;
3504
+ code?: string | undefined;
3505
+ id?: string | undefined;
3506
+ links?: {
3507
+ about?: string | undefined;
3508
+ } | undefined;
3509
+ meta?: Record<string, unknown> | undefined;
3510
+ title?: string | undefined;
3511
+ detail?: string | undefined;
3512
+ source?: {
3513
+ pointer?: string | undefined;
3514
+ parameter?: string | undefined;
3515
+ } | undefined;
3516
+ }[];
3517
+ meta?: Record<string, unknown> | undefined;
3518
+ }, {
3519
+ errors: {
3520
+ status?: string | undefined;
3521
+ code?: string | undefined;
3522
+ id?: string | undefined;
3523
+ links?: {
3524
+ about?: string | undefined;
3525
+ } | undefined;
3526
+ meta?: Record<string, unknown> | undefined;
3527
+ title?: string | undefined;
3528
+ detail?: string | undefined;
3529
+ source?: {
3530
+ pointer?: string | undefined;
3531
+ parameter?: string | undefined;
3532
+ } | undefined;
3533
+ }[];
3534
+ meta?: Record<string, unknown> | undefined;
3535
+ }>;
3536
+ 401: z.ZodObject<{
3537
+ errors: z.ZodArray<z.ZodObject<{
3538
+ id: z.ZodOptional<z.ZodString>;
3539
+ links: z.ZodOptional<z.ZodObject<{
3540
+ about: z.ZodOptional<z.ZodString>;
3541
+ }, "strip", z.ZodTypeAny, {
3542
+ about?: string | undefined;
3543
+ }, {
3544
+ about?: string | undefined;
3545
+ }>>;
3546
+ status: z.ZodOptional<z.ZodString>;
3547
+ code: z.ZodOptional<z.ZodString>;
3548
+ title: z.ZodOptional<z.ZodString>;
3549
+ detail: z.ZodOptional<z.ZodString>;
3550
+ source: z.ZodOptional<z.ZodObject<{
3551
+ pointer: z.ZodOptional<z.ZodString>;
3552
+ parameter: z.ZodOptional<z.ZodString>;
3553
+ }, "strip", z.ZodTypeAny, {
3554
+ pointer?: string | undefined;
3555
+ parameter?: string | undefined;
3556
+ }, {
3557
+ pointer?: string | undefined;
3558
+ parameter?: string | undefined;
3559
+ }>>;
3560
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3561
+ }, "strip", z.ZodTypeAny, {
3562
+ status?: string | undefined;
3563
+ code?: string | undefined;
3564
+ id?: string | undefined;
3565
+ links?: {
3566
+ about?: string | undefined;
3567
+ } | undefined;
3568
+ meta?: Record<string, unknown> | undefined;
3569
+ title?: string | undefined;
3570
+ detail?: string | undefined;
3571
+ source?: {
3572
+ pointer?: string | undefined;
3573
+ parameter?: string | undefined;
3574
+ } | undefined;
3575
+ }, {
3576
+ status?: string | undefined;
3577
+ code?: string | undefined;
3578
+ id?: string | undefined;
3579
+ links?: {
3580
+ about?: string | undefined;
3581
+ } | undefined;
3582
+ meta?: Record<string, unknown> | undefined;
3583
+ title?: string | undefined;
3584
+ detail?: string | undefined;
3585
+ source?: {
3586
+ pointer?: string | undefined;
3587
+ parameter?: string | undefined;
3588
+ } | undefined;
3589
+ }>, "many">;
3590
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3591
+ }, "strip", z.ZodTypeAny, {
3592
+ errors: {
3593
+ status?: string | undefined;
3594
+ code?: string | undefined;
3595
+ id?: string | undefined;
3596
+ links?: {
3597
+ about?: string | undefined;
3598
+ } | undefined;
3599
+ meta?: Record<string, unknown> | undefined;
3600
+ title?: string | undefined;
3601
+ detail?: string | undefined;
3602
+ source?: {
3603
+ pointer?: string | undefined;
3604
+ parameter?: string | undefined;
3605
+ } | undefined;
3606
+ }[];
3607
+ meta?: Record<string, unknown> | undefined;
3608
+ }, {
3609
+ errors: {
3610
+ status?: string | undefined;
3611
+ code?: string | undefined;
3612
+ id?: string | undefined;
3613
+ links?: {
3614
+ about?: string | undefined;
3615
+ } | undefined;
3616
+ meta?: Record<string, unknown> | undefined;
3617
+ title?: string | undefined;
3618
+ detail?: string | undefined;
3619
+ source?: {
3620
+ pointer?: string | undefined;
3621
+ parameter?: string | undefined;
3622
+ } | undefined;
3623
+ }[];
3624
+ meta?: Record<string, unknown> | undefined;
3625
+ }>;
3626
+ };
3627
+ };
3628
+ };
3629
+ //# sourceMappingURL=capital.routes.d.ts.map