Archived
- Express 5 (qs query parser and req.body = {} kept as in Express 4).
- Scanner and at-the-door check-in use /api/v2/checkin; look-up gives attendee, bookedBy,
ticketOptionId.
- Shared middleware errors on /api/v2 rewritten to { error: { code, message, reason } };
apiFetch treats reason like v1's code.
- Deprecation + Link: rel="successor-version" on v1 endpoints that have a v2 replacement.
- Roadmap: open question on how much of v1 to retire in 2.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls1vMdg2GYqbnKZmPaX1ot
1406 lines
51 KiB
TypeScript
1406 lines
51 KiB
TypeScript
/**
|
||
* This file was auto-generated by openapi-typescript.
|
||
* Do not make direct changes to the file.
|
||
*/
|
||
|
||
export interface paths {
|
||
"/events": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Upcoming public events
|
||
* @description Events anyone can see (active, not hidden, live) that have not ended, soonest first.
|
||
*
|
||
* **Who:** Anyone.
|
||
*/
|
||
get: operations["getEvents"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/events/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* One public event
|
||
* @description With its ticket options (internal kids check-in and volunteer tickets left out) and sessions. Hidden events can be fetched by id (they are unlisted, not private).
|
||
*
|
||
* **Who:** Anyone.
|
||
*/
|
||
get: operations["getEventsId"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/registrations": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Register for an event
|
||
* @description Signed in, or as a guest for a free event that allows it (`guest` then required), or with a waitlist link (`waitlistToken`).
|
||
*
|
||
* Registering again for the same event adds to the existing registration. When nothing is owed it is marked paid and tickets are issued; otherwise pay with `POST /registrations/{id}/checkout`.
|
||
*
|
||
* A coupon that was valid when checked but used up a moment later is reported in `couponError`; the registration is still made.
|
||
*
|
||
* **Who:** Anyone; signed-in staff may see more.
|
||
*/
|
||
post: operations["postRegistrations"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/registrations/{id}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* One of my registrations
|
||
* @description **Who:** Any signed-in person.
|
||
*/
|
||
get: operations["getRegistrationsId"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/registrations/{id}/cancel": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Cancel my registration
|
||
* @description Not after the event has ended, and not once anything has been paid (the church can do that). Its places go to the waitlist.
|
||
*
|
||
* **Who:** Any signed-in person.
|
||
*/
|
||
post: operations["postRegistrationsIdCancel"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/registrations/{id}/checkout": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Pay what I owe online
|
||
* @description Starts a payment with the church's provider (Yoco or PayFast) and returns where to send the person (`redirectUrl`).
|
||
*
|
||
* If an early-bird price ran out since the registration was made, nothing is started: `priceUpdated` is true with the new amount owing — show it, then call again.
|
||
*
|
||
* **Who:** Any signed-in person.
|
||
*/
|
||
post: operations["postRegistrationsIdCheckout"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/me": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* The signed-in person
|
||
* @description **Who:** Any signed-in person.
|
||
*/
|
||
get: operations["getMe"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
/**
|
||
* Change my details
|
||
* @description Only what is sent changes. A new `password` needs `currentPassword`; it sends a security notice and stops other devices skipping the 2FA code. The answer has a fresh `token` (the old one keeps working).
|
||
*
|
||
* **Who:** Any signed-in person.
|
||
*/
|
||
patch: operations["patchMe"];
|
||
trace?: never;
|
||
};
|
||
"/me/registrations": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* My registrations
|
||
* @description Newest first. By default only ones for events that have not ended, and not cancelled; `past=true` lists everything.
|
||
*
|
||
* **Who:** Any signed-in person.
|
||
*/
|
||
get: operations["getMeRegistrations"];
|
||
put?: never;
|
||
post?: never;
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/checkin/{qrCode}": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
/**
|
||
* Look a ticket up before checking it in
|
||
* @description Who it is for, how many are left to check in (for today's session on multi-day events, or `sessionId`), and parental consent. Nothing is changed.
|
||
*
|
||
* **Who:** Staff, supervisors and admins.
|
||
*/
|
||
get: operations["getCheckinQrCode"];
|
||
put?: never;
|
||
/**
|
||
* Check a ticket in
|
||
* @description Checks in everyone left on the ticket, or `people`. Every normal result is a 200 with an `outcome`:
|
||
*
|
||
* `checked_in`, `already_used`, `consent_required` (a supervisor can resend with `overrideConsent`, which is logged), `wrong_event`, `wrong_section`, `section_not_found`, `no_session` (multi-day: nothing open now), `locked` (offline-locked to another device) or `transferred` (handed on; `message` says to whom).
|
||
*
|
||
* An unknown code is `NOT_FOUND`.
|
||
*
|
||
* **Who:** Staff, supervisors and admins.
|
||
*/
|
||
post: operations["postCheckinQrCode"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/auth/signup": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Create an account
|
||
* @description Signs the new account in straight away. `acceptTerms` must be true (the Terms of Use and Privacy Policy); `newsOptIn` is the unticked "News & announcements" box.
|
||
*
|
||
* **Who:** Anyone.
|
||
*/
|
||
post: operations["postAuthSignup"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/auth/login": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Log in
|
||
* @description With an email address or phone number. Five wrong passwords lock the account for five minutes (`RATE_LIMITED`).
|
||
*
|
||
* With two-factor authentication (always for supervisors and admins), the answer is `code_required`: a code was sent by email or WhatsApp — finish with `POST /auth/login/code`.
|
||
*
|
||
* **Who:** Anyone.
|
||
*/
|
||
post: operations["postAuthLogin"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
"/auth/login/code": {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
get?: never;
|
||
put?: never;
|
||
/**
|
||
* Finish logging in with the code
|
||
* @description **Who:** Anyone.
|
||
*/
|
||
post: operations["postAuthLoginCode"];
|
||
delete?: never;
|
||
options?: never;
|
||
head?: never;
|
||
patch?: never;
|
||
trace?: never;
|
||
};
|
||
}
|
||
export type webhooks = Record<string, never>;
|
||
export interface components {
|
||
schemas: {
|
||
Error: {
|
||
error: {
|
||
/** @enum {string} */
|
||
code: "VALIDATION_FAILED" | "UNAUTHENTICATED" | "FORBIDDEN" | "NOT_FOUND" | "CONFLICT" | "RATE_LIMITED" | "READ_ONLY" | "INTERNAL";
|
||
message: string;
|
||
/** @description Per-field problems (VALIDATION_FAILED only) */
|
||
fields?: {
|
||
[key: string]: string;
|
||
};
|
||
/** @description A more specific cause when there is one, e.g. TWO_FACTOR_REQUIRED, IMPERSONATION_ENDED, LICENCE_READ_ONLY, OTHER_CAMPUS */
|
||
reason?: string;
|
||
};
|
||
};
|
||
};
|
||
responses: never;
|
||
parameters: never;
|
||
requestBodies: never;
|
||
headers: never;
|
||
pathItems: never;
|
||
}
|
||
export type $defs = Record<string, never>;
|
||
export interface operations {
|
||
getEvents: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Page number, from 1 */
|
||
page?: number;
|
||
/** @description Items per page (at most 100) */
|
||
limit?: number;
|
||
/** @description Search the title */
|
||
q?: string;
|
||
/** @description A campus id or slug (its events plus church-wide ones), or 'all' for church-wide events only */
|
||
campus?: string;
|
||
/** @description A series slug */
|
||
series?: string;
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description OK */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
data: {
|
||
id: string;
|
||
title: string;
|
||
/** Format: date-time */
|
||
startDate: string;
|
||
/** Format: date-time */
|
||
endDate: string;
|
||
location: string | null;
|
||
/** @description The headline price in rand (0 = free) */
|
||
price: number;
|
||
pictureUrl: string | null;
|
||
requiresRegistration: boolean;
|
||
/** @enum {string} */
|
||
scheduleType: "single" | "sessions";
|
||
/** @description null = for all campuses (or campuses are off) */
|
||
campus: {
|
||
id: string;
|
||
name: string;
|
||
slug: string;
|
||
} | null;
|
||
series: {
|
||
id: string;
|
||
name: string;
|
||
slug: string;
|
||
} | null;
|
||
}[];
|
||
meta: {
|
||
page: number;
|
||
limit: number;
|
||
/** @description Items across all pages */
|
||
total: number;
|
||
/** @description Number of pages (at least 1) */
|
||
pages: number;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
/** @description Validation failed (VALIDATION_FAILED) */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getEventsId: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id */
|
||
id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description OK */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
data: {
|
||
id: string;
|
||
title: string;
|
||
/** Format: date-time */
|
||
startDate: string;
|
||
/** Format: date-time */
|
||
endDate: string;
|
||
location: string | null;
|
||
/** @description The headline price in rand (0 = free) */
|
||
price: number;
|
||
pictureUrl: string | null;
|
||
requiresRegistration: boolean;
|
||
/** @enum {string} */
|
||
scheduleType: "single" | "sessions";
|
||
/** @description null = for all campuses (or campuses are off) */
|
||
campus: {
|
||
id: string;
|
||
name: string;
|
||
slug: string;
|
||
} | null;
|
||
series: {
|
||
id: string;
|
||
name: string;
|
||
slug: string;
|
||
} | null;
|
||
description: string | null;
|
||
registrationDeadline: string | null;
|
||
ticketOptions: {
|
||
id: string;
|
||
name: string;
|
||
/** @description The normal price in rand */
|
||
price: number;
|
||
/** @description What it costs now (an early-bird price while one runs) */
|
||
currentPrice: number;
|
||
isMainTicket: boolean;
|
||
/**
|
||
* @description "pick" = the buyer chooses sessions
|
||
* @enum {string}
|
||
*/
|
||
sessionMode: "all" | "pick";
|
||
}[];
|
||
/** @description Multi-day events only; empty otherwise */
|
||
sessions: {
|
||
id: string;
|
||
label: string | null;
|
||
/** Format: date-time */
|
||
startsAt: string;
|
||
/** Format: date-time */
|
||
endsAt: string;
|
||
location: string | null;
|
||
cancelled: boolean;
|
||
}[];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
/** @description Validation failed (VALIDATION_FAILED) */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not found (NOT_FOUND) */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
postRegistrations: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": {
|
||
eventId: string;
|
||
options: {
|
||
eventOptionId: string;
|
||
quantity: number;
|
||
variantId?: string | null;
|
||
/** @description "Pick sessions" tickets: the sessions chosen */
|
||
sessionIds?: string[];
|
||
}[];
|
||
guest?: {
|
||
name: string;
|
||
/** Format: email */
|
||
email: string;
|
||
phone?: string;
|
||
};
|
||
couponCode?: string;
|
||
/** @description Names for the places (events that collect them) */
|
||
attendees?: {
|
||
eventOptionId: string;
|
||
variantId?: string | null;
|
||
name: string;
|
||
email?: string | null;
|
||
phone?: string | null;
|
||
/** @description YYYY-MM-DD (youth events) */
|
||
dateOfBirth?: string | null;
|
||
gender?: string | null;
|
||
parentName?: string | null;
|
||
parentEmail?: string | null;
|
||
parentPhone?: string | null;
|
||
}[];
|
||
/**
|
||
* @description With attendees: tickets to the payer, or to each attendee
|
||
* @enum {string}
|
||
*/
|
||
ticketDelivery?: "payer" | "each";
|
||
waitlistToken?: string;
|
||
analyticsSessionId?: string;
|
||
};
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description OK */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
data: {
|
||
id: string;
|
||
/** @enum {string} */
|
||
status: "pending" | "confirmed" | "partial_paid" | "paid" | "cancelled";
|
||
/** Format: date-time */
|
||
createdAt: string;
|
||
event: {
|
||
id: string;
|
||
title: string;
|
||
/** Format: date-time */
|
||
startDate: string;
|
||
/** Format: date-time */
|
||
endDate: string;
|
||
};
|
||
items: {
|
||
ticket: string;
|
||
variant: string | null;
|
||
quantity: number;
|
||
unitPrice: number;
|
||
}[];
|
||
/** @description In rand, after discounts */
|
||
totalDue: number;
|
||
/** @description In rand (refunds subtracted) */
|
||
amountPaid: number;
|
||
/** @description totalDue − amountPaid; 0 or less = nothing owing */
|
||
balance: number;
|
||
/** @description false = added to an existing registration */
|
||
isNew: boolean;
|
||
couponError: string | null;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
/** @description Validation failed (VALIDATION_FAILED) */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getRegistrationsId: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id */
|
||
id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description OK */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
data: {
|
||
id: string;
|
||
/** @enum {string} */
|
||
status: "pending" | "confirmed" | "partial_paid" | "paid" | "cancelled";
|
||
/** Format: date-time */
|
||
createdAt: string;
|
||
event: {
|
||
id: string;
|
||
title: string;
|
||
/** Format: date-time */
|
||
startDate: string;
|
||
/** Format: date-time */
|
||
endDate: string;
|
||
};
|
||
items: {
|
||
ticket: string;
|
||
variant: string | null;
|
||
quantity: number;
|
||
unitPrice: number;
|
||
}[];
|
||
/** @description In rand, after discounts */
|
||
totalDue: number;
|
||
/** @description In rand (refunds subtracted) */
|
||
amountPaid: number;
|
||
/** @description totalDue − amountPaid; 0 or less = nothing owing */
|
||
balance: number;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
/** @description Validation failed (VALIDATION_FAILED) */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not signed in (UNAUTHENTICATED) */
|
||
401: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not found (NOT_FOUND) */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
postRegistrationsIdCancel: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id */
|
||
id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description OK */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
data: {
|
||
id: string;
|
||
/** @enum {string} */
|
||
status: "pending" | "confirmed" | "partial_paid" | "paid" | "cancelled";
|
||
/** Format: date-time */
|
||
createdAt: string;
|
||
event: {
|
||
id: string;
|
||
title: string;
|
||
/** Format: date-time */
|
||
startDate: string;
|
||
/** Format: date-time */
|
||
endDate: string;
|
||
};
|
||
items: {
|
||
ticket: string;
|
||
variant: string | null;
|
||
quantity: number;
|
||
unitPrice: number;
|
||
}[];
|
||
/** @description In rand, after discounts */
|
||
totalDue: number;
|
||
/** @description In rand (refunds subtracted) */
|
||
amountPaid: number;
|
||
/** @description totalDue − amountPaid; 0 or less = nothing owing */
|
||
balance: number;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
/** @description Validation failed (VALIDATION_FAILED) */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not signed in (UNAUTHENTICATED) */
|
||
401: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not found (NOT_FOUND) */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
postRegistrationsIdCheckout: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The id */
|
||
id: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": {
|
||
/** @description An optional donation added on top, in rand */
|
||
donationAmount?: number;
|
||
/** @description yoco or payfast (default: the first one switched on) */
|
||
provider?: string;
|
||
/** Format: uri */
|
||
successUrl?: string;
|
||
/** Format: uri */
|
||
cancelUrl?: string;
|
||
/** Format: uri */
|
||
failureUrl?: string;
|
||
};
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description OK */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
data: {
|
||
/** @constant */
|
||
priceUpdated: true;
|
||
newBalance: number;
|
||
message: string;
|
||
} | {
|
||
/** @constant */
|
||
priceUpdated: false;
|
||
checkoutId: string;
|
||
redirectUrl: string;
|
||
provider: string;
|
||
/** @description Charged now, in rand (with any donation) */
|
||
amount: number;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
/** @description Validation failed (VALIDATION_FAILED) */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not signed in (UNAUTHENTICATED) */
|
||
401: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not found (NOT_FOUND) */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getMe: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description OK */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
data: {
|
||
id: string;
|
||
name: string;
|
||
email: string;
|
||
phone: string | null;
|
||
/** @enum {string} */
|
||
role: "admin" | "supervisor" | "staff" | "user";
|
||
twoFactorEnabled: boolean;
|
||
/** @enum {string} */
|
||
notificationPreference: "email" | "whatsapp" | "both";
|
||
homeCampusId: string | null;
|
||
/** Format: date-time */
|
||
createdAt: string;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
/** @description Not signed in (UNAUTHENTICATED) */
|
||
401: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
patchMe: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": {
|
||
name?: string;
|
||
/** Format: email */
|
||
email?: string;
|
||
/** @description null or empty removes it */
|
||
phone?: string | null;
|
||
/** @enum {string} */
|
||
notificationPreference?: "email" | "whatsapp" | "both";
|
||
/** @description While campuses are on */
|
||
homeCampusId?: string | null;
|
||
password?: string;
|
||
currentPassword?: string;
|
||
};
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description OK */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
data: {
|
||
id: string;
|
||
name: string;
|
||
email: string;
|
||
phone: string | null;
|
||
/** @enum {string} */
|
||
role: "admin" | "supervisor" | "staff" | "user";
|
||
twoFactorEnabled: boolean;
|
||
/** @enum {string} */
|
||
notificationPreference: "email" | "whatsapp" | "both";
|
||
homeCampusId: string | null;
|
||
/** Format: date-time */
|
||
createdAt: string;
|
||
};
|
||
token: string;
|
||
};
|
||
};
|
||
};
|
||
/** @description Validation failed (VALIDATION_FAILED) */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not signed in (UNAUTHENTICATED) */
|
||
401: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getMeRegistrations: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Page number, from 1 */
|
||
page?: number;
|
||
/** @description Items per page (at most 100) */
|
||
limit?: number;
|
||
/** @description Include past and cancelled registrations */
|
||
past?: "true" | "false";
|
||
};
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description OK */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
data: {
|
||
id: string;
|
||
/** @enum {string} */
|
||
status: "pending" | "confirmed" | "partial_paid" | "paid" | "cancelled";
|
||
/** Format: date-time */
|
||
createdAt: string;
|
||
event: {
|
||
id: string;
|
||
title: string;
|
||
/** Format: date-time */
|
||
startDate: string;
|
||
/** Format: date-time */
|
||
endDate: string;
|
||
};
|
||
items: {
|
||
ticket: string;
|
||
variant: string | null;
|
||
quantity: number;
|
||
unitPrice: number;
|
||
}[];
|
||
/** @description In rand, after discounts */
|
||
totalDue: number;
|
||
/** @description In rand (refunds subtracted) */
|
||
amountPaid: number;
|
||
/** @description totalDue − amountPaid; 0 or less = nothing owing */
|
||
balance: number;
|
||
}[];
|
||
meta: {
|
||
page: number;
|
||
limit: number;
|
||
/** @description Items across all pages */
|
||
total: number;
|
||
/** @description Number of pages (at least 1) */
|
||
pages: number;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
/** @description Validation failed (VALIDATION_FAILED) */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not signed in (UNAUTHENTICATED) */
|
||
401: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
getCheckinQrCode: {
|
||
parameters: {
|
||
query?: {
|
||
/** @description Multi-day events: the session (default: today's) */
|
||
sessionId?: string;
|
||
};
|
||
header?: never;
|
||
path: {
|
||
/** @description The code in the ticket's QR */
|
||
qrCode: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody?: never;
|
||
responses: {
|
||
/** @description OK */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
data: {
|
||
/** @enum {string} */
|
||
outcome: "found" | "transferred";
|
||
/** @description For a transferred ticket: who has it now */
|
||
message: string | null;
|
||
ticket: {
|
||
id: string;
|
||
eventId: string;
|
||
eventTitle: string | null;
|
||
/** @description For section checks */
|
||
ticketOptionId: string | null;
|
||
ticketName: string | null;
|
||
variant: string | null;
|
||
/** @description The attendee named on it, if any */
|
||
attendee: string | null;
|
||
/** @description Who registered */
|
||
bookedBy: string | null;
|
||
quantity: number;
|
||
/** @description Still to check in (this session, on multi-day events) */
|
||
remaining: number;
|
||
session: {
|
||
id: string;
|
||
label: string;
|
||
} | null;
|
||
/** @description Why no session is open for check-in now */
|
||
sessionError: string | null;
|
||
/** @description not_required, given, pending, declined or missing */
|
||
consentStatus: string;
|
||
} | null;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
/** @description Validation failed (VALIDATION_FAILED) */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not signed in (UNAUTHENTICATED) */
|
||
401: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not allowed for this role (FORBIDDEN) */
|
||
403: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not found (NOT_FOUND) */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
postCheckinQrCode: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path: {
|
||
/** @description The code in the ticket's QR */
|
||
qrCode: string;
|
||
};
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": {
|
||
/** @description Refuse tickets for any other event */
|
||
eventId?: string;
|
||
/** @description Only tickets valid for this section */
|
||
sectionId?: string;
|
||
/** @description Multi-day events: the session (default: today's) */
|
||
sessionId?: string;
|
||
/** @description How many to check in (default: everyone left) */
|
||
people?: number;
|
||
overrideConsent?: boolean;
|
||
/** @description This scanner, so its own offline lock doesn't block it */
|
||
deviceId?: string;
|
||
};
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description OK */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
data: {
|
||
/** @enum {string} */
|
||
outcome: "checked_in" | "already_used" | "consent_required" | "wrong_event" | "wrong_section" | "section_not_found" | "no_session" | "locked" | "transferred";
|
||
message: string;
|
||
ticket: {
|
||
id: string;
|
||
eventId: string;
|
||
eventTitle: string | null;
|
||
/** @description The ticket option, e.g. "Adult" */
|
||
ticketName: string | null;
|
||
/** @description People on this ticket */
|
||
quantity: number;
|
||
} | null;
|
||
/** @description People checked in by this request (0 unless checked_in) */
|
||
checkedIn: number;
|
||
/** @description Still to check in afterwards */
|
||
remaining: number | null;
|
||
session: {
|
||
id: string;
|
||
label: string;
|
||
} | null;
|
||
consentStatus: string | null;
|
||
/** @description consent_required: whether you may override */
|
||
canOverride: boolean;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
/** @description Validation failed (VALIDATION_FAILED) */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not signed in (UNAUTHENTICATED) */
|
||
401: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not allowed for this role (FORBIDDEN) */
|
||
403: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
/** @description Not found (NOT_FOUND) */
|
||
404: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
postAuthSignup: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": {
|
||
name: string;
|
||
/** Format: email */
|
||
email: string;
|
||
password: string;
|
||
phone?: string;
|
||
/**
|
||
* @description WhatsApp needs a valid South African number; otherwise email is used
|
||
* @enum {string}
|
||
*/
|
||
notificationPreference?: "email" | "whatsapp" | "both";
|
||
newsOptIn?: boolean;
|
||
/** @constant */
|
||
acceptTerms: true;
|
||
};
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description OK */
|
||
201: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
data: {
|
||
/** @constant */
|
||
status: "signed_in";
|
||
/** @description Send as `Authorization: Bearer <token>` */
|
||
token: string;
|
||
user: {
|
||
id: string;
|
||
name: string;
|
||
email: string;
|
||
/** @enum {string} */
|
||
role: "admin" | "supervisor" | "staff" | "user";
|
||
};
|
||
/** @description Ask once whether they want News & announcements */
|
||
newsPromptPending: boolean;
|
||
/** @description A privacy notice they must accept: never accepted (first) or a newer version (updated) */
|
||
noticePromptPending: false | ("first" | "updated");
|
||
/** @description With rememberDevice: send it with the next login to skip the code on this device */
|
||
deviceToken?: string;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
/** @description Validation failed (VALIDATION_FAILED) */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
postAuthLogin: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": {
|
||
/** @description Email address or phone number */
|
||
identifier: string;
|
||
password: string;
|
||
/** @description From an earlier login with rememberDevice */
|
||
deviceToken?: string;
|
||
};
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description OK */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
data: {
|
||
/** @constant */
|
||
status: "signed_in";
|
||
/** @description Send as `Authorization: Bearer <token>` */
|
||
token: string;
|
||
user: {
|
||
id: string;
|
||
name: string;
|
||
email: string;
|
||
/** @enum {string} */
|
||
role: "admin" | "supervisor" | "staff" | "user";
|
||
};
|
||
/** @description Ask once whether they want News & announcements */
|
||
newsPromptPending: boolean;
|
||
/** @description A privacy notice they must accept: never accepted (first) or a newer version (updated) */
|
||
noticePromptPending: false | ("first" | "updated");
|
||
/** @description With rememberDevice: send it with the next login to skip the code on this device */
|
||
deviceToken?: string;
|
||
} | {
|
||
/** @constant */
|
||
status: "code_required";
|
||
challengeId: string;
|
||
/** @enum {string} */
|
||
method: "email" | "whatsapp";
|
||
/** @description Where the code went, partly hidden */
|
||
destination: string | null;
|
||
/** @description true = this turns two-factor on (required for the role) */
|
||
enrolling: boolean;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
/** @description Validation failed (VALIDATION_FAILED) */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
postAuthLoginCode: {
|
||
parameters: {
|
||
query?: never;
|
||
header?: never;
|
||
path?: never;
|
||
cookie?: never;
|
||
};
|
||
requestBody: {
|
||
content: {
|
||
"application/json": {
|
||
challengeId: string;
|
||
code: string;
|
||
/** @description Skip the code on this device next time (30 days) */
|
||
rememberDevice?: boolean;
|
||
};
|
||
};
|
||
};
|
||
responses: {
|
||
/** @description OK */
|
||
200: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": {
|
||
data: {
|
||
/** @constant */
|
||
status: "signed_in";
|
||
/** @description Send as `Authorization: Bearer <token>` */
|
||
token: string;
|
||
user: {
|
||
id: string;
|
||
name: string;
|
||
email: string;
|
||
/** @enum {string} */
|
||
role: "admin" | "supervisor" | "staff" | "user";
|
||
};
|
||
/** @description Ask once whether they want News & announcements */
|
||
newsPromptPending: boolean;
|
||
/** @description A privacy notice they must accept: never accepted (first) or a newer version (updated) */
|
||
noticePromptPending: false | ("first" | "updated");
|
||
/** @description With rememberDevice: send it with the next login to skip the code on this device */
|
||
deviceToken?: string;
|
||
};
|
||
};
|
||
};
|
||
};
|
||
/** @description Validation failed (VALIDATION_FAILED) */
|
||
400: {
|
||
headers: {
|
||
[name: string]: unknown;
|
||
};
|
||
content: {
|
||
"application/json": components["schemas"]["Error"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
}
|