Spaces:
Sleeping
Sleeping
| /** | |
| * Generated by orval v8.5.3 🍺 | |
| * Do not edit manually. | |
| * Api | |
| * RAQIM — Document to Markdown conversion platform API | |
| * OpenAPI spec version: 0.1.0 | |
| */ | |
| export interface HealthStatus { | |
| status: string; | |
| } | |
| export interface MessageResponse { | |
| message: string; | |
| } | |
| export interface ErrorResponse { | |
| error: string; | |
| message: string; | |
| } | |
| export interface RegisterBody { | |
| email: string; | |
| password: string; | |
| displayName?: string; | |
| } | |
| export interface LoginBody { | |
| email: string; | |
| password: string; | |
| } | |
| export interface ForgotPasswordBody { | |
| email: string; | |
| } | |
| export interface ResetPasswordBody { | |
| token: string; | |
| password: string; | |
| } | |
| export type UserRole = (typeof UserRole)[keyof typeof UserRole]; | |
| export const UserRole = { | |
| user: "user", | |
| admin: "admin", | |
| } as const; | |
| export type UserStatus = (typeof UserStatus)[keyof typeof UserStatus]; | |
| export const UserStatus = { | |
| pending: "pending", | |
| active: "active", | |
| suspended: "suspended", | |
| } as const; | |
| export interface User { | |
| id: string; | |
| email: string; | |
| displayName?: string; | |
| role: UserRole; | |
| status: UserStatus; | |
| createdAt: string; | |
| } | |
| export interface AuthResponse { | |
| accessToken: string; | |
| user: User; | |
| } | |
| export interface UserSummary { | |
| id: string; | |
| email: string; | |
| displayName?: string; | |
| } | |
| export interface Folder { | |
| id: string; | |
| name: string; | |
| parentId?: string | null; | |
| ownerId: string; | |
| fileCount: number; | |
| createdAt: string; | |
| updatedAt: string; | |
| } | |
| export interface CreateFolderBody { | |
| name: string; | |
| parentId?: string | null; | |
| } | |
| export interface UpdateFolderBody { | |
| name?: string; | |
| parentId?: string | null; | |
| } | |
| export type FileItemStatus = | |
| (typeof FileItemStatus)[keyof typeof FileItemStatus]; | |
| export const FileItemStatus = { | |
| uploading: "uploading", | |
| queued: "queued", | |
| processing: "processing", | |
| done: "done", | |
| failed: "failed", | |
| trashed: "trashed", | |
| } as const; | |
| export type FileItemPermission = | |
| | (typeof FileItemPermission)[keyof typeof FileItemPermission] | |
| | null; | |
| export const FileItemPermission = { | |
| owner: "owner", | |
| read: "read", | |
| edit: "edit", | |
| full: "full", | |
| } as const; | |
| export interface FileItem { | |
| id: string; | |
| name: string; | |
| folderId?: string | null; | |
| ownerId: string; | |
| originalName: string; | |
| originalType: string; | |
| sizeBytes: number; | |
| status: FileItemStatus; | |
| qualityScore?: number | null; | |
| wordCount?: number | null; | |
| language?: string | null; | |
| isShared: boolean; | |
| sharedWith?: UserSummary[]; | |
| permission?: FileItemPermission; | |
| createdAt: string; | |
| updatedAt: string; | |
| } | |
| export interface UpdateFileBody { | |
| name?: string; | |
| folderId?: string | null; | |
| } | |
| export interface FileContent { | |
| id: string; | |
| markdownContent: string; | |
| originalMarkdown: string; | |
| updatedAt: string; | |
| } | |
| export interface UpdateContentBody { | |
| markdownContent: string; | |
| } | |
| export type ExportBodyFormat = | |
| (typeof ExportBodyFormat)[keyof typeof ExportBodyFormat]; | |
| export const ExportBodyFormat = { | |
| md: "md", | |
| docx: "docx", | |
| pdf: "pdf", | |
| print: "print", | |
| } as const; | |
| export interface ExportBody { | |
| format: ExportBodyFormat; | |
| fileName?: string; | |
| } | |
| export interface ExportResponse { | |
| downloadUrl: string; | |
| fileName: string; | |
| format: string; | |
| } | |
| export interface StartConversionBody { | |
| fileId: string; | |
| pageStart?: number | null; | |
| pageEnd?: number | null; | |
| } | |
| export type ConversionJobStatus = | |
| (typeof ConversionJobStatus)[keyof typeof ConversionJobStatus]; | |
| export const ConversionJobStatus = { | |
| queued: "queued", | |
| analyzing: "analyzing", | |
| routing: "routing", | |
| ocr: "ocr", | |
| layout: "layout", | |
| scoring: "scoring", | |
| merging: "merging", | |
| cleanup: "cleanup", | |
| done: "done", | |
| failed: "failed", | |
| } as const; | |
| export type ConversionStepStatus = | |
| (typeof ConversionStepStatus)[keyof typeof ConversionStepStatus]; | |
| export const ConversionStepStatus = { | |
| pending: "pending", | |
| running: "running", | |
| done: "done", | |
| failed: "failed", | |
| } as const; | |
| export interface ConversionStep { | |
| name: string; | |
| status: ConversionStepStatus; | |
| label: string; | |
| } | |
| export interface ConversionJob { | |
| jobId: string; | |
| fileId: string; | |
| status: ConversionJobStatus; | |
| /** 0-100 */ | |
| progress: number; | |
| steps: ConversionStep[]; | |
| queuePosition?: number | null; | |
| elapsedSeconds?: number | null; | |
| estimatedSeconds?: number | null; | |
| errorMessage?: string | null; | |
| createdAt: string; | |
| } | |
| export type SharePermission = | |
| (typeof SharePermission)[keyof typeof SharePermission]; | |
| export const SharePermission = { | |
| read: "read", | |
| edit: "edit", | |
| full: "full", | |
| } as const; | |
| export interface Share { | |
| id: string; | |
| fileId?: string | null; | |
| folderId?: string | null; | |
| ownerId: string; | |
| sharedWithId: string; | |
| permission: SharePermission; | |
| fileName?: string | null; | |
| folderName?: string | null; | |
| ownerEmail: string; | |
| sharedWithEmail: string; | |
| createdAt: string; | |
| } | |
| export type CreateShareBodyPermission = | |
| (typeof CreateShareBodyPermission)[keyof typeof CreateShareBodyPermission]; | |
| export const CreateShareBodyPermission = { | |
| read: "read", | |
| edit: "edit", | |
| full: "full", | |
| } as const; | |
| export interface CreateShareBody { | |
| fileId?: string | null; | |
| folderId?: string | null; | |
| sharedWithId: string; | |
| permission: CreateShareBodyPermission; | |
| } | |
| export type UpdateShareBodyPermission = | |
| (typeof UpdateShareBodyPermission)[keyof typeof UpdateShareBodyPermission]; | |
| export const UpdateShareBodyPermission = { | |
| read: "read", | |
| edit: "edit", | |
| full: "full", | |
| } as const; | |
| export interface UpdateShareBody { | |
| permission: UpdateShareBodyPermission; | |
| } | |
| export type AdminUserRole = (typeof AdminUserRole)[keyof typeof AdminUserRole]; | |
| export const AdminUserRole = { | |
| user: "user", | |
| admin: "admin", | |
| } as const; | |
| export type AdminUserStatus = | |
| (typeof AdminUserStatus)[keyof typeof AdminUserStatus]; | |
| export const AdminUserStatus = { | |
| pending: "pending", | |
| active: "active", | |
| suspended: "suspended", | |
| } as const; | |
| export interface AdminUser { | |
| id: string; | |
| email: string; | |
| displayName?: string | null; | |
| role: AdminUserRole; | |
| status: AdminUserStatus; | |
| fileCount: number; | |
| lastLoginAt?: string | null; | |
| createdAt: string; | |
| } | |
| export type AdminCreateUserBodyRole = | |
| (typeof AdminCreateUserBodyRole)[keyof typeof AdminCreateUserBodyRole]; | |
| export const AdminCreateUserBodyRole = { | |
| user: "user", | |
| admin: "admin", | |
| } as const; | |
| export interface AdminCreateUserBody { | |
| email: string; | |
| password: string; | |
| displayName?: string; | |
| role?: AdminCreateUserBodyRole; | |
| } | |
| export type AdminUpdateUserBodyRole = | |
| (typeof AdminUpdateUserBodyRole)[keyof typeof AdminUpdateUserBodyRole]; | |
| export const AdminUpdateUserBodyRole = { | |
| user: "user", | |
| admin: "admin", | |
| } as const; | |
| export type AdminUpdateUserBodyStatus = | |
| (typeof AdminUpdateUserBodyStatus)[keyof typeof AdminUpdateUserBodyStatus]; | |
| export const AdminUpdateUserBodyStatus = { | |
| active: "active", | |
| suspended: "suspended", | |
| } as const; | |
| export interface AdminUpdateUserBody { | |
| role?: AdminUpdateUserBodyRole; | |
| status?: AdminUpdateUserBodyStatus; | |
| } | |
| export interface JoinRequest { | |
| id: string; | |
| email: string; | |
| displayName?: string | null; | |
| requestedAt: string; | |
| } | |
| export type ProcessJoinRequestBodyAction = | |
| (typeof ProcessJoinRequestBodyAction)[keyof typeof ProcessJoinRequestBodyAction]; | |
| export const ProcessJoinRequestBodyAction = { | |
| approve: "approve", | |
| reject: "reject", | |
| } as const; | |
| export interface ProcessJoinRequestBody { | |
| action: ProcessJoinRequestBodyAction; | |
| reason?: string | null; | |
| } | |
| export type PlatformStatsConversionsByType = { [key: string]: number }; | |
| export interface PlatformStats { | |
| totalUsers: number; | |
| activeUsers: number; | |
| pendingRequests: number; | |
| totalFiles: number; | |
| filesConvertedToday: number; | |
| filesConvertedThisWeek: number; | |
| successRate: number; | |
| averageQualityScore: number; | |
| averageProcessingSeconds: number; | |
| topFileType?: string; | |
| conversionsByType?: PlatformStatsConversionsByType; | |
| } | |
| export interface TrashItems { | |
| files: FileItem[]; | |
| folders: Folder[]; | |
| } | |
| export type ListFoldersParams = { | |
| /** | |
| * Parent folder ID (null for root) | |
| */ | |
| parentId?: string; | |
| }; | |
| export type ListFilesParams = { | |
| /** | |
| * Folder ID (null for root) | |
| */ | |
| folderId?: string; | |
| /** | |
| * Search by name | |
| */ | |
| search?: string; | |
| /** | |
| * Show trashed files | |
| */ | |
| trashed?: boolean; | |
| /** | |
| * Show files shared with me | |
| */ | |
| shared?: boolean; | |
| }; | |
| export type SearchUsersForSharingParams = { | |
| q: string; | |
| }; | |
| export type AdminListUsersParams = { | |
| status?: AdminListUsersStatus; | |
| role?: AdminListUsersRole; | |
| search?: string; | |
| }; | |
| export type AdminListUsersStatus = | |
| (typeof AdminListUsersStatus)[keyof typeof AdminListUsersStatus]; | |
| export const AdminListUsersStatus = { | |
| active: "active", | |
| suspended: "suspended", | |
| pending: "pending", | |
| } as const; | |
| export type AdminListUsersRole = | |
| (typeof AdminListUsersRole)[keyof typeof AdminListUsersRole]; | |
| export const AdminListUsersRole = { | |
| user: "user", | |
| admin: "admin", | |
| } as const; | |