@deepintel-ltd/farmpro-contracts 1.3.3 → 1.4.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.
@@ -448,6 +448,927 @@ export declare const documentsRouter: {
448
448
  }>;
449
449
  };
450
450
  };
451
+ uploadDocumentFile: {
452
+ pathParams: z.ZodObject<{
453
+ farmId: z.ZodString;
454
+ }, "strip", z.ZodTypeAny, {
455
+ farmId: string;
456
+ }, {
457
+ farmId: string;
458
+ }>;
459
+ summary: "Upload document file";
460
+ description: "Upload a file and get back the file URL in JSON:API format";
461
+ method: "POST";
462
+ contentType: "multipart/form-data";
463
+ body: import("@ts-rest/core").ContractPlainType<{
464
+ file: File;
465
+ }>;
466
+ path: "/farms/:farmId/documents/upload";
467
+ responses: {
468
+ 200: z.ZodObject<{
469
+ data: z.ZodObject<{
470
+ type: z.ZodLiteral<string>;
471
+ id: z.ZodString;
472
+ attributes: z.ZodObject<{
473
+ fileUrl: z.ZodString;
474
+ fileSize: z.ZodNumber;
475
+ fileName: z.ZodString;
476
+ contentType: z.ZodOptional<z.ZodString>;
477
+ uploadedAt: z.ZodString;
478
+ }, "strip", z.ZodTypeAny, {
479
+ fileUrl: string;
480
+ fileSize: number;
481
+ fileName: string;
482
+ uploadedAt: string;
483
+ contentType?: string | undefined;
484
+ }, {
485
+ fileUrl: string;
486
+ fileSize: number;
487
+ fileName: string;
488
+ uploadedAt: string;
489
+ contentType?: string | undefined;
490
+ }>;
491
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
492
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
493
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
494
+ }, "strip", z.ZodTypeAny, {
495
+ type: string;
496
+ id: string;
497
+ attributes: {
498
+ fileUrl: string;
499
+ fileSize: number;
500
+ fileName: string;
501
+ uploadedAt: string;
502
+ contentType?: string | undefined;
503
+ };
504
+ relationships?: Record<string, unknown> | undefined;
505
+ links?: Record<string, string> | undefined;
506
+ meta?: Record<string, unknown> | undefined;
507
+ }, {
508
+ type: string;
509
+ id: string;
510
+ attributes: {
511
+ fileUrl: string;
512
+ fileSize: number;
513
+ fileName: string;
514
+ uploadedAt: string;
515
+ contentType?: string | undefined;
516
+ };
517
+ relationships?: Record<string, unknown> | undefined;
518
+ links?: Record<string, string> | undefined;
519
+ meta?: Record<string, unknown> | undefined;
520
+ }>;
521
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
522
+ type: z.ZodString;
523
+ id: z.ZodString;
524
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
525
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
526
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
527
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
528
+ }, "strip", z.ZodTypeAny, {
529
+ type: string;
530
+ id: string;
531
+ attributes?: Record<string, unknown> | undefined;
532
+ relationships?: Record<string, unknown> | undefined;
533
+ links?: Record<string, string> | undefined;
534
+ meta?: Record<string, unknown> | undefined;
535
+ }, {
536
+ type: string;
537
+ id: string;
538
+ attributes?: Record<string, unknown> | undefined;
539
+ relationships?: Record<string, unknown> | undefined;
540
+ links?: Record<string, string> | undefined;
541
+ meta?: Record<string, unknown> | undefined;
542
+ }>, "many">>;
543
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
544
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
545
+ }, "strip", z.ZodTypeAny, {
546
+ data: {
547
+ type: string;
548
+ id: string;
549
+ attributes: {
550
+ fileUrl: string;
551
+ fileSize: number;
552
+ fileName: string;
553
+ uploadedAt: string;
554
+ contentType?: string | undefined;
555
+ };
556
+ relationships?: Record<string, unknown> | undefined;
557
+ links?: Record<string, string> | undefined;
558
+ meta?: Record<string, unknown> | undefined;
559
+ };
560
+ links?: Record<string, string> | undefined;
561
+ meta?: Record<string, unknown> | undefined;
562
+ included?: {
563
+ type: string;
564
+ id: string;
565
+ attributes?: Record<string, unknown> | undefined;
566
+ relationships?: Record<string, unknown> | undefined;
567
+ links?: Record<string, string> | undefined;
568
+ meta?: Record<string, unknown> | undefined;
569
+ }[] | undefined;
570
+ }, {
571
+ data: {
572
+ type: string;
573
+ id: string;
574
+ attributes: {
575
+ fileUrl: string;
576
+ fileSize: number;
577
+ fileName: string;
578
+ uploadedAt: string;
579
+ contentType?: string | undefined;
580
+ };
581
+ relationships?: Record<string, unknown> | undefined;
582
+ links?: Record<string, string> | undefined;
583
+ meta?: Record<string, unknown> | undefined;
584
+ };
585
+ links?: Record<string, string> | undefined;
586
+ meta?: Record<string, unknown> | undefined;
587
+ included?: {
588
+ type: string;
589
+ id: string;
590
+ attributes?: Record<string, unknown> | undefined;
591
+ relationships?: Record<string, unknown> | undefined;
592
+ links?: Record<string, string> | undefined;
593
+ meta?: Record<string, unknown> | undefined;
594
+ }[] | undefined;
595
+ }>;
596
+ 400: z.ZodObject<{
597
+ errors: z.ZodArray<z.ZodObject<{
598
+ id: z.ZodOptional<z.ZodString>;
599
+ links: z.ZodOptional<z.ZodObject<{
600
+ about: z.ZodOptional<z.ZodString>;
601
+ }, "strip", z.ZodTypeAny, {
602
+ about?: string | undefined;
603
+ }, {
604
+ about?: string | undefined;
605
+ }>>;
606
+ status: z.ZodOptional<z.ZodString>;
607
+ code: z.ZodOptional<z.ZodString>;
608
+ title: z.ZodOptional<z.ZodString>;
609
+ detail: z.ZodOptional<z.ZodString>;
610
+ source: z.ZodOptional<z.ZodObject<{
611
+ pointer: z.ZodOptional<z.ZodString>;
612
+ parameter: z.ZodOptional<z.ZodString>;
613
+ }, "strip", z.ZodTypeAny, {
614
+ pointer?: string | undefined;
615
+ parameter?: string | undefined;
616
+ }, {
617
+ pointer?: string | undefined;
618
+ parameter?: string | undefined;
619
+ }>>;
620
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
621
+ }, "strip", z.ZodTypeAny, {
622
+ status?: string | undefined;
623
+ code?: string | undefined;
624
+ id?: string | undefined;
625
+ links?: {
626
+ about?: string | undefined;
627
+ } | undefined;
628
+ meta?: Record<string, unknown> | undefined;
629
+ title?: string | undefined;
630
+ detail?: string | undefined;
631
+ source?: {
632
+ pointer?: string | undefined;
633
+ parameter?: string | undefined;
634
+ } | undefined;
635
+ }, {
636
+ status?: string | undefined;
637
+ code?: string | undefined;
638
+ id?: string | undefined;
639
+ links?: {
640
+ about?: string | undefined;
641
+ } | undefined;
642
+ meta?: Record<string, unknown> | undefined;
643
+ title?: string | undefined;
644
+ detail?: string | undefined;
645
+ source?: {
646
+ pointer?: string | undefined;
647
+ parameter?: string | undefined;
648
+ } | undefined;
649
+ }>, "many">;
650
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
651
+ }, "strip", z.ZodTypeAny, {
652
+ errors: {
653
+ status?: string | undefined;
654
+ code?: string | undefined;
655
+ id?: string | undefined;
656
+ links?: {
657
+ about?: string | undefined;
658
+ } | undefined;
659
+ meta?: Record<string, unknown> | undefined;
660
+ title?: string | undefined;
661
+ detail?: string | undefined;
662
+ source?: {
663
+ pointer?: string | undefined;
664
+ parameter?: string | undefined;
665
+ } | undefined;
666
+ }[];
667
+ meta?: Record<string, unknown> | undefined;
668
+ }, {
669
+ errors: {
670
+ status?: string | undefined;
671
+ code?: string | undefined;
672
+ id?: string | undefined;
673
+ links?: {
674
+ about?: string | undefined;
675
+ } | undefined;
676
+ meta?: Record<string, unknown> | undefined;
677
+ title?: string | undefined;
678
+ detail?: string | undefined;
679
+ source?: {
680
+ pointer?: string | undefined;
681
+ parameter?: string | undefined;
682
+ } | undefined;
683
+ }[];
684
+ meta?: Record<string, unknown> | undefined;
685
+ }>;
686
+ 404: z.ZodObject<{
687
+ errors: z.ZodArray<z.ZodObject<{
688
+ id: z.ZodOptional<z.ZodString>;
689
+ links: z.ZodOptional<z.ZodObject<{
690
+ about: z.ZodOptional<z.ZodString>;
691
+ }, "strip", z.ZodTypeAny, {
692
+ about?: string | undefined;
693
+ }, {
694
+ about?: string | undefined;
695
+ }>>;
696
+ status: z.ZodOptional<z.ZodString>;
697
+ code: z.ZodOptional<z.ZodString>;
698
+ title: z.ZodOptional<z.ZodString>;
699
+ detail: z.ZodOptional<z.ZodString>;
700
+ source: z.ZodOptional<z.ZodObject<{
701
+ pointer: z.ZodOptional<z.ZodString>;
702
+ parameter: z.ZodOptional<z.ZodString>;
703
+ }, "strip", z.ZodTypeAny, {
704
+ pointer?: string | undefined;
705
+ parameter?: string | undefined;
706
+ }, {
707
+ pointer?: string | undefined;
708
+ parameter?: string | undefined;
709
+ }>>;
710
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
711
+ }, "strip", z.ZodTypeAny, {
712
+ status?: string | undefined;
713
+ code?: string | undefined;
714
+ id?: string | undefined;
715
+ links?: {
716
+ about?: string | undefined;
717
+ } | undefined;
718
+ meta?: Record<string, unknown> | undefined;
719
+ title?: string | undefined;
720
+ detail?: string | undefined;
721
+ source?: {
722
+ pointer?: string | undefined;
723
+ parameter?: string | undefined;
724
+ } | undefined;
725
+ }, {
726
+ status?: string | undefined;
727
+ code?: string | undefined;
728
+ id?: string | undefined;
729
+ links?: {
730
+ about?: string | undefined;
731
+ } | undefined;
732
+ meta?: Record<string, unknown> | undefined;
733
+ title?: string | undefined;
734
+ detail?: string | undefined;
735
+ source?: {
736
+ pointer?: string | undefined;
737
+ parameter?: string | undefined;
738
+ } | undefined;
739
+ }>, "many">;
740
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
741
+ }, "strip", z.ZodTypeAny, {
742
+ errors: {
743
+ status?: string | undefined;
744
+ code?: string | undefined;
745
+ id?: string | undefined;
746
+ links?: {
747
+ about?: string | undefined;
748
+ } | undefined;
749
+ meta?: Record<string, unknown> | undefined;
750
+ title?: string | undefined;
751
+ detail?: string | undefined;
752
+ source?: {
753
+ pointer?: string | undefined;
754
+ parameter?: string | undefined;
755
+ } | undefined;
756
+ }[];
757
+ meta?: Record<string, unknown> | undefined;
758
+ }, {
759
+ errors: {
760
+ status?: string | undefined;
761
+ code?: string | undefined;
762
+ id?: string | undefined;
763
+ links?: {
764
+ about?: string | undefined;
765
+ } | undefined;
766
+ meta?: Record<string, unknown> | undefined;
767
+ title?: string | undefined;
768
+ detail?: string | undefined;
769
+ source?: {
770
+ pointer?: string | undefined;
771
+ parameter?: string | undefined;
772
+ } | undefined;
773
+ }[];
774
+ meta?: Record<string, unknown> | undefined;
775
+ }>;
776
+ 401: z.ZodObject<{
777
+ errors: z.ZodArray<z.ZodObject<{
778
+ id: z.ZodOptional<z.ZodString>;
779
+ links: z.ZodOptional<z.ZodObject<{
780
+ about: z.ZodOptional<z.ZodString>;
781
+ }, "strip", z.ZodTypeAny, {
782
+ about?: string | undefined;
783
+ }, {
784
+ about?: string | undefined;
785
+ }>>;
786
+ status: z.ZodOptional<z.ZodString>;
787
+ code: z.ZodOptional<z.ZodString>;
788
+ title: z.ZodOptional<z.ZodString>;
789
+ detail: z.ZodOptional<z.ZodString>;
790
+ source: z.ZodOptional<z.ZodObject<{
791
+ pointer: z.ZodOptional<z.ZodString>;
792
+ parameter: z.ZodOptional<z.ZodString>;
793
+ }, "strip", z.ZodTypeAny, {
794
+ pointer?: string | undefined;
795
+ parameter?: string | undefined;
796
+ }, {
797
+ pointer?: string | undefined;
798
+ parameter?: string | undefined;
799
+ }>>;
800
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
801
+ }, "strip", z.ZodTypeAny, {
802
+ status?: string | undefined;
803
+ code?: string | undefined;
804
+ id?: string | undefined;
805
+ links?: {
806
+ about?: string | undefined;
807
+ } | undefined;
808
+ meta?: Record<string, unknown> | undefined;
809
+ title?: string | undefined;
810
+ detail?: string | undefined;
811
+ source?: {
812
+ pointer?: string | undefined;
813
+ parameter?: string | undefined;
814
+ } | undefined;
815
+ }, {
816
+ status?: string | undefined;
817
+ code?: string | undefined;
818
+ id?: string | undefined;
819
+ links?: {
820
+ about?: string | undefined;
821
+ } | undefined;
822
+ meta?: Record<string, unknown> | undefined;
823
+ title?: string | undefined;
824
+ detail?: string | undefined;
825
+ source?: {
826
+ pointer?: string | undefined;
827
+ parameter?: string | undefined;
828
+ } | undefined;
829
+ }>, "many">;
830
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
831
+ }, "strip", z.ZodTypeAny, {
832
+ errors: {
833
+ status?: string | undefined;
834
+ code?: string | undefined;
835
+ id?: string | undefined;
836
+ links?: {
837
+ about?: string | undefined;
838
+ } | undefined;
839
+ meta?: Record<string, unknown> | undefined;
840
+ title?: string | undefined;
841
+ detail?: string | undefined;
842
+ source?: {
843
+ pointer?: string | undefined;
844
+ parameter?: string | undefined;
845
+ } | undefined;
846
+ }[];
847
+ meta?: Record<string, unknown> | undefined;
848
+ }, {
849
+ errors: {
850
+ status?: string | undefined;
851
+ code?: string | undefined;
852
+ id?: string | undefined;
853
+ links?: {
854
+ about?: string | undefined;
855
+ } | undefined;
856
+ meta?: Record<string, unknown> | undefined;
857
+ title?: string | undefined;
858
+ detail?: string | undefined;
859
+ source?: {
860
+ pointer?: string | undefined;
861
+ parameter?: string | undefined;
862
+ } | undefined;
863
+ }[];
864
+ meta?: Record<string, unknown> | undefined;
865
+ }>;
866
+ };
867
+ };
868
+ uploadFileToDocument: {
869
+ pathParams: z.ZodObject<{
870
+ farmId: z.ZodString;
871
+ id: z.ZodString;
872
+ }, "strip", z.ZodTypeAny, {
873
+ id: string;
874
+ farmId: string;
875
+ }, {
876
+ id: string;
877
+ farmId: string;
878
+ }>;
879
+ summary: "Upload file to existing document";
880
+ description: "Upload a file to an existing document record and update it with the file URL";
881
+ method: "POST";
882
+ contentType: "multipart/form-data";
883
+ body: import("@ts-rest/core").ContractPlainType<{
884
+ file: File;
885
+ }>;
886
+ path: "/farms/:farmId/documents/:id/upload";
887
+ responses: {
888
+ 200: z.ZodObject<{
889
+ data: z.ZodObject<{
890
+ type: z.ZodLiteral<string>;
891
+ id: z.ZodString;
892
+ attributes: z.ZodObject<{
893
+ farmId: z.ZodString;
894
+ name: z.ZodString;
895
+ type: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
896
+ category: z.ZodNullable<z.ZodString>;
897
+ fileUrl: z.ZodString;
898
+ fileSize: z.ZodNullable<z.ZodNumber>;
899
+ uploadedDate: z.ZodString;
900
+ uploadedBy: z.ZodNullable<z.ZodString>;
901
+ relatedTo: z.ZodNullable<z.ZodObject<{
902
+ type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
903
+ id: z.ZodString;
904
+ }, "strip", z.ZodTypeAny, {
905
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
906
+ id: string;
907
+ }, {
908
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
909
+ id: string;
910
+ }>>;
911
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
912
+ description: z.ZodNullable<z.ZodString>;
913
+ } & {
914
+ createdAt: z.ZodString;
915
+ updatedAt: z.ZodString;
916
+ }, "strip", z.ZodTypeAny, {
917
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
918
+ createdAt: string;
919
+ updatedAt: string;
920
+ name: string;
921
+ description: string | null;
922
+ farmId: string;
923
+ category: string | null;
924
+ fileUrl: string;
925
+ fileSize: number | null;
926
+ uploadedDate: string;
927
+ uploadedBy: string | null;
928
+ relatedTo: {
929
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
930
+ id: string;
931
+ } | null;
932
+ tags?: string[] | undefined;
933
+ }, {
934
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
935
+ createdAt: string;
936
+ updatedAt: string;
937
+ name: string;
938
+ description: string | null;
939
+ farmId: string;
940
+ category: string | null;
941
+ fileUrl: string;
942
+ fileSize: number | null;
943
+ uploadedDate: string;
944
+ uploadedBy: string | null;
945
+ relatedTo: {
946
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
947
+ id: string;
948
+ } | null;
949
+ tags?: string[] | undefined;
950
+ }>;
951
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
952
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
953
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
954
+ }, "strip", z.ZodTypeAny, {
955
+ type: string;
956
+ id: string;
957
+ attributes: {
958
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
959
+ createdAt: string;
960
+ updatedAt: string;
961
+ name: string;
962
+ description: string | null;
963
+ farmId: string;
964
+ category: string | null;
965
+ fileUrl: string;
966
+ fileSize: number | null;
967
+ uploadedDate: string;
968
+ uploadedBy: string | null;
969
+ relatedTo: {
970
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
971
+ id: string;
972
+ } | null;
973
+ tags?: string[] | undefined;
974
+ };
975
+ relationships?: Record<string, unknown> | undefined;
976
+ links?: Record<string, string> | undefined;
977
+ meta?: Record<string, unknown> | undefined;
978
+ }, {
979
+ type: string;
980
+ id: string;
981
+ attributes: {
982
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
983
+ createdAt: string;
984
+ updatedAt: string;
985
+ name: string;
986
+ description: string | null;
987
+ farmId: string;
988
+ category: string | null;
989
+ fileUrl: string;
990
+ fileSize: number | null;
991
+ uploadedDate: string;
992
+ uploadedBy: string | null;
993
+ relatedTo: {
994
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
995
+ id: string;
996
+ } | null;
997
+ tags?: string[] | undefined;
998
+ };
999
+ relationships?: Record<string, unknown> | undefined;
1000
+ links?: Record<string, string> | undefined;
1001
+ meta?: Record<string, unknown> | undefined;
1002
+ }>;
1003
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
1004
+ type: z.ZodString;
1005
+ id: z.ZodString;
1006
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1007
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1008
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1009
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1010
+ }, "strip", z.ZodTypeAny, {
1011
+ type: string;
1012
+ id: string;
1013
+ attributes?: Record<string, unknown> | undefined;
1014
+ relationships?: Record<string, unknown> | undefined;
1015
+ links?: Record<string, string> | undefined;
1016
+ meta?: Record<string, unknown> | undefined;
1017
+ }, {
1018
+ type: string;
1019
+ id: string;
1020
+ attributes?: Record<string, unknown> | undefined;
1021
+ relationships?: Record<string, unknown> | undefined;
1022
+ links?: Record<string, string> | undefined;
1023
+ meta?: Record<string, unknown> | undefined;
1024
+ }>, "many">>;
1025
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1026
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1027
+ }, "strip", z.ZodTypeAny, {
1028
+ data: {
1029
+ type: string;
1030
+ id: string;
1031
+ attributes: {
1032
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
1033
+ createdAt: string;
1034
+ updatedAt: string;
1035
+ name: string;
1036
+ description: string | null;
1037
+ farmId: string;
1038
+ category: string | null;
1039
+ fileUrl: string;
1040
+ fileSize: number | null;
1041
+ uploadedDate: string;
1042
+ uploadedBy: string | null;
1043
+ relatedTo: {
1044
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
1045
+ id: string;
1046
+ } | null;
1047
+ tags?: string[] | undefined;
1048
+ };
1049
+ relationships?: Record<string, unknown> | undefined;
1050
+ links?: Record<string, string> | undefined;
1051
+ meta?: Record<string, unknown> | undefined;
1052
+ };
1053
+ links?: Record<string, string> | undefined;
1054
+ meta?: Record<string, unknown> | undefined;
1055
+ included?: {
1056
+ type: string;
1057
+ id: string;
1058
+ attributes?: Record<string, unknown> | undefined;
1059
+ relationships?: Record<string, unknown> | undefined;
1060
+ links?: Record<string, string> | undefined;
1061
+ meta?: Record<string, unknown> | undefined;
1062
+ }[] | undefined;
1063
+ }, {
1064
+ data: {
1065
+ type: string;
1066
+ id: string;
1067
+ attributes: {
1068
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
1069
+ createdAt: string;
1070
+ updatedAt: string;
1071
+ name: string;
1072
+ description: string | null;
1073
+ farmId: string;
1074
+ category: string | null;
1075
+ fileUrl: string;
1076
+ fileSize: number | null;
1077
+ uploadedDate: string;
1078
+ uploadedBy: string | null;
1079
+ relatedTo: {
1080
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
1081
+ id: string;
1082
+ } | null;
1083
+ tags?: string[] | undefined;
1084
+ };
1085
+ relationships?: Record<string, unknown> | undefined;
1086
+ links?: Record<string, string> | undefined;
1087
+ meta?: Record<string, unknown> | undefined;
1088
+ };
1089
+ links?: Record<string, string> | undefined;
1090
+ meta?: Record<string, unknown> | undefined;
1091
+ included?: {
1092
+ type: string;
1093
+ id: string;
1094
+ attributes?: Record<string, unknown> | undefined;
1095
+ relationships?: Record<string, unknown> | undefined;
1096
+ links?: Record<string, string> | undefined;
1097
+ meta?: Record<string, unknown> | undefined;
1098
+ }[] | undefined;
1099
+ }>;
1100
+ 400: z.ZodObject<{
1101
+ errors: z.ZodArray<z.ZodObject<{
1102
+ id: z.ZodOptional<z.ZodString>;
1103
+ links: z.ZodOptional<z.ZodObject<{
1104
+ about: z.ZodOptional<z.ZodString>;
1105
+ }, "strip", z.ZodTypeAny, {
1106
+ about?: string | undefined;
1107
+ }, {
1108
+ about?: string | undefined;
1109
+ }>>;
1110
+ status: z.ZodOptional<z.ZodString>;
1111
+ code: z.ZodOptional<z.ZodString>;
1112
+ title: z.ZodOptional<z.ZodString>;
1113
+ detail: z.ZodOptional<z.ZodString>;
1114
+ source: z.ZodOptional<z.ZodObject<{
1115
+ pointer: z.ZodOptional<z.ZodString>;
1116
+ parameter: z.ZodOptional<z.ZodString>;
1117
+ }, "strip", z.ZodTypeAny, {
1118
+ pointer?: string | undefined;
1119
+ parameter?: string | undefined;
1120
+ }, {
1121
+ pointer?: string | undefined;
1122
+ parameter?: string | undefined;
1123
+ }>>;
1124
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1125
+ }, "strip", z.ZodTypeAny, {
1126
+ status?: string | undefined;
1127
+ code?: string | undefined;
1128
+ id?: string | undefined;
1129
+ links?: {
1130
+ about?: string | undefined;
1131
+ } | undefined;
1132
+ meta?: Record<string, unknown> | undefined;
1133
+ title?: string | undefined;
1134
+ detail?: string | undefined;
1135
+ source?: {
1136
+ pointer?: string | undefined;
1137
+ parameter?: string | undefined;
1138
+ } | undefined;
1139
+ }, {
1140
+ status?: string | undefined;
1141
+ code?: string | undefined;
1142
+ id?: string | undefined;
1143
+ links?: {
1144
+ about?: string | undefined;
1145
+ } | undefined;
1146
+ meta?: Record<string, unknown> | undefined;
1147
+ title?: string | undefined;
1148
+ detail?: string | undefined;
1149
+ source?: {
1150
+ pointer?: string | undefined;
1151
+ parameter?: string | undefined;
1152
+ } | undefined;
1153
+ }>, "many">;
1154
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1155
+ }, "strip", z.ZodTypeAny, {
1156
+ errors: {
1157
+ status?: string | undefined;
1158
+ code?: string | undefined;
1159
+ id?: string | undefined;
1160
+ links?: {
1161
+ about?: string | undefined;
1162
+ } | undefined;
1163
+ meta?: Record<string, unknown> | undefined;
1164
+ title?: string | undefined;
1165
+ detail?: string | undefined;
1166
+ source?: {
1167
+ pointer?: string | undefined;
1168
+ parameter?: string | undefined;
1169
+ } | undefined;
1170
+ }[];
1171
+ meta?: Record<string, unknown> | undefined;
1172
+ }, {
1173
+ errors: {
1174
+ status?: string | undefined;
1175
+ code?: string | undefined;
1176
+ id?: string | undefined;
1177
+ links?: {
1178
+ about?: string | undefined;
1179
+ } | undefined;
1180
+ meta?: Record<string, unknown> | undefined;
1181
+ title?: string | undefined;
1182
+ detail?: string | undefined;
1183
+ source?: {
1184
+ pointer?: string | undefined;
1185
+ parameter?: string | undefined;
1186
+ } | undefined;
1187
+ }[];
1188
+ meta?: Record<string, unknown> | undefined;
1189
+ }>;
1190
+ 404: z.ZodObject<{
1191
+ errors: z.ZodArray<z.ZodObject<{
1192
+ id: z.ZodOptional<z.ZodString>;
1193
+ links: z.ZodOptional<z.ZodObject<{
1194
+ about: z.ZodOptional<z.ZodString>;
1195
+ }, "strip", z.ZodTypeAny, {
1196
+ about?: string | undefined;
1197
+ }, {
1198
+ about?: string | undefined;
1199
+ }>>;
1200
+ status: z.ZodOptional<z.ZodString>;
1201
+ code: z.ZodOptional<z.ZodString>;
1202
+ title: z.ZodOptional<z.ZodString>;
1203
+ detail: z.ZodOptional<z.ZodString>;
1204
+ source: z.ZodOptional<z.ZodObject<{
1205
+ pointer: z.ZodOptional<z.ZodString>;
1206
+ parameter: z.ZodOptional<z.ZodString>;
1207
+ }, "strip", z.ZodTypeAny, {
1208
+ pointer?: string | undefined;
1209
+ parameter?: string | undefined;
1210
+ }, {
1211
+ pointer?: string | undefined;
1212
+ parameter?: string | undefined;
1213
+ }>>;
1214
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1215
+ }, "strip", z.ZodTypeAny, {
1216
+ status?: string | undefined;
1217
+ code?: string | undefined;
1218
+ id?: string | undefined;
1219
+ links?: {
1220
+ about?: string | undefined;
1221
+ } | undefined;
1222
+ meta?: Record<string, unknown> | undefined;
1223
+ title?: string | undefined;
1224
+ detail?: string | undefined;
1225
+ source?: {
1226
+ pointer?: string | undefined;
1227
+ parameter?: string | undefined;
1228
+ } | undefined;
1229
+ }, {
1230
+ status?: string | undefined;
1231
+ code?: string | undefined;
1232
+ id?: string | undefined;
1233
+ links?: {
1234
+ about?: string | undefined;
1235
+ } | undefined;
1236
+ meta?: Record<string, unknown> | undefined;
1237
+ title?: string | undefined;
1238
+ detail?: string | undefined;
1239
+ source?: {
1240
+ pointer?: string | undefined;
1241
+ parameter?: string | undefined;
1242
+ } | undefined;
1243
+ }>, "many">;
1244
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1245
+ }, "strip", z.ZodTypeAny, {
1246
+ errors: {
1247
+ status?: string | undefined;
1248
+ code?: string | undefined;
1249
+ id?: string | undefined;
1250
+ links?: {
1251
+ about?: string | undefined;
1252
+ } | undefined;
1253
+ meta?: Record<string, unknown> | undefined;
1254
+ title?: string | undefined;
1255
+ detail?: string | undefined;
1256
+ source?: {
1257
+ pointer?: string | undefined;
1258
+ parameter?: string | undefined;
1259
+ } | undefined;
1260
+ }[];
1261
+ meta?: Record<string, unknown> | undefined;
1262
+ }, {
1263
+ errors: {
1264
+ status?: string | undefined;
1265
+ code?: string | undefined;
1266
+ id?: string | undefined;
1267
+ links?: {
1268
+ about?: string | undefined;
1269
+ } | undefined;
1270
+ meta?: Record<string, unknown> | undefined;
1271
+ title?: string | undefined;
1272
+ detail?: string | undefined;
1273
+ source?: {
1274
+ pointer?: string | undefined;
1275
+ parameter?: string | undefined;
1276
+ } | undefined;
1277
+ }[];
1278
+ meta?: Record<string, unknown> | undefined;
1279
+ }>;
1280
+ 401: z.ZodObject<{
1281
+ errors: z.ZodArray<z.ZodObject<{
1282
+ id: z.ZodOptional<z.ZodString>;
1283
+ links: z.ZodOptional<z.ZodObject<{
1284
+ about: z.ZodOptional<z.ZodString>;
1285
+ }, "strip", z.ZodTypeAny, {
1286
+ about?: string | undefined;
1287
+ }, {
1288
+ about?: string | undefined;
1289
+ }>>;
1290
+ status: z.ZodOptional<z.ZodString>;
1291
+ code: z.ZodOptional<z.ZodString>;
1292
+ title: z.ZodOptional<z.ZodString>;
1293
+ detail: z.ZodOptional<z.ZodString>;
1294
+ source: z.ZodOptional<z.ZodObject<{
1295
+ pointer: z.ZodOptional<z.ZodString>;
1296
+ parameter: z.ZodOptional<z.ZodString>;
1297
+ }, "strip", z.ZodTypeAny, {
1298
+ pointer?: string | undefined;
1299
+ parameter?: string | undefined;
1300
+ }, {
1301
+ pointer?: string | undefined;
1302
+ parameter?: string | undefined;
1303
+ }>>;
1304
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1305
+ }, "strip", z.ZodTypeAny, {
1306
+ status?: string | undefined;
1307
+ code?: string | undefined;
1308
+ id?: string | undefined;
1309
+ links?: {
1310
+ about?: string | undefined;
1311
+ } | undefined;
1312
+ meta?: Record<string, unknown> | undefined;
1313
+ title?: string | undefined;
1314
+ detail?: string | undefined;
1315
+ source?: {
1316
+ pointer?: string | undefined;
1317
+ parameter?: string | undefined;
1318
+ } | undefined;
1319
+ }, {
1320
+ status?: string | undefined;
1321
+ code?: string | undefined;
1322
+ id?: string | undefined;
1323
+ links?: {
1324
+ about?: string | undefined;
1325
+ } | undefined;
1326
+ meta?: Record<string, unknown> | undefined;
1327
+ title?: string | undefined;
1328
+ detail?: string | undefined;
1329
+ source?: {
1330
+ pointer?: string | undefined;
1331
+ parameter?: string | undefined;
1332
+ } | undefined;
1333
+ }>, "many">;
1334
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1335
+ }, "strip", z.ZodTypeAny, {
1336
+ errors: {
1337
+ status?: string | undefined;
1338
+ code?: string | undefined;
1339
+ id?: string | undefined;
1340
+ links?: {
1341
+ about?: string | undefined;
1342
+ } | undefined;
1343
+ meta?: Record<string, unknown> | undefined;
1344
+ title?: string | undefined;
1345
+ detail?: string | undefined;
1346
+ source?: {
1347
+ pointer?: string | undefined;
1348
+ parameter?: string | undefined;
1349
+ } | undefined;
1350
+ }[];
1351
+ meta?: Record<string, unknown> | undefined;
1352
+ }, {
1353
+ errors: {
1354
+ status?: string | undefined;
1355
+ code?: string | undefined;
1356
+ id?: string | undefined;
1357
+ links?: {
1358
+ about?: string | undefined;
1359
+ } | undefined;
1360
+ meta?: Record<string, unknown> | undefined;
1361
+ title?: string | undefined;
1362
+ detail?: string | undefined;
1363
+ source?: {
1364
+ pointer?: string | undefined;
1365
+ parameter?: string | undefined;
1366
+ } | undefined;
1367
+ }[];
1368
+ meta?: Record<string, unknown> | undefined;
1369
+ }>;
1370
+ };
1371
+ };
451
1372
  createDocument: {
452
1373
  pathParams: z.ZodObject<{
453
1374
  farmId: z.ZodString;
@@ -466,7 +1387,7 @@ export declare const documentsRouter: {
466
1387
  name: z.ZodString;
467
1388
  type: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
468
1389
  category: z.ZodOptional<z.ZodString>;
469
- fileUrl: z.ZodString;
1390
+ fileUrl: z.ZodOptional<z.ZodString>;
470
1391
  fileSize: z.ZodOptional<z.ZodNumber>;
471
1392
  relatedTo: z.ZodOptional<z.ZodObject<{
472
1393
  type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
@@ -483,9 +1404,9 @@ export declare const documentsRouter: {
483
1404
  }, "strip", z.ZodTypeAny, {
484
1405
  type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
485
1406
  name: string;
486
- fileUrl: string;
487
1407
  description?: string | undefined;
488
1408
  category?: string | undefined;
1409
+ fileUrl?: string | undefined;
489
1410
  fileSize?: number | undefined;
490
1411
  relatedTo?: {
491
1412
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
@@ -495,9 +1416,9 @@ export declare const documentsRouter: {
495
1416
  }, {
496
1417
  type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
497
1418
  name: string;
498
- fileUrl: string;
499
1419
  description?: string | undefined;
500
1420
  category?: string | undefined;
1421
+ fileUrl?: string | undefined;
501
1422
  fileSize?: number | undefined;
502
1423
  relatedTo?: {
503
1424
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
@@ -510,9 +1431,9 @@ export declare const documentsRouter: {
510
1431
  attributes: {
511
1432
  type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
512
1433
  name: string;
513
- fileUrl: string;
514
1434
  description?: string | undefined;
515
1435
  category?: string | undefined;
1436
+ fileUrl?: string | undefined;
516
1437
  fileSize?: number | undefined;
517
1438
  relatedTo?: {
518
1439
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
@@ -525,9 +1446,9 @@ export declare const documentsRouter: {
525
1446
  attributes: {
526
1447
  type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
527
1448
  name: string;
528
- fileUrl: string;
529
1449
  description?: string | undefined;
530
1450
  category?: string | undefined;
1451
+ fileUrl?: string | undefined;
531
1452
  fileSize?: number | undefined;
532
1453
  relatedTo?: {
533
1454
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
@@ -542,9 +1463,9 @@ export declare const documentsRouter: {
542
1463
  attributes: {
543
1464
  type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
544
1465
  name: string;
545
- fileUrl: string;
546
1466
  description?: string | undefined;
547
1467
  category?: string | undefined;
1468
+ fileUrl?: string | undefined;
548
1469
  fileSize?: number | undefined;
549
1470
  relatedTo?: {
550
1471
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
@@ -559,9 +1480,9 @@ export declare const documentsRouter: {
559
1480
  attributes: {
560
1481
  type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
561
1482
  name: string;
562
- fileUrl: string;
563
1483
  description?: string | undefined;
564
1484
  category?: string | undefined;
1485
+ fileUrl?: string | undefined;
565
1486
  fileSize?: number | undefined;
566
1487
  relatedTo?: {
567
1488
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
@@ -1586,6 +2507,8 @@ export declare const documentsRouter: {
1586
2507
  name: z.ZodOptional<z.ZodString>;
1587
2508
  type: z.ZodOptional<z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>>;
1588
2509
  category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2510
+ fileUrl: z.ZodOptional<z.ZodString>;
2511
+ fileSize: z.ZodOptional<z.ZodNumber>;
1589
2512
  relatedTo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1590
2513
  type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
1591
2514
  id: z.ZodString;
@@ -1603,6 +2526,8 @@ export declare const documentsRouter: {
1603
2526
  name?: string | undefined;
1604
2527
  description?: string | null | undefined;
1605
2528
  category?: string | null | undefined;
2529
+ fileUrl?: string | undefined;
2530
+ fileSize?: number | undefined;
1606
2531
  relatedTo?: {
1607
2532
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
1608
2533
  id: string;
@@ -1613,6 +2538,8 @@ export declare const documentsRouter: {
1613
2538
  name?: string | undefined;
1614
2539
  description?: string | null | undefined;
1615
2540
  category?: string | null | undefined;
2541
+ fileUrl?: string | undefined;
2542
+ fileSize?: number | undefined;
1616
2543
  relatedTo?: {
1617
2544
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
1618
2545
  id: string;
@@ -1627,6 +2554,8 @@ export declare const documentsRouter: {
1627
2554
  name?: string | undefined;
1628
2555
  description?: string | null | undefined;
1629
2556
  category?: string | null | undefined;
2557
+ fileUrl?: string | undefined;
2558
+ fileSize?: number | undefined;
1630
2559
  relatedTo?: {
1631
2560
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
1632
2561
  id: string;
@@ -1641,6 +2570,8 @@ export declare const documentsRouter: {
1641
2570
  name?: string | undefined;
1642
2571
  description?: string | null | undefined;
1643
2572
  category?: string | null | undefined;
2573
+ fileUrl?: string | undefined;
2574
+ fileSize?: number | undefined;
1644
2575
  relatedTo?: {
1645
2576
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
1646
2577
  id: string;
@@ -1657,6 +2588,8 @@ export declare const documentsRouter: {
1657
2588
  name?: string | undefined;
1658
2589
  description?: string | null | undefined;
1659
2590
  category?: string | null | undefined;
2591
+ fileUrl?: string | undefined;
2592
+ fileSize?: number | undefined;
1660
2593
  relatedTo?: {
1661
2594
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
1662
2595
  id: string;
@@ -1673,6 +2606,8 @@ export declare const documentsRouter: {
1673
2606
  name?: string | undefined;
1674
2607
  description?: string | null | undefined;
1675
2608
  category?: string | null | undefined;
2609
+ fileUrl?: string | undefined;
2610
+ fileSize?: number | undefined;
1676
2611
  relatedTo?: {
1677
2612
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
1678
2613
  id: string;