@deepintel-ltd/farmpro-contracts 1.5.24 → 1.5.26

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.
@@ -416,16 +416,19 @@ export declare const filesRouter: {
416
416
  };
417
417
  viewFile: {
418
418
  pathParams: z.ZodObject<{
419
+ prefix: z.ZodString;
419
420
  fileId: z.ZodString;
420
421
  }, "strip", z.ZodTypeAny, {
422
+ prefix: string;
421
423
  fileId: string;
422
424
  }, {
425
+ prefix: string;
423
426
  fileId: string;
424
427
  }>;
425
428
  summary: "View file";
426
- description: "Stream or download a file by its UUID. Extension is optional - both /files/view/{fileId} and /files/view/{fileId}.{ext} work for the same file. Requires authentication and validates that the requesting user has permission to access the file.";
429
+ description: "Stream or download a file by its prefix and UUID. URL format: /files/view/{prefix}/{uuid}.{ext}. The storage path is constructed as {prefix}/{uuid}.{ext}. Requires authentication and validates that the requesting user has permission to access the file.";
427
430
  method: "GET";
428
- path: "/files/view/:fileId";
431
+ path: "/files/view/:prefix/:fileId";
429
432
  responses: {
430
433
  200: z.ZodAny;
431
434
  400: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"files.routes.d.ts","sourceRoot":"","sources":["../../src/routes/files.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCtB,CAAC"}
@@ -21,9 +21,10 @@ export const filesRouter = c.router({
21
21
  },
22
22
  viewFile: {
23
23
  method: 'GET',
24
- path: '/files/view/:fileId',
24
+ path: '/files/view/:prefix/:fileId',
25
25
  pathParams: z.object({
26
- fileId: z.string(),
26
+ prefix: z.string().describe('Storage prefix (e.g., waybills, invoices, documents, organizations, uploads)'),
27
+ fileId: z.string().describe('File identifier in format {uuid}.{ext} (e.g., 550e8400-e29b-41d4-a716-446655440000.pdf)'),
27
28
  }),
28
29
  responses: {
29
30
  200: z.any(), // File stream response
@@ -33,6 +34,6 @@ export const filesRouter = c.router({
33
34
  404: jsonApiErrorResponseSchema,
34
35
  },
35
36
  summary: 'View file',
36
- description: 'Stream or download a file by its UUID. Extension is optional - both /files/view/{fileId} and /files/view/{fileId}.{ext} work for the same file. Requires authentication and validates that the requesting user has permission to access the file.',
37
+ description: 'Stream or download a file by its prefix and UUID. URL format: /files/view/{prefix}/{uuid}.{ext}. The storage path is constructed as {prefix}/{uuid}.{ext}. Requires authentication and validates that the requesting user has permission to access the file.',
37
38
  },
38
39
  });