115 lines
4.4 KiB
TypeScript
115 lines
4.4 KiB
TypeScript
|
|
// 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";
|
||
|
|
|
||
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||
|
|
// @ts-ignore: Unused imports
|
||
|
|
import * as $models from "./models.js";
|
||
|
|
|
||
|
|
/**
|
||
|
|
* AddBookmark adds a source and question ID to the Bookmark table
|
||
|
|
*/
|
||
|
|
export function AddBookmark(source: string, questionID: number): $CancellablePromise<void> {
|
||
|
|
return $Call.ByID(2172709195, source, questionID);
|
||
|
|
}
|
||
|
|
|
||
|
|
export function AskGemini(source: string, id: number, prompt: string, base64Image: string): $CancellablePromise<string> {
|
||
|
|
return $Call.ByID(248984702, source, id, prompt, base64Image);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* GetBookmarkedCategories retrieves categories that have bookmarked questions
|
||
|
|
*/
|
||
|
|
export function GetBookmarkedCategories(): $CancellablePromise<$models.CategoryInfo[]> {
|
||
|
|
return $Call.ByID(2614333737).then(($result: any) => {
|
||
|
|
return $$createType1($result);
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* GetBookmarkedQuestions retrieves all bookmarked questions for a given category and difficulty
|
||
|
|
*/
|
||
|
|
export function GetBookmarkedQuestions(category: string, difficulty: string): $CancellablePromise<$models.Question[]> {
|
||
|
|
return $Call.ByID(1774610406, category, difficulty).then(($result: any) => {
|
||
|
|
return $$createType3($result);
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* GetBookmarkedTargets retrieves difficulties (targets) that have bookmarked questions within a category
|
||
|
|
*/
|
||
|
|
export function GetBookmarkedTargets(category: string): $CancellablePromise<$models.TargetInfo[]> {
|
||
|
|
return $Call.ByID(859878861, category).then(($result: any) => {
|
||
|
|
return $$createType5($result);
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
export function GetCategories(): $CancellablePromise<$models.CategoryInfo[]> {
|
||
|
|
return $Call.ByID(4276529076).then(($result: any) => {
|
||
|
|
return $$createType1($result);
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
export function GetDescriptiveGradingHistory(source: string, questionID: number): $CancellablePromise<$models.DescriptiveGradingRecord[]> {
|
||
|
|
return $Call.ByID(1670245718, source, questionID).then(($result: any) => {
|
||
|
|
return $$createType7($result);
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
export function GetQuestions(category: string, difficulty: string, subject: string): $CancellablePromise<$models.Question[]> {
|
||
|
|
return $Call.ByID(2580577541, category, difficulty, subject).then(($result: any) => {
|
||
|
|
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);
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
export function GradeDescriptiveAnswer(source: string, questionID: number, userAnswer: string): $CancellablePromise<$models.DescriptiveGradingRecord | null> {
|
||
|
|
return $Call.ByID(642001377, source, questionID, userAnswer).then(($result: any) => {
|
||
|
|
return $$createType9($result);
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* RemoveBookmark removes a source and question ID from the Bookmark table
|
||
|
|
*/
|
||
|
|
export function RemoveBookmark(source: string, questionID: number): $CancellablePromise<void> {
|
||
|
|
return $Call.ByID(189585076, source, questionID);
|
||
|
|
}
|
||
|
|
|
||
|
|
export function SaveAiExplanation(source: string, id: number, explanation: string): $CancellablePromise<void> {
|
||
|
|
return $Call.ByID(71515486, source, id, explanation);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* SetGeminiKey sets the API key for Gemini calls
|
||
|
|
*/
|
||
|
|
export function SetGeminiKey(key: string): $CancellablePromise<void> {
|
||
|
|
return $Call.ByID(2865570266, key);
|
||
|
|
}
|
||
|
|
|
||
|
|
// 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);
|
||
|
|
const $$createType9 = $Create.Nullable($$createType6);
|