mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-10 21:46:27 +02:00
41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
TypeScript
import ServiceAccessors from "./accessors"
|
|
import {
|
|
elementName,
|
|
Volunteer,
|
|
VolunteerDayWishes,
|
|
VolunteerAsks,
|
|
VolunteerParticipationDetails,
|
|
VolunteerTeamWishes,
|
|
VolunteerTeamAssign,
|
|
VolunteerWithoutId,
|
|
} from "./volunteers"
|
|
|
|
const serviceAccessors = new ServiceAccessors<VolunteerWithoutId, Volunteer>(elementName)
|
|
|
|
export const volunteerListGet = serviceAccessors.securedListGet()
|
|
export const volunteerDiscordIdGet = serviceAccessors.securedCustomGet<[number]>("DiscordId")
|
|
export const volunteerPartialAdd = serviceAccessors.customPost<[Partial<Volunteer>]>("PartialAdd")
|
|
export const volunteerSet = serviceAccessors.set()
|
|
|
|
export const volunteerLogin =
|
|
serviceAccessors.customPost<[{ email: string; password: string }]>("Login")
|
|
|
|
export const volunteerForgot = serviceAccessors.customPost<[{ email: string }]>("Forgot")
|
|
|
|
export const volunteerAsksSet =
|
|
serviceAccessors.securedCustomPost<[number, Partial<VolunteerAsks>]>("AsksSet")
|
|
|
|
export const volunteerTeamWishesSet =
|
|
serviceAccessors.securedCustomPost<[number, Partial<VolunteerTeamWishes>]>("TeamWishesSet")
|
|
|
|
export const volunteerDayWishesSet =
|
|
serviceAccessors.securedCustomPost<[number, Partial<VolunteerDayWishes>]>("DayWishesSet")
|
|
|
|
export const volunteerParticipationDetailsSet =
|
|
serviceAccessors.securedCustomPost<[number, Partial<VolunteerParticipationDetails>]>(
|
|
"ParticipationDetailsSet"
|
|
)
|
|
|
|
export const volunteerTeamAssignSet =
|
|
serviceAccessors.securedCustomPost<[number, Partial<VolunteerTeamAssign>]>("TeamAssignSet")
|