import type { TFunction } from "i18next"; import type { ResponseWithValidationErrorsType } from "../utils/type-guards"; export type ConstantMap = Readonly>; export type Nullable = T | null; export type Nullish = T | null | undefined; export type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; export type FetchStatus = "IDLE" | "LOADING" | "SUCCESS" | "FAILURE"; export type QueryParams = { [key: string]: any; }; export type BodyParam = { [key: string]: any; } | BodyInit; export type JsonParseResult = { [key: string]: any; } | Array | number | boolean | null; export type ParsedResponseBody = JsonParseResult | string | null; export type RequestOptions = { path?: string; body?: BodyParam; params?: QueryParams | undefined; absoluteUrl?: string; fetchOptions?: RequestInit; }; export type HttpRequestFunction = (options: RequestOptions) => Promise; export type LaravelError = { message: string; exception: string; file: string; line: number; trace: Array<{ class: string; file: string; function: string; line: number; type: string; }>; }; export interface PaginationMeta { page: { number: number; size: number; count: number; }; total: number; } export type ResponseBody = { data: Data; message?: string; meta?: M; } & Partial & Partial; export type LogoConfig = { logo?: Nullable; label?: Nullable; "label-color"?: Nullable; }; export type AppConfigType = { APP_NAME: string; TITLE_TEMPLATE: string; LANGUAGE: string; BRAND: { small: LogoConfig; large: LogoConfig; subtitle?: string; }; SPLASH_SCREEN?: { logo?: string; background?: string; color?: string; }; }; export type TranslateFunction = TFunction;