Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
260 changes: 256 additions & 4 deletions admin/src/api/sdk.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,20 @@ import type {
AdminEventKompomaattiEntriesValidateArchiveRetrieveData,
AdminEventKompomaattiEntriesValidateArchiveRetrieveErrors,
AdminEventKompomaattiEntriesValidateArchiveRetrieveResponses,
AdminEventKompomaattiLiveVotingHideAllCreateData,
AdminEventKompomaattiLiveVotingHideAllCreateResponses,
AdminEventKompomaattiLiveVotingHideEntryCreateData,
AdminEventKompomaattiLiveVotingHideEntryCreateResponses,
AdminEventKompomaattiLiveVotingPartialUpdateData,
AdminEventKompomaattiLiveVotingPartialUpdateResponses,
AdminEventKompomaattiLiveVotingResetCreateData,
AdminEventKompomaattiLiveVotingResetCreateResponses,
AdminEventKompomaattiLiveVotingRetrieveData,
AdminEventKompomaattiLiveVotingRetrieveResponses,
AdminEventKompomaattiLiveVotingRevealAllCreateData,
AdminEventKompomaattiLiveVotingRevealAllCreateResponses,
AdminEventKompomaattiLiveVotingRevealEntryCreateData,
AdminEventKompomaattiLiveVotingRevealEntryCreateResponses,
AdminEventKompomaattiTicketVoteCodesListData,
AdminEventKompomaattiTicketVoteCodesListResponses,
AdminEventKompomaattiTicketVoteCodesRetrieveData,
Expand Down Expand Up @@ -344,6 +358,9 @@ import type {
PublicEventKompomaattiEntriesListResponses,
PublicEventKompomaattiEntriesRetrieveData,
PublicEventKompomaattiEntriesRetrieveResponses,
PublicEventKompomaattiLiveVotingRetrieveData,
PublicEventKompomaattiLiveVotingRetrieveErrors,
PublicEventKompomaattiLiveVotingRetrieveResponses,
PublicEventProgramEventsListData,
PublicEventProgramEventsListResponses,
PublicEventProgramEventsRetrieveData,
Expand Down Expand Up @@ -1996,6 +2013,220 @@ export const adminEventKompomaattiEntriesValidateArchiveRetrieve = <
});
};

/**
* Staff viewset for managing live voting state during a compo presentation.
*/
export const adminEventKompomaattiLiveVotingRetrieve = <ThrowOnError extends boolean = false>(
options: Options<AdminEventKompomaattiLiveVotingRetrieveData, ThrowOnError>
) => {
return (options.client ?? client).get<
AdminEventKompomaattiLiveVotingRetrieveResponses,
unknown,
ThrowOnError
>({
responseType: "json",
security: [
{
name: "Authorization",
type: "apiKey",
},
{
in: "cookie",
name: "sessionid",
type: "apiKey",
},
],
url: "/api/v2/admin/event/{event_pk}/kompomaatti/live_voting/{id}/",
...options,
});
};

/**
* Staff viewset for managing live voting state during a compo presentation.
*/
export const adminEventKompomaattiLiveVotingPartialUpdate = <ThrowOnError extends boolean = false>(
options: Options<AdminEventKompomaattiLiveVotingPartialUpdateData, ThrowOnError>
) => {
return (options.client ?? client).patch<
AdminEventKompomaattiLiveVotingPartialUpdateResponses,
unknown,
ThrowOnError
>({
responseType: "json",
security: [
{
name: "Authorization",
type: "apiKey",
},
{
in: "cookie",
name: "sessionid",
type: "apiKey",
},
],
url: "/api/v2/admin/event/{event_pk}/kompomaatti/live_voting/{id}/",
...options,
headers: {
"Content-Type": "application/json",
...options.headers,
},
});
};

/**
* Staff viewset for managing live voting state during a compo presentation.
*/
export const adminEventKompomaattiLiveVotingHideAllCreate = <ThrowOnError extends boolean = false>(
options: Options<AdminEventKompomaattiLiveVotingHideAllCreateData, ThrowOnError>
) => {
return (options.client ?? client).post<
AdminEventKompomaattiLiveVotingHideAllCreateResponses,
unknown,
ThrowOnError
>({
responseType: "json",
security: [
{
name: "Authorization",
type: "apiKey",
},
{
in: "cookie",
name: "sessionid",
type: "apiKey",
},
],
url: "/api/v2/admin/event/{event_pk}/kompomaatti/live_voting/{id}/hide_all/",
...options,
});
};

