@plyaz/api 1.6.6 → 1.6.7

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.
Files changed (51) hide show
  1. package/dist/api/endpoints/files.d.ts +38 -0
  2. package/dist/api/endpoints/files.d.ts.map +1 -0
  3. package/dist/api/endpoints/index.d.ts +29 -0
  4. package/dist/api/endpoints/index.d.ts.map +1 -1
  5. package/dist/api/services/files/DELETE/deleteFile.d.ts +28 -0
  6. package/dist/api/services/files/DELETE/deleteFile.d.ts.map +1 -0
  7. package/dist/api/services/files/DELETE/index.d.ts +7 -0
  8. package/dist/api/services/files/DELETE/index.d.ts.map +1 -0
  9. package/dist/api/services/files/DELETE/useDeleteFile.d.ts +33 -0
  10. package/dist/api/services/files/DELETE/useDeleteFile.d.ts.map +1 -0
  11. package/dist/api/services/files/GET/downloadFile.d.ts +37 -0
  12. package/dist/api/services/files/GET/downloadFile.d.ts.map +1 -0
  13. package/dist/api/services/files/GET/getFile.d.ts +26 -0
  14. package/dist/api/services/files/GET/getFile.d.ts.map +1 -0
  15. package/dist/api/services/files/GET/getSignedUrl.d.ts +34 -0
  16. package/dist/api/services/files/GET/getSignedUrl.d.ts.map +1 -0
  17. package/dist/api/services/files/GET/index.d.ts +11 -0
  18. package/dist/api/services/files/GET/index.d.ts.map +1 -0
  19. package/dist/api/services/files/GET/useDownloadFile.d.ts +41 -0
  20. package/dist/api/services/files/GET/useDownloadFile.d.ts.map +1 -0
  21. package/dist/api/services/files/GET/useGetFile.d.ts +31 -0
  22. package/dist/api/services/files/GET/useGetFile.d.ts.map +1 -0
  23. package/dist/api/services/files/GET/useGetSignedUrl.d.ts +40 -0
  24. package/dist/api/services/files/GET/useGetSignedUrl.d.ts.map +1 -0
  25. package/dist/api/services/files/POST/generateDocument.d.ts +42 -0
  26. package/dist/api/services/files/POST/generateDocument.d.ts.map +1 -0
  27. package/dist/api/services/files/POST/index.d.ts +11 -0
  28. package/dist/api/services/files/POST/index.d.ts.map +1 -0
  29. package/dist/api/services/files/POST/uploadFile.d.ts +40 -0
  30. package/dist/api/services/files/POST/uploadFile.d.ts.map +1 -0
  31. package/dist/api/services/files/POST/uploadFiles.d.ts +49 -0
  32. package/dist/api/services/files/POST/uploadFiles.d.ts.map +1 -0
  33. package/dist/api/services/files/POST/useGenerateDocument.d.ts +39 -0
  34. package/dist/api/services/files/POST/useGenerateDocument.d.ts.map +1 -0
  35. package/dist/api/services/files/POST/useUploadFile.d.ts +34 -0
  36. package/dist/api/services/files/POST/useUploadFile.d.ts.map +1 -0
  37. package/dist/api/services/files/POST/useUploadFiles.d.ts +36 -0
  38. package/dist/api/services/files/POST/useUploadFiles.d.ts.map +1 -0
  39. package/dist/api/services/files/index.d.ts +16 -0
  40. package/dist/api/services/files/index.d.ts.map +1 -0
  41. package/dist/api/services/index.d.ts +1 -0
  42. package/dist/api/services/index.d.ts.map +1 -1
  43. package/dist/entry-frontend.cjs +300 -0
  44. package/dist/entry-frontend.cjs.map +1 -1
  45. package/dist/entry-frontend.mjs +286 -1
  46. package/dist/entry-frontend.mjs.map +1 -1
  47. package/dist/index.cjs +300 -0
  48. package/dist/index.cjs.map +1 -1
  49. package/dist/index.mjs +286 -1
  50. package/dist/index.mjs.map +1 -1
  51. package/package.json +3 -4
