@gemini-dock/protocol
Version:
Protocol utilities for Gemini Dock
30 lines (29 loc) • 805 B
TypeScript
export declare const CODES: {
REQUEST_INPUT: number;
REQUEST_PASSWORD: number;
SUCCESS: number;
REDIRECT_TEMPORARY: number;
REDIRECT_PERMANENT: number;
FAIL_TEMPORARY: number;
FAIL_SERVER_UNAVAILABLE: number;
FAIL_CGI_ERROR: number;
FAIL_PROXY_ERROR: number;
FAIL_SLOW_DOWN: number;
FAIL_PERMANENT: number;
FAIL_NOT_FOUND: number;
FAIL_GONE: number;
FAIL_PROXY_REQUEST_ERROR: number;
FAIL_BAD_REQUEST: number;
CERTIFICATE_REQUIRED: number;
CERTIFICATE_NOT_AUTHORIZED: number;
CERTIFICATE_INVALID: number;
};
export declare const respond: (code: number, body?: string, type?: string) => {
code: number;
type: string | undefined;
body?: undefined;
} | {
code: number;
type: string;
body: string | undefined;
};