This commit is contained in:
2026-03-15 21:01:29 -04:00
parent d40f8fc375
commit 4306d86080
73 changed files with 13106 additions and 63 deletions

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface Activity {
id: string;
user_id: string;
document_id: string;
activity_type: string;
timestamp: string;
}

View File

@@ -0,0 +1,14 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
import type { Activity } from './activity';
import type { UserData } from './userData';
export interface ActivityResponse {
activities: Activity[];
user: UserData;
}

View File

@@ -0,0 +1,11 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export type CreateDocumentBody = {
document_file: Blob;
};

View File

@@ -0,0 +1,14 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface DatabaseInfo {
documents_size: number;
activity_size: number;
progress_size: number;
devices_size: number;
}

View File

@@ -0,0 +1,14 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface Device {
id?: string;
device_name?: string;
created_at?: string;
last_synced?: string;
}

View File

@@ -0,0 +1,20 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface Document {
id: string;
title: string;
author: string;
created_at: string;
updated_at: string;
deleted: boolean;
words?: number;
filepath?: string;
percentage?: number;
total_time_seconds?: number;
}

View File

@@ -0,0 +1,16 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
import type { Document } from './document';
import type { UserData } from './userData';
import type { Progress } from './progress';
export interface DocumentResponse {
document: Document;
user: UserData;
progress?: Progress;
}

View File

@@ -0,0 +1,22 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
import type { Document } from './document';
import type { UserData } from './userData';
import type { WordCount } from './wordCount';
export interface DocumentsResponse {
documents: Document[];
total: number;
page: number;
limit: number;
next_page?: number;
previous_page?: number;
search?: string;
user: UserData;
word_counts: WordCount[];
}

View File

@@ -0,0 +1,12 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface ErrorResponse {
code: number;
message: string;
}

View File

@@ -0,0 +1,14 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export type GetActivityParams = {
doc_filter?: boolean;
document_id?: string;
offset?: number;
limit?: number;
};

View File

@@ -0,0 +1,13 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export type GetDocumentsParams = {
page?: number;
limit?: number;
search?: string;
};

View File

@@ -0,0 +1,13 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export type GetProgressListParams = {
page?: number;
limit?: number;
document?: string;
};

View File

@@ -0,0 +1,13 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
import type { GetSearchSource } from './getSearchSource';
export type GetSearchParams = {
query: string;
source: GetSearchSource;
};

View File

@@ -0,0 +1,16 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export type GetSearchSource = typeof GetSearchSource[keyof typeof GetSearchSource];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const GetSearchSource = {
LibGen: 'LibGen',
Annas_Archive: 'Annas Archive',
} as const;

View File

@@ -0,0 +1,12 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface GraphDataPoint {
date: string;
minutes_read: number;
}

View File

@@ -0,0 +1,14 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
import type { GraphDataPoint } from './graphDataPoint';
import type { UserData } from './userData';
export interface GraphDataResponse {
graph_data: GraphDataPoint[];
user: UserData;
}

View File

@@ -0,0 +1,20 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
import type { DatabaseInfo } from './databaseInfo';
import type { StreaksResponse } from './streaksResponse';
import type { GraphDataResponse } from './graphDataResponse';
import type { UserStatisticsResponse } from './userStatisticsResponse';
import type { UserData } from './userData';
export interface HomeResponse {
database_info: DatabaseInfo;
streaks: StreaksResponse;
graph_data: GraphDataResponse;
user_statistics: UserStatisticsResponse;
user: UserData;
}

View File

@@ -0,0 +1,42 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export * from './activity';
export * from './activityResponse';
export * from './createDocumentBody';
export * from './databaseInfo';
export * from './device';
export * from './document';
export * from './documentResponse';
export * from './documentsResponse';
export * from './errorResponse';
export * from './getActivityParams';
export * from './getDocumentsParams';
export * from './getProgressListParams';
export * from './getSearchParams';
export * from './getSearchSource';
export * from './graphDataPoint';
export * from './graphDataResponse';
export * from './homeResponse';
export * from './leaderboardData';
export * from './leaderboardEntry';
export * from './loginRequest';
export * from './loginResponse';
export * from './postSearchBody';
export * from './progress';
export * from './progressListResponse';
export * from './progressResponse';
export * from './searchItem';
export * from './searchResponse';
export * from './setting';
export * from './settingsResponse';
export * from './streaksResponse';
export * from './userData';
export * from './userStatisticsResponse';
export * from './userStreak';
export * from './wordCount';

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
import type { LeaderboardEntry } from './leaderboardEntry';
export interface LeaderboardData {
all: LeaderboardEntry[];
year: LeaderboardEntry[];
month: LeaderboardEntry[];
week: LeaderboardEntry[];
}

View File

@@ -0,0 +1,12 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface LeaderboardEntry {
user_id: string;
value: number;
}

View File

@@ -0,0 +1,12 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface LoginRequest {
username: string;
password: string;
}

View File

@@ -0,0 +1,12 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface LoginResponse {
username: string;
is_admin: boolean;
}

View File

@@ -0,0 +1,14 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export type PostSearchBody = {
source: string;
title: string;
author: string;
id: string;
};

View File

@@ -0,0 +1,17 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface Progress {
title?: string;
author?: string;
device_name?: string;
percentage?: number;
document_id?: string;
user_id?: string;
created_at?: string;
}

View File

@@ -0,0 +1,19 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
import type { Progress } from './progress';
import type { UserData } from './userData';
export interface ProgressListResponse {
progress?: Progress[];
user?: UserData;
page?: number;
limit?: number;
next_page?: number;
previous_page?: number;
total?: number;
}

View File

@@ -0,0 +1,14 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
import type { Progress } from './progress';
import type { UserData } from './userData';
export interface ProgressResponse {
progress?: Progress;
user?: UserData;
}

View File

@@ -0,0 +1,18 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface SearchItem {
id?: string;
title?: string;
author?: string;
language?: string;
series?: string;
file_type?: string;
file_size?: string;
upload_date?: string;
}

View File

@@ -0,0 +1,14 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
import type { SearchItem } from './searchItem';
export interface SearchResponse {
results: SearchItem[];
source: string;
query: string;
}

View File

@@ -0,0 +1,14 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface Setting {
id: string;
user_id: string;
key: string;
value: string;
}

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
import type { UserData } from './userData';
import type { Device } from './device';
export interface SettingsResponse {
user: UserData;
timezone?: string;
devices?: Device[];
}

View File

@@ -0,0 +1,14 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
import type { UserStreak } from './userStreak';
import type { UserData } from './userData';
export interface StreaksResponse {
streaks: UserStreak[];
user: UserData;
}

View File

@@ -0,0 +1,12 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface UserData {
username: string;
is_admin: boolean;
}

View File

@@ -0,0 +1,16 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
import type { LeaderboardData } from './leaderboardData';
import type { UserData } from './userData';
export interface UserStatisticsResponse {
wpm: LeaderboardData;
duration: LeaderboardData;
words: LeaderboardData;
user: UserData;
}

View File

@@ -0,0 +1,17 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface UserStreak {
window: string;
max_streak: number;
max_streak_start_date: string;
max_streak_end_date: string;
current_streak: number;
current_streak_start_date: string;
current_streak_end_date: string;
}

View File

@@ -0,0 +1,12 @@
/**
* Generated by orval v7.21.0 🍺
* Do not edit manually.
* AnthoLume API v1
* REST API for AnthoLume document management system
* OpenAPI spec version: 1.0.0
*/
export interface WordCount {
document_id: string;
count: number;
}