Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
import {publicApi} from "./public-client";
import {
Attendee,
AttendeeDetailPublic,
CheckInList,
CheckInListStats,
GenericDataResponse,
GenericPaginatedResponse,
IdParam, PublicCheckIn,
QueryFilters,
} from "../types";
import {queryParamsHelper} from "../utilites/queryParamsHelper";
export const publicCheckInClient = {
getCheckInList: async (checkInListShortId: IdParam) => {
const response = await publicApi.get<GenericDataResponse<CheckInList>>(`/check-in-lists/${checkInListShortId}`);
return response.data;
},
getCheckInListStats: async (checkInListShortId: IdParam, eventOccurrenceId?: number | null) => {
const qs = eventOccurrenceId ? `?event_occurrence_id=${eventOccurrenceId}` : '';
const response = await publicApi.get<GenericDataResponse<CheckInListStats>>(`/check-in-lists/${checkInListShortId}/stats${qs}`);
return response.data;
},
getCheckInListAttendees: async (checkInListShortId: IdParam, pagination: QueryFilters) => {
const response = await publicApi.get<GenericPaginatedResponse<Attendee>>(`/check-in-lists/${checkInListShortId}/attendees` + queryParamsHelper.buildQueryString(pagination));
return response.data;
},
getCheckInListAttendee: async (checkInListShortId: IdParam, attendeePublicId: IdParam) => {
const response = await publicApi.get<GenericDataResponse<Attendee>>(`/check-in-lists/${checkInListShortId}/attendees/${attendeePublicId}`);
return response.data;
},
getCheckInListAttendeeDetail: async (checkInListShortId: IdParam, attendeePublicId: IdParam) => {
const response = await publicApi.get<GenericDataResponse<AttendeeDetailPublic>>(`/check-in-lists/${checkInListShortId}/attendees/${attendeePublicId}/detail`);
return response.data;
},
createCheckIn: async (checkInListShortId: IdParam, attendeePublicId: IdParam, action: 'check-in' | 'check-in-and-mark-order-as-paid') => {
const response = await publicApi.post<GenericDataResponse<PublicCheckIn[]>>(`/check-in-lists/${checkInListShortId}/check-ins`, {
"attendees": [
{
"public_id": attendeePublicId,
"action": action
}
]
});
return response.data;
},
deleteCheckIn: async (checkInListShortId: IdParam, checkInShortId: IdParam) => {
const response = await publicApi.delete<GenericDataResponse<PublicCheckIn>>(`/check-in-lists/${checkInListShortId}/check-ins/${checkInShortId}`);
return response.data;
},
};