UNPKG

denwa-web-shared

Version:

A shared library for Next.js App Router projects containing reusable components, hooks, schemas, and utilities.

43 lines (42 loc) • 1.5 kB
export { ValidationError } from '../../shared/lib/schema'; export type { SafeParseResult, SchemaLike } from '../../shared/lib/schema'; /** Вложенная ошибка в ответе REST API. */ export interface ResponseSchemaError { statusCode: number; message?: string | null; messages?: string[] | null; } /** Структура ответа REST API. */ export interface ResponseSchemaData { statusCode?: number; message?: string | null; messages?: string[] | null; data?: unknown; error?: ResponseSchemaError | null; response?: unknown; } /** Объект картинки, как его отдаёт файловый шлюз. */ export interface ServerImageSchemaData { altRU?: string | null; altEN?: string | null; altAR?: string | null; name: string; originalFileExtension: string; entityId?: string; fullPathExample?: string; fileExtensions?: string[]; prefixes?: string[]; folder?: string; } /** Объект файла, как его отдаёт файловый шлюз. */ export interface ServerFileSchemaData { name: string; fullName: string; extension: string; entityId: string; fullPathExample: string; folder?: string; } export declare const responseSchema: import('.').SchemaLike<ResponseSchemaData>; export declare const serverImageSchema: import('.').SchemaLike<ServerImageSchemaData>; export declare const serverFileSchema: import('.').SchemaLike<ServerFileSchemaData>;