@deepintel-ltd/farmpro-contracts 1.5.1 → 1.5.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.
@@ -29,9 +29,8 @@ 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(), // 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')
32
+ fileUrl: zod_1.z.string(),
33
+ fileExtension: zod_1.z.string().nullable().optional(),
35
34
  fileSize: zod_1.z.number().int().positive().nullable(), // in bytes
36
35
  uploadedDate: zod_1.z.string().datetime(),
37
36
  uploadedBy: zod_1.z.string().uuid().nullable(),
@@ -44,7 +43,7 @@ exports.createDocumentAttributesSchema = zod_1.z.object({
44
43
  name: zod_1.z.string().min(1).max(200),
45
44
  type: exports.documentTypeSchema,
46
45
  category: zod_1.z.string().optional(),
47
- fileUrl: zod_1.z.string().url().optional(), // URL to uploaded file (optional - can be set after upload)
46
+ fileUrl: zod_1.z.string().optional(), // View URL path (optional - will be set after file upload)
48
47
  fileSize: zod_1.z.number().int().positive().optional(), // in bytes
49
48
  relatedTo: exports.relatedEntitySchema.optional(),
50
49
  tags: zod_1.z.array(zod_1.z.string()).optional(),
@@ -55,7 +54,7 @@ exports.updateDocumentAttributesSchema = zod_1.z.object({
55
54
  name: zod_1.z.string().min(1).max(200).optional(),
56
55
  type: exports.documentTypeSchema.optional(),
57
56
  category: zod_1.z.string().nullable().optional(),
58
- fileUrl: zod_1.z.string().url().optional(), // URL to uploaded file (can be updated after upload)
57
+ fileUrl: zod_1.z.string().optional(), // View URL path (can be updated after file upload)
59
58
  fileSize: zod_1.z.number().int().positive().optional(), // in bytes
60
59
  relatedTo: exports.relatedEntitySchema.nullable().optional(),
61
60
  tags: zod_1.z.array(zod_1.z.string()).optional(),
@@ -78,8 +77,7 @@ exports.documentResourceSchema = (0, common_schemas_1.createJsonApiResourceSchem
78
77
  exports.documentResponseSchema = (0, common_schemas_1.jsonApiSingleResponseSchema)(exports.documentResourceSchema);
79
78
  exports.documentListResponseSchema = (0, common_schemas_1.jsonApiCollectionResponseSchema)(exports.documentResourceSchema);
80
79
  exports.uploadedFileAttributesSchema = zod_1.z.object({
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
+ fileUrl: zod_1.z.string(),
83
81
  fileSize: zod_1.z.number().int().positive(),
84
82
  fileName: zod_1.z.string(),
85
83
  contentType: zod_1.z.string().optional(),