@plyaz/types 1.30.0 → 1.31.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.
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Files Endpoint Type Definitions
3
+ *
4
+ * Uses fetchff's Endpoint and Req types for type-safe API definitions.
5
+ *
6
+ * Req<TResponse, TBody?, TParams?> generic parameters:
7
+ * - TResponse: The response type returned by the endpoint
8
+ * - TBody: The request body type (use 'never' for GET/DELETE)
9
+ * - TParams: URL path parameters type (use 'never' if no path params)
10
+ */
11
+ import type { Endpoint, Req } from 'fetchff';
12
+ import type { UploadFileRequest, UploadFileResponse, UploadFilesRequest, UploadFilesResponse, GenerateDocumentRequest, GenerateDocumentResponse, GetFileParams, GetFileResponse, DownloadFileParams, DownloadFileResponse, DeleteFileParams, DeleteFileResponse, GetSignedUrlParams, GetSignedUrlQuery, GetSignedUrlResponse } from './schemas';
13
+ /**
14
+ * Files API endpoint types.
15
+ * Complete type definitions for file operation endpoints.
16
+ */
17
+ export interface FilesEndpointTypes {
18
+ /**
19
+ * POST /upload - Upload a file
20
+ * Supports template-based document generation when templateId is provided.
21
+ *
22
+ * Req<Response, Body>
23
+ * - Response: UploadFileResponse
24
+ * - Body: UploadFileRequest
25
+ */
26
+ uploadFile: Endpoint<Req<UploadFileResponse, UploadFileRequest>>;
27
+ /**
28
+ * POST /upload/bulk - Upload multiple files
29
+ * Uses uploadMultipleFiles() with concurrency control.
30
+ *
31
+ * Req<Response, Body>
32
+ * - Response: UploadFilesResponse
33
+ * - Body: UploadFilesRequest
34
+ */
35
+ uploadFiles: Endpoint<Req<UploadFilesResponse, UploadFilesRequest>>;
36
+ /**
37
+ * POST /generate-document - Generate document from template
38
+ * Returns base64 encoded buffer, no upload to storage.
39
+ *
40
+ * Req<Response, Body>
41
+ * - Response: GenerateDocumentResponse
42
+ * - Body: GenerateDocumentRequest
43
+ */
44
+ generateDocument: Endpoint<Req<GenerateDocumentResponse, GenerateDocumentRequest>>;
45
+ /**
46
+ * GET /files/:id - Get file metadata
47
+ *
48
+ * Req<Response, Body, Query, Params>
49
+ * - Response: GetFileResponse
50
+ * - Body: never (GET has no body)
51
+ * - Query: never (no query params)
52
+ * - Params: GetFileParams (path params)
53
+ */
54
+ getFile: Endpoint<Req<GetFileResponse, never, never, GetFileParams>>;
55
+ /**
56
+ * GET /files/:id/download - Download a file
57
+ *
58
+ * Req<Response, Body, Query, Params>
59
+ * - Response: DownloadFileResponse
60
+ * - Body: never (GET has no body)
61
+ * - Query: never (no query params)
62
+ * - Params: DownloadFileParams (path params)
63
+ */
64
+ downloadFile: Endpoint<Req<DownloadFileResponse, never, never, DownloadFileParams>>;
65
+ /**
66
+ * GET /files/:id/signed-url - Get signed URL for temporary access
67
+ *
68
+ * Req<Response, Body, Query, Params>
69
+ * - Response: GetSignedUrlResponse
70
+ * - Body: never (GET has no body)
71
+ * - Query: GetSignedUrlQuery (expiresIn)
72
+ * - Params: GetSignedUrlParams (path params)
73
+ */
74
+ getSignedUrl: Endpoint<Req<GetSignedUrlResponse, never, GetSignedUrlQuery, GetSignedUrlParams>>;
75
+ /**
76
+ * DELETE /files/:id - Delete a file
77
+ *
78
+ * Req<Response, Body, Query, Params>
79
+ * - Response: DeleteFileResponse
80
+ * - Body: never (DELETE typically has no body)
81
+ * - Query: never (no query params)
82
+ * - Params: DeleteFileParams (path params)
83
+ */
84
+ deleteFile: Endpoint<Req<DeleteFileResponse, never, never, DeleteFileParams>>;
85
+ }
86
+ /**
87
+ * Type guard for files endpoint keys.
88
+ */
89
+ export type FilesEndpointKey = keyof FilesEndpointTypes;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Files API Endpoint Types
3
+ * Export all file operation types and schemas
4
+ *
5
+ * Single source of truth: types are inferred from Zod schemas
6
+ */
7
+ export type { FilesEndpointTypes, FilesEndpointKey } from './endpoints';
8
+ export { OutputFormatSchema, AccessLevelSchema, PdfOptionsSchema, FileVariantSchema, UploadFileRequestSchema, UploadFileResponseSchema, UploadFileItemSchema, UploadFilesRequestSchema, UploadFileResultSchema, UploadFilesResponseSchema, GenerateDocumentRequestSchema, GenerateDocumentResponseSchema, GetFileParamsSchema, GetFileRequestSchema, GetFileResponseSchema, DownloadFileParamsSchema, DownloadFileRequestSchema, DownloadFileResponseSchema, DeleteFileParamsSchema, DeleteFileRequestSchema, DeleteFileResponseSchema, GetSignedUrlParamsSchema, GetSignedUrlQuerySchema, GetSignedUrlRequestSchema, GetSignedUrlResponseSchema, } from './schemas';
9
+ export type { OutputFormat, AccessLevel, PdfOptions, FileVariant, UploadFileRequest, UploadFileResponse, UploadFileItem, UploadFilesRequest, UploadFileResult, UploadFilesResponse, GenerateDocumentRequest, GenerateDocumentResponse, GetFileParams, GetFileRequest, GetFileResponse, DownloadFileParams, DownloadFileRequest, DownloadFileResponse, DeleteFileParams, DeleteFileRequest, DeleteFileResponse, GetSignedUrlParams, GetSignedUrlQuery, GetSignedUrlRequest, GetSignedUrlResponse, } from './schemas';
@@ -0,0 +1,487 @@
1
+ /**
2
+ * Files API Zod Schemas
3
+ * @module @plyaz/types/api/endpoints/files/schemas
4
+ *
5
+ * Validation schemas and types for file operations API endpoints.
6
+ * Single source of truth - types are inferred from schemas.
7
+ */
8
+ import { z } from 'zod';
9
+ /**
10
+ * Output format for template-based document generation
11
+ */
12
+ export declare const OutputFormatSchema: z.ZodEnum<{
13
+ pdf: "pdf";
14
+ docx: "docx";
15
+ xlsx: "xlsx";
16
+ html: "html";
17
+ }>;
18
+ export type OutputFormat = z.infer<typeof OutputFormatSchema>;
19
+ /**
20
+ * Access level for files
21
+ */
22
+ export declare const AccessLevelSchema: z.ZodEnum<{
23
+ public: "public";
24
+ private: "private";
25
+ protected: "protected";
26
+ }>;
27
+ export type AccessLevel = z.infer<typeof AccessLevelSchema>;
28
+ /**
29
+ * PDF render options
30
+ */
31
+ export declare const PdfOptionsSchema: z.ZodOptional<z.ZodObject<{
32
+ format: z.ZodOptional<z.ZodEnum<{
33
+ A4: "A4";
34
+ Letter: "Letter";
35
+ Legal: "Legal";
36
+ }>>;
37
+ landscape: z.ZodOptional<z.ZodBoolean>;
38
+ margin: z.ZodOptional<z.ZodObject<{
39
+ top: z.ZodOptional<z.ZodString>;
40
+ right: z.ZodOptional<z.ZodString>;
41
+ bottom: z.ZodOptional<z.ZodString>;
42
+ left: z.ZodOptional<z.ZodString>;
43
+ }, z.core.$strip>>;
44
+ displayHeaderFooter: z.ZodOptional<z.ZodBoolean>;
45
+ headerTemplate: z.ZodOptional<z.ZodString>;
46
+ footerTemplate: z.ZodOptional<z.ZodString>;
47
+ printBackground: z.ZodOptional<z.ZodBoolean>;
48
+ scale: z.ZodOptional<z.ZodNumber>;
49
+ }, z.core.$strip>>;
50
+ export type PdfOptions = z.infer<typeof PdfOptionsSchema>;
51
+ /**
52
+ * Upload file request schema
53
+ *
54
+ * Supports multiple upload modes:
55
+ * - Direct upload: base64 + mimeType
56
+ * - Template generation: templateId + templateData
57
+ */
58
+ export declare const UploadFileRequestSchema: z.ZodObject<{
59
+ base64: z.ZodOptional<z.ZodString>;
60
+ mimeType: z.ZodOptional<z.ZodString>;
61
+ filename: z.ZodOptional<z.ZodString>;
62
+ templateId: z.ZodOptional<z.ZodString>;
63
+ templateData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
64
+ outputFormat: z.ZodOptional<z.ZodEnum<{
65
+ pdf: "pdf";
66
+ docx: "docx";
67
+ xlsx: "xlsx";
68
+ html: "html";
69
+ }>>;
70
+ locale: z.ZodOptional<z.ZodString>;
71
+ pdfOptions: z.ZodOptional<z.ZodObject<{
72
+ format: z.ZodOptional<z.ZodEnum<{
73
+ A4: "A4";
74
+ Letter: "Letter";
75
+ Legal: "Legal";
76
+ }>>;
77
+ landscape: z.ZodOptional<z.ZodBoolean>;
78
+ margin: z.ZodOptional<z.ZodObject<{
79
+ top: z.ZodOptional<z.ZodString>;
80
+ right: z.ZodOptional<z.ZodString>;
81
+ bottom: z.ZodOptional<z.ZodString>;
82
+ left: z.ZodOptional<z.ZodString>;
83
+ }, z.core.$strip>>;
84
+ displayHeaderFooter: z.ZodOptional<z.ZodBoolean>;
85
+ headerTemplate: z.ZodOptional<z.ZodString>;
86
+ footerTemplate: z.ZodOptional<z.ZodString>;
87
+ printBackground: z.ZodOptional<z.ZodBoolean>;
88
+ scale: z.ZodOptional<z.ZodNumber>;
89
+ }, z.core.$strip>>;
90
+ category: z.ZodString;
91
+ entityType: z.ZodString;
92
+ entityId: z.ZodString;
93
+ accessLevel: z.ZodOptional<z.ZodEnum<{
94
+ public: "public";
95
+ private: "private";
96
+ protected: "protected";
97
+ }>>;
98
+ customMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
99
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
100
+ customPath: z.ZodOptional<z.ZodString>;
101
+ ttl: z.ZodOptional<z.ZodNumber>;
102
+ immutable: z.ZodOptional<z.ZodBoolean>;
103
+ extractMetadata: z.ZodOptional<z.ZodBoolean>;
104
+ virusScan: z.ZodOptional<z.ZodBoolean>;
105
+ processMedia: z.ZodOptional<z.ZodBoolean>;
106
+ }, z.core.$strip>;
107
+ export type UploadFileRequest = z.input<typeof UploadFileRequestSchema>;
108
+ /**
109
+ * File variant schema (for generated thumbnails, etc.)
110
+ */
111
+ export declare const FileVariantSchema: z.ZodObject<{
112
+ url: z.ZodString;
113
+ size: z.ZodNumber;
114
+ mimeType: z.ZodString;
115
+ }, z.core.$strip>;
116
+ export type FileVariant = z.infer<typeof FileVariantSchema>;
117
+ /**
118
+ * Upload file response schema
119
+ */
120
+ export declare const UploadFileResponseSchema: z.ZodObject<{
121
+ id: z.ZodString;
122
+ key: z.ZodString;
123
+ filename: z.ZodString;
124
+ mimeType: z.ZodString;
125
+ size: z.ZodNumber;
126
+ checksum: z.ZodOptional<z.ZodString>;
127
+ url: z.ZodOptional<z.ZodString>;
128
+ publicUrl: z.ZodOptional<z.ZodString>;
129
+ signedUrl: z.ZodOptional<z.ZodString>;
130
+ bucket: z.ZodString;
131
+ adapter: z.ZodOptional<z.ZodString>;
132
+ entityType: z.ZodOptional<z.ZodString>;
133
+ entityId: z.ZodOptional<z.ZodString>;
134
+ category: z.ZodOptional<z.ZodString>;
135
+ uploadedAt: z.ZodString;
136
+ expiresAt: z.ZodOptional<z.ZodString>;
137
+ variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
138
+ url: z.ZodString;
139
+ size: z.ZodNumber;
140
+ mimeType: z.ZodString;
141
+ }, z.core.$strip>>>;
142
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
143
+ }, z.core.$strip>;
144
+ export type UploadFileResponse = z.infer<typeof UploadFileResponseSchema>;
145
+ /**
146
+ * Single file item for bulk upload (reuses UploadFileRequestSchema fields)
147
+ */
148
+ export declare const UploadFileItemSchema: z.ZodObject<{
149
+ base64: z.ZodOptional<z.ZodString>;
150
+ mimeType: z.ZodOptional<z.ZodString>;
151
+ filename: z.ZodOptional<z.ZodString>;
152
+ templateId: z.ZodOptional<z.ZodString>;
153
+ templateData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
154
+ outputFormat: z.ZodOptional<z.ZodEnum<{
155
+ pdf: "pdf";
156
+ docx: "docx";
157
+ xlsx: "xlsx";
158
+ html: "html";
159
+ }>>;
160
+ locale: z.ZodOptional<z.ZodString>;
161
+ pdfOptions: z.ZodOptional<z.ZodObject<{
162
+ format: z.ZodOptional<z.ZodEnum<{
163
+ A4: "A4";
164
+ Letter: "Letter";
165
+ Legal: "Legal";
166
+ }>>;
167
+ landscape: z.ZodOptional<z.ZodBoolean>;
168
+ margin: z.ZodOptional<z.ZodObject<{
169
+ top: z.ZodOptional<z.ZodString>;
170
+ right: z.ZodOptional<z.ZodString>;
171
+ bottom: z.ZodOptional<z.ZodString>;
172
+ left: z.ZodOptional<z.ZodString>;
173
+ }, z.core.$strip>>;
174
+ displayHeaderFooter: z.ZodOptional<z.ZodBoolean>;
175
+ headerTemplate: z.ZodOptional<z.ZodString>;
176
+ footerTemplate: z.ZodOptional<z.ZodString>;
177
+ printBackground: z.ZodOptional<z.ZodBoolean>;
178
+ scale: z.ZodOptional<z.ZodNumber>;
179
+ }, z.core.$strip>>;
180
+ category: z.ZodString;
181
+ entityType: z.ZodString;
182
+ entityId: z.ZodString;
183
+ accessLevel: z.ZodOptional<z.ZodEnum<{
184
+ public: "public";
185
+ private: "private";
186
+ protected: "protected";
187
+ }>>;
188
+ customMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
189
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
190
+ customPath: z.ZodOptional<z.ZodString>;
191
+ ttl: z.ZodOptional<z.ZodNumber>;
192
+ immutable: z.ZodOptional<z.ZodBoolean>;
193
+ extractMetadata: z.ZodOptional<z.ZodBoolean>;
194
+ virusScan: z.ZodOptional<z.ZodBoolean>;
195
+ processMedia: z.ZodOptional<z.ZodBoolean>;
196
+ }, z.core.$strip>;
197
+ export type UploadFileItem = z.input<typeof UploadFileItemSchema>;
198
+ /**
199
+ * Bulk upload request schema
200
+ * Wraps an array of files with upload options
201
+ */
202
+ export declare const UploadFilesRequestSchema: z.ZodObject<{
203
+ files: z.ZodArray<z.ZodObject<{
204
+ base64: z.ZodOptional<z.ZodString>;
205
+ mimeType: z.ZodOptional<z.ZodString>;
206
+ filename: z.ZodOptional<z.ZodString>;
207
+ templateId: z.ZodOptional<z.ZodString>;
208
+ templateData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
209
+ outputFormat: z.ZodOptional<z.ZodEnum<{
210
+ pdf: "pdf";
211
+ docx: "docx";
212
+ xlsx: "xlsx";
213
+ html: "html";
214
+ }>>;
215
+ locale: z.ZodOptional<z.ZodString>;
216
+ pdfOptions: z.ZodOptional<z.ZodObject<{
217
+ format: z.ZodOptional<z.ZodEnum<{
218
+ A4: "A4";
219
+ Letter: "Letter";
220
+ Legal: "Legal";
221
+ }>>;
222
+ landscape: z.ZodOptional<z.ZodBoolean>;
223
+ margin: z.ZodOptional<z.ZodObject<{
224
+ top: z.ZodOptional<z.ZodString>;
225
+ right: z.ZodOptional<z.ZodString>;
226
+ bottom: z.ZodOptional<z.ZodString>;
227
+ left: z.ZodOptional<z.ZodString>;
228
+ }, z.core.$strip>>;
229
+ displayHeaderFooter: z.ZodOptional<z.ZodBoolean>;
230
+ headerTemplate: z.ZodOptional<z.ZodString>;
231
+ footerTemplate: z.ZodOptional<z.ZodString>;
232
+ printBackground: z.ZodOptional<z.ZodBoolean>;
233
+ scale: z.ZodOptional<z.ZodNumber>;
234
+ }, z.core.$strip>>;
235
+ category: z.ZodString;
236
+ entityType: z.ZodString;
237
+ entityId: z.ZodString;
238
+ accessLevel: z.ZodOptional<z.ZodEnum<{
239
+ public: "public";
240
+ private: "private";
241
+ protected: "protected";
242
+ }>>;
243
+ customMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
244
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
245
+ customPath: z.ZodOptional<z.ZodString>;
246
+ ttl: z.ZodOptional<z.ZodNumber>;
247
+ immutable: z.ZodOptional<z.ZodBoolean>;
248
+ extractMetadata: z.ZodOptional<z.ZodBoolean>;
249
+ virusScan: z.ZodOptional<z.ZodBoolean>;
250
+ processMedia: z.ZodOptional<z.ZodBoolean>;
251
+ }, z.core.$strip>>;
252
+ options: z.ZodOptional<z.ZodObject<{
253
+ concurrency: z.ZodOptional<z.ZodNumber>;
254
+ continueOnError: z.ZodOptional<z.ZodBoolean>;
255
+ useQueue: z.ZodOptional<z.ZodBoolean>;
256
+ }, z.core.$strip>>;
257
+ }, z.core.$strip>;
258
+ export type UploadFilesRequest = z.input<typeof UploadFilesRequestSchema>;
259
+ /**
260
+ * Single file result in bulk upload response
261
+ */
262
+ export declare const UploadFileResultSchema: z.ZodObject<{
263
+ index: z.ZodNumber;
264
+ success: z.ZodBoolean;
265
+ data: z.ZodOptional<z.ZodObject<{
266
+ id: z.ZodString;
267
+ key: z.ZodString;
268
+ filename: z.ZodString;
269
+ mimeType: z.ZodString;
270
+ size: z.ZodNumber;
271
+ checksum: z.ZodOptional<z.ZodString>;
272
+ url: z.ZodOptional<z.ZodString>;
273
+ publicUrl: z.ZodOptional<z.ZodString>;
274
+ signedUrl: z.ZodOptional<z.ZodString>;
275
+ bucket: z.ZodString;
276
+ adapter: z.ZodOptional<z.ZodString>;
277
+ entityType: z.ZodOptional<z.ZodString>;
278
+ entityId: z.ZodOptional<z.ZodString>;
279
+ category: z.ZodOptional<z.ZodString>;
280
+ uploadedAt: z.ZodString;
281
+ expiresAt: z.ZodOptional<z.ZodString>;
282
+ variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
283
+ url: z.ZodString;
284
+ size: z.ZodNumber;
285
+ mimeType: z.ZodString;
286
+ }, z.core.$strip>>>;
287
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
288
+ }, z.core.$strip>>;
289
+ error: z.ZodOptional<z.ZodString>;
290
+ }, z.core.$strip>;
291
+ export type UploadFileResult = z.infer<typeof UploadFileResultSchema>;
292
+ /**
293
+ * Bulk upload response schema
294
+ */
295
+ export declare const UploadFilesResponseSchema: z.ZodObject<{
296
+ results: z.ZodArray<z.ZodObject<{
297
+ index: z.ZodNumber;
298
+ success: z.ZodBoolean;
299
+ data: z.ZodOptional<z.ZodObject<{
300
+ id: z.ZodString;
301
+ key: z.ZodString;
302
+ filename: z.ZodString;
303
+ mimeType: z.ZodString;
304
+ size: z.ZodNumber;
305
+ checksum: z.ZodOptional<z.ZodString>;
306
+ url: z.ZodOptional<z.ZodString>;
307
+ publicUrl: z.ZodOptional<z.ZodString>;
308
+ signedUrl: z.ZodOptional<z.ZodString>;
309
+ bucket: z.ZodString;
310
+ adapter: z.ZodOptional<z.ZodString>;
311
+ entityType: z.ZodOptional<z.ZodString>;
312
+ entityId: z.ZodOptional<z.ZodString>;
313
+ category: z.ZodOptional<z.ZodString>;
314
+ uploadedAt: z.ZodString;
315
+ expiresAt: z.ZodOptional<z.ZodString>;
316
+ variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
317
+ url: z.ZodString;
318
+ size: z.ZodNumber;
319
+ mimeType: z.ZodString;
320
+ }, z.core.$strip>>>;
321
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
322
+ }, z.core.$strip>>;
323
+ error: z.ZodOptional<z.ZodString>;
324
+ }, z.core.$strip>>;
325
+ summary: z.ZodObject<{
326
+ total: z.ZodNumber;
327
+ succeeded: z.ZodNumber;
328
+ failed: z.ZodNumber;
329
+ }, z.core.$strip>;
330
+ allSucceeded: z.ZodBoolean;
331
+ }, z.core.$strip>;
332
+ export type UploadFilesResponse = z.infer<typeof UploadFilesResponseSchema>;
333
+ /**
334
+ * Generate document request schema
335
+ */
336
+ export declare const GenerateDocumentRequestSchema: z.ZodObject<{
337
+ templateId: z.ZodString;
338
+ templateData: z.ZodRecord<z.ZodString, z.ZodUnknown>;
339
+ outputFormat: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
340
+ pdf: "pdf";
341
+ docx: "docx";
342
+ xlsx: "xlsx";
343
+ html: "html";
344
+ }>>>;
345
+ locale: z.ZodOptional<z.ZodString>;
346
+ pdfOptions: z.ZodOptional<z.ZodObject<{
347
+ format: z.ZodOptional<z.ZodEnum<{
348
+ A4: "A4";
349
+ Letter: "Letter";
350
+ Legal: "Legal";
351
+ }>>;
352
+ landscape: z.ZodOptional<z.ZodBoolean>;
353
+ margin: z.ZodOptional<z.ZodObject<{
354
+ top: z.ZodOptional<z.ZodString>;
355
+ right: z.ZodOptional<z.ZodString>;
356
+ bottom: z.ZodOptional<z.ZodString>;
357
+ left: z.ZodOptional<z.ZodString>;
358
+ }, z.core.$strip>>;
359
+ displayHeaderFooter: z.ZodOptional<z.ZodBoolean>;
360
+ headerTemplate: z.ZodOptional<z.ZodString>;
361
+ footerTemplate: z.ZodOptional<z.ZodString>;
362
+ printBackground: z.ZodOptional<z.ZodBoolean>;
363
+ scale: z.ZodOptional<z.ZodNumber>;
364
+ }, z.core.$strip>>;
365
+ }, z.core.$strip>;
366
+ export type GenerateDocumentRequest = z.input<typeof GenerateDocumentRequestSchema>;
367
+ /**
368
+ * Generate document response schema
369
+ */
370
+ export declare const GenerateDocumentResponseSchema: z.ZodObject<{
371
+ buffer: z.ZodString;
372
+ size: z.ZodNumber;
373
+ }, z.core.$strip>;
374
+ export type GenerateDocumentResponse = z.infer<typeof GenerateDocumentResponseSchema>;
375
+ /**
376
+ * Get file params schema
377
+ */
378
+ export declare const GetFileParamsSchema: z.ZodObject<{
379
+ id: z.ZodString;
380
+ }, z.core.$strip>;
381
+ export type GetFileParams = z.input<typeof GetFileParamsSchema>;
382
+ /**
383
+ * Get file request schema (for service layer)
384
+ */
385
+ export declare const GetFileRequestSchema: z.ZodObject<{
386
+ id: z.ZodString;
387
+ }, z.core.$strip>;
388
+ export type GetFileRequest = z.input<typeof GetFileRequestSchema>;
389
+ /**
390
+ * Get file response schema
391
+ */
392
+ export declare const GetFileResponseSchema: z.ZodObject<{
393
+ id: z.ZodString;
394
+ key: z.ZodString;
395
+ filename: z.ZodString;
396
+ mimeType: z.ZodString;
397
+ size: z.ZodNumber;
398
+ checksum: z.ZodOptional<z.ZodString>;
399
+ url: z.ZodOptional<z.ZodString>;
400
+ publicUrl: z.ZodOptional<z.ZodString>;
401
+ signedUrl: z.ZodOptional<z.ZodString>;
402
+ bucket: z.ZodString;
403
+ entityType: z.ZodOptional<z.ZodString>;
404
+ entityId: z.ZodOptional<z.ZodString>;
405
+ category: z.ZodOptional<z.ZodString>;
406
+ uploadedAt: z.ZodString;
407
+ expiresAt: z.ZodOptional<z.ZodString>;
408
+ }, z.core.$strip>;
409
+ export type GetFileResponse = z.infer<typeof GetFileResponseSchema>;
410
+ /**
411
+ * Download file params schema
412
+ */
413
+ export declare const DownloadFileParamsSchema: z.ZodObject<{
414
+ id: z.ZodString;
415
+ }, z.core.$strip>;
416
+ export type DownloadFileParams = z.input<typeof DownloadFileParamsSchema>;
417
+ /**
418
+ * Download file request schema (for service layer)
419
+ */
420
+ export declare const DownloadFileRequestSchema: z.ZodObject<{
421
+ id: z.ZodString;
422
+ }, z.core.$strip>;
423
+ export type DownloadFileRequest = z.input<typeof DownloadFileRequestSchema>;
424
+ /**
425
+ * Download file response schema
426
+ */
427
+ export declare const DownloadFileResponseSchema: z.ZodObject<{
428
+ buffer: z.ZodString;
429
+ size: z.ZodNumber;
430
+ mimeType: z.ZodString;
431
+ filename: z.ZodOptional<z.ZodString>;
432
+ }, z.core.$strip>;
433
+ export type DownloadFileResponse = z.infer<typeof DownloadFileResponseSchema>;
434
+ /**
435
+ * Delete file params schema
436
+ */
437
+ export declare const DeleteFileParamsSchema: z.ZodObject<{
438
+ id: z.ZodString;
439
+ }, z.core.$strip>;
440
+ export type DeleteFileParams = z.input<typeof DeleteFileParamsSchema>;
441
+ /**
442
+ * Delete file request schema (for service layer)
443
+ */
444
+ export declare const DeleteFileRequestSchema: z.ZodObject<{
445
+ id: z.ZodString;
446
+ }, z.core.$strip>;
447
+ export type DeleteFileRequest = z.input<typeof DeleteFileRequestSchema>;
448
+ /**
449
+ * Delete file response schema
450
+ */
451
+ export declare const DeleteFileResponseSchema: z.ZodObject<{
452
+ success: z.ZodBoolean;
453
+ }, z.core.$strip>;
454
+ export type DeleteFileResponse = z.infer<typeof DeleteFileResponseSchema>;
455
+ /**
456
+ * Get signed URL params schema
457
+ */
458
+ export declare const GetSignedUrlParamsSchema: z.ZodObject<{
459
+ id: z.ZodString;
460
+ }, z.core.$strip>;
461
+ export type GetSignedUrlParams = z.input<typeof GetSignedUrlParamsSchema>;
462
+ /**
463
+ * Get signed URL query schema
464
+ */
465
+ export declare const GetSignedUrlQuerySchema: z.ZodObject<{
466
+ expiresIn: z.ZodOptional<z.ZodNumber>;
467
+ }, z.core.$strip>;
468
+ export type GetSignedUrlQuery = z.input<typeof GetSignedUrlQuerySchema>;
469
+ /**
470
+ * Get signed URL request schema (for service layer)
471
+ * Combines path params and optional query params
472
+ */
473
+ export declare const GetSignedUrlRequestSchema: z.ZodObject<{
474
+ id: z.ZodString;
475
+ query: z.ZodOptional<z.ZodObject<{
476
+ expiresIn: z.ZodOptional<z.ZodNumber>;
477
+ }, z.core.$strip>>;
478
+ }, z.core.$strip>;
479
+ export type GetSignedUrlRequest = z.input<typeof GetSignedUrlRequestSchema>;
480
+ /**
481
+ * Get signed URL response schema
482
+ */
483
+ export declare const GetSignedUrlResponseSchema: z.ZodObject<{
484
+ url: z.ZodString;
485
+ expiresAt: z.ZodString;
486
+ }, z.core.$strip>;
487
+ export type GetSignedUrlResponse = z.infer<typeof GetSignedUrlResponseSchema>;
@@ -1,5 +1,6 @@
1
1
  export type * from './campaigns';
