@arascreative/erp-client 1.0.0 → 1.1.0

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.
@@ -177,6 +177,105 @@ export type SearchAddresses400 = {
177
177
  instance?: string;
178
178
  errors?: SearchAddresses400Errors;
179
179
  };
180
+ export type InitiateUploadBody = {
181
+ originalName: string;
182
+ mimeType: string;
183
+ sizeBytes: number;
184
+ checksum: string;
185
+ purpose: string;
186
+ expiresInSeconds?: number;
187
+ };
188
+ export type InitiateUpload201 = {
189
+ fileId: string;
190
+ storageKey: string;
191
+ presignedUploadUrl: string;
192
+ expiresInSeconds: number;
193
+ };
194
+ export type InitiateUpload400Errors = {
195
+ [key: string]: string[];
196
+ };
197
+ export type InitiateUpload400 = {
198
+ type: string;
199
+ title: string;
200
+ status: number;
201
+ detail?: string;
202
+ instance?: string;
203
+ errors?: InitiateUpload400Errors;
204
+ };
205
+ export type InitiateUpload413Errors = {
206
+ [key: string]: string[];
207
+ };
208
+ export type InitiateUpload413 = {
209
+ type: string;
210
+ title: string;
211
+ status: number;
212
+ detail?: string;
213
+ instance?: string;
214
+ errors?: InitiateUpload413Errors;
215
+ };
216
+ export type InitiateUpload422Errors = {
217
+ [key: string]: string[];
218
+ };
219
+ export type InitiateUpload422 = {
220
+ type: string;
221
+ title: string;
222
+ status: number;
223
+ detail?: string;
224
+ instance?: string;
225
+ errors?: InitiateUpload422Errors;
226
+ };
227
+ export type UploadFileBody = {
228
+ originalName: string;
229
+ mimeType: string;
230
+ contentBase64: string;
231
+ purpose: string;
232
+ uploadedBy?: string;
233
+ };
234
+ export type UploadFile201 = {
235
+ id: string;
236
+ originalName: string;
237
+ mimeType: string;
238
+ sizeBytes: number;
239
+ checksum: string;
240
+ status: string;
241
+ visibility: string;
242
+ purpose: string;
243
+ accessUrl: string;
244
+ expiresAt: string;
245
+ };
246
+ export type UploadFile400Errors = {
247
+ [key: string]: string[];
248
+ };
249
+ export type UploadFile400 = {
250
+ type: string;
251
+ title: string;
252
+ status: number;
253
+ detail?: string;
254
+ instance?: string;
255
+ errors?: UploadFile400Errors;
256
+ };
257
+ export type UploadFile413Errors = {
258
+ [key: string]: string[];
259
+ };
260
+ export type UploadFile413 = {
261
+ type: string;
262
+ title: string;
263
+ status: number;
264
+ detail?: string;
265
+ instance?: string;
266
+ errors?: UploadFile413Errors;
267
+ };
268
+ export type UploadFile422Errors = {
269
+ [key: string]: string[];
270
+ };
271
+ export type UploadFile422 = {
272
+ type: string;
273
+ title: string;
274
+ status: number;
275
+ detail?: string;
276
+ instance?: string;
277
+ errors?: UploadFile422Errors;
278
+ };
180
279
  export type ToggleWarehouseStatus200 = {
181
280
  isActive: boolean;
182
281
  };
@@ -219,6 +318,100 @@ export type ChangeStockItemStatus404 = {
219
318
  instance?: string;
220
319
  errors?: ChangeStockItemStatus404Errors;
221
320
  };
