api ulandi

This commit is contained in:
Samandar Turgunboyev
2025-11-28 19:41:12 +05:00
parent c8f96f46ad
commit 83efa1f24a
35 changed files with 2043 additions and 767 deletions

View File

@@ -0,0 +1,14 @@
import type { RegionListRes } from "@/features/region/lib/data";
import httpClient from "@/shared/config/api/httpClient";
import { REGIONS } from "@/shared/config/api/URLs";
import type { AxiosResponse } from "axios";
export const region_api = {
async list(params: {
limit?: number;
offset?: number;
name?: string;
}): Promise<AxiosResponse<RegionListRes>> {
return await httpClient.get(`${REGIONS}list/`, { params });
},
};

View File

@@ -17,3 +17,16 @@ export const fakeRegionList: RegionType[] = [
name: "Andijon",
},
];
export interface RegionListRes {
status_code: number;
status: string;
message: string;
data: RegionListResData[];
}
export interface RegionListResData {
id: number;
name: string;
created_at: string;
}