2
2
  export type * from './featureFlags';
3
+ export type * from './files';
3
4
  export type * from './health';
4
5
  export type * from './infobip';
5
6
  export type * from './virustotal';
@@ -5,6 +5,7 @@ import type { VirusTotalEndpointTypes } from './virustotal';
5
5
  import type { CloudflareEndpointTypes, CloudFrontEndpointTypes, FastlyEndpointTypes } from './cdn';
6
6
  import type { FeatureFlagEndpointTypes } from './featureFlags';
7
7
  import type { PaymentEndpointTypes } from './payments';
8
+ import type { FilesEndpointTypes } from './files';
8
9
  /**
9
10
  * Query parameters type - matches fetchff's flexible param handling
10
11
  * Supports objects, URLSearchParams, and arrays of name-value pairs
@@ -13,5 +14,5 @@ export type QueryParams = Record<string, string | number | boolean | string[] |
13
14
  /**
14
15
  * All endpoint types combined
15
16
  */
16
- export interface EndpointTypes extends CampaignEndpointTypes, PaymentEndpointTypes, PollingEndpointTypes, InfobipEndpointTypes, VirusTotalEndpointTypes, CloudflareEndpointTypes, CloudFrontEndpointTypes, FastlyEndpointTypes, FeatureFlagEndpointTypes {
17
+ export interface EndpointTypes extends CampaignEndpointTypes, PaymentEndpointTypes, PollingEndpointTypes, InfobipEndpointTypes, VirusTotalEndpointTypes, CloudflareEndpointTypes, CloudFrontEndpointTypes, FastlyEndpointTypes, FeatureFlagEndpointTypes, FilesEndpointTypes {
17
18
  }