export type Id = string;

export interface ApiSuccessResponse<T> {
  code: "OK";
  message: string;
  data: T;
  requestId: string;
}

export interface ApiErrorResponse {
  code: string;
  message: string;
  details: unknown | null;
  requestId: string;
}

export interface PageResult<T> {
  items: T[];
  page: number;
  pageSize: number;
  total: number;
  totalPages: number;
}

export interface JsonResult<T> {
  data: T;
  message: string;
  requestId: string;
  httpStatus: number;
  headers: Headers;
}

export interface BlobResult {
  blob: Blob;
  contentType: string | null;
  contentDisposition: string | null;
  requestId: string;
  httpStatus: number;
  headers: Headers;
}

export type QueryPrimitive = string | number | boolean;
export type QueryValue =
  | QueryPrimitive
  | readonly QueryPrimitive[]
  | null
  | undefined;
export type QueryParams = Record<string, QueryValue>;
