hypershield
Version:
Middleware suite for high-performance and resilient APIs
63 lines • 1.87 kB
TypeScript
export declare const CACHE: {
readonly DEFAULT_TTL: 3600;
readonly MIN_TTL: 1;
readonly MAX_TTL: 86400;
readonly COMPRESSION_PREFIX: "gz:";
readonly RETRY: {
readonly MAX_ATTEMPTS: 3;
readonly BASE_DELAY: 1000;
readonly MAX_DELAY: 5000;
};
};
export declare const COMPRESSION: {
readonly GZIP: {
readonly MIN_LEVEL: 1;
readonly MAX_LEVEL: 9;
readonly DEFAULT_LEVEL: 6;
readonly DEFAULT_CHUNK_SIZE: number;
readonly DEFAULT_MEM_LEVEL: 8;
readonly MIN_SIZE_TO_COMPRESS: 1024;
readonly STRATEGY: {
readonly DEFAULT: 0;
readonly FILTERED: 1;
readonly HUFFMAN_ONLY: 2;
readonly RLE: 3;
readonly FIXED: 4;
};
};
readonly CONTENT_TYPES: {
readonly COMPRESSIBLE: readonly ["text/", "application/json", "application/javascript", "application/xml", "application/x-www-form-urlencoded"];
};
};
export declare const ALERTS: {
readonly THROTTLE: {
readonly DEFAULT_MS: 1000;
readonly MIN_MS: 100;
readonly MAX_MS: 60000;
};
readonly RETRY: {
readonly DEFAULT_ATTEMPTS: 3;
readonly MAX_ATTEMPTS: 5;
readonly BASE_DELAY: 1000;
};
};
export declare const HTTP: {
readonly STATUS_CODES: {
readonly OK: 200;
readonly BAD_REQUEST: 400;
readonly UNAUTHORIZED: 401;
readonly NOT_FOUND: 404;
readonly SERVER_ERROR: 500;
};
readonly HEADERS: {
readonly CACHE_CONTROL: "Cache-Control";
readonly CONTENT_TYPE: "Content-Type";
readonly CONTENT_ENCODING: "Content-Encoding";
};
};
export declare const ENV: {
readonly DEVELOPMENT: "development";
readonly PRODUCTION: "production";
readonly TEST: "test";
};
//# sourceMappingURL=constants.d.ts.map