new api spec

This commit is contained in:
Raj Nandan Sharma
2026-02-02 10:28:55 +05:30
parent 8bd26cca92
commit 6c15d48b58
5 changed files with 2110 additions and 36 deletions
+82 -35
View File
@@ -29,6 +29,7 @@
"@rajnandan1/aven": "file:../aven",
"@rajnandan1/svelte-legos": "^0.0.1",
"@scalar/express-api-reference": "^0.8.28",
"@scalar/sveltekit": "^0.1.43",
"@uiw/codemirror-theme-github": "^4.25.3",
"analytics": "^0.8.19",
"axios": "^1.13.2",
@@ -129,8 +130,8 @@
}
},
"../aven": {
"name": "@rajnandan1/atticus",
"version": "1.0.0",
"name": "@rajnandan1/aven",
"version": "0.1.1",
"license": "MIT",
"dependencies": {
"@openai/agents": "^0.3.7",
@@ -3254,7 +3255,6 @@
"version": "1.0.0-next.29",
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz",
"integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==",
"devOptional": true,
"license": "MIT"
},
"node_modules/@rajnandan1/aven": {
@@ -3947,21 +3947,6 @@
"node": ">=20"
}
},
"node_modules/@scalar/core/node_modules/type-fest": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-5.4.1.tgz",
"integrity": "sha512-xygQcmneDyzsEuKZrFbRMne5HDqMs++aFzefrJTgEIKjQ3rekM+RPfFCVq2Gp1VIDqddoYeppCj4Pcb+RZW0GQ==",
"license": "(MIT OR CC0-1.0)",
"dependencies": {
"tagged-tag": "^1.0.0"
},
"engines": {
"node": ">=20"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@scalar/express-api-reference": {
"version": "0.8.35",
"resolved": "https://registry.npmjs.org/@scalar/express-api-reference/-/express-api-reference-0.8.35.tgz",
@@ -3983,11 +3968,62 @@
"node": ">=20"
}
},
"node_modules/@scalar/sveltekit": {
"version": "0.1.43",
"resolved": "https://registry.npmjs.org/@scalar/sveltekit/-/sveltekit-0.1.43.tgz",
"integrity": "sha512-pNebLeZm9R718YwrpakOrBMa6StiIOVCnTkkb+RvS04/EqSygdR7OzXBbCSDB3VBW+UbGhVcFhoya45HP/jSXQ==",
"license": "MIT",
"dependencies": {
"@scalar/core": "0.3.36"
},
"engines": {
"node": ">=20"
},
"peerDependencies": {
"@sveltejs/kit": "^2.25.0",
"svelte": "^5.0.0"
}
},
"node_modules/@scalar/sveltekit/node_modules/@scalar/core": {
"version": "0.3.36",
"resolved": "https://registry.npmjs.org/@scalar/core/-/core-0.3.36.tgz",
"integrity": "sha512-gdgoF/XP2RkvhqGlI0l2MWTR/2522GPdaiQkWwS348Po8oCkJy2npxFuZbC2jtp6DIrWDrOD6qYgHssyzMmcrA==",
"license": "MIT",
"dependencies": {
"@scalar/types": "0.6.1"
},
"engines": {
"node": ">=20"
}
},
"node_modules/@scalar/types": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/@scalar/types/-/types-0.6.1.tgz",
"integrity": "sha512-2u/pZTauRLoUDD2PpJF8XDflZX3PgaYSD72cFDBL1WVM/jb0IxoWggxWKm34OR03LnNYbTvXlwfyr2QZ0hm3Xg==",
"license": "MIT",
"dependencies": {
"@scalar/helpers": "0.2.10",
"nanoid": "^5.1.6",
"type-fest": "^5.3.1",
"zod": "^4.3.5"
},
"engines": {
"node": ">=20"
}
},
"node_modules/@scalar/types/node_modules/@scalar/helpers": {
"version": "0.2.10",
"resolved": "https://registry.npmjs.org/@scalar/helpers/-/helpers-0.2.10.tgz",
"integrity": "sha512-VS32setBEAGY9JifuDZKHIq8SUCUWLEfL1V+h3s5V4wcmE8OZVkzaJemsMq/YAM9e7gb9ZbkvJLL4zzEvPSrVg==",
"license": "MIT",
"engines": {
"node": ">=20"
}
},
"node_modules/@standard-schema/spec": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",
"integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",
"devOptional": true,
"license": "MIT"
},
"node_modules/@sveltejs/acorn-typescript": {
@@ -4029,7 +4065,6 @@
"version": "2.50.0",
"resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.50.0.tgz",
"integrity": "sha512-Hj8sR8O27p2zshFEIJzsvfhLzxga/hWw6tRLnBjMYw70m1aS9BSYCqAUtzDBjRREtX1EvLMYgaC0mYE3Hz4KWA==",
"devOptional": true,
"license": "MIT",
"dependencies": {
"@standard-schema/spec": "^1.0.0",
@@ -4072,7 +4107,6 @@
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-6.2.4.tgz",
"integrity": "sha512-ou/d51QSdTyN26D7h6dSpusAKaZkAiGM55/AKYi+9AGZw7q85hElbjK3kEyzXHhLSnRISHOYzVge6x0jRZ7DXA==",
"devOptional": true,
"license": "MIT",
"dependencies": {
"@sveltejs/vite-plugin-svelte-inspector": "^5.0.0",
@@ -4093,7 +4127,6 @@
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-5.0.2.tgz",
"integrity": "sha512-TZzRTcEtZffICSAoZGkPSl6Etsj2torOVrx6Uw0KpXxrec9Gg6jFWQ60Q3+LmNGfZSxHRCZL7vXVZIWmuV50Ig==",
"devOptional": true,
"license": "MIT",
"dependencies": {
"obug": "^2.1.0"
@@ -4111,7 +4144,6 @@
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
"devOptional": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -4121,7 +4153,6 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.1.tgz",
"integrity": "sha512-B/Fegf3i8zh0yFbpzZ21amWzHmuNlLlmJT6n7bu5e+pCHUKQIfXSYokrqOBGEMMe9UG2sostKQF9mml/vYaWJQ==",
"devOptional": true,
"license": "MIT",
"workspaces": [
"tests/deps/*",
@@ -4794,7 +4825,6 @@
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz",
"integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==",
"devOptional": true,
"license": "MIT"
},
"node_modules/@types/d3-path": {
@@ -5949,7 +5979,6 @@
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",
"integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==",
"devOptional": true,
"license": "MIT",
"engines": {
"node": ">= 0.6"
@@ -7727,6 +7756,17 @@
"node": ">=12.0.0"
}
},
"node_modules/hono": {
"version": "4.11.7",
"resolved": "https://registry.npmjs.org/hono/-/hono-4.11.7.tgz",
"integrity": "sha512-l7qMiNee7t82bH3SeyUCt9UF15EVmaBvsppY2zQtrbIhl/yzBTny+YUxsVjSjQ6gaqaeVtZmGocom8TzBlA4Yw==",
"license": "MIT",
"optional": true,
"peer": true,
"engines": {
"node": ">=16.9.0"
}
},
"node_modules/hosted-git-info": {
"version": "2.8.9",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
@@ -8069,7 +8109,6 @@
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
"integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
"devOptional": true,
"license": "MIT",
"engines": {
"node": ">=6"
@@ -8595,7 +8634,6 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz",
"integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==",
"devOptional": true,
"license": "MIT",
"engines": {
"node": ">=10"
@@ -8992,7 +9030,6 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz",
"integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==",
"devOptional": true,
"funding": [
"https://github.com/sponsors/sxzz",
"https://opencollective.com/debug"
@@ -10534,7 +10571,6 @@
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz",
"integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==",
"devOptional": true,
"license": "MIT",
"dependencies": {
"mri": "^1.1.0"
@@ -10547,7 +10583,6 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
"integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
"devOptional": true,
"license": "MIT",
"engines": {
"node": ">=4"
@@ -10667,7 +10702,6 @@
"version": "2.7.2",
"resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz",
"integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==",
"devOptional": true,
"license": "MIT"
},
"node_modules/sharp": {
@@ -10753,7 +10787,6 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.2.tgz",
"integrity": "sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==",
"devOptional": true,
"license": "MIT",
"dependencies": {
"@polka/url": "^1.0.0-next.24",
@@ -10768,7 +10801,6 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz",
"integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==",
"devOptional": true,
"license": "MIT",
"engines": {
"node": ">=6"
@@ -12804,6 +12836,21 @@
"url": "https://github.com/sponsors/Wombosvideo"
}
},
"node_modules/type-fest": {
"version": "5.4.3",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-5.4.3.tgz",
"integrity": "sha512-AXSAQJu79WGc79/3e9/CR77I/KQgeY1AhNvcShIH4PTcGYyC4xv6H4R4AUOwkPS5799KlVDAu8zExeCrkGquiA==",
"license": "(MIT OR CC0-1.0)",
"dependencies": {
"tagged-tag": "^1.0.0"
},
"engines": {
"node": ">=20"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/type-is": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
@@ -12822,7 +12869,7 @@
"version": "5.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"dev": true,
"devOptional": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
+1
View File
@@ -114,6 +114,7 @@
"@rajnandan1/aven": "file:../aven",
"@rajnandan1/svelte-legos": "^0.0.1",
"@scalar/express-api-reference": "^0.8.28",
"@scalar/sveltekit": "^0.1.43",
"@uiw/codemirror-theme-github": "^4.25.3",
"analytics": "^0.8.19",
"axios": "^1.13.2",
+1 -1
View File
@@ -6,7 +6,7 @@ import type { UnauthorizedResponse, NotFoundResponse } from "$lib/types/api";
const API_PATH_PREFIX = "/api/";
// Paths that don't require authentication
const PUBLIC_API_PATHS = ["/api/status"];
const PUBLIC_API_PATHS = ["/api/status", "/api/spec"];
// Regex to match routes with monitor_tag parameter
const MONITOR_TAG_ROUTE_REGEX = /^\/api\/monitors\/([^/]+)/;
+26
View File
@@ -0,0 +1,26 @@
// routes/+server.ts
import { ScalarApiReference } from "@scalar/sveltekit";
import type { RequestHandler } from "./$types";
import { asset } from "$app/paths";
const render = ScalarApiReference({
url: asset("/api-references/v4.json"),
hideModels: true,
hideTestRequestButton: true,
darkMode: true,
metaData: {
title: "Kener API Reference",
description: "Kener free open source status page API Reference",
ogDescription: "Kener free open source status page API Reference",
ogTitle: "Kener API Reference",
ogImage: "https://kener.ing/newbg.png",
twitterCard: "summary_large_image",
twitterTitle: "Kener API Reference",
twitterDescription: "Kener free open source status page API Reference",
twitterImage: "https://kener.ing/newbg.png",
},
favicon: "https://kener.ing/logo96.png",
});
export const GET: RequestHandler = () => {
return render();
};
File diff suppressed because it is too large Load Diff