frontend/src/api/generated/api.schemas.ts

416 lines
8.7 KiB
TypeScript

/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI definition
* OpenAPI spec version: v0
*/
export interface RegistrationRequestDTO {
name?: string;
email?: string;
password?: string;
}
export interface DefaultResponseDTOVoid {
timestamp?: string;
data?: unknown;
message?: string;
}
export interface ImportRequestDTO {
malId?: string;
aniListId?: string;
id: string;
}
export interface DefaultResponseDTOImportMangaResponseDTO {
timestamp?: string;
data?: ImportMangaResponseDTO;
message?: string;
}
export interface ImportMangaResponseDTO {
id: number;
}
export interface FileImportRequestDTO {
malId?: string;
aniListId?: string;
files?: Blob[];
}
export interface PresignedImportRequestDTO {
malId?: number;
aniListId?: number;
/** @minLength 1 */
originalFilename: string;
}
export interface DefaultResponseDTOPresignedImportResponseDTO {
timestamp?: string;
data?: PresignedImportResponseDTO;
message?: string;
}
export interface PresignedImportResponseDTO {
jobId?: number;
presignedUrl?: string;
fileKey?: string;
}
export interface AuthenticationRequestDTO {
email: string;
password: string;
}
export type AuthenticationResponseDTORole = typeof AuthenticationResponseDTORole[keyof typeof AuthenticationResponseDTORole];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const AuthenticationResponseDTORole = {
USER: 'USER',
} as const;
export interface AuthenticationResponseDTO {
id: number;
accessToken: string;
refreshToken: string;
email: string;
name: string;
role: AuthenticationResponseDTORole;
}
export interface DefaultResponseDTOAuthenticationResponseDTO {
timestamp?: string;
data?: AuthenticationResponseDTO;
message?: string;
}
export interface RefreshTokenRequestDTO {
refreshToken: string;
}
export interface ContentProviderDTO {
id?: number;
/** @minLength 1 */
name: string;
url?: string;
active?: boolean;
}
export interface ContentProviderListDTO {
providers: ContentProviderDTO[];
}
export interface DefaultResponseDTOContentProviderListDTO {
timestamp?: string;
data?: ContentProviderListDTO;
message?: string;
}
export interface DefaultResponseDTOListMangaContentDTO {
timestamp?: string;
data?: MangaContentDTO[];
message?: string;
}
export interface LanguageDTO {
id: number;
/** @minLength 1 */
code: string;
/** @minLength 1 */
name: string;
}
export interface MangaContentDTO {
id: number;
/** @minLength 1 */
title: string;
downloaded: boolean;
isRead: boolean;
language?: LanguageDTO;
}
export interface DefaultResponseDTOMangaContentImagesDTO {
timestamp?: string;
data?: MangaContentImagesDTO;
message?: string;
}
export interface MangaContentImagesDTO {
id: number;
/** @minLength 1 */
mangaTitle: string;
previousContentId?: number;
nextContentId?: number;
contentImageKeys: string[];
}
export interface DefaultResponseDTOMangaImportJobPageResponseDTO {
timestamp?: string;
data?: MangaImportJobPageResponseDTO;
message?: string;
}
export type MangaImportJobDTOStatus = typeof MangaImportJobDTOStatus[keyof typeof MangaImportJobDTOStatus];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const MangaImportJobDTOStatus = {
PENDING: 'PENDING',
PROCESSING: 'PROCESSING',
SUCCESS: 'SUCCESS',
FAILED: 'FAILED',
} as const;
export interface MangaImportJobDTO {
id?: number;
status?: MangaImportJobDTOStatus;
malId?: number;
aniListId?: number;
filename?: string;
s3Key?: string;
createdAt?: string;
updatedAt?: string;
errorMessage?: string;
errorStackTrace?: string;
}
export interface MangaImportJobPageResponseDTO {
page?: PageMangaImportJobDTO;
totalJobs?: number;
pendingJobs?: number;
processingJobs?: number;
completedJobs?: number;
failedJobs?: number;
}
export interface PageMangaImportJobDTO {
totalPages?: number;
totalElements?: number;
size?: number;
content?: MangaImportJobDTO[];
number?: number;
pageable?: PageableObject;
numberOfElements?: number;
sort?: SortObject;
first?: boolean;
last?: boolean;
empty?: boolean;
}
export interface PageableObject {
offset?: number;
paged?: boolean;
pageNumber?: number;
pageSize?: number;
unpaged?: boolean;
sort?: SortObject;
}
export interface SortObject {
empty?: boolean;
sorted?: boolean;
unsorted?: boolean;
}
export interface DefaultResponseDTOPageMangaListDTO {
timestamp?: string;
data?: PageMangaListDTO;
message?: string;
}
export type MangaListDTOStatus = typeof MangaListDTOStatus[keyof typeof MangaListDTOStatus];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const MangaListDTOStatus = {
ONGOING: 'ONGOING',
COMPLETED: 'COMPLETED',
HIATUS: 'HIATUS',
CANCELLED: 'CANCELLED',
UNKNOWN: 'UNKNOWN',
} as const;
export interface MangaListDTO {
id: number;
/** @minLength 1 */
title: string;
coverImageKey?: string;
status?: MangaListDTOStatus;
publishedFrom?: string;
publishedTo?: string;
providerCount?: number;
genres: string[];
authors: string[];
score: number;
favorite: boolean;
}
export interface PageMangaListDTO {
totalPages?: number;
totalElements?: number;
size?: number;
content?: MangaListDTO[];
number?: number;
pageable?: PageableObject;
numberOfElements?: number;
sort?: SortObject;
first?: boolean;
last?: boolean;
empty?: boolean;
}
export interface DefaultResponseDTOMangaDTO {
timestamp?: string;
data?: MangaDTO;
message?: string;
}
export type MangaDTOStatus = typeof MangaDTOStatus[keyof typeof MangaDTOStatus];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const MangaDTOStatus = {
ONGOING: 'ONGOING',
COMPLETED: 'COMPLETED',
HIATUS: 'HIATUS',
CANCELLED: 'CANCELLED',
UNKNOWN: 'UNKNOWN',
} as const;
export interface MangaDTO {
id: number;
/** @minLength 1 */
title: string;
coverImageKey?: string;
status?: MangaDTOStatus;
publishedFrom?: string;
publishedTo?: string;
synopsis?: string;
providerCount?: number;
alternativeTitles: string[];
genres: string[];
authors: string[];
score: number;
providers: MangaProviderDTO[];
chapterCount: number;
favorite: boolean;
following: boolean;
}
export interface MangaProviderDTO {
id?: number;
/** @minLength 1 */
providerName: string;
active?: boolean;
chaptersAvailable: number;
chaptersDownloaded: number;
supportsChapterFetch: boolean;
}
export interface DefaultResponseDTOListMangaIngestReviewDTO {
timestamp?: string;
data?: MangaIngestReviewDTO[];
message?: string;
}
export interface MangaIngestReviewDTO {
id: number;
/** @minLength 1 */
title: string;
/** @minLength 1 */
contentProviderName: string;
externalUrl?: string;
/** @minLength 1 */
reason: string;
createdAt: string;
}
export interface DefaultResponseDTOListGenreDTO {
timestamp?: string;
data?: GenreDTO[];
message?: string;
}
export interface GenreDTO {
id: number;
/** @minLength 1 */
name: string;
}
export type DownloadContentArchiveParams = {
contentArchiveFileType: DownloadContentArchiveContentArchiveFileType;
};
export type DownloadContentArchiveContentArchiveFileType = typeof DownloadContentArchiveContentArchiveFileType[keyof typeof DownloadContentArchiveContentArchiveFileType];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const DownloadContentArchiveContentArchiveFileType = {
CBZ: 'CBZ',
CBR: 'CBR',
} as const;
export type ResolveMangaIngestReviewParams = {
id: number;
malId?: number;
aniListId?: number;
};
export type GetContentProvidersParams = {
manualImport?: boolean;
};
export type GetMangaImportJobsParams = {
searchQuery?: string;
status?: GetMangaImportJobsStatus;
/**
* Zero-based page index (0..N)
* @minimum 0
*/
page?: number;
/**
* The size of the page to be returned
* @minimum 1
*/
size?: number;
/**
* Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
*/
sort?: string[];
};
export type GetMangaImportJobsStatus = typeof GetMangaImportJobsStatus[keyof typeof GetMangaImportJobsStatus];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const GetMangaImportJobsStatus = {
PENDING: 'PENDING',
PROCESSING: 'PROCESSING',
SUCCESS: 'SUCCESS',
FAILED: 'FAILED',
} as const;
export type GetMangasParams = {
searchQuery?: string;
genreIds?: number[];
statuses?: string[];
userFavorites?: boolean;
score?: number;
/**
* Zero-based page index (0..N)
* @minimum 0
*/
page?: number;
/**
* The size of the page to be returned
* @minimum 1
*/
size?: number;
/**
* Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
*/
sort?: string[];
};