321
+ export type CompleteUploadBody = {
322
+ actualChecksum?: string;
323
+ };
324
+ export type CompleteUpload200 = {
325
+ id: string;
326
+ status: string;
327
+ activatedAt: string;
328
+ };
329
+ export type CompleteUpload400Errors = {
330
+ [key: string]: string[];
331
+ };
332
+ export type CompleteUpload400 = {
333
+ type: string;
334
+ title: string;
335
+ status: number;
336
+ detail?: string;
337
+ instance?: string;
338
+ errors?: CompleteUpload400Errors;
339
+ };
340
+ export type CompleteUpload404Errors = {
341
+ [key: string]: string[];
342
+ };
343
+ export type CompleteUpload404 = {
344
+ type: string;
345
+ title: string;
346
+ status: number;
347
+ detail?: string;
348
+ instance?: string;
349
+ errors?: CompleteUpload404Errors;
350
+ };
351
+ export type CompleteUpload422Errors = {
352
+ [key: string]: string[];
353
+ };
354
+ export type CompleteUpload422 = {
355
+ type: string;
356
+ title: string;
357
+ status: number;
358
+ detail?: string;
359
+ instance?: string;
360
+ errors?: CompleteUpload422Errors;
361
+ };
362
+ export type CompleteUpload500Errors = {
363
+ [key: string]: string[];
364
+ };
365
+ export type CompleteUpload500 = {
366
+ type: string;
367
+ title: string;
368
+ status: number;
369
+ detail?: string;
370
+ instance?: string;
371
+ errors?: CompleteUpload500Errors;
372
+ };
373
+ export type GetFileAccessUrlParams = {
374
+ expiresInSeconds?: number;
375
+ };
376
+ export type GetFileAccessUrl200 = {
377
+ fileId: string;
378
+ url: string;
379
+ isPublic: boolean;
380
+ expiresAt: string;
381
+ };
382
+ export type GetFileAccessUrl400Errors = {
383
+ [key: string]: string[];
384
+ };
385
+ export type GetFileAccessUrl400 = {
386
+ type: string;
387
+ title: string;
388
+ status: number;
389
+ detail?: string;
390
+ instance?: string;
391
+ errors?: GetFileAccessUrl400Errors;
392
+ };
393
+ export type GetFileAccessUrl404Errors = {
394
+ [key: string]: string[];
395
+ };
396
+ export type GetFileAccessUrl404 = {
397
+ type: string;
398
+ title: string;
399
+ status: number;
400
+ detail?: string;
401
+ instance?: string;
402
+ errors?: GetFileAccessUrl404Errors;
403
+ };
404
+ export type GetFileAccessUrl422Errors = {
405
+ [key: string]: string[];
406
+ };
407
+ export type GetFileAccessUrl422 = {
408
+ type: string;
409
+ title: string;
410
+ status: number;
411
+ detail?: string;
412
+ instance?: string;
413
+ errors?: GetFileAccessUrl422Errors;
414
+ };
222
415
  export type GetWarehouseById200Pic = {
223
416
  name: string;
224
417
  phone: string;
@@ -417,6 +610,77 @@ export type DeleteStockItem409 = {
417
610
  instance?: string;
418
611
  errors?: DeleteStockItem409Errors;
419
612
  };
613
+ export type GetStoredFileById200 = {
614
+ id: string;
615
+ originalName: string;
616
+ mimeType: string;
617
+ sizeBytes: number;
618
+ checksum: string;
619
+ storageKey: string;
620
+ status: string;
621
+ visibility: string;
622
+ purpose: string;
623
+ uploadedBy: string;
624
+ expiresAt: string;
625
+ createdAt: string;
626
+ activatedAt: string;
627
+ deletedAt: string;
628
+ };
629
+ export type GetStoredFileById400Errors = {
630
+ [key: string]: string[];
631
+ };
632
+ export type GetStoredFileById400 = {
633
+ type: string;
634
+ title: string;
635
+ status: number;
636
+ detail?: string;
637
+ instance?: string;
638
+ errors?: GetStoredFileById400Errors;
639
+ };
640
+ export type GetStoredFileById404Errors = {
641
+ [key: string]: string[];
642
+ };
643
+ export type GetStoredFileById404 = {
644
+ type: string;
645
+ title: string;
646
+ status: number;
647
+ detail?: string;
648
+ instance?: string;
649
+ errors?: GetStoredFileById404Errors;
650
+ };
651
+ export type DeleteStoredFile400Errors = {
652
+ [key: string]: string[];
653
+ };
654
+ export type DeleteStoredFile400 = {
655
+ type: string;
656
+ title: string;
657
+ status: number;
658
+ detail?: string;
659
+ instance?: string;
660
+ errors?: DeleteStoredFile400Errors;
661
+ };
662
+ export type DeleteStoredFile404Errors = {
663
+ [key: string]: string[];
664
+ };
665
+ export type DeleteStoredFile404 = {
666
+ type: string;
667
+ title: string;
668
+ status: number;
669
+ detail?: string;
670
+ instance?: string;
671
+ errors?: DeleteStoredFile404Errors;
672
+ };
673
+ export type DeleteStoredFile409Errors = {
674
+ [key: string]: string[];
675
+ };
676
+ export type DeleteStoredFile409 = {
677
+ type: string;
678
+ title: string;
679
+ status: number;
680
+ detail?: string;
681
+ instance?: string;
682
+ errors?: DeleteStoredFile409Errors;
683
+ };
420
684
  export type GetHealth200 = {
421
685
  status: string;
422
686
  timestamp: string;
@@ -969,6 +1233,108 @@ export declare function useSearchAddresses<TData = Awaited<ReturnType<typeof sea
969
1233
  }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
970
1234
  queryKey: DataTag<QueryKey, TData, TError>;
971
1235
  };
