import { ErrorCode } from "@delysium/sso-api"; import Auth from "./Auth"; export interface ErrorResponse { message: string; code: ErrorCode; } export declare enum ApiError { UNAUTHORIZED = "unauthorized", SERVER_ERROR = "server_error", OTHER = "other" } export interface ErrorDTO { type: ApiError; message: string; code: ErrorCode | undefined; } export default class Http { private static stringifyParameters; private static createUrl; private static handleHttpResult; private static httpURL; private static httpData; static get(domain: string | null, endpoint: string, auth: Auth | null, parameters: {}, onSuccess: (data: T) => void, onError: (error: ErrorDTO) => void): void; static post(domain: string | null, endpoint: string, auth: Auth | null, data: {}, onSuccess: (data: T) => void, onError: (error: ErrorDTO) => void): void; static put(domain: string | null, endpoint: string, auth: Auth | null, data: {}, onSuccess: (data: T) => void, onError: (error: ErrorDTO) => void): void; static delete(domain: string | null, endpoint: string, auth: Auth | null, data: {}, onSuccess: (data: T) => void, onError: (error: ErrorDTO) => void): void; }