@htkimura/files-storage-backend.rest-client 0.0.26 → 0.0.27
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.
- package/dist/generated/model/file.d.ts +1 -0
- package/dist/generated/model/fileFilters.d.ts +10 -0
- package/dist/generated/model/fileFilters.js +8 -0
- package/dist/generated/model/fileWithPresignedUrl.d.ts +1 -0
- package/dist/generated/model/index.d.ts +1 -0
- package/dist/generated/model/index.js +1 -0
- package/dist/generated/model/myFilesParams.d.ts +2 -0
- package/dist/generated/model/myFilesParams.js +0 -7
- package/dist/generated/storage/storage.d.ts +20 -2
- package/dist/generated/storage/storage.js +28 -2
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ export * from './createUserDto';
|
|
|
9
9
|
export * from './deleteBulkFilesByIdsParams';
|
|
10
10
|
export * from './deleteBulkFilesOutput';
|
|
11
11
|
export * from './file';
|
|
12
|
+
export * from './fileFilters';
|
|
12
13
|
export * from './fileWithPresignedUrl';
|
|
13
14
|
export * from './getBulkFilesByIdsParams';
|
|
14
15
|
export * from './getPresignedUploadUrlParams';
|
|
@@ -9,6 +9,7 @@ export * from './createUserDto';
|
|
|
9
9
|
export * from './deleteBulkFilesByIdsParams';
|
|
10
10
|
export * from './deleteBulkFilesOutput';
|
|
11
11
|
export * from './file';
|
|
12
|
+
export * from './fileFilters';
|
|
12
13
|
export * from './fileWithPresignedUrl';
|
|
13
14
|
export * from './getBulkFilesByIdsParams';
|
|
14
15
|
export * from './getPresignedUploadUrlParams';
|
|
@@ -25,9 +25,27 @@ export declare function useGetPresignedUploadUrl<TData = Awaited<ReturnType<type
|
|
|
25
25
|
queryKey: QueryKey;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
29
|
-
* @summary
|
|
28
|
+
* Confirms the file upload, adding the file to the thumbnail queue
|
|
29
|
+
* @summary Confirms the image upload
|
|
30
30
|
*/
|
|
31
|
+
export declare const imageUploaded: (options?: AxiosRequestConfig) => Promise<AxiosResponse<boolean>>;
|
|
32
|
+
export declare const getImageUploadedMutationOptions: <TData = AxiosResponse<boolean, any>, TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
33
|
+
mutation?: UseMutationOptions<TData, TError, void, TContext>;
|
|
34
|
+
axios?: AxiosRequestConfig;
|
|
35
|
+
}) => UseMutationOptions<TData, TError, void, TContext>;
|
|
36
|
+
export type ImageUploadedMutationResult = NonNullable<Awaited<ReturnType<typeof imageUploaded>>>;
|
|
37
|
+
export type ImageUploadedMutationError = AxiosError<unknown>;
|
|
38
|
+
/**
|
|
39
|
+
* @summary Confirms the image upload
|
|
40
|
+
*/
|
|
41
|
+
export declare const useImageUploaded: <TData = AxiosResponse<boolean, any>, TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
42
|
+
mutation?: UseMutationOptions<TData, TError, void, TContext>;
|
|
43
|
+
axios?: AxiosRequestConfig;
|
|
44
|
+
}) => UseMutationResult<TData, TError, void, TContext>;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the authenticated user files by ids with presigned urls
|
|
47
|
+
* @summary Get the authenticated user files by ids with presigned urls
|
|
48
|
+
*/
|
|
31
49
|
export declare const getBulkFilesByIds: (params: GetBulkFilesByIdsParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<FileWithPresignedUrl[]>>;
|
|
32
50
|
export declare const getGetBulkFilesByIdsQueryKey: (params: GetBulkFilesByIdsParams) => readonly ["/files/bulk", ...GetBulkFilesByIdsParams[]];
|
|
33
51
|
export declare const getGetBulkFilesByIdsQueryOptions: <TData = AxiosResponse<FileWithPresignedUrl[], any>, TError = AxiosError<unknown, any>>(params: GetBulkFilesByIdsParams, options?: {
|
|
@@ -36,9 +36,35 @@ export function useGetPresignedUploadUrl(params, options) {
|
|
|
36
36
|
return query;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
40
|
-
* @summary
|
|
39
|
+
* Confirms the file upload, adding the file to the thumbnail queue
|
|
40
|
+
* @summary Confirms the image upload
|
|
41
41
|
*/
|
|
42
|
+
export const imageUploaded = (options) => {
|
|
43
|
+
return axios.post(`/uploads/image-uploaded`, undefined, options);
|
|
44
|
+
};
|
|
45
|
+
export const getImageUploadedMutationOptions = (options) => {
|
|
46
|
+
const mutationKey = ['imageUploaded'];
|
|
47
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options ?
|
|
48
|
+
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
49
|
+
options
|
|
50
|
+
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
|
51
|
+
: { mutation: { mutationKey, }, axios: undefined };
|
|
52
|
+
const mutationFn = () => {
|
|
53
|
+
return imageUploaded(axiosOptions);
|
|
54
|
+
};
|
|
55
|
+
return { mutationFn, ...mutationOptions };
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* @summary Confirms the image upload
|
|
59
|
+
*/
|
|
60
|
+
export const useImageUploaded = (options) => {
|
|
61
|
+
const mutationOptions = getImageUploadedMutationOptions(options);
|
|
62
|
+
return useMutation(mutationOptions);
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Returns the authenticated user files by ids with presigned urls
|
|
66
|
+
* @summary Get the authenticated user files by ids with presigned urls
|
|
67
|
+
*/
|
|
42
68
|
export const getBulkFilesByIds = (params, options) => {
|
|
43
69
|
return axios.get(`/files/bulk`, {
|
|
44
70
|
...options,
|