2026-06-25 07:43:27 +09:00
|
|
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
|
|
|
// This file is automatically generated. DO NOT EDIT
|
|
|
|
|
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
|
|
|
// @ts-ignore: Unused imports
|
|
|
|
|
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
|
|
|
|
|
2026-06-28 23:48:13 +00:00
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
|
|
|
// @ts-ignore: Unused imports
|
|
|
|
|
import * as application$0 from "../github.com/wailsapp/wails/v3/pkg/application/models.js";
|
|
|
|
|
|
2026-06-25 07:43:27 +09:00
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
|
|
|
// @ts-ignore: Unused imports
|
|
|
|
|
import * as $models from "./models.js";
|
|
|
|
|
|
|
|
|
|
/**
|
2026-06-28 23:48:13 +00:00
|
|
|
* AddBookmark adds a source and question ID to the Bookmark table for a user
|
|
|
|
|
*/
|
|
|
|
|
export function AddBookmark(username: string, source: string, questionID: number): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(2172709195, username, source, questionID);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* AddGeminiKey adds a new Gemini API Key to database
|
|
|
|
|
*/
|
|
|
|
|
export function AddGeminiKey(key: string): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(4245109295, key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ApproveRegistration approves a registration request
|
2026-06-25 07:43:27 +09:00
|
|
|
*/
|
2026-06-28 23:48:13 +00:00
|
|
|
export function ApproveRegistration(username: string): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(3158451936, username);
|
2026-06-25 07:43:27 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function AskGemini(source: string, id: number, prompt: string, base64Image: string): $CancellablePromise<string> {
|
|
|
|
|
return $Call.ByID(248984702, source, id, prompt, base64Image);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2026-06-28 23:48:13 +00:00
|
|
|
* ChangePassword updates user password
|
2026-06-25 07:43:27 +09:00
|
|
|
*/
|
2026-06-28 23:48:13 +00:00
|
|
|
export function ChangePassword(username: string, oldPassword: string, newPassword: string): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(182621021, username, oldPassword, newPassword);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* DeleteGeminiKey deletes a Gemini API Key from database
|
|
|
|
|
*/
|
|
|
|
|
export function DeleteGeminiKey(key: string): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(939796543, key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* DeleteUser deletes a user from Users table (admin only)
|
|
|
|
|
*/
|
|
|
|
|
export function DeleteUser(username: string): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(4061081732, username);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* GetBookmarkedCategories retrieves categories that have bookmarked questions for a user
|
|
|
|
|
*/
|
|
|
|
|
export function GetBookmarkedCategories(username: string): $CancellablePromise<$models.CategoryInfo[]> {
|
|
|
|
|
return $Call.ByID(2614333737, username).then(($result: any) => {
|
2026-06-25 07:43:27 +09:00
|
|
|
return $$createType1($result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2026-06-28 23:48:13 +00:00
|
|
|
* GetBookmarkedQuestions retrieves all bookmarked questions for a given category and difficulty for a user
|
2026-06-25 07:43:27 +09:00
|
|
|
*/
|
2026-06-28 23:48:13 +00:00
|
|
|
export function GetBookmarkedQuestions(username: string, category: string, difficulty: string): $CancellablePromise<$models.Question[]> {
|
|
|
|
|
return $Call.ByID(1774610406, username, category, difficulty).then(($result: any) => {
|
2026-06-25 07:43:27 +09:00
|
|
|
return $$createType3($result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2026-06-28 23:48:13 +00:00
|
|
|
* GetBookmarkedTargets retrieves difficulties (targets) that have bookmarked questions within a category for a user
|
2026-06-25 07:43:27 +09:00
|
|
|
*/
|
2026-06-28 23:48:13 +00:00
|
|
|
export function GetBookmarkedTargets(username: string, category: string): $CancellablePromise<$models.TargetInfo[]> {
|
|
|
|
|
return $Call.ByID(859878861, username, category).then(($result: any) => {
|
2026-06-25 07:43:27 +09:00
|
|
|
return $$createType5($result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function GetCategories(): $CancellablePromise<$models.CategoryInfo[]> {
|
|
|
|
|
return $Call.ByID(4276529076).then(($result: any) => {
|
|
|
|
|
return $$createType1($result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-28 23:48:13 +00:00
|
|
|
/**
|
|
|
|
|
* GetCategoriesForUser retrieves categories based on user authorization
|
|
|
|
|
*/
|
|
|
|
|
export function GetCategoriesForUser(username: string): $CancellablePromise<$models.CategoryInfo[]> {
|
|
|
|
|
return $Call.ByID(2664331048, username).then(($result: any) => {
|
|
|
|
|
return $$createType1($result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function GetDescriptiveGradingHistory(username: string, source: string, questionID: number): $CancellablePromise<$models.DescriptiveGradingRecord[]> {
|
|
|
|
|
return $Call.ByID(1670245718, username, source, questionID).then(($result: any) => {
|
2026-06-25 07:43:27 +09:00
|
|
|
return $$createType7($result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-28 23:48:13 +00:00
|
|
|
/**
|
|
|
|
|
* GetGeminiKeys returns all stored Gemini API Keys
|
|
|
|
|
*/
|
|
|
|
|
export function GetGeminiKeys(): $CancellablePromise<string[]> {
|
|
|
|
|
return $Call.ByID(2410372615).then(($result: any) => {
|
|
|
|
|
return $$createType8($result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* GetPendingRegistrations retrieves list of pending sign-ups (admin only)
|
|
|
|
|
*/
|
|
|
|
|
export function GetPendingRegistrations(): $CancellablePromise<$models.User[]> {
|
|
|
|
|
return $Call.ByID(1284545415).then(($result: any) => {
|
|
|
|
|
return $$createType10($result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* GetPreferredModel returns the user's preferred Gemini model from database
|
|
|
|
|
*/
|
|
|
|
|
export function GetPreferredModel(): $CancellablePromise<string> {
|
|
|
|
|
return $Call.ByID(2043611586);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function GetQuestions(username: string, category: string, difficulty: string, subject: string): $CancellablePromise<$models.Question[]> {
|
|
|
|
|
return $Call.ByID(2580577541, username, category, difficulty, subject).then(($result: any) => {
|
2026-06-25 07:43:27 +09:00
|
|
|
return $$createType3($result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function GetSubjects(category: string, difficulty: string): $CancellablePromise<string[]> {
|
|
|
|
|
return $Call.ByID(1060436249, category, difficulty).then(($result: any) => {
|
|
|
|
|
return $$createType8($result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function GetTargets(category: string): $CancellablePromise<$models.TargetInfo[]> {
|
|
|
|
|
return $Call.ByID(371042150, category).then(($result: any) => {
|
|
|
|
|
return $$createType5($result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-28 23:48:13 +00:00
|
|
|
/**
|
|
|
|
|
* GetUserAllowedCategories returns allowed category names for a specific user
|
|
|
|
|
*/
|
|
|
|
|
export function GetUserAllowedCategories(username: string): $CancellablePromise<string[]> {
|
|
|
|
|
return $Call.ByID(850277733, username).then(($result: any) => {
|
|
|
|
|
return $$createType8($result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* GetUsers returns list of all users (admin only)
|
|
|
|
|
*/
|
|
|
|
|
export function GetUsers(): $CancellablePromise<$models.User[]> {
|
|
|
|
|
return $Call.ByID(4202172424).then(($result: any) => {
|
|
|
|
|
return $$createType10($result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-04 07:42:19 +00:00
|
|
|
export function GradeDescriptiveAnswer(username: string, source: string, questionID: number, userAnswer: string, ocrImageBase64: string): $CancellablePromise<$models.DescriptiveGradingRecord | null> {
|
|
|
|
|
return $Call.ByID(642001377, username, source, questionID, userAnswer, ocrImageBase64).then(($result: any) => {
|
2026-06-28 23:48:13 +00:00
|
|
|
return $$createType11($result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Login authenticates a user
|
|
|
|
|
*/
|
|
|
|
|
export function Login(username: string, password: string): $CancellablePromise<$models.User | null> {
|
|
|
|
|
return $Call.ByID(3841810241, username, password).then(($result: any) => {
|
|
|
|
|
return $$createType12($result);
|
2026-06-25 07:43:27 +09:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2026-06-28 23:48:13 +00:00
|
|
|
* Register creates a new registration application
|
2026-06-25 07:43:27 +09:00
|
|
|
*/
|
2026-06-28 23:48:13 +00:00
|
|
|
export function Register(username: string, password: string, nickname: string, phone: string, apiKey: string): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(2274424021, username, password, nickname, phone, apiKey);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* RejectRegistration rejects a registration request
|
|
|
|
|
*/
|
|
|
|
|
export function RejectRegistration(username: string): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(822104546, username);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* RemoveBookmark removes a source and question ID from the Bookmark table for a user
|
|
|
|
|
*/
|
|
|
|
|
export function RemoveBookmark(username: string, source: string, questionID: number): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(189585076, username, source, questionID);
|
2026-06-25 07:43:27 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function SaveAiExplanation(source: string, id: number, explanation: string): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(71515486, source, id, explanation);
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-28 23:48:13 +00:00
|
|
|
export function SetApp(app: application$0.App | null): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(1456464199, app);
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-25 07:43:27 +09:00
|
|
|
/**
|
|
|
|
|
* SetGeminiKey sets the API key for Gemini calls
|
|
|
|
|
*/
|
|
|
|
|
export function SetGeminiKey(key: string): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(2865570266, key);
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-28 23:48:13 +00:00
|
|
|
/**
|
|
|
|
|
* SetPreferredModel saves the user's preferred Gemini model to database
|
|
|
|
|
*/
|
|
|
|
|
export function SetPreferredModel(modelName: string): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(1264102078, modelName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* SetUserAllowedCategories replaces user's allowed categories
|
|
|
|
|
*/
|
|
|
|
|
export function SetUserAllowedCategories(username: string, categories: string[]): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(2086723649, username, categories);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* UpdateUserApiKey updates a user's personal API key in Users table and seeds it to GeminiKeys
|
|
|
|
|
*/
|
|
|
|
|
export function UpdateUserApiKey(username: string, apiKey: string): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(1770417973, username, apiKey);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* UpdateUserInfoForce updates user details by admin force (admin only)
|
|
|
|
|
*/
|
|
|
|
|
export function UpdateUserInfoForce(username: string, nickname: string, phone: string, password: string): $CancellablePromise<void> {
|
|
|
|
|
return $Call.ByID(1431090105, username, nickname, phone, password);
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-25 07:43:27 +09:00
|
|
|
// Private type creation functions
|
|
|
|
|
const $$createType0 = $models.CategoryInfo.createFrom;
|
|
|
|
|
const $$createType1 = $Create.Array($$createType0);
|
|
|
|
|
const $$createType2 = $models.Question.createFrom;
|
|
|
|
|
const $$createType3 = $Create.Array($$createType2);
|
|
|
|
|
const $$createType4 = $models.TargetInfo.createFrom;
|
|
|
|
|
const $$createType5 = $Create.Array($$createType4);
|
|
|
|
|
const $$createType6 = $models.DescriptiveGradingRecord.createFrom;
|
|
|
|
|
const $$createType7 = $Create.Array($$createType6);
|
|
|
|
|
const $$createType8 = $Create.Array($Create.Any);
|
2026-06-28 23:48:13 +00:00
|
|
|
const $$createType9 = $models.User.createFrom;
|
|
|
|
|
const $$createType10 = $Create.Array($$createType9);
|
|
|
|
|
const $$createType11 = $Create.Nullable($$createType6);
|
|
|
|
|
const $$createType12 = $Create.Nullable($$createType9);
|