posprocessing hook for DRF

This commit is contained in:
vabene1111
2024-03-30 11:01:37 +01:00
parent cb98b6723f
commit dfd9f7b066
156 changed files with 11621 additions and 1118 deletions

View File

@@ -24,19 +24,13 @@ export interface UserFile {
* @type {number}
* @memberof UserFile
*/
readonly id: number;
id?: number;
/**
*
* @type {string}
* @memberof UserFile
*/
name: string;
/**
*
* @type {string}
* @memberof UserFile
*/
file: string;
/**
*
* @type {string}
@@ -61,9 +55,7 @@ export interface UserFile {
* Check if a given object implements the UserFile interface.
*/
export function instanceOfUserFile(value: object): boolean {
if (!('id' in value)) return false;
if (!('name' in value)) return false;
if (!('file' in value)) return false;
if (!('fileDownload' in value)) return false;
if (!('preview' in value)) return false;
if (!('fileSizeKb' in value)) return false;
@@ -80,9 +72,8 @@ export function UserFileFromJSONTyped(json: any, ignoreDiscriminator: boolean):
}
return {
'id': json['id'],
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'file': json['file'],
'fileDownload': json['file_download'],
'preview': json['preview'],
'fileSizeKb': json['file_size_kb'],
@@ -95,8 +86,8 @@ export function UserFileToJSON(value?: UserFile | null): any {
}
return {
'id': value['id'],
'name': value['name'],
'file': value['file'],
};
}