@deepintel-ltd/farmpro-contracts 1.4.2 → 1.5.1
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/routes/agent-workflows.routes.js +6 -6
- package/dist/routes/documents.routes.d.ts +378 -15
- package/dist/routes/documents.routes.d.ts.map +1 -1
- package/dist/routes/documents.routes.js +16 -1
- package/dist/routes/farms.routes.d.ts +42 -0
- package/dist/routes/farms.routes.d.ts.map +1 -1
- package/dist/routes/field-monitoring.routes.d.ts +290 -4
- package/dist/routes/field-monitoring.routes.d.ts.map +1 -1
- package/dist/routes/field-monitoring.routes.js +48 -1
- package/dist/routes/field-observations.routes.d.ts +6 -6
- package/dist/routes/tasks.routes.d.ts +10 -4
- package/dist/routes/tasks.routes.d.ts.map +1 -1
- package/dist/routes/team.routes.d.ts +343 -0
- package/dist/routes/team.routes.d.ts.map +1 -1
- package/dist/routes/team.routes.js +26 -0
- package/dist/schemas/documents.schemas.d.ts +77 -18
- package/dist/schemas/documents.schemas.d.ts.map +1 -1
- package/dist/schemas/documents.schemas.js +6 -3
- package/dist/schemas/farms.schemas.d.ts +51 -0
- package/dist/schemas/farms.schemas.d.ts.map +1 -1
- package/dist/schemas/farms.schemas.js +5 -1
- package/dist/schemas/field-monitoring.schemas.d.ts +9 -3
- package/dist/schemas/field-monitoring.schemas.d.ts.map +1 -1
- package/dist/schemas/field-monitoring.schemas.js +3 -1
- package/dist/schemas/field-observations.schemas.d.ts +3 -3
- package/dist/schemas/field-observations.schemas.js +1 -1
- package/dist/schemas/tasks.schemas.d.ts +17 -5
- package/dist/schemas/tasks.schemas.d.ts.map +1 -1
- package/dist/schemas/tasks.schemas.js +9 -1
- package/dist/schemas/team.schemas.d.ts +8 -0
- package/dist/schemas/team.schemas.d.ts.map +1 -1
- package/dist/schemas/team.schemas.js +1 -0
- package/package.json +1 -1
|
@@ -20,6 +20,8 @@ export declare const documentAttributesSchema: z.ZodObject<{
|
|
|
20
20
|
type: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
|
|
21
21
|
category: z.ZodNullable<z.ZodString>;
|
|
22
22
|
fileUrl: z.ZodString;
|
|
23
|
+
viewUrl: z.ZodOptional<z.ZodString>;
|
|
24
|
+
fileExtension: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
25
|
fileSize: z.ZodNullable<z.ZodNumber>;
|
|
24
26
|
uploadedDate: z.ZodString;
|
|
25
27
|
uploadedBy: z.ZodNullable<z.ZodString>;
|
|
@@ -54,6 +56,8 @@ export declare const documentAttributesSchema: z.ZodObject<{
|
|
|
54
56
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
55
57
|
id: string;
|
|
56
58
|
} | null;
|
|
59
|
+
viewUrl?: string | undefined;
|
|
60
|
+
fileExtension?: string | null | undefined;
|
|
57
61
|
tags?: string[] | undefined;
|
|
58
62
|
}, {
|
|
59
63
|
type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
|
|
@@ -71,6 +75,8 @@ export declare const documentAttributesSchema: z.ZodObject<{
|
|
|
71
75
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
72
76
|
id: string;
|
|
73
77
|
} | null;
|
|
78
|
+
viewUrl?: string | undefined;
|
|
79
|
+
fileExtension?: string | null | undefined;
|
|
74
80
|
tags?: string[] | undefined;
|
|
75
81
|
}>;
|
|
76
82
|
export declare const createDocumentAttributesSchema: z.ZodObject<{
|
|
@@ -323,6 +329,8 @@ export declare const documentResourceSchema: z.ZodObject<{
|
|
|
323
329
|
type: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
|
|
324
330
|
category: z.ZodNullable<z.ZodString>;
|
|
325
331
|
fileUrl: z.ZodString;
|
|
332
|
+
viewUrl: z.ZodOptional<z.ZodString>;
|
|
333
|
+
fileExtension: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
326
334
|
fileSize: z.ZodNullable<z.ZodNumber>;
|
|
327
335
|
uploadedDate: z.ZodString;
|
|
328
336
|
uploadedBy: z.ZodNullable<z.ZodString>;
|
|
@@ -357,6 +365,8 @@ export declare const documentResourceSchema: z.ZodObject<{
|
|
|
357
365
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
358
366
|
id: string;
|
|
359
367
|
} | null;
|
|
368
|
+
viewUrl?: string | undefined;
|
|
369
|
+
fileExtension?: string | null | undefined;
|
|
360
370
|
tags?: string[] | undefined;
|
|
361
371
|
}, {
|
|
362
372
|
type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
|
|
@@ -374,6 +384,8 @@ export declare const documentResourceSchema: z.ZodObject<{
|
|
|
374
384
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
375
385
|
id: string;
|
|
376
386
|
} | null;
|
|
387
|
+
viewUrl?: string | undefined;
|
|
388
|
+
fileExtension?: string | null | undefined;
|
|
377
389
|
tags?: string[] | undefined;
|
|
378
390
|
}>;
|
|
379
391
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -398,6 +410,8 @@ export declare const documentResourceSchema: z.ZodObject<{
|
|
|
398
410
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
399
411
|
id: string;
|
|
400
412
|
} | null;
|
|
413
|
+
viewUrl?: string | undefined;
|
|
414
|
+
fileExtension?: string | null | undefined;
|
|
401
415
|
tags?: string[] | undefined;
|
|
402
416
|
};
|
|
403
417
|
relationships?: Record<string, unknown> | undefined;
|
|
@@ -422,6 +436,8 @@ export declare const documentResourceSchema: z.ZodObject<{
|
|
|
422
436
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
423
437
|
id: string;
|
|
424
438
|
} | null;
|
|
439
|
+
viewUrl?: string | undefined;
|
|
440
|
+
fileExtension?: string | null | undefined;
|
|
425
441
|
tags?: string[] | undefined;
|
|
426
442
|
};
|
|
427
443
|
relationships?: Record<string, unknown> | undefined;
|
|
@@ -438,6 +454,8 @@ export declare const documentResponseSchema: z.ZodObject<{
|
|
|
438
454
|
type: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
|
|
439
455
|
category: z.ZodNullable<z.ZodString>;
|
|
440
456
|
fileUrl: z.ZodString;
|
|
457
|
+
viewUrl: z.ZodOptional<z.ZodString>;
|
|
458
|
+
fileExtension: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
441
459
|
fileSize: z.ZodNullable<z.ZodNumber>;
|
|
442
460
|
uploadedDate: z.ZodString;
|
|
443
461
|
uploadedBy: z.ZodNullable<z.ZodString>;
|
|
@@ -472,6 +490,8 @@ export declare const documentResponseSchema: z.ZodObject<{
|
|
|
472
490
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
473
491
|
id: string;
|
|
474
492
|
} | null;
|
|
493
|
+
viewUrl?: string | undefined;
|
|
494
|
+
fileExtension?: string | null | undefined;
|
|
475
495
|
tags?: string[] | undefined;
|
|
476
496
|
}, {
|
|
477
497
|
type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
|
|
@@ -489,6 +509,8 @@ export declare const documentResponseSchema: z.ZodObject<{
|
|
|
489
509
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
490
510
|
id: string;
|
|
491
511
|
} | null;
|
|
512
|
+
viewUrl?: string | undefined;
|
|
513
|
+
fileExtension?: string | null | undefined;
|
|
492
514
|
tags?: string[] | undefined;
|
|
493
515
|
}>;
|
|
494
516
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -513,6 +535,8 @@ export declare const documentResponseSchema: z.ZodObject<{
|
|
|
513
535
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
514
536
|
id: string;
|
|
515
537
|
} | null;
|
|
538
|
+
viewUrl?: string | undefined;
|
|
539
|
+
fileExtension?: string | null | undefined;
|
|
516
540
|
tags?: string[] | undefined;
|
|
517
541
|
};
|
|
518
542
|
relationships?: Record<string, unknown> | undefined;
|
|
@@ -537,6 +561,8 @@ export declare const documentResponseSchema: z.ZodObject<{
|
|
|
537
561
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
538
562
|
id: string;
|
|
539
563
|
} | null;
|
|
564
|
+
viewUrl?: string | undefined;
|
|
565
|
+
fileExtension?: string | null | undefined;
|
|
540
566
|
tags?: string[] | undefined;
|
|
541
567
|
};
|
|
542
568
|
relationships?: Record<string, unknown> | undefined;
|
|
@@ -587,6 +613,8 @@ export declare const documentResponseSchema: z.ZodObject<{
|
|
|
587
613
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
588
614
|
id: string;
|
|
589
615
|
} | null;
|
|
616
|
+
viewUrl?: string | undefined;
|
|
617
|
+
fileExtension?: string | null | undefined;
|
|
590
618
|
tags?: string[] | undefined;
|
|
591
619
|
};
|
|
592
620
|
relationships?: Record<string, unknown> | undefined;
|
|
@@ -623,6 +651,8 @@ export declare const documentResponseSchema: z.ZodObject<{
|
|
|
623
651
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
624
652
|
id: string;
|
|
625
653
|
} | null;
|
|
654
|
+
viewUrl?: string | undefined;
|
|
655
|
+
fileExtension?: string | null | undefined;
|
|
626
656
|
tags?: string[] | undefined;
|
|
627
657
|
};
|
|
628
658
|
relationships?: Record<string, unknown> | undefined;
|
|
@@ -650,6 +680,8 @@ export declare const documentListResponseSchema: z.ZodObject<{
|
|
|
650
680
|
type: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
|
|
651
681
|
category: z.ZodNullable<z.ZodString>;
|
|
652
682
|
fileUrl: z.ZodString;
|
|
683
|
+
viewUrl: z.ZodOptional<z.ZodString>;
|
|
684
|
+
fileExtension: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
653
685
|
fileSize: z.ZodNullable<z.ZodNumber>;
|
|
654
686
|
uploadedDate: z.ZodString;
|
|
655
687
|
uploadedBy: z.ZodNullable<z.ZodString>;
|
|
@@ -684,6 +716,8 @@ export declare const documentListResponseSchema: z.ZodObject<{
|
|
|
684
716
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
685
717
|
id: string;
|
|
686
718
|
} | null;
|
|
719
|
+
viewUrl?: string | undefined;
|
|
720
|
+
fileExtension?: string | null | undefined;
|
|
687
721
|
tags?: string[] | undefined;
|
|
688
722
|
}, {
|
|
689
723
|
type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
|
|
@@ -701,6 +735,8 @@ export declare const documentListResponseSchema: z.ZodObject<{
|
|
|
701
735
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
702
736
|
id: string;
|
|
703
737
|
} | null;
|
|
738
|
+
viewUrl?: string | undefined;
|
|
739
|
+
fileExtension?: string | null | undefined;
|
|
704
740
|
tags?: string[] | undefined;
|
|
705
741
|
}>;
|
|
706
742
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -725,6 +761,8 @@ export declare const documentListResponseSchema: z.ZodObject<{
|
|
|
725
761
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
726
762
|
id: string;
|
|
727
763
|
} | null;
|
|
764
|
+
viewUrl?: string | undefined;
|
|
765
|
+
fileExtension?: string | null | undefined;
|
|
728
766
|
tags?: string[] | undefined;
|
|
729
767
|
};
|
|
730
768
|
relationships?: Record<string, unknown> | undefined;
|
|
@@ -749,6 +787,8 @@ export declare const documentListResponseSchema: z.ZodObject<{
|
|
|
749
787
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
750
788
|
id: string;
|
|
751
789
|
} | null;
|
|
790
|
+
viewUrl?: string | undefined;
|
|
791
|
+
fileExtension?: string | null | undefined;
|
|
752
792
|
tags?: string[] | undefined;
|
|
753
793
|
};
|
|
754
794
|
relationships?: Record<string, unknown> | undefined;
|
|
@@ -799,6 +839,8 @@ export declare const documentListResponseSchema: z.ZodObject<{
|
|
|
799
839
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
800
840
|
id: string;
|
|
801
841
|
} | null;
|
|
842
|
+
viewUrl?: string | undefined;
|
|
843
|
+
fileExtension?: string | null | undefined;
|
|
802
844
|
tags?: string[] | undefined;
|
|
803
845
|
};
|
|
804
846
|
relationships?: Record<string, unknown> | undefined;
|
|
@@ -835,6 +877,8 @@ export declare const documentListResponseSchema: z.ZodObject<{
|
|
|
835
877
|
type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
|
|
836
878
|
id: string;
|
|
837
879
|
} | null;
|
|
880
|
+
viewUrl?: string | undefined;
|
|
881
|
+
fileExtension?: string | null | undefined;
|
|
838
882
|
tags?: string[] | undefined;
|
|
839
883
|
};
|
|
840
884
|
relationships?: Record<string, unknown> | undefined;
|
|
@@ -853,45 +897,51 @@ export declare const documentListResponseSchema: z.ZodObject<{
|
|
|
853
897
|
}[] | undefined;
|
|
854
898
|
}>;
|
|
855
899
|
export declare const uploadedFileAttributesSchema: z.ZodObject<{
|
|
856
|
-
fileUrl: z.ZodString
|
|
900
|
+
fileUrl: z.ZodOptional<z.ZodString>;
|
|
901
|
+
viewUrl: z.ZodString;
|
|
857
902
|
fileSize: z.ZodNumber;
|
|
858
903
|
fileName: z.ZodString;
|
|
859
904
|
contentType: z.ZodOptional<z.ZodString>;
|
|
860
905
|
uploadedAt: z.ZodString;
|
|
861
906
|
}, "strip", z.ZodTypeAny, {
|
|
862
|
-
|
|
907
|
+
viewUrl: string;
|
|
863
908
|
fileSize: number;
|
|
864
909
|
fileName: string;
|
|
865
910
|
uploadedAt: string;
|
|
866
911
|
contentType?: string | undefined;
|
|
912
|
+
fileUrl?: string | undefined;
|
|
867
913
|
}, {
|
|
868
|
-
|
|
914
|
+
viewUrl: string;
|
|
869
915
|
fileSize: number;
|
|
870
916
|
fileName: string;
|
|
871
917
|
uploadedAt: string;
|
|
872
918
|
contentType?: string | undefined;
|
|
919
|
+
fileUrl?: string | undefined;
|
|
873
920
|
}>;
|
|
874
921
|
export declare const uploadedFileResourceSchema: z.ZodObject<{
|
|
875
922
|
type: z.ZodLiteral<string>;
|
|
876
923
|
id: z.ZodString;
|
|
877
924
|
attributes: z.ZodObject<{
|
|
878
|
-
fileUrl: z.ZodString
|
|
925
|
+
fileUrl: z.ZodOptional<z.ZodString>;
|
|
926
|
+
viewUrl: z.ZodString;
|
|
879
927
|
fileSize: z.ZodNumber;
|
|
880
928
|
fileName: z.ZodString;
|
|
881
929
|
contentType: z.ZodOptional<z.ZodString>;
|
|
882
930
|
uploadedAt: z.ZodString;
|
|
883
931
|
}, "strip", z.ZodTypeAny, {
|
|
884
|
-
|
|
932
|
+
viewUrl: string;
|
|
885
933
|
fileSize: number;
|
|
886
934
|
fileName: string;
|
|
887
935
|
uploadedAt: string;
|
|
888
936
|
contentType?: string | undefined;
|
|
937
|
+
fileUrl?: string | undefined;
|
|
889
938
|
}, {
|
|
890
|
-
|
|
939
|
+
viewUrl: string;
|
|
891
940
|
fileSize: number;
|
|
892
941
|
fileName: string;
|
|
893
942
|
uploadedAt: string;
|
|
894
943
|
contentType?: string | undefined;
|
|
944
|
+
fileUrl?: string | undefined;
|
|
895
945
|
}>;
|
|
896
946
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
897
947
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -900,11 +950,12 @@ export declare const uploadedFileResourceSchema: z.ZodObject<{
|
|
|
900
950
|
type: string;
|
|
901
951
|
id: string;
|
|
902
952
|
attributes: {
|
|
903
|
-
|
|
953
|
+
viewUrl: string;
|
|
904
954
|
fileSize: number;
|
|
905
955
|
fileName: string;
|
|
906
956
|
uploadedAt: string;
|
|
907
957
|
contentType?: string | undefined;
|
|
958
|
+
fileUrl?: string | undefined;
|
|
908
959
|
};
|
|
909
960
|
relationships?: Record<string, unknown> | undefined;
|
|
910
961
|
links?: Record<string, string> | undefined;
|
|
@@ -913,11 +964,12 @@ export declare const uploadedFileResourceSchema: z.ZodObject<{
|
|
|
913
964
|
type: string;
|
|
914
965
|
id: string;
|
|
915
966
|
attributes: {
|
|
916
|
-
|
|
967
|
+
viewUrl: string;
|
|
917
968
|
fileSize: number;
|
|
918
969
|
fileName: string;
|
|
919
970
|
uploadedAt: string;
|
|
920
971
|
contentType?: string | undefined;
|
|
972
|
+
fileUrl?: string | undefined;
|
|
921
973
|
};
|
|
922
974
|
relationships?: Record<string, unknown> | undefined;
|
|
923
975
|
links?: Record<string, string> | undefined;
|
|
@@ -928,23 +980,26 @@ export declare const uploadedFileResponseSchema: z.ZodObject<{
|
|
|
928
980
|
type: z.ZodLiteral<string>;
|
|
929
981
|
id: z.ZodString;
|
|
930
982
|
attributes: z.ZodObject<{
|
|
931
|
-
fileUrl: z.ZodString
|
|
983
|
+
fileUrl: z.ZodOptional<z.ZodString>;
|
|
984
|
+
viewUrl: z.ZodString;
|
|
932
985
|
fileSize: z.ZodNumber;
|
|
933
986
|
fileName: z.ZodString;
|
|
934
987
|
contentType: z.ZodOptional<z.ZodString>;
|
|
935
988
|
uploadedAt: z.ZodString;
|
|
936
989
|
}, "strip", z.ZodTypeAny, {
|
|
937
|
-
|
|
990
|
+
viewUrl: string;
|
|
938
991
|
fileSize: number;
|
|
939
992
|
fileName: string;
|
|
940
993
|
uploadedAt: string;
|
|
941
994
|
contentType?: string | undefined;
|
|
995
|
+
fileUrl?: string | undefined;
|
|
942
996
|
}, {
|
|
943
|
-
|
|
997
|
+
viewUrl: string;
|
|
944
998
|
fileSize: number;
|
|
945
999
|
fileName: string;
|
|
946
1000
|
uploadedAt: string;
|
|
947
1001
|
contentType?: string | undefined;
|
|
1002
|
+
fileUrl?: string | undefined;
|
|
948
1003
|
}>;
|
|
949
1004
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
950
1005
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -953,11 +1008,12 @@ export declare const uploadedFileResponseSchema: z.ZodObject<{
|
|
|
953
1008
|
type: string;
|
|
954
1009
|
id: string;
|
|
955
1010
|
attributes: {
|
|
956
|
-
|
|
1011
|
+
viewUrl: string;
|
|
957
1012
|
fileSize: number;
|
|
958
1013
|
fileName: string;
|
|
959
1014
|
uploadedAt: string;
|
|
960
1015
|
contentType?: string | undefined;
|
|
1016
|
+
fileUrl?: string | undefined;
|
|
961
1017
|
};
|
|
962
1018
|
relationships?: Record<string, unknown> | undefined;
|
|
963
1019
|
links?: Record<string, string> | undefined;
|
|
@@ -966,11 +1022,12 @@ export declare const uploadedFileResponseSchema: z.ZodObject<{
|
|
|
966
1022
|
type: string;
|
|
967
1023
|
id: string;
|
|
968
1024
|
attributes: {
|
|
969
|
-
|
|
1025
|
+
viewUrl: string;
|
|
970
1026
|
fileSize: number;
|
|
971
1027
|
fileName: string;
|
|
972
1028
|
uploadedAt: string;
|
|
973
1029
|
contentType?: string | undefined;
|
|
1030
|
+
fileUrl?: string | undefined;
|
|
974
1031
|
};
|
|
975
1032
|
relationships?: Record<string, unknown> | undefined;
|
|
976
1033
|
links?: Record<string, string> | undefined;
|
|
@@ -1005,11 +1062,12 @@ export declare const uploadedFileResponseSchema: z.ZodObject<{
|
|
|
1005
1062
|
type: string;
|
|
1006
1063
|
id: string;
|
|
1007
1064
|
attributes: {
|
|
1008
|
-
|
|
1065
|
+
viewUrl: string;
|
|
1009
1066
|
fileSize: number;
|
|
1010
1067
|
fileName: string;
|
|
1011
1068
|
uploadedAt: string;
|
|
1012
1069
|
contentType?: string | undefined;
|
|
1070
|
+
fileUrl?: string | undefined;
|
|
1013
1071
|
};
|
|
1014
1072
|
relationships?: Record<string, unknown> | undefined;
|
|
1015
1073
|
links?: Record<string, string> | undefined;
|
|
@@ -1030,11 +1088,12 @@ export declare const uploadedFileResponseSchema: z.ZodObject<{
|
|
|
1030
1088
|
type: string;
|
|
1031
1089
|
id: string;
|
|
1032
1090
|
attributes: {
|
|
1033
|
-
|
|
1091
|
+
viewUrl: string;
|
|
1034
1092
|
fileSize: number;
|
|
1035
1093
|
fileName: string;
|
|
1036
1094
|
uploadedAt: string;
|
|
1037
1095
|
contentType?: string | undefined;
|
|
1096
|
+
fileUrl?: string | undefined;
|
|
1038
1097
|
};
|
|
1039
1098
|
relationships?: Record<string, unknown> | undefined;
|
|
1040
1099
|
links?: Record<string, string> | undefined;
|
|
@@ -1052,11 +1111,11 @@ export declare const uploadedFileResponseSchema: z.ZodObject<{
|
|
|
1052
1111
|
}[] | undefined;
|
|
1053
1112
|
}>;
|
|
1054
1113
|
export declare const uploadFileBodySchema: z.ZodObject<{
|
|
1055
|
-
file: z.
|
|
1114
|
+
file: z.ZodAny;
|
|
1056
1115
|
}, "strip", z.ZodTypeAny, {
|
|
1057
|
-
file
|
|
1116
|
+
file?: any;
|
|
1058
1117
|
}, {
|
|
1059
|
-
file
|
|
1118
|
+
file?: any;
|
|
1060
1119
|
}>;
|
|
1061
1120
|
export type DocumentType = z.infer<typeof documentTypeSchema>;
|
|
1062
1121
|
export type RelatedEntityType = z.infer<typeof relatedEntityTypeSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documents.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/documents.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;GAEG;AAGH,eAAO,MAAM,kBAAkB,qGAQ7B,CAAC;AAGH,eAAO,MAAM,uBAAuB,2EAAyE,CAAC;AAG9G,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AAGH,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"documents.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/documents.schemas.ts"],"names":[],"mappings":"AAAA,OAAO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AAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -29,7 +29,9 @@ exports.documentAttributesSchema = zod_1.z.object({
|
|
|
29
29
|
name: zod_1.z.string(),
|
|
30
30
|
type: exports.documentTypeSchema,
|
|
31
31
|
category: zod_1.z.string().nullable(),
|
|
32
|
-
fileUrl: zod_1.z.string().url(), // URL
|
|
32
|
+
fileUrl: zod_1.z.string().url(), // Legacy storage URL (kept for backward compatibility)
|
|
33
|
+
viewUrl: zod_1.z.string().url().optional(), // Internal view URL: {baseUrl}/documents/view/{docId}.{ext}
|
|
34
|
+
fileExtension: zod_1.z.string().nullable().optional(), // File extension (e.g., 'pdf', 'jpg', 'png')
|
|
33
35
|
fileSize: zod_1.z.number().int().positive().nullable(), // in bytes
|
|
34
36
|
uploadedDate: zod_1.z.string().datetime(),
|
|
35
37
|
uploadedBy: zod_1.z.string().uuid().nullable(),
|
|
@@ -76,7 +78,8 @@ exports.documentResourceSchema = (0, common_schemas_1.createJsonApiResourceSchem
|
|
|
76
78
|
exports.documentResponseSchema = (0, common_schemas_1.jsonApiSingleResponseSchema)(exports.documentResourceSchema);
|
|
77
79
|
exports.documentListResponseSchema = (0, common_schemas_1.jsonApiCollectionResponseSchema)(exports.documentResourceSchema);
|
|
78
80
|
exports.uploadedFileAttributesSchema = zod_1.z.object({
|
|
79
|
-
fileUrl: zod_1.z.string().url(),
|
|
81
|
+
fileUrl: zod_1.z.string().url().optional(), // Legacy storage URL (kept for backward compatibility)
|
|
82
|
+
viewUrl: zod_1.z.string().url(), // Internal view URL: {baseUrl}/documents/view/{docId}.{ext}
|
|
80
83
|
fileSize: zod_1.z.number().int().positive(),
|
|
81
84
|
fileName: zod_1.z.string(),
|
|
82
85
|
contentType: zod_1.z.string().optional(),
|
|
@@ -85,5 +88,5 @@ exports.uploadedFileAttributesSchema = zod_1.z.object({
|
|
|
85
88
|
exports.uploadedFileResourceSchema = (0, common_schemas_1.createJsonApiResourceSchema)('uploaded-files', exports.uploadedFileAttributesSchema);
|
|
86
89
|
exports.uploadedFileResponseSchema = (0, common_schemas_1.jsonApiSingleResponseSchema)(exports.uploadedFileResourceSchema);
|
|
87
90
|
exports.uploadFileBodySchema = zod_1.z.object({
|
|
88
|
-
file: zod_1.z.
|
|
91
|
+
file: zod_1.z.any(),
|
|
89
92
|
});
|