Enhance API with OIDC support, including login and callback endpoints. Update environment variables for OIDC configuration in .env.example. Add new features to the catalog service for listing software families, Minecraft versions, and deployment regions. Implement server management actions such as kill, delete, and update in the servers module. Integrate feature flags for maintenance mode in server operations. Update pnpm-lock.yaml with new dependencies and versions.
Some checks failed
CI / Node — lint, typecheck, test, build (push) Failing after 12s
CI / Go — node-agent tests (push) Failing after 9s
CI / Go — edge-gateway build (push) Successful in 17s

This commit is contained in:
TheOnlyMace
2026-07-05 18:39:53 +02:00
parent bf36cb3159
commit 50cd4b3ffd
225 changed files with 17824 additions and 436 deletions

View File

@@ -0,0 +1,78 @@
import { apiFetch } from "./auth";
export type ScheduleTaskType =
| "START"
| "STOP"
| "RESTART"
| "BACKUP"
| "CONSOLE_COMMAND"
| "UPDATE_CHECK"
| "MAINTENANCE";
export interface ScheduledTask {
id: string;
taskType: ScheduleTaskType;
payload: Record<string, unknown> | null;
}
export interface Schedule {
id: string;
name: string;
timezone: string;
cronExpr: string;
enabled: boolean;
nextRunAt: string | null;
lastRunAt: string | null;
tasks: ScheduledTask[];
}
export interface ScheduleListResponse {
schedules: Schedule[];
}
export interface CreateSchedulePayload {
name: string;
timezone?: string;
cronExpr: string;
enabled?: boolean;
tasks: Array<{
taskType: ScheduleTaskType;
payload?: Record<string, unknown>;
}>;
}
export type UpdateSchedulePayload = Partial<CreateSchedulePayload>;
export async function listSchedules(serverId: string): Promise<ScheduleListResponse> {
return apiFetch<ScheduleListResponse>(`/servers/${serverId}/schedules`);
}
export async function createSchedule(
serverId: string,
payload: CreateSchedulePayload,
): Promise<Schedule> {
return apiFetch<Schedule>(`/servers/${serverId}/schedules`, {
method: "POST",
body: JSON.stringify(payload),
});
}
export async function updateSchedule(
serverId: string,
scheduleId: string,
payload: UpdateSchedulePayload,
): Promise<Schedule> {
return apiFetch<Schedule>(`/servers/${serverId}/schedules/${scheduleId}`, {
method: "PATCH",
body: JSON.stringify(payload),
});
}
export async function deleteSchedule(
serverId: string,
scheduleId: string,
): Promise<void> {
await apiFetch<void>(`/servers/${serverId}/schedules/${scheduleId}`, {
method: "DELETE",
});
}