2025-07-30 06:43:37 -04:00
|
|
|
import {AxiosResponse} from "axios";
|
|
|
|
import {ResponseVO} from "@/lib/definitions";
|
|
|
|
import {httpReq} from "@/utils/axiosReq";
|
2025-08-06 06:58:51 -04:00
|
|
|
import {ShareVO, TeamMemberVO} from "@/components/type/Share.d";
|
2025-07-30 06:43:37 -04:00
|
|
|
|
|
|
|
export const addTaskPassAPI= (data:ShareVO):Promise<AxiosResponse<ResponseVO<ShareVO>>> =>{
|
|
|
|
return httpReq.post(process.env.NEXT_PUBLIC_TODO_REQUEST_URL + "/task/pass",
|
|
|
|
data)
|
2025-08-06 06:58:51 -04:00
|
|
|
}
|
|
|
|
export const listTeamMemberAPI = (taskId:string):Promise<AxiosResponse<ResponseVO<TeamMemberVO[]>>> =>{
|
|
|
|
return httpReq.get(process.env.NEXT_PUBLIC_TODO_REQUEST_URL + `/task/team/member/list?taskId=${taskId}`)
|
2025-08-07 07:27:37 -04:00
|
|
|
}
|
|
|
|
export const removeTeamAPI = (teamMember: TeamMemberVO):Promise<AxiosResponse<ResponseVO<TeamMemberVO[]>>> =>{
|
|
|
|
return httpReq.post(process.env.NEXT_PUBLIC_TODO_REQUEST_URL + `/task/team/member/remove`,teamMember)
|
|
|
|
}
|
|
|
|
export const quitTeamAPI = (teamMember: TeamMemberVO):Promise<AxiosResponse<ResponseVO<TeamMemberVO[]>>> =>{
|
|
|
|
return httpReq.delete(process.env.NEXT_PUBLIC_TODO_REQUEST_URL + `/task/team/member/quite/${teamMember.id}`)
|
|
|
|
}
|
|
|
|
export const allowAddTeamAPI = (teamAllow:any):Promise<AxiosResponse<ResponseVO<TeamMemberVO[]>>> =>{
|
|
|
|
return httpReq.post(process.env.NEXT_PUBLIC_TODO_REQUEST_URL + `/task/team/member/allow`,teamAllow)
|
2025-07-30 06:43:37 -04:00
|
|
|
}
|