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.
This commit is contained in:
47
apps/web/src/lib/api/compliance.ts
Normal file
47
apps/web/src/lib/api/compliance.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import { apiFetch } from "./auth";
|
||||
|
||||
export interface DataExportRequest {
|
||||
id: string;
|
||||
status: "PENDING" | "PROCESSING" | "READY" | "FAILED" | "EXPIRED";
|
||||
downloadUrl: string | null;
|
||||
expiresAt: string | null;
|
||||
completedAt: string | null;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface AccountDeletionRequest {
|
||||
id: string;
|
||||
status: "PENDING" | "SCHEDULED" | "COMPLETED" | "CANCELLED";
|
||||
scheduledFor: string;
|
||||
completedAt: string | null;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export async function requestDataExport(): Promise<DataExportRequest> {
|
||||
return apiFetch<DataExportRequest>("/account/compliance/export", {
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
export async function listDataExports(): Promise<{ exports: DataExportRequest[] }> {
|
||||
return apiFetch("/account/compliance/export");
|
||||
}
|
||||
|
||||
export async function requestAccountDeletion(
|
||||
confirmEmail: string,
|
||||
): Promise<AccountDeletionRequest> {
|
||||
return apiFetch<AccountDeletionRequest>("/account/compliance/deletion", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ confirmEmail }),
|
||||
});
|
||||
}
|
||||
|
||||
export async function getAccountDeletionStatus(): Promise<AccountDeletionRequest | null> {
|
||||
return apiFetch<AccountDeletionRequest | null>("/account/compliance/deletion");
|
||||
}
|
||||
|
||||
export async function cancelAccountDeletion(): Promise<AccountDeletionRequest> {
|
||||
return apiFetch<AccountDeletionRequest>("/account/compliance/deletion", {
|
||||
method: "DELETE",
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user