WIP 1.51.8: sections, costs and uploads on v2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls1vMdg2GYqbnKZmPaX1ot
This commit is contained in:
2026-10-29 12:08:03 +02:00
co-authored by Claude Opus 5.5
parent 006c4db02f
commit 96b9b8c23f
9 changed files with 3055 additions and 314 deletions
File diff suppressed because it is too large Load Diff
+928
View File
@@ -386,6 +386,174 @@ export interface paths {
patch?: never;
trace?: never;
};
"/sections": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Scanning sections
* @description Which ticket types may come in at which door, for one event or every event you can see.
*
* **Who:** Staff, supervisors and admins.
*/
get: operations["getSections"];
put?: never;
/**
* Add a scanning section
* @description **Who:** Supervisors and admins.
*/
post: operations["postSections"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/sections/{id}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
post?: never;
/**
* Remove a scanning section
* @description **Who:** Admins only.
*/
delete: operations["deleteSectionsId"];
options?: never;
head?: never;
/**
* Change a scanning section
* @description `allowedOptionIds`, when sent, replaces its ticket types.
*
* **Who:** Supervisors and admins.
*/
patch: operations["patchSectionsId"];
trace?: never;
};
"/events/{id}/costs": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* An event's planned costs
* @description **Who:** Supervisors and admins.
*/
get: operations["getEventsIdCosts"];
put?: never;
/**
* Add a planned cost
* @description Admins. Not on a cashed-up event.
*
* **Who:** Admins only.
*/
post: operations["postEventsIdCosts"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/costs/{id}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
post?: never;
/**
* Remove a planned cost
* @description **Who:** Admins only.
*/
delete: operations["deleteCostsId"];
options?: never;
head?: never;
/**
* Change a planned cost
* @description **Who:** Admins only.
*/
patch: operations["patchCostsId"];
trace?: never;
};
"/uploads/event-image": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Upload an event picture
* @description Returns the path to save as the event's `picture`.
*
* **Who:** Supervisors and admins.
*/
post: operations["postUploadsEvent-image"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/uploads/logo": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Upload the site logo
* @description Admins — or anyone during first-time setup, before any account exists.
*
* **Who:** Anyone.
*/
post: operations["postUploadsLogo"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/uploads/favicon": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Upload the site icon (favicon)
* @description Admins — or anyone during first-time setup, before any account exists.
*
* **Who:** Anyone.
*/
post: operations["postUploadsFavicon"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/registrations": {
parameters: {
query?: never;
@@ -2470,6 +2638,766 @@ export interface operations {
};
};
};
getSections: {
parameters: {
query?: {
eventId?: string;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
data: ({
id: string;
eventId: string;
name: string;
allowedOptions: ({
eventOptionId: string;
eventOption: {
id: string;
name: string;
} & {
[key: string]: unknown;
};
} & {
[key: string]: unknown;
})[];
event: {
id: string;
title: string;
};
} & {
[key: string]: unknown;
})[];
};
};
};
/** @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"];
};
};
};
};
postSections: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": {
eventId: string;
name: string;
allowedOptionIds?: string[];
};
};
};
responses: {
/** @description OK */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
data: {
id: string;
eventId: string;
name: string;
allowedOptions: ({
eventOptionId: string;
eventOption: {
id: string;
name: string;
} & {
[key: string]: unknown;
};
} & {
[key: string]: unknown;
})[];
} & {
[key: string]: unknown;
};
};
};
};
/** @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"];
};
};
};
};
deleteSectionsId: {
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;
/** @constant */
deleted: true;
};
};
};
};
/** @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"];
};
};
};
};
patchSectionsId: {
parameters: {
query?: never;
header?: never;
path: {
/** @description The id */
id: string;
};
cookie?: never;
};
requestBody: {
content: {
"application/json": {
name?: string;
allowedOptionIds?: string[];
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
data: {
id: string;
eventId: string;
name: string;
allowedOptions: ({
eventOptionId: string;
eventOption: {
id: string;
name: string;
} & {
[key: string]: unknown;
};
} & {
[key: string]: unknown;
})[];
} & {
[key: string]: unknown;
};
};
};
};
/** @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"];
};
};
};
};
getEventsIdCosts: {
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;
eventId: string;
label: string;
/** @enum {string} */
costType: "once_off" | "per_item";
amount: number;
eventOptionId: string | null;
eventOption: {
id: string;
name: string;
} | null;
/** @description How it was paid out of the takings (cash, card, eft, other) */
paidFromMethod: string | null;
notes: string | null;
/** Format: date-time */
createdAt: string;
/** Format: date-time */
updatedAt?: 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"];
};
};
/** @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"];
};
};
};
};
postEventsIdCosts: {
parameters: {
query?: never;
header?: never;
path: {
/** @description The id */
id: string;
};
cookie?: never;
};
requestBody: {
content: {
"application/json": {
label: string;
/**
* @description per_item = per ticket sold of `eventOptionId`
* @enum {string}
*/
costType: "once_off" | "per_item";
amount: number | string;
eventOptionId?: string | null;
notes?: string | null;
paidFromMethod?: ("cash" | "card" | "eft" | "other") | null;
};
};
};
responses: {
/** @description OK */
201: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
data: {
id: string;
eventId: string;
label: string;
/** @enum {string} */
costType: "once_off" | "per_item";
amount: number;
eventOptionId: string | null;
eventOption: {
id: string;
name: string;
} | null;
/** @description How it was paid out of the takings (cash, card, eft, other) */
paidFromMethod: string | null;
notes: string | null;
/** Format: date-time */
createdAt: string;
/** Format: date-time */
updatedAt?: 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"];
};
};
/** @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"];
};
};
};
};
deleteCostsId: {
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;
/** @constant */
deleted: true;
};
};
};
};
/** @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"];
};
};
};
};
patchCostsId: {
parameters: {
query?: never;
header?: never;
path: {
/** @description The id */
id: string;
};
cookie?: never;
};
requestBody: {
content: {
"application/json": {
label?: string;
/**
* @description per_item = per ticket sold of `eventOptionId`
* @enum {string}
*/
costType?: "once_off" | "per_item";
amount?: number | string;
eventOptionId?: string | null;
notes?: string | null;
paidFromMethod?: ("cash" | "card" | "eft" | "other") | null;
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
data: {
id: string;
eventId: string;
label: string;
/** @enum {string} */
costType: "once_off" | "per_item";
amount: number;
eventOptionId: string | null;
eventOption: {
id: string;
name: string;
} | null;
/** @description How it was paid out of the takings (cash, card, eft, other) */
paidFromMethod: string | null;
notes: string | null;
/** Format: date-time */
createdAt: string;
/** Format: date-time */
updatedAt?: 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"];
};
};
/** @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"];
};
};
};
};
"postUploadsEvent-image": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"multipart/form-data": {
/**
* Format: binary
* @description A JPEG, PNG, GIF or WebP image
*/
image: string;
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
data: {
/** @description What to save on the event or setting */
path: string;
/** @description The same, as a full address */
url: string;
};
};
};
};
/** @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"];
};
};
};
};
postUploadsLogo: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"multipart/form-data": {
/**
* Format: binary
* @description A JPEG, PNG, WebP or SVG image
*/
image: string;
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
data: {
/** @description What to save on the event or setting */
path: string;
/** @description The same, as a full address */
url: string;
};
};
};
};
};
};
postUploadsFavicon: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"multipart/form-data": {
/**
* Format: binary
* @description An ICO, PNG or SVG image
*/
image: string;
};
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
data: {
/** @description What to save on the event or setting */
path: string;
/** @description The same, as a full address */
url: string;
};
};
};
};
};
};
postRegistrations: {
parameters: {
query?: never;