@deepintel-ltd/farmpro-contracts 1.22.3 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/index.d.ts +6 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +6 -0
  4. package/dist/routes/commodity-deals.routes.d.ts +175 -0
  5. package/dist/routes/commodity-deals.routes.d.ts.map +1 -1
  6. package/dist/routes/index.d.ts +9 -0
  7. package/dist/routes/index.d.ts.map +1 -1
  8. package/dist/routes/index.js +6 -0
  9. package/dist/routes/invoices.routes.d.ts +189 -42
  10. package/dist/routes/invoices.routes.d.ts.map +1 -1
  11. package/dist/routes/livestock-groups.routes.d.ts +308 -0
  12. package/dist/routes/livestock-groups.routes.d.ts.map +1 -1
  13. package/dist/routes/organization-capabilities.routes.d.ts +1671 -0
  14. package/dist/routes/organization-capabilities.routes.d.ts.map +1 -0
  15. package/dist/routes/organization-capabilities.routes.js +74 -0
  16. package/dist/routes/purchase-orders.routes.d.ts +2061 -0
  17. package/dist/routes/purchase-orders.routes.d.ts.map +1 -0
  18. package/dist/routes/purchase-orders.routes.js +55 -0
  19. package/dist/routes/staff.routes.d.ts +84 -0
  20. package/dist/routes/staff.routes.d.ts.map +1 -1
  21. package/dist/routes/trade-cash-events.routes.d.ts +3837 -0
  22. package/dist/routes/trade-cash-events.routes.d.ts.map +1 -0
  23. package/dist/routes/trade-cash-events.routes.js +126 -0
  24. package/dist/routes/waybills.routes.d.ts +210 -0
  25. package/dist/routes/waybills.routes.d.ts.map +1 -1
  26. package/dist/schemas/commodity-deals.schemas.d.ts +98 -0
  27. package/dist/schemas/commodity-deals.schemas.d.ts.map +1 -1
  28. package/dist/schemas/commodity-deals.schemas.js +7 -0
  29. package/dist/schemas/invoices.schemas.d.ts +144 -30
  30. package/dist/schemas/invoices.schemas.d.ts.map +1 -1
  31. package/dist/schemas/invoices.schemas.js +8 -2
  32. package/dist/schemas/livestock-groups.schemas.d.ts +302 -0
  33. package/dist/schemas/livestock-groups.schemas.d.ts.map +1 -1
  34. package/dist/schemas/livestock-groups.schemas.js +22 -0
  35. package/dist/schemas/organization-capabilities.schemas.d.ts +355 -0
  36. package/dist/schemas/organization-capabilities.schemas.d.ts.map +1 -0
  37. package/dist/schemas/organization-capabilities.schemas.js +19 -0
  38. package/dist/schemas/purchase-orders.schemas.d.ts +1031 -0
  39. package/dist/schemas/purchase-orders.schemas.d.ts.map +1 -0
  40. package/dist/schemas/purchase-orders.schemas.js +49 -0
  41. package/dist/schemas/staff.schemas.d.ts +76 -0
  42. package/dist/schemas/staff.schemas.d.ts.map +1 -1
  43. package/dist/schemas/staff.schemas.js +6 -0
  44. package/dist/schemas/trade-cash-events.schemas.d.ts +1524 -0
  45. package/dist/schemas/trade-cash-events.schemas.d.ts.map +1 -0
  46. package/dist/schemas/trade-cash-events.schemas.js +131 -0
  47. package/dist/schemas/waybills.schemas.d.ts +168 -0
  48. package/dist/schemas/waybills.schemas.d.ts.map +1 -1
  49. package/dist/schemas/waybills.schemas.js +9 -0
  50. package/package.json +1 -1
