complated project
This commit is contained in:
@@ -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;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user