@@ -0,0 +1,34 @@
1
+ /**
2
+ * React Query Mutation Hook for Uploading Files
3
+ * Provides mutation state and cache invalidation
4
+ */
5
+ import { createApiMutation } from '../../../hooks/factories';
6
+ import type { UploadFileRequest, UploadFileResponse, ServiceOptions } from '@plyaz/types/api';
7
+ import type { ErrorResponse } from '@plyaz/types/errors';
8
+ import type { EndpointsList } from '@/api/endpoints';
9
+ /**
10
+ * Hook for uploading files
11
+ *
12
+ * @param serviceOptions - Service options (apiClient, apiConfig, updateConfigOptions)
13
+ * @param mutationOptions - React Query mutation options
14
+ * @returns React Query mutation result
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * const { mutate, isPending } = useUploadFile();
19
+ *
20
+ * const handleUpload = () => {
21
+ * mutate({
22
+ * templateId: 'invoices/standard',
23
+ * templateData: { invoiceNumber: 'INV-001' },
24
+ * filename: 'invoice.pdf',
25
+ * }, {
26
+ * onSuccess: (result) => {
27
+ * console.log('File uploaded:', result.url);
28
+ * }
29
+ * });
30
+ * };
31
+ * ```
32
+ */
33
+ export declare function useUploadFile<TEndpoints = EndpointsList>(serviceOptions?: ServiceOptions<TEndpoints>, mutationOptions?: Parameters<ReturnType<typeof createApiMutation<UploadFileResponse, ErrorResponse, UploadFileRequest, unknown, TEndpoints>>>[1]): ReturnType<ReturnType<typeof createApiMutation<UploadFileResponse, ErrorResponse, UploadFileRequest, unknown, TEndpoints>>>;
34
+ //# sourceMappingURL=useUploadFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUploadFile.d.ts","sourceRoot":"","sources":["../../../../../src/api/services/files/POST/useUploadFile.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,aAAa,CAAC,UAAU,GAAG,aAAa,EACtD,cAAc,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,EAC3C,eAAe,CAAC,EAAE,UAAU,CAC1B,UAAU,CACR,OAAO,iBAAiB,CACtB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,UAAU,CACX,CACF,CACF,CAAC,CAAC,CAAC,GACH,UAAU,CACX,UAAU,CACR,OAAO,iBAAiB,CACtB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,UAAU,CACX,CACF,CACF,CAkBA"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * React Query Mutation Hook for Uploading Multiple Files
3
+ * Provides mutation state and cache invalidation
4
+ */
5
+ import { createApiMutation } from '../../../hooks/factories';
6
+ import type { UploadFilesRequest, UploadFilesResponse, ServiceOptions } from '@plyaz/types/api';
7
+ import type { ErrorResponse } from '@plyaz/types/errors';
8
+ import type { EndpointsList } from '@/api/endpoints';
9
+ /**
10
+ * Hook for uploading multiple files
11
+ *
12
+ * @param serviceOptions - Service options (apiClient, apiConfig, updateConfigOptions)
13
+ * @param mutationOptions - React Query mutation options
14
+ * @returns React Query mutation result
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * const { mutate, isPending } = useUploadFiles();
19
+ *
20
+ * const handleBulkUpload = () => {
21
+ * mutate({
22
+ * files: [
23
+ * { base64: '...', mimeType: 'image/png', category: 'images', entityType: 'user', entityId: 'user-1' },
24
+ * { base64: '...', mimeType: 'image/jpeg', category: 'images', entityType: 'user', entityId: 'user-1' },
25
+ * ],
26
+ * options: { concurrency: 3, continueOnError: true }
27
+ * }, {
28
+ * onSuccess: (result) => {
29
+ * console.log(`Uploaded ${result.summary.succeeded}/${result.summary.total} files`);
30
+ * }
31
+ * });
32
+ * };
33
+ * ```
34
+ */
35
+ export declare function useUploadFiles<TEndpoints = EndpointsList>(serviceOptions?: ServiceOptions<TEndpoints>, mutationOptions?: Parameters<ReturnType<typeof createApiMutation<UploadFilesResponse, ErrorResponse, UploadFilesRequest, unknown, TEndpoints>>>[1]): ReturnType<ReturnType<typeof createApiMutation<UploadFilesResponse, ErrorResponse, UploadFilesRequest, unknown, TEndpoints>>>;
36
+ //# sourceMappingURL=useUploadFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUploadFiles.d.ts","sourceRoot":"","sources":["../../../../../src/api/services/files/POST/useUploadFiles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,cAAc,CAAC,UAAU,GAAG,aAAa,EACvD,cAAc,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,EAC3C,eAAe,CAAC,EAAE,UAAU,CAC1B,UAAU,CACR,OAAO,iBAAiB,CACtB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,OAAO,EACP,UAAU,CACX,CACF,CACF,CAAC,CAAC,CAAC,GACH,UAAU,CACX,UAAU,CACR,OAAO,iBAAiB,CACtB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,OAAO,EACP,UAAU,CACX,CACF,CACF,CAkBA"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Files Services and Hooks
3
+ * Complete file operations with React Query integration
4
+ *
5
+ * Supports:
6
+ * - File upload (single and bulk with concurrency control)
7
+ * - Document generation (returns buffer without upload)
8
+ * - File metadata retrieval
9
+ * - File download
10
+ * - Signed URL generation
11
+ * - File deletion
12
+ */
13
+ export * from './GET';
14
+ export * from './POST';
15
+ export * from './DELETE';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/services/files/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,cAAc,OAAO,CAAC;AAGtB,cAAc,QAAQ,CAAC;AAGvB,cAAc,UAAU,CAAC"}
@@ -8,4 +8,5 @@ export * from './featureFlags';
8
8
  export * from './infobip';
