This commit is contained in:
2026-06-11 20:37:13 -05:00
parent b362357bcb
commit a5e3915be5
7 changed files with 691 additions and 11 deletions

View File

@@ -0,0 +1,26 @@
/**
* Type stub for Pterodactyl's internal @/api/http module.
* This file exists ONLY for IDE type resolution in the standalone addon repo.
* When installed into Pterodactyl Panel, the real module is used from the panel's src.
*
* @author Ball Studios <https://git.balls.studio>
*/
export interface ApiResponse<T = unknown> {
data: T;
status: number;
statusText: string;
headers: Record<string, string>;
}
/** Minimal Axios-compatible interface sufficient for IDE resolution. */
interface HttpClient {
get<T = any>(url: string, config?: object): Promise<ApiResponse<T>>;
post<T = any>(url: string, data?: unknown, config?: object): Promise<ApiResponse<T>>;
put<T = any>(url: string, data?: unknown, config?: object): Promise<ApiResponse<T>>;
patch<T = any>(url: string, data?: unknown, config?: object): Promise<ApiResponse<T>>;
delete<T = any>(url: string, config?: object): Promise<ApiResponse<T>>;
}
declare const http: HttpClient;
export default http;