updated docs

This commit is contained in:
2025-05-13 18:45:23 +03:00
parent 6dfa17c5e6
commit 3627412fe9
247 changed files with 30258 additions and 0 deletions

View File

View File

@@ -0,0 +1,29 @@
export async function retrieveAvailableApplications(data: any): Promise<string[]> {
try {
const response = await fetch("http://localhost:3000/api/menu", {
method: "POST",
headers: { "Content-Type": "application/json", "no-cache": "true" },
body: JSON.stringify({ ...data }),
})
if (response.status !== 200) {
throw new Error("Failed to retrieve available applications");
}
const result = await response.json();
return result.data
} catch (error) { throw error }
}
export async function retrievePageToRender(data: any): Promise<string> {
try {
const response = await fetch("http://localhost:3000/api/pages", {
method: "POST",
headers: { "Content-Type": "application/json", "no-cache": "true" },
body: JSON.stringify({ ...data }),
})
if (response.status !== 200) {
throw new Error("Failed to retrieve page to render");
}
const result = await response.json();
return result.data
} catch (error) { throw error }
}