9
9
  export * from './virustotal';
10
10
  export * from './cdn';
11
+ export * from './files';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGrE,cAAc,aAAa,CAAC;AAG5B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,WAAW,CAAC;AAG1B,cAAc,cAAc,CAAC;AAG7B,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGrE,cAAc,aAAa,CAAC;AAG5B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,WAAW,CAAC;AAG1B,cAAc,cAAc,CAAC;AAG7B,cAAc,OAAO,CAAC;AAGtB,cAAc,SAAS,CAAC"}
@@ -13913,6 +13913,41 @@ var featureFlagEndpoints = {
13913
13913
  }
13914
13914
  };
13915
13915
 
13916
+ // src/api/endpoints/files.ts
13917
+ var filesEndpoints = {
13918
+ // POST endpoints
13919
+ uploadFile: {
13920
+ url: "/upload",
13921
+ method: "POST"
13922
+ },
13923
+ uploadFiles: {
13924
+ url: "/upload/bulk",
13925
+ method: "POST"
13926
+ },
13927
+ generateDocument: {
13928
+ url: "/generate-document",
13929
+ method: "POST"
13930
+ },
13931
+ // GET endpoints
13932
+ downloadFile: {
13933
+ url: "/files/:id/download",
13934
+ method: "GET"
13935
+ },
13936
+ getSignedUrl: {
13937
+ url: "/files/:id/signed-url",
13938
+ method: "GET"
13939
+ },
13940
+ getFile: {
13941
+ url: "/files/:id",
13942
+ method: "GET"
13943
+ },
13944
+ // DELETE endpoints
13945
+ deleteFile: {
13946
+ url: "/files/:id",
13947
+ method: "DELETE"
13948
+ }
13949
+ };
13950
+
13916
13951
  // src/api/endpoints/polling.ts
13917
13952
  var pollingEndpoints = {
13918
13953
  // Job monitoring - use with 'jobStatus' polling strategy
@@ -14355,6 +14390,8 @@ var endpoints = {
14355
14390
  ...campaignEndpoints,
14356
14391
  // Feature flag endpoints (evaluation, management)
14357
14392
  ...featureFlagEndpoints,
14393
+ // File operation endpoints (upload, download, generate document)
14394
+ ...filesEndpoints,
14358
14395
  // These are only examples for the polling, none of these endpoints doesnt exist yet
14359
14396
  ...pollingEndpoints,
14360
14397
  // Infobip third-party provider endpoints (Email, SMS, WhatsApp)
@@ -23577,6 +23614,254 @@ async function fastlyPurgeUrl(payload, options) {
23577
23614
  });
23578
23615
  }
23579
23616
  __name(fastlyPurgeUrl, "fastlyPurgeUrl");
