mirror of
https://github.com/strapi/strapi.git
synced 2025-08-31 04:03:50 +00:00

* chore: migrate and create config files for the migration * chore: migrate test utils to TS * chore: fix the typo * chore: fix eslint errors * chore: define the shared contracts
47 lines
928 B
TypeScript
47 lines
928 B
TypeScript
/**
|
|
* Used to store user configurations related to media files.
|
|
* E.g the size optimization flag, the responsive dimensions flag and the auto orientation.
|
|
*/
|
|
|
|
import { errors } from '@strapi/utils';
|
|
import { Utils } from '@strapi/types';
|
|
|
|
export interface Settings {
|
|
data: {
|
|
sizeOptimization: boolean;
|
|
responsiveDimensions: boolean;
|
|
autoOrientation?: boolean;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* GET /upload/settings
|
|
*
|
|
* Return the stored settings for the media files.
|
|
*/
|
|
export declare namespace GetSettings {
|
|
export interface Request {
|
|
query?: {};
|
|
}
|
|
|
|
export interface Response {
|
|
data: Settings;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* PUT /upload/settings
|
|
*
|
|
* Update the stored settings
|
|
*/
|
|
export declare namespace UpdateSettings {
|
|
export interface Request {
|
|
body: Settings['data'];
|
|
}
|
|
|
|
export type Response = Utils.OneOf<
|
|
{ data: Settings['data'] },
|
|
{ error?: errors.ApplicationError | errors.ValidationError }
|
|
>;
|
|
}
|