@deepintel-ltd/farmpro-contracts 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * @module @farmpro/contracts
7
7
  */
8
8
  export { apiContract } from './routes';
9
- export type { ApiContractType, ApiContractDefinition, AuthEndpoints, UsersEndpoints, FarmsEndpoints, FieldsEndpoints, TasksEndpoints, InventoryEndpoints, FinanceEndpoints, HarvestEndpoints, SoilTestsEndpoints, WeatherEndpoints, TeamEndpoints, EquipmentEndpoints, DocumentsEndpoints, SuppliersEndpoints, AnalyticsEndpoints, CategoriesEndpoints, AgentsEndpoints, AgentWorkflowsEndpoints, FieldMonitoringEndpoints, FieldObservationsEndpoints, AdminEndpoints, } from './routes';
9
+ export type { ApiContractType, ApiContractDefinition, AuthEndpoints, UsersEndpoints, FarmsEndpoints, FieldsEndpoints, TasksEndpoints, InventoryEndpoints, FinanceEndpoints, HarvestEndpoints, SoilTestsEndpoints, WeatherEndpoints, TeamEndpoints, EquipmentEndpoints, DocumentsEndpoints, SuppliersEndpoints, AnalyticsEndpoints, CategoriesEndpoints, AgentsEndpoints, AgentWorkflowsEndpoints, FieldMonitoringEndpoints, FieldObservationsEndpoints, AdminEndpoints, HealthEndpoints, } from './routes';
10
10
  export { authRouter } from './routes/auth.routes';
11
11
  export { usersRouter } from './routes/users.routes';
12
12
  export { farmsRouter } from './routes/farms.routes';
@@ -28,6 +28,7 @@ export { agentWorkflowsRouter } from './routes/agent-workflows.routes';
28
28
  export { fieldMonitoringRouter } from './routes/field-monitoring.routes';
29
29
  export { fieldObservationsRouter } from './routes/field-observations.routes';
30
30
  export { adminRouter } from './routes/admin.routes';
31
+ export { healthRouter } from './routes/health.routes';
31
32
  export * from './schemas/common.schemas';
32
33
  export * from './schemas/auth.schemas';
33
34
  export * from './schemas/users.schemas';
@@ -50,4 +51,5 @@ export * from './schemas/agent-workflows.schemas';
50
51
  export * from './schemas/recommendations.schemas';
51
52
  export * from './schemas/field-monitoring.schemas';
52
53
  export * from './schemas/field-observations.schemas';
54
+ export * from './schemas/health.schemas';
53
55
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,cAAc,GACf,MAAM,UAAU,CAAC;AAMlB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CA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AAiC,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAMtD,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0BAA0B,CAAC"}
package/dist/index.js CHANGED
@@ -21,7 +21,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
21
21
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
22
22
  };
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.adminRouter = exports.fieldObservationsRouter = exports.fieldMonitoringRouter = exports.agentWorkflowsRouter = exports.agentsRouter = exports.categoriesRouter = exports.analyticsRouter = exports.suppliersRouter = exports.documentsRouter = exports.equipmentRouter = exports.teamRouter = exports.weatherRouter = exports.soilTestsRouter = exports.harvestRouter = exports.financeRouter = exports.inventoryRouter = exports.tasksRouter = exports.fieldsRouter = exports.farmsRouter = exports.usersRouter = exports.authRouter = exports.apiContract = void 0;
24
+ exports.healthRouter = exports.adminRouter = exports.fieldObservationsRouter = exports.fieldMonitoringRouter = exports.agentWorkflowsRouter = exports.agentsRouter = exports.categoriesRouter = exports.analyticsRouter = exports.suppliersRouter = exports.documentsRouter = exports.equipmentRouter = exports.teamRouter = exports.weatherRouter = exports.soilTestsRouter = exports.harvestRouter = exports.financeRouter = exports.inventoryRouter = exports.tasksRouter = exports.fieldsRouter = exports.farmsRouter = exports.usersRouter = exports.authRouter = exports.apiContract = void 0;
25
25
  // =============================================================================
26
26
  // Main API Contract
27
27
  // =============================================================================
@@ -72,6 +72,8 @@ var field_observations_routes_1 = require("./routes/field-observations.routes");
72
72
  Object.defineProperty(exports, "fieldObservationsRouter", { enumerable: true, get: function () { return field_observations_routes_1.fieldObservationsRouter; } });
73
73
  var admin_routes_1 = require("./routes/admin.routes");
74
74
  Object.defineProperty(exports, "adminRouter", { enumerable: true, get: function () { return admin_routes_1.adminRouter; } });
75
+ var health_routes_1 = require("./routes/health.routes");
76
+ Object.defineProperty(exports, "healthRouter", { enumerable: true, get: function () { return health_routes_1.healthRouter; } });
75
77
  // =============================================================================
76
78
  // Schemas
77
79
  // =============================================================================
@@ -97,3 +99,4 @@ __exportStar(require("./schemas/agent-workflows.schemas"), exports);
97
99
  __exportStar(require("./schemas/recommendations.schemas"), exports);
98
100
  __exportStar(require("./schemas/field-monitoring.schemas"), exports);
99
101
  __exportStar(require("./schemas/field-observations.schemas"), exports);
102
+ __exportStar(require("./schemas/health.schemas"), exports);
@@ -448,6 +448,423 @@ 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
+ };
451
868
  createDocument: {
452
869
  pathParams: z.ZodObject<{
453
870
  farmId: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"documents.routes.d.ts","sourceRoot":"","sources":["../../src/routes/documents.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkF3B,CAAC"}
@@ -29,6 +29,22 @@ exports.documentsRouter = c.router({
29
29
  summary: 'List documents',
30
30
  description: 'Get all documents for a farm with optional filtering',
31
31
  },
32
+ // Upload document file
33
+ uploadDocumentFile: {
34
+ method: 'POST',
35
+ path: '/farms/:farmId/documents/upload',
36
+ contentType: 'multipart/form-data',
37
+ pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
38
+ body: c.type(),
39
+ responses: {
40
+ 200: documents_schemas_1.uploadedFileResponseSchema,
41
+ 400: common_schemas_1.jsonApiErrorResponseSchema,
42
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
43
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
44
+ },
45
+ summary: 'Upload document file',
46
+ description: 'Upload a file and get back the file URL in JSON:API format',
47
+ },
32
48
  // Create document
33
49
  createDocument: {
34
50
  method: 'POST',