hilingriviw/src/types/common.ts
2023-10-03 14:52:06 +07:00

35 lines
735 B
TypeScript

import { Province, Regency, Region } from "../domains";
type BaseNullValueRes = { Valid: boolean };
export type NullValueRes<Key extends string, _> = BaseNullValueRes & Record<Key, string | number>
export interface GetRequestPagination {
page: number,
page_size: number,
}
export interface IHttpResponse {
data: any,
error: any,
status?: number,
};
export interface IDropdownInputProps {
label: string,
value: string
}
export interface IndonesiaRegionsInfo {
regions?: Array<Region>,
provinces?: Array<Province>,
regencies?: Array<Regency>,
}
export enum LocationType {
Beach = "beach",
AmusementPark = "amusement park",
Culinary = "culinary",
HikingCamping = "hiking / camping",
Other = "other"
}