85 lines
3.1 KiB
TypeScript
85 lines
3.1 KiB
TypeScript
export declare const API_PATHS: {
|
|
readonly AUTH: {
|
|
readonly LOGIN: "/auth/login";
|
|
readonly REGISTER: "/auth/register";
|
|
readonly REFRESH: "/auth/refresh";
|
|
readonly LOGOUT: "/auth/logout";
|
|
};
|
|
readonly USER: {
|
|
readonly BASE: "/users";
|
|
readonly BY_ID: (id: string) => string;
|
|
readonly PROFILE: "/users/profile";
|
|
};
|
|
readonly FILE: {
|
|
readonly BASE: "/files";
|
|
readonly BY_ID: (id: string) => string;
|
|
readonly UPLOAD: "/files/upload";
|
|
readonly DOWNLOAD: (id: string) => string;
|
|
};
|
|
readonly HEALTH: "/health";
|
|
};
|
|
export declare const ERROR_CODES: {
|
|
readonly INVALID_CREDENTIALS: "INVALID_CREDENTIALS";
|
|
readonly USER_NOT_FOUND: "USER_NOT_FOUND";
|
|
readonly USER_ALREADY_EXISTS: "USER_ALREADY_EXISTS";
|
|
readonly UNAUTHORIZED: "UNAUTHORIZED";
|
|
readonly FORBIDDEN: "FORBIDDEN";
|
|
readonly NOT_FOUND: "NOT_FOUND";
|
|
readonly VALIDATION_ERROR: "VALIDATION_ERROR";
|
|
readonly INTERNAL_SERVER_ERROR: "INTERNAL_SERVER_ERROR";
|
|
readonly FILE_NOT_FOUND: "FILE_NOT_FOUND";
|
|
readonly FILE_UPLOAD_FAILED: "FILE_UPLOAD_FAILED";
|
|
readonly TOKEN_EXPIRED: "TOKEN_EXPIRED";
|
|
readonly TOKEN_INVALID: "TOKEN_INVALID";
|
|
};
|
|
export declare const ROLES: {
|
|
readonly ADMIN: "admin";
|
|
readonly USER: "user";
|
|
readonly EDITOR: "editor";
|
|
readonly VIEWER: "viewer";
|
|
};
|
|
export declare const PERMISSIONS: {
|
|
readonly USER: {
|
|
readonly CREATE: "user:create";
|
|
readonly READ: "user:read";
|
|
readonly UPDATE: "user:update";
|
|
readonly DELETE: "user:delete";
|
|
};
|
|
readonly FILE: {
|
|
readonly CREATE: "file:create";
|
|
readonly READ: "file:read";
|
|
readonly UPDATE: "file:update";
|
|
readonly DELETE: "file:delete";
|
|
};
|
|
readonly ADMIN: {
|
|
readonly MANAGE_USERS: "admin:manage_users";
|
|
readonly MANAGE_FILES: "admin:manage_files";
|
|
readonly VIEW_ANALYTICS: "admin:view_analytics";
|
|
};
|
|
};
|
|
export declare const FILE_TYPES: {
|
|
readonly IMAGE: readonly ["image/jpeg", "image/png", "image/gif", "image/webp"];
|
|
readonly DOCUMENT: readonly ["application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"];
|
|
readonly SPREADSHEET: readonly ["application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"];
|
|
readonly VIDEO: readonly ["video/mp4", "video/webm", "video/ogg"];
|
|
readonly AUDIO: readonly ["audio/mpeg", "audio/wav", "audio/ogg"];
|
|
readonly ARCHIVE: readonly ["application/zip", "application/x-rar-compressed", "application/gzip"];
|
|
};
|
|
export declare const MAX_FILE_SIZE: {
|
|
readonly IMAGE: number;
|
|
readonly DOCUMENT: number;
|
|
readonly VIDEO: number;
|
|
readonly AUDIO: number;
|
|
readonly ARCHIVE: number;
|
|
};
|
|
export declare const JWT_CONFIG: {
|
|
readonly ACCESS_TOKEN_EXPIRES_IN: "15m";
|
|
readonly REFRESH_TOKEN_EXPIRES_IN: "7d";
|
|
readonly ALGORITHM: "HS256";
|
|
};
|
|
export declare const PAGINATION: {
|
|
readonly DEFAULT_PAGE: 1;
|
|
readonly DEFAULT_LIMIT: 10;
|
|
readonly MAX_LIMIT: 100;
|
|
};
|
|
//# sourceMappingURL=index.d.ts.map
|