complated project

This commit is contained in:
Samandar Turgunboyev
2026-02-02 18:51:53 +05:00
parent f0183e4573
commit a7419929f8
57 changed files with 3035 additions and 477 deletions

View File

@@ -7,6 +7,7 @@ import {
MyAdsData,
MyAdsDataRes,
MyBonusesData,
NotificationListRes,
UserInfoResponseData,
} from './type';
@@ -35,6 +36,8 @@ export const user_api = {
person_type: 'employee' | 'legal_entity' | 'ytt' | 'band';
phone: string;
activate_types: number[];
age: number;
gender: 'male' | 'female';
}) {
const res = await httpClient.patch(API_URLS.User_Update, body);
return res;
@@ -105,4 +108,32 @@ export const user_api = {
const res = await httpClient.get(API_URLS.Detail_Products(id));
return res;
},
async my_referrals(params: { page: number; page_size: number }) {
const res = await httpClient.get(API_URLS.My_Refferals, { params });
return res;
},
async create_referral(body: {
code: string;
referral_share: number;
description: string;
is_agent: boolean;
}) {
const res = await httpClient.post(API_URLS.My_Refferals, body);
return res;
},
async notification_list(params: {
page: number;
page_size: number;
}): Promise<AxiosResponse<NotificationListRes>> {
const res = await httpClient.get(API_URLS.Notification_List, { params });
return res;
},
async is_ready_id(id: number) {
const res = await httpClient.post(API_URLS.Notification_Ready(id));
return res;
},
};