/**
* Staff viewset for managing live voting state during a compo presentation.
*/
export const adminEventKompomaattiLiveVotingHideEntryCreate = <
ThrowOnError extends boolean = false,
>(
options: Options<AdminEventKompomaattiLiveVotingHideEntryCreateData, ThrowOnError>
) => {
return (options.client ?? client).post<
AdminEventKompomaattiLiveVotingHideEntryCreateResponses,
unknown,
ThrowOnError
>({
responseType: "json",
security: [
{
name: "Authorization",
type: "apiKey",
},
{
in: "cookie",
name: "sessionid",
type: "apiKey",
},
],
url: "/api/v2/admin/event/{event_pk}/kompomaatti/live_voting/{id}/hide_entry/",
...options,
headers: {
"Content-Type": "application/json",
...options.headers,
},
});
};

/**
* Staff viewset for managing live voting state during a compo presentation.
*/
export const adminEventKompomaattiLiveVotingResetCreate = <ThrowOnError extends boolean = false>(
options: Options<AdminEventKompomaattiLiveVotingResetCreateData, ThrowOnError>
) => {
return (options.client ?? client).post<
AdminEventKompomaattiLiveVotingResetCreateResponses,
unknown,
ThrowOnError
>({
responseType: "json",
security: [
{
name: "Authorization",
type: "apiKey",
},
{
in: "cookie",
name: "sessionid",
type: "apiKey",
},
],
url: "/api/v2/admin/event/{event_pk}/kompomaatti/live_voting/{id}/reset/",
...options,
});
};

/**
* Staff viewset for managing live voting state during a compo presentation.
*/
export const adminEventKompomaattiLiveVotingRevealAllCreate = <
ThrowOnError extends boolean = false,
>(
options: Options<AdminEventKompomaattiLiveVotingRevealAllCreateData, ThrowOnError>
) => {
return (options.client ?? client).post<
AdminEventKompomaattiLiveVotingRevealAllCreateResponses,
unknown,
ThrowOnError
>({
responseType: "json",
security: [
{
name: "Authorization",
type: "apiKey",
},
{
in: "cookie",
name: "sessionid",
type: "apiKey",
},
],
url: "/api/v2/admin/event/{event_pk}/kompomaatti/live_voting/{id}/reveal_all/",
...options,
});
};

/**
* Staff viewset for managing live voting state during a compo presentation.
*/
export const adminEventKompomaattiLiveVotingRevealEntryCreate = <
ThrowOnError extends boolean = false,
>(
options: Options<AdminEventKompomaattiLiveVotingRevealEntryCreateData, ThrowOnError>
) => {
return (options.client ?? client).post<
AdminEventKompomaattiLiveVotingRevealEntryCreateResponses,
unknown,
ThrowOnError
>({
responseType: "json",
security: [
{
name: "Authorization",
type: "apiKey",
},
{
in: "cookie",
name: "sessionid",
type: "apiKey",
},
],
url: "/api/v2/admin/event/{event_pk}/kompomaatti/live_voting/{id}/reveal_entry/",
...options,
headers: {
"Content-Type": "application/json",
...options.headers,
},
});
};

/**
* Staff viewset for viewing ticket vote codes (read-only).
*/
Expand Down Expand Up @@ -5318,8 +5549,8 @@ export const publicEventKompomaattiComposRetrieve = <ThrowOnError extends boolea
/**
* Public read-only endpoint for compo entries.
*
* Only entries from active compos where voting has started (or the event
* is archived) are shown.
* Only entries from active compos where the event is archived or the entry
* has been revealed via live voting are shown.
*
* Supports ordering by rank and score when results are visible.
*/
Expand All @@ -5340,8 +5571,8 @@ export const publicEventKompomaattiEntriesList = <ThrowOnError extends boolean =
/**
* Public read-only endpoint for compo entries.
*
* Only entries from active compos where voting has started (or the event
* is archived) are shown.
* Only entries from active compos where the event is archived or the entry
* has been revealed via live voting are shown.
*
* Supports ordering by rank and score when results are visible.
*/
Expand All @@ -5359,6 +5590,27 @@ export const publicEventKompomaattiEntriesRetrieve = <ThrowOnError extends boole
});
};

/**
* Public polling endpoint for live voting state.
*
* Returns the current live voting state for a compo, including which entries
* have been revealed. Supports conditional requests via If-Modified-Since
* for efficient polling.
*/
export const publicEventKompomaattiLiveVotingRetrieve = <ThrowOnError extends boolean = false>(
options: Options<PublicEventKompomaattiLiveVotingRetrieveData, ThrowOnError>
) => {
return (options.client ?? client).get<
PublicEventKompomaattiLiveVotingRetrieveResponses,
PublicEventKompomaattiLiveVotingRetrieveErrors,
ThrowOnError
>({
responseType: "json",
url: "/api/v2/public/event/{event_pk}/kompomaatti/live_voting/{compo_pk}/",
...options,
});
};

/**
* Public read-only endpoint for program events. Only active events are shown.
*/
Expand Down
Loading
Loading