1236
+ /**
1237
+ * Creates a pending file metadata record and generates a presigned S3 upload URL for direct client-to-storage upload.
1238
+ * @summary Initiate direct file upload to storage
1239
+ */
1240
+ export type initiateUploadResponse201 = {
1241
+ data: InitiateUpload201;
1242
+ status: 201;
1243
+ };
1244
+ export type initiateUploadResponse400 = {
1245
+ data: InitiateUpload400;
1246
+ status: 400;
1247
+ };
1248
+ export type initiateUploadResponse413 = {
1249
+ data: InitiateUpload413;
1250
+ status: 413;
1251
+ };
1252
+ export type initiateUploadResponse422 = {
1253
+ data: InitiateUpload422;
1254
+ status: 422;
1255
+ };
1256
+ export type initiateUploadResponseSuccess = (initiateUploadResponse201) & {
1257
+ headers: Headers;
1258
+ };
1259
+ export type initiateUploadResponseError = (initiateUploadResponse400 | initiateUploadResponse413 | initiateUploadResponse422) & {
1260
+ headers: Headers;
1261
+ };
1262
+ export type initiateUploadResponse = (initiateUploadResponseSuccess | initiateUploadResponseError);
1263
+ export declare const getInitiateUploadUrl: () => string;
1264
+ export declare const initiateUpload: (initiateUploadBody: InitiateUploadBody, options?: RequestInit) => Promise<initiateUploadResponse>;
1265
+ export declare const getInitiateUploadMutationOptions: <TError = InitiateUpload400 | InitiateUpload413 | InitiateUpload422, TContext = unknown>(options?: {
1266
+ mutation?: UseMutationOptions<Awaited<ReturnType<typeof initiateUpload>>, TError, {
1267
+ data: InitiateUploadBody;
1268
+ }, TContext>;
1269
+ fetch?: RequestInit;
1270
+ }) => UseMutationOptions<Awaited<ReturnType<typeof initiateUpload>>, TError, {
1271
+ data: InitiateUploadBody;
1272
+ }, TContext>;
1273
+ export type InitiateUploadMutationResult = NonNullable<Awaited<ReturnType<typeof initiateUpload>>>;
1274
+ export type InitiateUploadMutationBody = InitiateUploadBody;
1275
+ export type InitiateUploadMutationError = InitiateUpload400 | InitiateUpload413 | InitiateUpload422;
1276
+ /**
1277
+ * @summary Initiate direct file upload to storage
1278
+ */
1279
+ export declare const useInitiateUpload: <TError = InitiateUpload400 | InitiateUpload413 | InitiateUpload422, TContext = unknown>(options?: {
1280
+ mutation?: UseMutationOptions<Awaited<ReturnType<typeof initiateUpload>>, TError, {
1281
+ data: InitiateUploadBody;
1282
+ }, TContext>;
1283
+ fetch?: RequestInit;
1284
+ }, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof initiateUpload>>, TError, {
1285
+ data: InitiateUploadBody;
1286
+ }, TContext>;
1287
+ /**
1288
+ * Uploads a file directly with base64 encoded content, verifies against purpose policy, stores to S3, and activates immediately.
1289
+ * @summary Direct upload file
1290
+ */
1291
+ export type uploadFileResponse201 = {
1292
+ data: UploadFile201;
1293
+ status: 201;
1294
+ };
1295
+ export type uploadFileResponse400 = {
1296
+ data: UploadFile400;
1297
+ status: 400;
1298
+ };
1299
+ export type uploadFileResponse413 = {
1300
+ data: UploadFile413;
1301
+ status: 413;
1302
+ };
1303
+ export type uploadFileResponse422 = {
1304
+ data: UploadFile422;
1305
+ status: 422;
1306
+ };
1307
+ export type uploadFileResponseSuccess = (uploadFileResponse201) & {
1308
+ headers: Headers;
1309
+ };
1310
+ export type uploadFileResponseError = (uploadFileResponse400 | uploadFileResponse413 | uploadFileResponse422) & {
1311
+ headers: Headers;
1312
+ };
1313
+ export type uploadFileResponse = (uploadFileResponseSuccess | uploadFileResponseError);
1314
+ export declare const getUploadFileUrl: () => string;
1315
+ export declare const uploadFile: (uploadFileBody: UploadFileBody, options?: RequestInit) => Promise<uploadFileResponse>;
1316
+ export declare const getUploadFileMutationOptions: <TError = UploadFile400 | UploadFile413 | UploadFile422, TContext = unknown>(options?: {
1317
+ mutation?: UseMutationOptions<Awaited<ReturnType<typeof uploadFile>>, TError, {
1318
+ data: UploadFileBody;
1319
+ }, TContext>;
1320
+ fetch?: RequestInit;
1321
+ }) => UseMutationOptions<Awaited<ReturnType<typeof uploadFile>>, TError, {
1322
+ data: UploadFileBody;
1323
+ }, TContext>;
1324
+ export type UploadFileMutationResult = NonNullable<Awaited<ReturnType<typeof uploadFile>>>;
1325
+ export type UploadFileMutationBody = UploadFileBody;
1326
+ export type UploadFileMutationError = UploadFile400 | UploadFile413 | UploadFile422;
1327
+ /**
1328
+ * @summary Direct upload file
1329
+ */
1330
+ export declare const useUploadFile: <TError = UploadFile400 | UploadFile413 | UploadFile422, TContext = unknown>(options?: {
1331
+ mutation?: UseMutationOptions<Awaited<ReturnType<typeof uploadFile>>, TError, {
1332
+ data: UploadFileBody;
1333
+ }, TContext>;
1334
+ fetch?: RequestInit;
1335
+ }, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof uploadFile>>, TError, {
1336
+ data: UploadFileBody;
1337
+ }, TContext>;
972
1338
  /**
973
1339
  * Toggles the active state of a warehouse. Soft-deleted warehouses cannot be toggled.
974
1340
  * @summary Toggle warehouse active status
@@ -1062,6 +1428,121 @@ export declare const useChangeStockItemStatus: <TError = ChangeStockItemStatus40
1062
1428
  id: string;
1063
1429
  data: ChangeStockItemStatusBody;
1064
1430
  }, TContext>;
1431
+ /**
1432
+ * Verifies that physical object was written to storage provider, verifies checksum, and transitions file to ACTIVE.
1433
+ * @summary Complete direct file upload
1434
+ */
1435
+ export type completeUploadResponse200 = {
1436
+ data: CompleteUpload200;
1437
+ status: 200;
1438
+ };
1439
+ export type completeUploadResponse400 = {
1440
+ data: CompleteUpload400;
1441
+ status: 400;
1442
+ };
1443
+ export type completeUploadResponse404 = {
1444
+ data: CompleteUpload404;
1445
+ status: 404;
1446
+ };
1447
+ export type completeUploadResponse422 = {
1448
+ data: CompleteUpload422;
1449
+ status: 422;
1450
+ };
1451
+ export type completeUploadResponse500 = {
1452
+ data: CompleteUpload500;
1453
+ status: 500;
1454
+ };
1455
+ export type completeUploadResponseSuccess = (completeUploadResponse200) & {
1456
+ headers: Headers;
1457
+ };
1458
+ export type completeUploadResponseError = (completeUploadResponse400 | completeUploadResponse404 | completeUploadResponse422 | completeUploadResponse500) & {
1459
+ headers: Headers;
1460
+ };
1461
+ export type completeUploadResponse = (completeUploadResponseSuccess | completeUploadResponseError);
1462
+ export declare const getCompleteUploadUrl: (id: string) => string;
1463
+ export declare const completeUpload: (id: string, completeUploadBody: CompleteUploadBody, options?: RequestInit) => Promise<completeUploadResponse>;
1464
+ export declare const getCompleteUploadMutationOptions: <TError = CompleteUpload400 | CompleteUpload404 | CompleteUpload422 | CompleteUpload500, TContext = unknown>(options?: {
1465
+ mutation?: UseMutationOptions<Awaited<ReturnType<typeof completeUpload>>, TError, {
1466
+ id: string;
1467
+ data: CompleteUploadBody;
1468
+ }, TContext>;
1469
+ fetch?: RequestInit;
1470
+ }) => UseMutationOptions<Awaited<ReturnType<typeof completeUpload>>, TError, {
1471
+ id: string;
1472
+ data: CompleteUploadBody;
1473
+ }, TContext>;
1474
+ export type CompleteUploadMutationResult = NonNullable<Awaited<ReturnType<typeof completeUpload>>>;
1475
+ export type CompleteUploadMutationBody = CompleteUploadBody;
1476
+ export type CompleteUploadMutationError = CompleteUpload400 | CompleteUpload404 | CompleteUpload422 | CompleteUpload500;
1477
+ /**
1478
+ * @summary Complete direct file upload
1479
+ */
1480
+ export declare const useCompleteUpload: <TError = CompleteUpload400 | CompleteUpload404 | CompleteUpload422 | CompleteUpload500, TContext = unknown>(options?: {
1481
+ mutation?: UseMutationOptions<Awaited<ReturnType<typeof completeUpload>>, TError, {
1482
+ id: string;
1483
+ data: CompleteUploadBody;
1484
+ }, TContext>;
1485
+ fetch?: RequestInit;
1486
+ }, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof completeUpload>>, TError, {
1487
+ id: string;
1488
+ data: CompleteUploadBody;
1489
+ }, TContext>;
1490
+ /**
1491
+ * Generates a public CDN URL (for public files) or a time-limited signed download URL (for private files).
1492
+ * @summary Get file download or CDN access URL
1493
+ */
1494
+ export type getFileAccessUrlResponse200 = {
1495
+ data: GetFileAccessUrl200;
1496
+ status: 200;
1497
+ };
1498
+ export type getFileAccessUrlResponse400 = {
1499
+ data: GetFileAccessUrl400;
1500
+ status: 400;
1501
+ };
1502
+ export type getFileAccessUrlResponse404 = {
1503
+ data: GetFileAccessUrl404;
1504
+ status: 404;
1505
+ };
1506
+ export type getFileAccessUrlResponse422 = {
1507
+ data: GetFileAccessUrl422;
1508
+ status: 422;
1509
+ };
1510
+ export type getFileAccessUrlResponseSuccess = (getFileAccessUrlResponse200) & {
1511
+ headers: Headers;
1512
+ };
1513
+ export type getFileAccessUrlResponseError = (getFileAccessUrlResponse400 | getFileAccessUrlResponse404 | getFileAccessUrlResponse422) & {
1514
+ headers: Headers;
1515
+ };
1516
+ export type getFileAccessUrlResponse = (getFileAccessUrlResponseSuccess | getFileAccessUrlResponseError);
1517
+ export declare const getGetFileAccessUrlUrl: (id: string, params?: GetFileAccessUrlParams) => string;
1518
+ export declare const getFileAccessUrl: (id: string, params?: GetFileAccessUrlParams, options?: RequestInit) => Promise<getFileAccessUrlResponse>;
1519
+ export declare const getGetFileAccessUrlQueryKey: (id?: string, params?: GetFileAccessUrlParams) => readonly [`/files/${string}/access-url`, ...GetFileAccessUrlParams[]];
1520
+ export declare const getGetFileAccessUrlQueryOptions: <TData = Awaited<ReturnType<typeof getFileAccessUrl>>, TError = GetFileAccessUrl400 | GetFileAccessUrl404 | GetFileAccessUrl422>(id: string, params?: GetFileAccessUrlParams, options?: {
1521
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileAccessUrl>>, TError, TData>>;
1522
+ fetch?: RequestInit;
1523
+ }) => UseQueryOptions<Awaited<ReturnType<typeof getFileAccessUrl>>, TError, TData> & {
1524
+ queryKey: DataTag<QueryKey, TData, TError>;
1525
+ };
1526
+ export type GetFileAccessUrlQueryResult = NonNullable<Awaited<ReturnType<typeof getFileAccessUrl>>>;
1527
+ export type GetFileAccessUrlQueryError = GetFileAccessUrl400 | GetFileAccessUrl404 | GetFileAccessUrl422;
1528
+ export declare function useGetFileAccessUrl<TData = Awaited<ReturnType<typeof getFileAccessUrl>>, TError = GetFileAccessUrl400 | GetFileAccessUrl404 | GetFileAccessUrl422>(id: string, params: undefined | GetFileAccessUrlParams, options: {
1529
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileAccessUrl>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getFileAccessUrl>>, TError, Awaited<ReturnType<typeof getFileAccessUrl>>>, 'initialData'>;
1530
+ fetch?: RequestInit;
1531
+ }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
1532
+ queryKey: DataTag<QueryKey, TData, TError>;
1533
+ };
1534
+ export declare function useGetFileAccessUrl<TData = Awaited<ReturnType<typeof getFileAccessUrl>>, TError = GetFileAccessUrl400 | GetFileAccessUrl404 | GetFileAccessUrl422>(id: string, params?: GetFileAccessUrlParams, options?: {
1535
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileAccessUrl>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getFileAccessUrl>>, TError, Awaited<ReturnType<typeof getFileAccessUrl>>>, 'initialData'>;
1536
+ fetch?: RequestInit;
1537
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
1538
+ queryKey: DataTag<QueryKey, TData, TError>;
1539
+ };
1540
+ export declare function useGetFileAccessUrl<TData = Awaited<ReturnType<typeof getFileAccessUrl>>, TError = GetFileAccessUrl400 | GetFileAccessUrl404 | GetFileAccessUrl422>(id: string, params?: GetFileAccessUrlParams, options?: {
1541
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileAccessUrl>>, TError, TData>>;
1542
+ fetch?: RequestInit;
1543
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
1544
+ queryKey: DataTag<QueryKey, TData, TError>;
1545
+ };
1065
1546
  /**
1066
1547
  * Retrieves warehouse details by its identifier. Returns 404 if not found or soft-deleted.
1067
1548
  * @summary Get warehouse by ID
@@ -1296,6 +1777,101 @@ export declare const useDeleteStockItem: <TError = DeleteStockItem400 | DeleteSt
1296
1777
  }, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deleteStockItem>>, TError, {
1297
1778
  id: string;
1298
1779
  }, TContext>;
1780
+ /**
1781
+ * Retrieves active stored file metadata by its ID.
1782
+ * @summary Get stored file by ID
1783
+ */
1784
+ export type getStoredFileByIdResponse200 = {
1785
+ data: GetStoredFileById200;
1786
+ status: 200;
1787
+ };
1788
+ export type getStoredFileByIdResponse400 = {
1789
+ data: GetStoredFileById400;
1790
+ status: 400;
1791
+ };
1792
+ export type getStoredFileByIdResponse404 = {
1793
+ data: GetStoredFileById404;
1794
+ status: 404;
1795
+ };
1796
+ export type getStoredFileByIdResponseSuccess = (getStoredFileByIdResponse200) & {
1797
+ headers: Headers;
1798
+ };
1799
+ export type getStoredFileByIdResponseError = (getStoredFileByIdResponse400 | getStoredFileByIdResponse404) & {
1800
+ headers: Headers;
1801
+ };
1802
+ export type getStoredFileByIdResponse = (getStoredFileByIdResponseSuccess | getStoredFileByIdResponseError);
1803
+ export declare const getGetStoredFileByIdUrl: (id: string) => string;
1804
+ export declare const getStoredFileById: (id: string, options?: RequestInit) => Promise<getStoredFileByIdResponse>;
1805
+ export declare const getGetStoredFileByIdQueryKey: (id?: string) => readonly [`/files/${string}`];
1806
+ export declare const getGetStoredFileByIdQueryOptions: <TData = Awaited<ReturnType<typeof getStoredFileById>>, TError = GetStoredFileById400 | GetStoredFileById404>(id: string, options?: {
1807
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getStoredFileById>>, TError, TData>>;
1808
+ fetch?: RequestInit;
1809
+ }) => UseQueryOptions<Awaited<ReturnType<typeof getStoredFileById>>, TError, TData> & {
1810
+ queryKey: DataTag<QueryKey, TData, TError>;
1811
+ };
1812
+ export type GetStoredFileByIdQueryResult = NonNullable<Awaited<ReturnType<typeof getStoredFileById>>>;
1813
+ export type GetStoredFileByIdQueryError = GetStoredFileById400 | GetStoredFileById404;
1814
+ export declare function useGetStoredFileById<TData = Awaited<ReturnType<typeof getStoredFileById>>, TError = GetStoredFileById400 | GetStoredFileById404>(id: string, options: {
1815
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getStoredFileById>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getStoredFileById>>, TError, Awaited<ReturnType<typeof getStoredFileById>>>, 'initialData'>;
1816
+ fetch?: RequestInit;
1817
+ }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
1818
+ queryKey: DataTag<QueryKey, TData, TError>;
1819
+ };
1820
+ export declare function useGetStoredFileById<TData = Awaited<ReturnType<typeof getStoredFileById>>, TError = GetStoredFileById400 | GetStoredFileById404>(id: string, options?: {
1821
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getStoredFileById>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getStoredFileById>>, TError, Awaited<ReturnType<typeof getStoredFileById>>>, 'initialData'>;
1822
+ fetch?: RequestInit;
1823
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
1824
+ queryKey: DataTag<QueryKey, TData, TError>;
1825
+ };
1826
+ export declare function useGetStoredFileById<TData = Awaited<ReturnType<typeof getStoredFileById>>, TError = GetStoredFileById400 | GetStoredFileById404>(id: string, options?: {
1827
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getStoredFileById>>, TError, TData>>;
1828
+ fetch?: RequestInit;
1829
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
1830
+ queryKey: DataTag<QueryKey, TData, TError>;
1831
+ };
1832
+ /**
1833
+ * Marks a stored file as DELETED. Files in active use by other modules cannot be deleted.
1834
+ * @summary Soft delete stored file
1835
+ */
1836
+ export type deleteStoredFileResponse400 = {
1837
+ data: DeleteStoredFile400;
1838
+ status: 400;
1839
+ };
1840
+ export type deleteStoredFileResponse404 = {
1841
+ data: DeleteStoredFile404;
1842
+ status: 404;
1843
+ };
1844
+ export type deleteStoredFileResponse409 = {
1845
+ data: DeleteStoredFile409;
1846
+ status: 409;
1847
+ };
1848
+ export type deleteStoredFileResponseError = (deleteStoredFileResponse400 | deleteStoredFileResponse404 | deleteStoredFileResponse409) & {
1849
+ headers: Headers;
1850
+ };
1851
+ export type deleteStoredFileResponse = (deleteStoredFileResponseError);
1852
+ export declare const getDeleteStoredFileUrl: (id: string) => string;
1853
+ export declare const deleteStoredFile: (id: string, options?: RequestInit) => Promise<deleteStoredFileResponse>;
1854
+ export declare const getDeleteStoredFileMutationOptions: <TError = DeleteStoredFile400 | DeleteStoredFile404 | DeleteStoredFile409, TContext = unknown>(options?: {
1855
+ mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteStoredFile>>, TError, {
1856
+ id: string;
1857
+ }, TContext>;
1858
+ fetch?: RequestInit;
1859
+ }) => UseMutationOptions<Awaited<ReturnType<typeof deleteStoredFile>>, TError, {
1860
+ id: string;
1861
+ }, TContext>;
1862
+ export type DeleteStoredFileMutationResult = NonNullable<Awaited<ReturnType<typeof deleteStoredFile>>>;
1863
+ export type DeleteStoredFileMutationError = DeleteStoredFile400 | DeleteStoredFile404 | DeleteStoredFile409;
1864
+ /**
1865
+ * @summary Soft delete stored file
1866
+ */
1867
+ export declare const useDeleteStoredFile: <TError = DeleteStoredFile400 | DeleteStoredFile404 | DeleteStoredFile409, TContext = unknown>(options?: {
1868
+ mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteStoredFile>>, TError, {
1869
+ id: string;
1870
+ }, TContext>;
1871
+ fetch?: RequestInit;
1872
+ }, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deleteStoredFile>>, TError, {
1873
+ id: string;
1874
+ }, TContext>;
1299
1875
  /**
1300
1876
  * @summary Health check
1301
1877
  */