23617
+ async function getFile(request, options) {
23618
+ const client = options?.apiClient ?? getDefaultApiClient();
23619
+ const pathParams = { id: request.id };
23620
+ if (!validatePathParams("getFile", pathParams)) {
23621
+ throw new ApiPackageError(
23622
+ "Missing required path parameter: id",
23623
+ void 0,
23624
+ api.API_ERROR_CODES.REQUIRED_FIELD_MISSING
23625
+ );
23626
+ }
23627
+ const serviceDefaults = { unifiedStrategy: "interactive" };
23628
+ const mergedConfig = mergeConfigs(serviceDefaults, options?.apiConfig ?? {});
23629
+ const updateOptions = {
23630
+ strategy: "temporary",
23631
+ ...options?.updateConfigOptions
23632
+ };
23633
+ if (shouldApplyConfig(mergedConfig, updateOptions)) {
23634
+ client.updateConfig(mergedConfig, updateOptions);
23635
+ }
23636
+ return client.getFile({
23637
+ urlPathParams: pathParams
23638
+ });
23639
+ }
23640
+ __name(getFile, "getFile");
23641
+ async function downloadFile(request, options) {
23642
+ const client = options?.apiClient ?? getDefaultApiClient();
23643
+ const pathParams = { id: request.id };
23644
+ if (!validatePathParams("downloadFile", pathParams)) {
23645
+ throw new ApiPackageError(
23646
+ "Missing required path parameter: id",
23647
+ void 0,
23648
+ api.API_ERROR_CODES.REQUIRED_FIELD_MISSING
23649
+ );
23650
+ }
23651
+ const serviceDefaults = {
23652
+ unifiedStrategy: "background",
23653
+ timeout: 6e4
23654
+ // 60 seconds for downloads
23655
+ };
23656
+ const mergedConfig = mergeConfigs(serviceDefaults, options?.apiConfig ?? {});
23657
+ const updateOptions = {
23658
+ strategy: "temporary",
23659
+ ...options?.updateConfigOptions
23660
+ };
23661
+ if (shouldApplyConfig(mergedConfig, updateOptions)) {
23662
+ client.updateConfig(mergedConfig, updateOptions);
23663
+ }
23664
+ return client.downloadFile({
23665
+ urlPathParams: pathParams
23666
+ });
23667
+ }
23668
+ __name(downloadFile, "downloadFile");
23669
+ async function getSignedUrl(request, options) {
23670
+ const client = options?.apiClient ?? getDefaultApiClient();
23671
+ const pathParams = { id: request.id };
23672
+ if (!validatePathParams("getSignedUrl", pathParams)) {
23673
+ throw new ApiPackageError(
23674
+ "Missing required path parameter: id",
23675
+ void 0,
23676
+ api.API_ERROR_CODES.REQUIRED_FIELD_MISSING
23677
+ );
23678
+ }
23679
+ const serviceDefaults = { unifiedStrategy: "interactive" };
23680
+ const mergedConfig = mergeConfigs(serviceDefaults, options?.apiConfig ?? {});
23681
+ const updateOptions = {
23682
+ strategy: "temporary",
23683
+ ...options?.updateConfigOptions
23684
+ };
23685
+ if (shouldApplyConfig(mergedConfig, updateOptions)) {
23686
+ client.updateConfig(mergedConfig, updateOptions);
23687
+ }
23688
+ return client.getSignedUrl({
23689
+ urlPathParams: pathParams,
23690
+ ...request.query ? { params: request.query } : {}
23691
+ });
23692
+ }
23693
+ __name(getSignedUrl, "getSignedUrl");
23694
+
23695
+ // src/api/services/files/GET/useGetFile.ts
23696
+ function useGetFile(queryKey, request, serviceOptions, queryOptions) {
23697
+ return createApiQuery(getFile, {
23698
+ apiConfig: {
23699
+ unifiedStrategy: "interactive"
23700
+ }
23701
+ })(queryKey, request, serviceOptions, queryOptions);
23702
+ }
23703
+ __name(useGetFile, "useGetFile");
23704
+
23705
+ // src/api/services/files/GET/useDownloadFile.ts
23706
+ function useDownloadFile(queryKey, request, serviceOptions, queryOptions) {
23707
+ return createApiQuery(downloadFile, {
23708
+ apiConfig: {
23709
+ unifiedStrategy: "background"
23710
+ }
23711
+ })(queryKey, request, serviceOptions, queryOptions);
23712
+ }
23713
+ __name(useDownloadFile, "useDownloadFile");
23714
+
23715
+ // src/api/services/files/GET/useGetSignedUrl.ts
23716
+ function useGetSignedUrl(queryKey, request, serviceOptions, queryOptions) {
23717
+ return createApiQuery(getSignedUrl, {
23718
+ apiConfig: {
23719
+ unifiedStrategy: "interactive"
23720
+ }
23721
+ })(queryKey, request, serviceOptions, queryOptions);
23722
+ }
23723
+ __name(useGetSignedUrl, "useGetSignedUrl");
23724
+
23725
+ // src/api/services/files/POST/uploadFile.ts
23726
+ async function uploadFile(data, options) {
23727
+ const client = options?.apiClient ?? getDefaultApiClient();
23728
+ const serviceDefaults = {
23729
+ unifiedStrategy: "realtime",
23730
+ timeout: 6e4
23731
+ // 60 seconds for uploads
23732
+ };
23733
+ const mergedConfig = mergeConfigs(serviceDefaults, options?.apiConfig ?? {});
23734
+ const updateOptions = {
23735
+ strategy: "temporary",
23736
+ ...options?.updateConfigOptions
23737
+ };
23738
+ if (shouldApplyConfig(mergedConfig, updateOptions)) {
23739
+ client.updateConfig(mergedConfig, updateOptions);
23740
+ }
23741
+ return client.uploadFile({
23742
+ body: data
23743
+ });
23744
+ }
23745
+ __name(uploadFile, "uploadFile");
23746
+
23747
+ // src/api/services/files/POST/uploadFiles.ts
23748
+ async function uploadFiles(data, options) {
23749
+ const client = options?.apiClient ?? getDefaultApiClient();
23750
+ const serviceDefaults = {
23751
+ unifiedStrategy: "realtime",
23752
+ timeout: 12e4
23753
+ // 2 minutes for bulk uploads
23754
+ };
23755
+ const mergedConfig = mergeConfigs(serviceDefaults, options?.apiConfig ?? {});
23756
+ const updateOptions = {
23757
+ strategy: "temporary",
23758
+ ...options?.updateConfigOptions
23759
+ };
23760
+ if (shouldApplyConfig(mergedConfig, updateOptions)) {
23761
+ client.updateConfig(mergedConfig, updateOptions);
23762
+ }
23763
+ return client.uploadFiles({
23764
+ body: data
23765
+ });
23766
+ }
23767
+ __name(uploadFiles, "uploadFiles");
23768
+
23769
+ // src/api/services/files/POST/generateDocument.ts
23770
+ async function generateDocument(data, options) {
23771
+ const client = options?.apiClient ?? getDefaultApiClient();
23772
+ const serviceDefaults = {
23773
+ unifiedStrategy: "realtime",
23774
+ timeout: 3e4
23775
+ // 30 seconds for document generation
23776
+ };
23777
+ const mergedConfig = mergeConfigs(serviceDefaults, options?.apiConfig ?? {});
23778
+ const updateOptions = {
23779
+ strategy: "temporary",
23780
+ ...options?.updateConfigOptions
23781
+ };
23782
+ if (shouldApplyConfig(mergedConfig, updateOptions)) {
23783
+ client.updateConfig(mergedConfig, updateOptions);
23784
+ }
23785
+ return client.generateDocument({
23786
+ body: data
23787
+ });
23788
+ }
23789
+ __name(generateDocument, "generateDocument");
23790
+ function useUploadFile(serviceOptions, mutationOptions) {
23791
+ const queryClient = reactQuery.useQueryClient();
23792
+ return createApiMutation(uploadFile, {
23793
+ onSuccess: /* @__PURE__ */ __name(() => {
23794
+ void queryClient.invalidateQueries({
23795
+ queryKey: ["files"]
23796
+ });
23797
+ }, "onSuccess"),
23798
+ ...mutationOptions
23799
+ })(serviceOptions, mutationOptions);
23800
+ }
23801
+ __name(useUploadFile, "useUploadFile");
23802
+ function useUploadFiles(serviceOptions, mutationOptions) {
23803
+ const queryClient = reactQuery.useQueryClient();
23804
+ return createApiMutation(uploadFiles, {
23805
+ onSuccess: /* @__PURE__ */ __name(() => {
23806
+ void queryClient.invalidateQueries({
23807
+ queryKey: ["files"]
23808
+ });
23809
+ }, "onSuccess"),
23810
+ ...mutationOptions
23811
+ })(serviceOptions, mutationOptions);
23812
+ }
23813
+ __name(useUploadFiles, "useUploadFiles");
23814
+
23815
+ // src/api/services/files/POST/useGenerateDocument.ts
23816
+ function useGenerateDocument(serviceOptions, mutationOptions) {
23817
+ return createApiMutation(generateDocument, {
23818
+ // No cache invalidation needed for document generation
23819
+ ...mutationOptions
23820
+ })(serviceOptions, mutationOptions);
23821
+ }
23822
+ __name(useGenerateDocument, "useGenerateDocument");
23823
+ async function deleteFile(request, options) {
23824
+ const client = options?.apiClient ?? getDefaultApiClient();
23825
+ const pathParams = { id: request.id };
23826
+ if (!validatePathParams("deleteFile", pathParams)) {
23827
+ throw new ApiPackageError(
23828
+ "Missing required path parameter: id",
23829
+ void 0,
23830
+ api.API_ERROR_CODES.REQUIRED_FIELD_MISSING
23831
+ );
23832
+ }
23833
+ const serviceDefaults = { unifiedStrategy: "realtime" };
23834
+ const mergedConfig = mergeConfigs(serviceDefaults, options?.apiConfig ?? {});
23835
+ const updateOptions = {
23836
+ strategy: "temporary",
23837
+ ...options?.updateConfigOptions
23838
+ };
23839
+ if (shouldApplyConfig(mergedConfig, updateOptions)) {
23840
+ client.updateConfig(mergedConfig, updateOptions);
23841
+ }
23842
+ return client.deleteFile({
23843
+ urlPathParams: pathParams
23844
+ });
23845
+ }
23846
+ __name(deleteFile, "deleteFile");
23847
+ function useDeleteFile(serviceOptions, mutationOptions) {
23848
+ const queryClient = reactQuery.useQueryClient();
23849
+ return createApiMutation(deleteFile, {
23850
+ onSuccess: /* @__PURE__ */ __name((_data, request) => {
23851
+ void queryClient.invalidateQueries({
23852
+ queryKey: ["files"]
23853
+ });
23854
+ queryClient.removeQueries({
23855
+ queryKey: ["file", request.id]
23856
+ });
23857
+ queryClient.removeQueries({
23858
+ queryKey: ["signedUrl", request.id]
23859
+ });
23860
+ }, "onSuccess"),
23861
+ ...mutationOptions
23862
+ })(serviceOptions, mutationOptions);
23863
+ }
23864
+ __name(useDeleteFile, "useDeleteFile");
23580
23865
  function useApiConfigConflicts(client, options = {}) {
23581
23866
  const [conflicts, setConflicts] = react.useState([]);
23582
23867
  const [isChecking, setIsChecking] = react.useState(false);
@@ -26196,11 +26481,13 @@ exports.deepMerge = deepMerge;
26196
26481
  exports.deleteCache = deleteCache;
26197
26482
  exports.deleteCampaign = deleteCampaign;
26198
26483
  exports.deleteFeatureFlag = deleteFeatureFlag;
26484
+ exports.deleteFile = deleteFile;
26199
26485
  exports.detectConfigConflicts = detectConfigConflicts;
26200
26486
  exports.detectConflicts = detectConflicts;
26201
26487
  exports.detectPlatform = detectPlatform;
26202
26488
  exports.determinePrecedenceReason = determinePrecedenceReason;
26203
26489
  exports.disableNetworkConfigDebug = disableNetworkConfigDebug;
26490
+ exports.downloadFile = downloadFile;
26204
26491
  exports.enableNetworkConfigDebug = enableNetworkConfigDebug;
26205
26492
  exports.encrypt = encrypt;
26206
26493
  exports.endOfDay = endOfDay;
@@ -26229,6 +26516,7 @@ exports.fetchInfobipEmailReports = fetchInfobipEmailReports;
26229
26516
  exports.fetchInfobipScheduledEmailStatuses = fetchInfobipScheduledEmailStatuses;
26230
26517
  exports.fetchInfobipScheduledEmails = fetchInfobipScheduledEmails;
26231
26518
  exports.fetchInfobipValidations = fetchInfobipValidations;
26519
+ exports.filesEndpoints = filesEndpoints;
26232
26520
  exports.filterHistory = filterHistory;
26233
26521
  exports.filterObject = filterObject;
26234
26522
  exports.findEndpointsByPattern = findEndpointsByPattern;
@@ -26241,6 +26529,7 @@ exports.fromFetchffConfig = fromFetchffConfig;
26241
26529
  exports.fromISOString = fromISOString;
26242
26530
  exports.fromUnixTimestamp = fromUnixTimestamp;
26243
26531
  exports.generateComprehensiveReport = generateComprehensiveReport;
26532
+ exports.generateDocument = generateDocument;
26244
26533
  exports.generateIV = generateIV;
26245
26534
  exports.generateIssueBreakdown = generateIssueBreakdown;
26246
26535
  exports.generateRandomKey = generateRandomKey;
@@ -26289,6 +26578,7 @@ exports.getErrorHandlers = getErrorHandlers;
26289
26578
  exports.getEventManager = getEventManager;
26290
26579
  exports.getExtendedEnvironmentInfo = getExtendedEnvironmentInfo;
26291
26580
  exports.getFieldValue = getFieldValue;
26581
+ exports.getFile = getFile;
26292
26582
  exports.getFileExtension = getFileExtension;
26293
26583
  exports.getFrameworkAdaptiveBatchSize = getFrameworkAdaptiveBatchSize;
26294
26584
  exports.getFrameworkAdaptiveTimeout = getFrameworkAdaptiveTimeout;
@@ -26341,6 +26631,7 @@ exports.getRuntimeEnvironment = getRuntimeEnvironment;
26341
26631
  exports.getSSRSafeConfig = getSSRSafeConfig;
26342
26632
  exports.getSSRSafePollingConfig = getSSRSafePollingConfig;
26343
26633
  exports.getSessionStorage = getSessionStorage;
26634
+ exports.getSignedUrl = getSignedUrl;
26344
26635
  exports.getTimeComponents = getTimeComponents;
26345
26636
  exports.getUnifiedDebugger = getUnifiedDebugger;
26346
26637
  exports.getUnifiedStrategy = getUnifiedStrategy;
@@ -26582,7 +26873,9 @@ exports.updateCampaign = updateCampaign;
26582
26873
  exports.updateFeatureFlag = updateFeatureFlag;
26583
26874
  exports.updateGlobalConfig = updateGlobalConfig;
26584
26875
  exports.updateInfobipScheduledEmailStatuses = updateInfobipScheduledEmailStatuses;
26876
+ exports.uploadFile = uploadFile;
26585
26877
  exports.uploadFileForScanning = uploadFileForScanning;
26878
+ exports.uploadFiles = uploadFiles;
26586
26879
  exports.useAbortableRequest = useAbortableRequest;
26587
26880
  exports.useApiConfigConflicts = useApiConfigConflicts;
26588
26881
  exports.useApiDebugInfo = useApiDebugInfo;
@@ -26599,7 +26892,12 @@ exports.useCreateFeatureFlag = useCreateFeatureFlag;
26599
26892
  exports.useDebouncedSubscription = useDebouncedSubscription;
26600
26893
  exports.useDeleteCampaign = useDeleteCampaign;
26601
26894
  exports.useDeleteFeatureFlag = useDeleteFeatureFlag;
26895
+ exports.useDeleteFile = useDeleteFile;
26896
+ exports.useDownloadFile = useDownloadFile;
26602
26897
  exports.useEvaluateAllFeatureFlags = useEvaluateAllFeatureFlags;
26898
+ exports.useGenerateDocument = useGenerateDocument;
26899
+ exports.useGetFile = useGetFile;
26900
+ exports.useGetSignedUrl = useGetSignedUrl;
26603
26901
  exports.useJoinCampaign = useJoinCampaign;
26604
26902
  exports.useLeaveCampaign = useLeaveCampaign;
26605
26903
  exports.useMultipleSubscriptions = useMultipleSubscriptions;
@@ -26613,6 +26911,8 @@ exports.useSubscription = useSubscription;
26613
26911
  exports.useSubscriptionState = useSubscriptionState;
26614
26912
  exports.useUpdateCampaign = useUpdateCampaign;
26615
26913
  exports.useUpdateFeatureFlag = useUpdateFeatureFlag;
26914
+ exports.useUploadFile = useUploadFile;
26915
+ exports.useUploadFiles = useUploadFiles;
26616
26916
  exports.validateConfigUpdate = validateConfigUpdate;
26617
26917
  exports.validateEncryptionConfig = validateEncryptionConfig;
26618
26918
  exports.validateHeaders = validateHeaders;