@@ -84,7 +84,7 @@ export declare const invoicesRouter: {
84
84
  total: z.ZodNumber;
85
85
  currency: z.ZodDefault<z.ZodString>;
86
86
  paymentTerms: z.ZodNullable<z.ZodOptional<z.ZodString>>;
87
- paymentStatus: z.ZodDefault<z.ZodEnum<["pending", "paid", "overdue", "cancelled"]>>;
87
+ paymentStatus: z.ZodDefault<z.ZodEnum<["pending", "partial", "paid", "overdue", "cancelled"]>>;
88
88
  paidAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
89
89
  notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
90
90
  pdfUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -92,6 +92,9 @@ export declare const invoicesRouter: {
92
92
  waybillNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
93
93
  waybillId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
94
94
  totalInWords: z.ZodNullable<z.ZodOptional<z.ZodString>>;
95
+ farmId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
96
+ commercialIntent: z.ZodNullable<z.ZodOptional<z.ZodEnum<["farm_sale", "trade"]>>>;
97
+ invoiceKind: z.ZodDefault<z.ZodOptional<z.ZodEnum<["provisional", "final"]>>>;
95
98
  organizationId: z.ZodString;
96
99
  } & {
97
100
  createdAt: z.ZodString;
@@ -117,11 +120,14 @@ export declare const invoicesRouter: {
117
120
  billFromName: string;
118
121
  billToName: string;
119
122
  subtotal: number;
120
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
123
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
124
+ invoiceKind: "provisional" | "final";
125
+ farmId?: string | null | undefined;
121
126
  notes?: string | null | undefined;
122
127
  paidAt?: string | null | undefined;
123
128
  waybillNumber?: string | null | undefined;
124
129
  pdfUrl?: string | null | undefined;
130
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
125
131
  taxRate?: number | null | undefined;
126
132
  dueDate?: string | null | undefined;
127
133
  billFromAddress?: string | null | undefined;
@@ -158,11 +164,13 @@ export declare const invoicesRouter: {
158
164
  billFromName: string;
159
165
  billToName: string;
160
166
  subtotal: number;
167
+ farmId?: string | null | undefined;
161
168
  currency?: string | undefined;
162
169
  notes?: string | null | undefined;
163
170
  paidAt?: string | null | undefined;
164
171
  waybillNumber?: string | null | undefined;
165
172
  pdfUrl?: string | null | undefined;
173
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
166
174
  taxRate?: number | null | undefined;
167
175
  dueDate?: string | null | undefined;
168
176
  billFromAddress?: string | null | undefined;
@@ -176,10 +184,11 @@ export declare const invoicesRouter: {
176
184
  taxAmount?: number | null | undefined;
177
185
  discount?: number | null | undefined;
178
186
  paymentTerms?: string | null | undefined;
179
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
187
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
180
188
  bankAccountId?: string | null | undefined;
181
189
  waybillId?: string | null | undefined;
182
190
  totalInWords?: string | null | undefined;
191
+ invoiceKind?: "provisional" | "final" | undefined;
183
192
  }>;
184
193
  relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
185
194
  links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -208,11 +217,14 @@ export declare const invoicesRouter: {
208
217
  billFromName: string;
209
218
  billToName: string;
210
219
  subtotal: number;
211
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
220
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
221
+ invoiceKind: "provisional" | "final";
222
+ farmId?: string | null | undefined;
212
223
  notes?: string | null | undefined;
213
224
  paidAt?: string | null | undefined;
214
225
  waybillNumber?: string | null | undefined;
215
226
  pdfUrl?: string | null | undefined;
227
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
216
228
  taxRate?: number | null | undefined;
217
229
  dueDate?: string | null | undefined;
218
230
  billFromAddress?: string | null | undefined;
@@ -256,11 +268,13 @@ export declare const invoicesRouter: {
256
268
  billFromName: string;
257
269
  billToName: string;
258
270
  subtotal: number;
271
+ farmId?: string | null | undefined;
259
272
  currency?: string | undefined;
260
273
  notes?: string | null | undefined;
261
274
  paidAt?: string | null | undefined;
262
275
  waybillNumber?: string | null | undefined;
263
276
  pdfUrl?: string | null | undefined;
277
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
264
278
  taxRate?: number | null | undefined;
265
279
  dueDate?: string | null | undefined;
266
280
  billFromAddress?: string | null | undefined;
@@ -274,10 +288,11 @@ export declare const invoicesRouter: {
274
288
  taxAmount?: number | null | undefined;
275
289
  discount?: number | null | undefined;
276
290
  paymentTerms?: string | null | undefined;
277
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
291
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
278
292
  bankAccountId?: string | null | undefined;
279
293
  waybillId?: string | null | undefined;
280
294
  totalInWords?: string | null | undefined;
295
+ invoiceKind?: "provisional" | "final" | undefined;
281
296
  };
282
297
  relationships?: Record<string, unknown> | undefined;
283
298
  links?: Record<string, string> | undefined;
@@ -332,11 +347,14 @@ export declare const invoicesRouter: {
332
347
  billFromName: string;
333
348
  billToName: string;
334
349
  subtotal: number;
335
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
350
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
351
+ invoiceKind: "provisional" | "final";
352
+ farmId?: string | null | undefined;
336
353
  notes?: string | null | undefined;
337
354
  paidAt?: string | null | undefined;
338
355
  waybillNumber?: string | null | undefined;
339
356
  pdfUrl?: string | null | undefined;
357
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
340
358
  taxRate?: number | null | undefined;
341
359
  dueDate?: string | null | undefined;
342
360
  billFromAddress?: string | null | undefined;
@@ -392,11 +410,13 @@ export declare const invoicesRouter: {
392
410
  billFromName: string;
393
411
  billToName: string;
394
412
  subtotal: number;
413
+ farmId?: string | null | undefined;
395
414
  currency?: string | undefined;
396
415
  notes?: string | null | undefined;
397
416
  paidAt?: string | null | undefined;
398
417
  waybillNumber?: string | null | undefined;
399
418
  pdfUrl?: string | null | undefined;
419
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
400
420
  taxRate?: number | null | undefined;
401
421
  dueDate?: string | null | undefined;
402
422
  billFromAddress?: string | null | undefined;
@@ -410,10 +430,11 @@ export declare const invoicesRouter: {
410
430
  taxAmount?: number | null | undefined;
411
431
  discount?: number | null | undefined;
412
432
  paymentTerms?: string | null | undefined;
413
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
433
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
414
434
  bankAccountId?: string | null | undefined;
415
435
  waybillId?: string | null | undefined;
416
436
  totalInWords?: string | null | undefined;
437
+ invoiceKind?: "provisional" | "final" | undefined;
417
438
  };
418
439
  relationships?: Record<string, unknown> | undefined;
419
440
  links?: Record<string, string> | undefined;
@@ -672,6 +693,9 @@ export declare const invoicesRouter: {
672
693
  waybillNumber: z.ZodOptional<z.ZodString>;
673
694
  waybillId: z.ZodOptional<z.ZodString>;
674
695
  totalInWords: z.ZodOptional<z.ZodString>;
696
+ farmId: z.ZodOptional<z.ZodString>;
697
+ commercialIntent: z.ZodOptional<z.ZodEnum<["farm_sale", "trade"]>>;
698
+ invoiceKind: z.ZodOptional<z.ZodEnum<["provisional", "final"]>>;
675
699
  }, "strip", z.ZodTypeAny, {
676
700
  currency: string;
677
701
  items: {
@@ -686,9 +710,11 @@ export declare const invoicesRouter: {
686
710
  }[];
687
711
  buyerId: string;
688
712
  billFromName: string;
713
+ farmId?: string | undefined;
689
714
  notes?: string | undefined;
690
715
  waybillNumber?: string | undefined;
691
716
  issueDate?: string | undefined;
717
+ commercialIntent?: "farm_sale" | "trade" | undefined;
692
718
  taxRate?: number | undefined;
693
719
  dueDate?: string | undefined;
694
720
  billFromAddress?: string | undefined;
@@ -700,6 +726,7 @@ export declare const invoicesRouter: {
700
726
  bankAccountId?: string | undefined;
701
727
  waybillId?: string | undefined;
702
728
  totalInWords?: string | undefined;
729
+ invoiceKind?: "provisional" | "final" | undefined;
703
730
  }, {
704
731
  items: {
705
732
  description: string;
@@ -713,10 +740,12 @@ export declare const invoicesRouter: {
713
740
  }[];
714
741
  buyerId: string;
715
742
  billFromName: string;
743
+ farmId?: string | undefined;
716
744
  currency?: string | undefined;
717
745
  notes?: string | undefined;
718
746
  waybillNumber?: string | undefined;
719
747
  issueDate?: string | undefined;
748
+ commercialIntent?: "farm_sale" | "trade" | undefined;
720
749
  taxRate?: number | undefined;
721
750
  dueDate?: string | undefined;
722
751
  billFromAddress?: string | undefined;
@@ -728,6 +757,7 @@ export declare const invoicesRouter: {
728
757
  bankAccountId?: string | undefined;
729
758
  waybillId?: string | undefined;
730
759
  totalInWords?: string | undefined;
760
+ invoiceKind?: "provisional" | "final" | undefined;
731
761
  }>;
732
762
  }, "strip", z.ZodTypeAny, {
733
763
  type: "invoices";
@@ -745,9 +775,11 @@ export declare const invoicesRouter: {
745
775
  }[];
746
776
  buyerId: string;
747
777
  billFromName: string;
778
+ farmId?: string | undefined;
748
779
  notes?: string | undefined;
749
780
  waybillNumber?: string | undefined;
750
781
  issueDate?: string | undefined;
782
+ commercialIntent?: "farm_sale" | "trade" | undefined;
751
783
  taxRate?: number | undefined;
752
784
  dueDate?: string | undefined;
753
785
  billFromAddress?: string | undefined;
@@ -759,6 +791,7 @@ export declare const invoicesRouter: {
759
791
  bankAccountId?: string | undefined;
760
792
  waybillId?: string | undefined;
761
793
  totalInWords?: string | undefined;
794
+ invoiceKind?: "provisional" | "final" | undefined;
762
795
  };
763
796
  }, {
764
797
  type: "invoices";
@@ -775,10 +808,12 @@ export declare const invoicesRouter: {
775
808
  }[];
776
809
  buyerId: string;
777
810
  billFromName: string;
811
+ farmId?: string | undefined;
778
812
  currency?: string | undefined;
779
813
  notes?: string | undefined;
780
814
  waybillNumber?: string | undefined;
781
815
  issueDate?: string | undefined;
816
+ commercialIntent?: "farm_sale" | "trade" | undefined;
782
817
  taxRate?: number | undefined;
783
818
  dueDate?: string | undefined;
784
819
  billFromAddress?: string | undefined;
@@ -790,6 +825,7 @@ export declare const invoicesRouter: {
790
825
  bankAccountId?: string | undefined;
791
826
  waybillId?: string | undefined;
792
827
  totalInWords?: string | undefined;
828
+ invoiceKind?: "provisional" | "final" | undefined;
793
829
  };
794
830
  }>;
795
831
  }, "strip", z.ZodTypeAny, {
@@ -809,9 +845,11 @@ export declare const invoicesRouter: {
809
845
  }[];
810
846
  buyerId: string;
811
847
  billFromName: string;
848
+ farmId?: string | undefined;
812
849
  notes?: string | undefined;
813
850
  waybillNumber?: string | undefined;
814
851
  issueDate?: string | undefined;
852
+ commercialIntent?: "farm_sale" | "trade" | undefined;
815
853
  taxRate?: number | undefined;
816
854
  dueDate?: string | undefined;
817
855
  billFromAddress?: string | undefined;
@@ -823,6 +861,7 @@ export declare const invoicesRouter: {
823
861
  bankAccountId?: string | undefined;
824
862
  waybillId?: string | undefined;
825
863
  totalInWords?: string | undefined;
864
+ invoiceKind?: "provisional" | "final" | undefined;
826
865
  };
827
866
  };
828
867
  }, {
@@ -841,10 +880,12 @@ export declare const invoicesRouter: {
841
880
  }[];
842
881
  buyerId: string;
843
882
  billFromName: string;
883
+ farmId?: string | undefined;
844
884
  currency?: string | undefined;
845
885
  notes?: string | undefined;
846
886
  waybillNumber?: string | undefined;
847
887
  issueDate?: string | undefined;
888
+ commercialIntent?: "farm_sale" | "trade" | undefined;
848
889
  taxRate?: number | undefined;
849
890
  dueDate?: string | undefined;
850
891
  billFromAddress?: string | undefined;
@@ -856,6 +897,7 @@ export declare const invoicesRouter: {
856
897
  bankAccountId?: string | undefined;
857
898
  waybillId?: string | undefined;
858
899
  totalInWords?: string | undefined;
900
+ invoiceKind?: "provisional" | "final" | undefined;
859
901
  };
860
902
  };
861
903
  }>;
@@ -914,7 +956,7 @@ export declare const invoicesRouter: {
914
956
  total: z.ZodNumber;
915
957
  currency: z.ZodDefault<z.ZodString>;
916
958
  paymentTerms: z.ZodNullable<z.ZodOptional<z.ZodString>>;
917
- paymentStatus: z.ZodDefault<z.ZodEnum<["pending", "paid", "overdue", "cancelled"]>>;
959
+ paymentStatus: z.ZodDefault<z.ZodEnum<["pending", "partial", "paid", "overdue", "cancelled"]>>;
918
960
  paidAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
919
961
  notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
920
962
  pdfUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -922,6 +964,9 @@ export declare const invoicesRouter: {
922
964
  waybillNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
923
965
  waybillId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
924
966
  totalInWords: z.ZodNullable<z.ZodOptional<z.ZodString>>;
967
+ farmId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
968
+ commercialIntent: z.ZodNullable<z.ZodOptional<z.ZodEnum<["farm_sale", "trade"]>>>;
969
+ invoiceKind: z.ZodDefault<z.ZodOptional<z.ZodEnum<["provisional", "final"]>>>;
925
970
  organizationId: z.ZodString;
926
971
  } & {
927
972
  createdAt: z.ZodString;
@@ -947,11 +992,14 @@ export declare const invoicesRouter: {
947
992
  billFromName: string;
948
993
  billToName: string;
949
994
  subtotal: number;
950
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
995
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
996
+ invoiceKind: "provisional" | "final";
997
+ farmId?: string | null | undefined;
951
998
  notes?: string | null | undefined;
952
999
  paidAt?: string | null | undefined;
953
1000
  waybillNumber?: string | null | undefined;
954
1001
  pdfUrl?: string | null | undefined;
1002
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
955
1003
  taxRate?: number | null | undefined;
956
1004
  dueDate?: string | null | undefined;
957
1005
  billFromAddress?: string | null | undefined;
@@ -988,11 +1036,13 @@ export declare const invoicesRouter: {
988
1036
  billFromName: string;
989
1037
  billToName: string;
990
1038
  subtotal: number;
1039
+ farmId?: string | null | undefined;
991
1040
  currency?: string | undefined;
992
1041
  notes?: string | null | undefined;
993
1042
  paidAt?: string | null | undefined;
994
1043
  waybillNumber?: string | null | undefined;
995
1044
  pdfUrl?: string | null | undefined;
1045
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
996
1046
  taxRate?: number | null | undefined;
997
1047
  dueDate?: string | null | undefined;
998
1048
  billFromAddress?: string | null | undefined;
@@ -1006,10 +1056,11 @@ export declare const invoicesRouter: {
1006
1056
  taxAmount?: number | null | undefined;
1007
1057
  discount?: number | null | undefined;
1008
1058
  paymentTerms?: string | null | undefined;
1009
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
1059
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
1010
1060
  bankAccountId?: string | null | undefined;
1011
1061
  waybillId?: string | null | undefined;
1012
1062
  totalInWords?: string | null | undefined;
1063
+ invoiceKind?: "provisional" | "final" | undefined;
1013
1064
  }>;
1014
1065
  relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1015
1066
  links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -1038,11 +1089,14 @@ export declare const invoicesRouter: {
1038
1089
  billFromName: string;
1039
1090
  billToName: string;
1040
1091
  subtotal: number;
1041
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
1092
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
1093
+ invoiceKind: "provisional" | "final";
1094
+ farmId?: string | null | undefined;
1042
1095
  notes?: string | null | undefined;
1043
1096
  paidAt?: string | null | undefined;
1044
1097
  waybillNumber?: string | null | undefined;
1045
1098
  pdfUrl?: string | null | undefined;
1099
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
1046
1100
  taxRate?: number | null | undefined;
1047
1101
  dueDate?: string | null | undefined;
1048
1102
  billFromAddress?: string | null | undefined;
@@ -1086,11 +1140,13 @@ export declare const invoicesRouter: {
1086
1140
  billFromName: string;
1087
1141
  billToName: string;
1088
1142
  subtotal: number;
1143
+ farmId?: string | null | undefined;
1089
1144
  currency?: string | undefined;
1090
1145
  notes?: string | null | undefined;
1091
1146
  paidAt?: string | null | undefined;
1092
1147
  waybillNumber?: string | null | undefined;
1093
1148
  pdfUrl?: string | null | undefined;
1149
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
1094
1150
  taxRate?: number | null | undefined;
1095
1151
  dueDate?: string | null | undefined;
1096
1152
  billFromAddress?: string | null | undefined;
@@ -1104,10 +1160,11 @@ export declare const invoicesRouter: {
1104
1160
  taxAmount?: number | null | undefined;
1105
1161
  discount?: number | null | undefined;
1106
1162
  paymentTerms?: string | null | undefined;
1107
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
1163
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
1108
1164
  bankAccountId?: string | null | undefined;
1109
1165
  waybillId?: string | null | undefined;
1110
1166
  totalInWords?: string | null | undefined;
1167
+ invoiceKind?: "provisional" | "final" | undefined;
1111
1168
  };
1112
1169
  relationships?: Record<string, unknown> | undefined;
1113
1170
  links?: Record<string, string> | undefined;
@@ -1162,11 +1219,14 @@ export declare const invoicesRouter: {
1162
1219
  billFromName: string;
1163
1220
  billToName: string;
1164
1221
  subtotal: number;
1165
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
1222
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
1223
+ invoiceKind: "provisional" | "final";
1224
+ farmId?: string | null | undefined;
1166
1225
  notes?: string | null | undefined;
1167
1226
  paidAt?: string | null | undefined;
1168
1227
  waybillNumber?: string | null | undefined;
1169
1228
  pdfUrl?: string | null | undefined;
1229
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
1170
1230
  taxRate?: number | null | undefined;
1171
1231
  dueDate?: string | null | undefined;
1172
1232
  billFromAddress?: string | null | undefined;
@@ -1222,11 +1282,13 @@ export declare const invoicesRouter: {
1222
1282
  billFromName: string;
1223
1283
  billToName: string;
1224
1284
  subtotal: number;
1285
+ farmId?: string | null | undefined;
1225
1286
  currency?: string | undefined;
1226
1287
  notes?: string | null | undefined;
1227
1288
  paidAt?: string | null | undefined;
1228
1289
  waybillNumber?: string | null | undefined;
1229
1290
  pdfUrl?: string | null | undefined;
1291
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
1230
1292
  taxRate?: number | null | undefined;
1231
1293
  dueDate?: string | null | undefined;
1232
1294
  billFromAddress?: string | null | undefined;
@@ -1240,10 +1302,11 @@ export declare const invoicesRouter: {
1240
1302
  taxAmount?: number | null | undefined;
1241
1303
  discount?: number | null | undefined;
1242
1304
  paymentTerms?: string | null | undefined;
1243
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
1305
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
1244
1306
  bankAccountId?: string | null | undefined;
1245
1307
  waybillId?: string | null | undefined;
1246
1308
  totalInWords?: string | null | undefined;
1309
+ invoiceKind?: "provisional" | "final" | undefined;
1247
1310
  };
1248
1311
  relationships?: Record<string, unknown> | undefined;
1249
1312
  links?: Record<string, string> | undefined;
@@ -1691,7 +1754,7 @@ export declare const invoicesRouter: {
1691
1754
  total: z.ZodNumber;
1692
1755
  currency: z.ZodDefault<z.ZodString>;
1693
1756
  paymentTerms: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1694
- paymentStatus: z.ZodDefault<z.ZodEnum<["pending", "paid", "overdue", "cancelled"]>>;
1757
+ paymentStatus: z.ZodDefault<z.ZodEnum<["pending", "partial", "paid", "overdue", "cancelled"]>>;
1695
1758
  paidAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1696
1759
  notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1697
1760
  pdfUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -1699,6 +1762,9 @@ export declare const invoicesRouter: {
1699
1762
  waybillNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1700
1763
  waybillId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1701
1764
  totalInWords: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1765
+ farmId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1766
+ commercialIntent: z.ZodNullable<z.ZodOptional<z.ZodEnum<["farm_sale", "trade"]>>>;
1767
+ invoiceKind: z.ZodDefault<z.ZodOptional<z.ZodEnum<["provisional", "final"]>>>;
1702
1768
  organizationId: z.ZodString;
1703
1769
  } & {
1704
1770
  createdAt: z.ZodString;
@@ -1724,11 +1790,14 @@ export declare const invoicesRouter: {
1724
1790
  billFromName: string;
1725
1791
  billToName: string;
1726
1792
  subtotal: number;
1727
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
1793
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
1794
+ invoiceKind: "provisional" | "final";
1795
+ farmId?: string | null | undefined;
1728
1796
  notes?: string | null | undefined;
1729
1797
  paidAt?: string | null | undefined;
1730
1798
  waybillNumber?: string | null | undefined;
1731
1799
  pdfUrl?: string | null | undefined;
1800
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
1732
1801
  taxRate?: number | null | undefined;
1733
1802
  dueDate?: string | null | undefined;
1734
1803
  billFromAddress?: string | null | undefined;
@@ -1765,11 +1834,13 @@ export declare const invoicesRouter: {
1765
1834
  billFromName: string;
1766
1835
  billToName: string;
1767
1836
  subtotal: number;
1837
+ farmId?: string | null | undefined;
1768
1838
  currency?: string | undefined;
1769
1839
  notes?: string | null | undefined;
1770
1840
  paidAt?: string | null | undefined;
1771
1841
  waybillNumber?: string | null | undefined;
1772
1842
  pdfUrl?: string | null | undefined;
1843
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
1773
1844
  taxRate?: number | null | undefined;
1774
1845
  dueDate?: string | null | undefined;
1775
1846
  billFromAddress?: string | null | undefined;
@@ -1783,10 +1854,11 @@ export declare const invoicesRouter: {
1783
1854
  taxAmount?: number | null | undefined;
1784
1855
  discount?: number | null | undefined;
1785
1856
  paymentTerms?: string | null | undefined;
1786
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
1857
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
1787
1858
  bankAccountId?: string | null | undefined;
1788
1859
  waybillId?: string | null | undefined;
1789
1860
  totalInWords?: string | null | undefined;
1861
+ invoiceKind?: "provisional" | "final" | undefined;
1790
1862
  }>;
1791
1863
  relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1792
1864
  links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -1815,11 +1887,14 @@ export declare const invoicesRouter: {
1815
1887
  billFromName: string;
1816
1888
  billToName: string;
1817
1889
  subtotal: number;
1818
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
1890
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
1891
+ invoiceKind: "provisional" | "final";
1892
+ farmId?: string | null | undefined;
1819
1893
  notes?: string | null | undefined;
1820
1894
  paidAt?: string | null | undefined;
1821
1895
  waybillNumber?: string | null | undefined;
1822
1896
  pdfUrl?: string | null | undefined;
1897
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
1823
1898
  taxRate?: number | null | undefined;
1824
1899
  dueDate?: string | null | undefined;
1825
1900
  billFromAddress?: string | null | undefined;
@@ -1863,11 +1938,13 @@ export declare const invoicesRouter: {
1863
1938
  billFromName: string;
1864
1939
  billToName: string;
1865
1940
  subtotal: number;
1941
+ farmId?: string | null | undefined;
1866
1942
  currency?: string | undefined;
1867
1943
  notes?: string | null | undefined;
1868
1944
  paidAt?: string | null | undefined;
1869
1945
  waybillNumber?: string | null | undefined;
1870
1946
  pdfUrl?: string | null | undefined;
1947
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
1871
1948
  taxRate?: number | null | undefined;
1872
1949
  dueDate?: string | null | undefined;
1873
1950
  billFromAddress?: string | null | undefined;
@@ -1881,10 +1958,11 @@ export declare const invoicesRouter: {
1881
1958
  taxAmount?: number | null | undefined;
1882
1959
  discount?: number | null | undefined;
1883
1960
  paymentTerms?: string | null | undefined;
1884
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
1961
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
1885
1962
  bankAccountId?: string | null | undefined;
1886
1963
  waybillId?: string | null | undefined;
1887
1964
  totalInWords?: string | null | undefined;
1965
+ invoiceKind?: "provisional" | "final" | undefined;
1888
1966
  };
1889
1967
  relationships?: Record<string, unknown> | undefined;
1890
1968
  links?: Record<string, string> | undefined;
@@ -1939,11 +2017,14 @@ export declare const invoicesRouter: {
1939
2017
  billFromName: string;
1940
2018
  billToName: string;
1941
2019
  subtotal: number;
1942
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
2020
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
2021
+ invoiceKind: "provisional" | "final";
2022
+ farmId?: string | null | undefined;
1943
2023
  notes?: string | null | undefined;
1944
2024
  paidAt?: string | null | undefined;
1945
2025
  waybillNumber?: string | null | undefined;
1946
2026
  pdfUrl?: string | null | undefined;
2027
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
1947
2028
  taxRate?: number | null | undefined;
1948
2029
  dueDate?: string | null | undefined;
1949
2030
  billFromAddress?: string | null | undefined;
@@ -1999,11 +2080,13 @@ export declare const invoicesRouter: {
1999
2080
  billFromName: string;
2000
2081
  billToName: string;
2001
2082
  subtotal: number;
2083
+ farmId?: string | null | undefined;
2002
2084
  currency?: string | undefined;
2003
2085
  notes?: string | null | undefined;
2004
2086
  paidAt?: string | null | undefined;
2005
2087
  waybillNumber?: string | null | undefined;
2006
2088
  pdfUrl?: string | null | undefined;
2089
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
2007
2090
  taxRate?: number | null | undefined;
2008
2091
  dueDate?: string | null | undefined;
2009
2092
  billFromAddress?: string | null | undefined;
@@ -2017,10 +2100,11 @@ export declare const invoicesRouter: {
2017
2100
  taxAmount?: number | null | undefined;
2018
2101
  discount?: number | null | undefined;
2019
2102
  paymentTerms?: string | null | undefined;
2020
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
2103
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
2021
2104
  bankAccountId?: string | null | undefined;
2022
2105
  waybillId?: string | null | undefined;
2023
2106
  totalInWords?: string | null | undefined;
2107
+ invoiceKind?: "provisional" | "final" | undefined;
2024
2108
  };
2025
2109
  relationships?: Record<string, unknown> | undefined;
2026
2110
  links?: Record<string, string> | undefined;
@@ -2283,9 +2367,13 @@ export declare const invoicesRouter: {
2283
2367
  waybillNumber: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2284
2368
  waybillId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2285
2369
  totalInWords: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2370
+ farmId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2371
+ commercialIntent: z.ZodOptional<z.ZodOptional<z.ZodEnum<["farm_sale", "trade"]>>>;
2372
+ invoiceKind: z.ZodOptional<z.ZodOptional<z.ZodEnum<["provisional", "final"]>>>;
2286
2373
  } & {
2287
- paymentStatus: z.ZodOptional<z.ZodEnum<["pending", "paid", "overdue", "cancelled"]>>;
2374
+ paymentStatus: z.ZodOptional<z.ZodEnum<["pending", "partial", "paid", "overdue", "cancelled"]>>;
2288
2375
  }, "strip", z.ZodTypeAny, {
2376
+ farmId?: string | undefined;
2289
2377
  currency?: string | undefined;
2290
2378
  notes?: string | undefined;
2291
2379
  items?: {
@@ -2300,6 +2388,7 @@ export declare const invoicesRouter: {
2300
2388
  }[] | undefined;
2301
2389
  waybillNumber?: string | undefined;
2302
2390
  issueDate?: string | undefined;
2391
+ commercialIntent?: "farm_sale" | "trade" | undefined;
2303
2392
  buyerId?: string | undefined;
2304
2393
  taxRate?: number | undefined;
2305
2394
  dueDate?: string | undefined;
@@ -2310,11 +2399,13 @@ export declare const invoicesRouter: {
2310
2399
  billFromTaxId?: string | undefined;
2311
2400
  discount?: number | undefined;
2312
2401
  paymentTerms?: string | undefined;
2313
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
2402
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
2314
2403
  bankAccountId?: string | undefined;
2315
2404
  waybillId?: string | undefined;
2316
2405
  totalInWords?: string | undefined;
2406
+ invoiceKind?: "provisional" | "final" | undefined;
2317
2407
  }, {
2408
+ farmId?: string | undefined;
2318
2409
  currency?: string | undefined;
2319
2410
  notes?: string | undefined;
2320
2411
  items?: {
@@ -2329,6 +2420,7 @@ export declare const invoicesRouter: {
2329
2420
  }[] | undefined;
2330
2421
  waybillNumber?: string | undefined;
2331
2422
  issueDate?: string | undefined;
2423
+ commercialIntent?: "farm_sale" | "trade" | undefined;
2332
2424
  buyerId?: string | undefined;
2333
2425
  taxRate?: number | undefined;
2334
2426
  dueDate?: string | undefined;
@@ -2339,15 +2431,17 @@ export declare const invoicesRouter: {
2339
2431
  billFromTaxId?: string | undefined;
2340
2432
  discount?: number | undefined;
2341
2433
  paymentTerms?: string | undefined;
2342
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
2434
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
2343
2435
  bankAccountId?: string | undefined;
2344
2436
  waybillId?: string | undefined;
2345
2437
  totalInWords?: string | undefined;
2438
+ invoiceKind?: "provisional" | "final" | undefined;
2346
2439
  }>;
2347
2440
  }, "strip", z.ZodTypeAny, {
2348
2441
  type: "invoices";
2349
2442
  id: string;
2350
2443
  attributes: {
2444
+ farmId?: string | undefined;
2351
2445
  currency?: string | undefined;
2352
2446
  notes?: string | undefined;
2353
2447
  items?: {
@@ -2362,6 +2456,7 @@ export declare const invoicesRouter: {
2362
2456
  }[] | undefined;
2363
2457
  waybillNumber?: string | undefined;
2364
2458
  issueDate?: string | undefined;
2459
+ commercialIntent?: "farm_sale" | "trade" | undefined;
2365
2460
  buyerId?: string | undefined;
2366
2461
  taxRate?: number | undefined;
2367
2462
  dueDate?: string | undefined;
@@ -2372,15 +2467,17 @@ export declare const invoicesRouter: {
2372
2467
  billFromTaxId?: string | undefined;
2373
2468
  discount?: number | undefined;
2374
2469
  paymentTerms?: string | undefined;
2375
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
2470
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
2376
2471
  bankAccountId?: string | undefined;
2377
2472
  waybillId?: string | undefined;
2378
2473
  totalInWords?: string | undefined;
2474
+ invoiceKind?: "provisional" | "final" | undefined;
2379
2475
  };
2380
2476
  }, {
2381
2477
  type: "invoices";
2382
2478
  id: string;
2383
2479
  attributes: {
2480
+ farmId?: string | undefined;
2384
2481
  currency?: string | undefined;
2385
2482
  notes?: string | undefined;
2386
2483
  items?: {
@@ -2395,6 +2492,7 @@ export declare const invoicesRouter: {
2395
2492
  }[] | undefined;
2396
2493
  waybillNumber?: string | undefined;
2397
2494
  issueDate?: string | undefined;
2495
+ commercialIntent?: "farm_sale" | "trade" | undefined;
2398
2496
  buyerId?: string | undefined;
2399
2497
  taxRate?: number | undefined;
2400
2498
  dueDate?: string | undefined;
@@ -2405,10 +2503,11 @@ export declare const invoicesRouter: {
2405
2503
  billFromTaxId?: string | undefined;
2406
2504
  discount?: number | undefined;
2407
2505
  paymentTerms?: string | undefined;
2408
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
2506
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
2409
2507
  bankAccountId?: string | undefined;
2410
2508
  waybillId?: string | undefined;
2411
2509
  totalInWords?: string | undefined;
2510
+ invoiceKind?: "provisional" | "final" | undefined;
2412
2511
  };
2413
2512
  }>;
2414
2513
  }, "strip", z.ZodTypeAny, {
@@ -2416,6 +2515,7 @@ export declare const invoicesRouter: {
2416
2515
  type: "invoices";
2417
2516
  id: string;
2418
2517
  attributes: {
2518
+ farmId?: string | undefined;
2419
2519
  currency?: string | undefined;
2420
2520
  notes?: string | undefined;
2421
2521
  items?: {
@@ -2430,6 +2530,7 @@ export declare const invoicesRouter: {
2430
2530
  }[] | undefined;
2431
2531
  waybillNumber?: string | undefined;
2432
2532
  issueDate?: string | undefined;
2533
+ commercialIntent?: "farm_sale" | "trade" | undefined;
2433
2534
  buyerId?: string | undefined;
2434
2535
  taxRate?: number | undefined;
2435
2536
  dueDate?: string | undefined;
@@ -2440,10 +2541,11 @@ export declare const invoicesRouter: {
2440
2541
  billFromTaxId?: string | undefined;
2441
2542
  discount?: number | undefined;
2442
2543
  paymentTerms?: string | undefined;
2443
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
2544
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
2444
2545
  bankAccountId?: string | undefined;
2445
2546
  waybillId?: string | undefined;
2446
2547
  totalInWords?: string | undefined;
2548
+ invoiceKind?: "provisional" | "final" | undefined;
2447
2549
  };
2448
2550
  };
2449
2551
  }, {
@@ -2451,6 +2553,7 @@ export declare const invoicesRouter: {
2451
2553
  type: "invoices";
2452
2554
  id: string;
2453
2555
  attributes: {
2556
+ farmId?: string | undefined;
2454
2557
  currency?: string | undefined;
2455
2558
  notes?: string | undefined;
2456
2559
  items?: {
@@ -2465,6 +2568,7 @@ export declare const invoicesRouter: {
2465
2568
  }[] | undefined;
2466
2569
  waybillNumber?: string | undefined;
2467
2570
  issueDate?: string | undefined;
2571
+ commercialIntent?: "farm_sale" | "trade" | undefined;
2468
2572
  buyerId?: string | undefined;
2469
2573
  taxRate?: number | undefined;
2470
2574
  dueDate?: string | undefined;
@@ -2475,10 +2579,11 @@ export declare const invoicesRouter: {
2475
2579
  billFromTaxId?: string | undefined;
2476
2580
  discount?: number | undefined;
2477
2581
  paymentTerms?: string | undefined;
2478
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
2582
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
2479
2583
  bankAccountId?: string | undefined;
2480
2584
  waybillId?: string | undefined;
2481
2585
  totalInWords?: string | undefined;
2586
+ invoiceKind?: "provisional" | "final" | undefined;
2482
2587
  };
2483
2588
  };
2484
2589
  }>;
@@ -2537,7 +2642,7 @@ export declare const invoicesRouter: {
2537
2642
  total: z.ZodNumber;
2538
2643
  currency: z.ZodDefault<z.ZodString>;
2539
2644
  paymentTerms: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2540
- paymentStatus: z.ZodDefault<z.ZodEnum<["pending", "paid", "overdue", "cancelled"]>>;
2645
+ paymentStatus: z.ZodDefault<z.ZodEnum<["pending", "partial", "paid", "overdue", "cancelled"]>>;
2541
2646
  paidAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2542
2647
  notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2543
2648
  pdfUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -2545,6 +2650,9 @@ export declare const invoicesRouter: {
2545
2650
  waybillNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2546
2651
  waybillId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2547
2652
  totalInWords: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2653
+ farmId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2654
+ commercialIntent: z.ZodNullable<z.ZodOptional<z.ZodEnum<["farm_sale", "trade"]>>>;
2655
+ invoiceKind: z.ZodDefault<z.ZodOptional<z.ZodEnum<["provisional", "final"]>>>;
2548
2656
  organizationId: z.ZodString;
2549
2657
  } & {
2550
2658
  createdAt: z.ZodString;
@@ -2570,11 +2678,14 @@ export declare const invoicesRouter: {
2570
2678
  billFromName: string;
2571
2679
  billToName: string;
2572
2680
  subtotal: number;
2573
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
2681
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
2682
+ invoiceKind: "provisional" | "final";
2683
+ farmId?: string | null | undefined;
2574
2684
  notes?: string | null | undefined;
2575
2685
  paidAt?: string | null | undefined;
2576
2686
  waybillNumber?: string | null | undefined;
2577
2687
  pdfUrl?: string | null | undefined;
2688
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
2578
2689
  taxRate?: number | null | undefined;
2579
2690
  dueDate?: string | null | undefined;
2580
2691
  billFromAddress?: string | null | undefined;
@@ -2611,11 +2722,13 @@ export declare const invoicesRouter: {
2611
2722
  billFromName: string;
2612
2723
  billToName: string;
2613
2724
  subtotal: number;
2725
+ farmId?: string | null | undefined;
2614
2726
  currency?: string | undefined;
2615
2727
  notes?: string | null | undefined;
2616
2728
  paidAt?: string | null | undefined;
2617
2729
  waybillNumber?: string | null | undefined;
2618
2730
  pdfUrl?: string | null | undefined;
2731
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
2619
2732
  taxRate?: number | null | undefined;
2620
2733
  dueDate?: string | null | undefined;
2621
2734
  billFromAddress?: string | null | undefined;
@@ -2629,10 +2742,11 @@ export declare const invoicesRouter: {
2629
2742
  taxAmount?: number | null | undefined;
2630
2743
  discount?: number | null | undefined;
2631
2744
  paymentTerms?: string | null | undefined;
2632
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
2745
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
2633
2746
  bankAccountId?: string | null | undefined;
2634
2747
  waybillId?: string | null | undefined;
2635
2748
  totalInWords?: string | null | undefined;
2749
+ invoiceKind?: "provisional" | "final" | undefined;
2636
2750
  }>;
2637
2751
  relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2638
2752
  links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -2661,11 +2775,14 @@ export declare const invoicesRouter: {
2661
2775
  billFromName: string;
2662
2776
  billToName: string;
2663
2777
  subtotal: number;
2664
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
2778
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
2779
+ invoiceKind: "provisional" | "final";
2780
+ farmId?: string | null | undefined;
2665
2781
  notes?: string | null | undefined;
2666
2782
  paidAt?: string | null | undefined;
2667
2783
  waybillNumber?: string | null | undefined;
2668
2784
  pdfUrl?: string | null | undefined;
2785
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
2669
2786
  taxRate?: number | null | undefined;
2670
2787
  dueDate?: string | null | undefined;
2671
2788
  billFromAddress?: string | null | undefined;
@@ -2709,11 +2826,13 @@ export declare const invoicesRouter: {
2709
2826
  billFromName: string;
2710
2827
  billToName: string;
2711
2828
  subtotal: number;
2829
+ farmId?: string | null | undefined;
2712
2830
  currency?: string | undefined;
2713
2831
  notes?: string | null | undefined;
2714
2832
  paidAt?: string | null | undefined;
2715
2833
  waybillNumber?: string | null | undefined;
2716
2834
  pdfUrl?: string | null | undefined;
2835
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
2717
2836
  taxRate?: number | null | undefined;
2718
2837
  dueDate?: string | null | undefined;
2719
2838
  billFromAddress?: string | null | undefined;
@@ -2727,10 +2846,11 @@ export declare const invoicesRouter: {
2727
2846
  taxAmount?: number | null | undefined;
2728
2847
  discount?: number | null | undefined;
2729
2848
  paymentTerms?: string | null | undefined;
2730
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
2849
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
2731
2850
  bankAccountId?: string | null | undefined;
2732
2851
  waybillId?: string | null | undefined;
2733
2852
  totalInWords?: string | null | undefined;
2853
+ invoiceKind?: "provisional" | "final" | undefined;
2734
2854
  };
2735
2855
  relationships?: Record<string, unknown> | undefined;
2736
2856
  links?: Record<string, string> | undefined;
@@ -2785,11 +2905,14 @@ export declare const invoicesRouter: {
2785
2905
  billFromName: string;
2786
2906
  billToName: string;
2787
2907
  subtotal: number;
2788
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
2908
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
2909
+ invoiceKind: "provisional" | "final";
2910
+ farmId?: string | null | undefined;
2789
2911
  notes?: string | null | undefined;
2790
2912
  paidAt?: string | null | undefined;
2791
2913
  waybillNumber?: string | null | undefined;
2792
2914
  pdfUrl?: string | null | undefined;
2915
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
2793
2916
  taxRate?: number | null | undefined;
2794
2917
  dueDate?: string | null | undefined;
2795
2918
  billFromAddress?: string | null | undefined;
@@ -2845,11 +2968,13 @@ export declare const invoicesRouter: {
2845
2968
  billFromName: string;
2846
2969
  billToName: string;
2847
2970
  subtotal: number;
2971
+ farmId?: string | null | undefined;
2848
2972
  currency?: string | undefined;
2849
2973
  notes?: string | null | undefined;
2850
2974
  paidAt?: string | null | undefined;
2851
2975
  waybillNumber?: string | null | undefined;
2852
2976
  pdfUrl?: string | null | undefined;
2977
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
2853
2978
  taxRate?: number | null | undefined;
2854
2979
  dueDate?: string | null | undefined;
2855
2980
  billFromAddress?: string | null | undefined;
@@ -2863,10 +2988,11 @@ export declare const invoicesRouter: {
2863
2988
  taxAmount?: number | null | undefined;
2864
2989
  discount?: number | null | undefined;
2865
2990
  paymentTerms?: string | null | undefined;
2866
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
2991
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
2867
2992
  bankAccountId?: string | null | undefined;
2868
2993
  waybillId?: string | null | undefined;
2869
2994
  totalInWords?: string | null | undefined;
2995
+ invoiceKind?: "provisional" | "final" | undefined;
2870
2996
  };
2871
2997
  relationships?: Record<string, unknown> | undefined;
2872
2998
  links?: Record<string, string> | undefined;
@@ -3315,7 +3441,7 @@ export declare const invoicesRouter: {
3315
3441
  total: z.ZodNumber;
3316
3442
  currency: z.ZodDefault<z.ZodString>;
3317
3443
  paymentTerms: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3318
- paymentStatus: z.ZodDefault<z.ZodEnum<["pending", "paid", "overdue", "cancelled"]>>;
3444
+ paymentStatus: z.ZodDefault<z.ZodEnum<["pending", "partial", "paid", "overdue", "cancelled"]>>;
3319
3445
  paidAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3320
3446
  notes: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3321
3447
  pdfUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -3323,6 +3449,9 @@ export declare const invoicesRouter: {
3323
3449
  waybillNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3324
3450
  waybillId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3325
3451
  totalInWords: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3452
+ farmId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3453
+ commercialIntent: z.ZodNullable<z.ZodOptional<z.ZodEnum<["farm_sale", "trade"]>>>;
3454
+ invoiceKind: z.ZodDefault<z.ZodOptional<z.ZodEnum<["provisional", "final"]>>>;
3326
3455
  organizationId: z.ZodString;
3327
3456
  } & {
3328
3457
  createdAt: z.ZodString;
@@ -3348,11 +3477,14 @@ export declare const invoicesRouter: {
3348
3477
  billFromName: string;
3349
3478
  billToName: string;
3350
3479
  subtotal: number;
3351
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
3480
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
3481
+ invoiceKind: "provisional" | "final";
3482
+ farmId?: string | null | undefined;
3352
3483
  notes?: string | null | undefined;
3353
3484
  paidAt?: string | null | undefined;
3354
3485
  waybillNumber?: string | null | undefined;
3355
3486
  pdfUrl?: string | null | undefined;
3487
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
3356
3488
  taxRate?: number | null | undefined;
3357
3489
  dueDate?: string | null | undefined;
3358
3490
  billFromAddress?: string | null | undefined;
@@ -3389,11 +3521,13 @@ export declare const invoicesRouter: {
3389
3521
  billFromName: string;
3390
3522
  billToName: string;
3391
3523
  subtotal: number;
3524
+ farmId?: string | null | undefined;
3392
3525
  currency?: string | undefined;
3393
3526
  notes?: string | null | undefined;
3394
3527
  paidAt?: string | null | undefined;
3395
3528
  waybillNumber?: string | null | undefined;
3396
3529
  pdfUrl?: string | null | undefined;
3530
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
3397
3531
  taxRate?: number | null | undefined;
3398
3532
  dueDate?: string | null | undefined;
3399
3533
  billFromAddress?: string | null | undefined;
@@ -3407,10 +3541,11 @@ export declare const invoicesRouter: {
3407
3541
  taxAmount?: number | null | undefined;
3408
3542
  discount?: number | null | undefined;
3409
3543
  paymentTerms?: string | null | undefined;
3410
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
3544
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
3411
3545
  bankAccountId?: string | null | undefined;
3412
3546
  waybillId?: string | null | undefined;
3413
3547
  totalInWords?: string | null | undefined;
3548
+ invoiceKind?: "provisional" | "final" | undefined;
3414
3549
  }>;
3415
3550
  relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3416
3551
  links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -3439,11 +3574,14 @@ export declare const invoicesRouter: {
3439
3574
  billFromName: string;
3440
3575
  billToName: string;
3441
3576
  subtotal: number;
3442
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
3577
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
3578
+ invoiceKind: "provisional" | "final";
3579
+ farmId?: string | null | undefined;
3443
3580
  notes?: string | null | undefined;
3444
3581
  paidAt?: string | null | undefined;
3445
3582
  waybillNumber?: string | null | undefined;
3446
3583
  pdfUrl?: string | null | undefined;
3584
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
3447
3585
  taxRate?: number | null | undefined;
3448
3586
  dueDate?: string | null | undefined;
3449
3587
  billFromAddress?: string | null | undefined;
@@ -3487,11 +3625,13 @@ export declare const invoicesRouter: {
3487
3625
  billFromName: string;
3488
3626
  billToName: string;
3489
3627
  subtotal: number;
3628
+ farmId?: string | null | undefined;
3490
3629
  currency?: string | undefined;
3491
3630
  notes?: string | null | undefined;
3492
3631
  paidAt?: string | null | undefined;
3493
3632
  waybillNumber?: string | null | undefined;
3494
3633
  pdfUrl?: string | null | undefined;
3634
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
3495
3635
  taxRate?: number | null | undefined;
3496
3636
  dueDate?: string | null | undefined;
3497
3637
  billFromAddress?: string | null | undefined;
@@ -3505,10 +3645,11 @@ export declare const invoicesRouter: {
3505
3645
  taxAmount?: number | null | undefined;
3506
3646
  discount?: number | null | undefined;
3507
3647
  paymentTerms?: string | null | undefined;
3508
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
3648
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
3509
3649
  bankAccountId?: string | null | undefined;
3510
3650
  waybillId?: string | null | undefined;
3511
3651
  totalInWords?: string | null | undefined;
3652
+ invoiceKind?: "provisional" | "final" | undefined;
3512
3653
  };
3513
3654
  relationships?: Record<string, unknown> | undefined;
3514
3655
  links?: Record<string, string> | undefined;
@@ -3563,11 +3704,14 @@ export declare const invoicesRouter: {
3563
3704
  billFromName: string;
3564
3705
  billToName: string;
3565
3706
  subtotal: number;
3566
- paymentStatus: "pending" | "cancelled" | "paid" | "overdue";
3707
+ paymentStatus: "partial" | "pending" | "cancelled" | "paid" | "overdue";
3708
+ invoiceKind: "provisional" | "final";
3709
+ farmId?: string | null | undefined;
3567
3710
  notes?: string | null | undefined;
3568
3711
  paidAt?: string | null | undefined;
3569
3712
  waybillNumber?: string | null | undefined;
3570
3713
  pdfUrl?: string | null | undefined;
3714
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
3571
3715
  taxRate?: number | null | undefined;
3572
3716
  dueDate?: string | null | undefined;
3573
3717
  billFromAddress?: string | null | undefined;
@@ -3623,11 +3767,13 @@ export declare const invoicesRouter: {
3623
3767
  billFromName: string;
3624
3768
  billToName: string;
3625
3769
  subtotal: number;
3770
+ farmId?: string | null | undefined;
3626
3771
  currency?: string | undefined;
3627
3772
  notes?: string | null | undefined;
3628
3773
  paidAt?: string | null | undefined;
3629
3774
  waybillNumber?: string | null | undefined;
3630
3775
  pdfUrl?: string | null | undefined;
3776
+ commercialIntent?: "farm_sale" | "trade" | null | undefined;
3631
3777
  taxRate?: number | null | undefined;
3632
3778
  dueDate?: string | null | undefined;
3633
3779
  billFromAddress?: string | null | undefined;
@@ -3641,10 +3787,11 @@ export declare const invoicesRouter: {
3641
3787
  taxAmount?: number | null | undefined;
3642
3788
  discount?: number | null | undefined;
3643
3789
  paymentTerms?: string | null | undefined;
3644
- paymentStatus?: "pending" | "cancelled" | "paid" | "overdue" | undefined;
3790
+ paymentStatus?: "partial" | "pending" | "cancelled" | "paid" | "overdue" | undefined;
3645
3791
  bankAccountId?: string | null | undefined;
3646
3792
  waybillId?: string | null | undefined;
3647
3793
  totalInWords?: string | null | undefined;
3794
+ invoiceKind?: "provisional" | "final" | undefined;
3648
3795
  };
3649
3796
  relationships?: Record<string, unknown> | undefined;
3650
3797
  links?: Record<string, string> | undefined;