import { HttpStatusCodes } from "./httpStatusCodes.js";

//#region src/utils/responseData.d.ts
type ErrorData = {
  code: string;
  title: string;
  message: string;
} & object;
type ResponseData<T = null> = {
  message?: string;
  description?: string;
  success: boolean;
  status: HttpStatusCodes;
  data: T | null;
  error?: ErrorData | ErrorData[];
};
type ValidResponseStatus = HttpStatusCodes.OK_200 | HttpStatusCodes.CREATED_201 | HttpStatusCodes.ACCEPTED_202 | HttpStatusCodes.NON_AUTHORITATIVE_INFORMATION_203 | HttpStatusCodes.NO_CONTENT_204 | HttpStatusCodes.RESET_CONTENT_205 | HttpStatusCodes.PARTIAL_CONTENT_206 | HttpStatusCodes.MULTI_STATUS_207 | HttpStatusCodes.ALREADY_REPORTED_208 | HttpStatusCodes.IM_USED_226;
type SuccessResponseArgs<T = undefined> = {
  message?: string;
  description?: string;
  data: T;
  status?: ValidResponseStatus;
  error?: null;
};
type ErrorResponseArgs = {
  error: ErrorData | ErrorData[];
  status: HttpStatusCodes;
  data?: null;
  message?: null;
  description?: null;
};
declare function formatResponse<T>({
  message,
  description,
  data,
  status
}: SuccessResponseArgs<T>): ResponseData<T>;
declare function formatResponse<T>({
  error,
  status
}: ErrorResponseArgs): ResponseData<T>;
type PaginatedResponse<T = undefined> = Omit<ResponseData<T>, 'data'> & {
  data: T[] | null;
  page: number | null;
  page_size: number | null;
  total_pages: number | null;
  total_items: number | null;
};
type SuccessPaginatedResponseArgs<T = undefined> = {
  message?: string;
  description?: string;
  data: T[];
  status?: ValidResponseStatus;
  page: number;
  pageSize: number;
  totalPages: number;
  totalItems: number;
  error?: null;
};
type ErrorPaginatedResponseArgs = {
  error: ErrorData | ErrorData[];
  status: HttpStatusCodes;
  message?: null;
  description?: null;
  data?: null;
  page?: null;
  pageSize?: null;
  totalPages?: null;
  totalItems?: null;
};
declare function formatPaginatedResponse<T>({
  message,
  description,
  data,
  status,
  page,
  pageSize,
  totalPages,
  totalItems
}: SuccessPaginatedResponseArgs<T>): PaginatedResponse<T>;
declare function formatPaginatedResponse<T>({
  error,
  status
}: ErrorPaginatedResponseArgs): PaginatedResponse<T>;
//#endregion
export { PaginatedResponse, ResponseData, formatPaginatedResponse, formatResponse };
//# sourceMappingURL=responseData.d.ts.map