refactor: remove api-types.ts compatibility layer

- Migrated all 29 files from api-types.ts to use reflector-api.d.ts directly
- Removed $SourceKind manual enum in favor of OpenAPI-generated types
- Fixed unrelated Spinner component TypeScript error in AuthWrapper.tsx
- All imports now use: import type { components } from "path/to/reflector-api"
- Deleted api-types.ts file completely
This commit is contained in:
2025-08-29 16:35:33 -06:00
parent 8c525e09e8
commit 7ddae5ddd5
35 changed files with 96 additions and 77 deletions

View File

@@ -12,7 +12,9 @@ import {
HStack,
} from "@chakra-ui/react";
import { LuLink } from "react-icons/lu";
import { Room } from "../../../lib/api-types";
import type { components } from "../../../reflector-api";
type Room = components["schemas"]["Room"];
import { RoomActionsMenu } from "./RoomActionsMenu";
interface RoomCardsProps {

View File

@@ -1,5 +1,7 @@
import { Box, Heading, Text, VStack } from "@chakra-ui/react";
import { Room } from "../../../lib/api-types";
import type { components } from "../../../reflector-api";
type Room = components["schemas"]["Room"];
import { RoomTable } from "./RoomTable";
import { RoomCards } from "./RoomCards";

View File

@@ -9,7 +9,9 @@ import {
Spinner,
} from "@chakra-ui/react";
import { LuLink } from "react-icons/lu";
import { Room } from "../../../lib/api-types";
import type { components } from "../../../reflector-api";
type Room = components["schemas"]["Room"];
import { RoomActionsMenu } from "./RoomActionsMenu";
interface RoomTableProps {

View File

@@ -16,7 +16,7 @@ import {
} from "@chakra-ui/react";
import { useEffect, useState } from "react";
import useRoomList from "./useRoomList";
import { Room } from "../../lib/api-types";
import type { components } from "../../reflector-api";
import {
useRoomCreate,
useRoomUpdate,
@@ -27,6 +27,8 @@ import {
import { RoomList } from "./_components/RoomList";
import { PaginationPage } from "../browse/_components/Pagination";
type Room = components["schemas"]["Room"];
interface SelectOption {
label: string;
value: string;

View File

@@ -1,5 +1,7 @@
import { useRoomsList } from "../../lib/api-hooks";
import { Page_Room_ } from "../../lib/api-types";
import type { components } from "../../reflector-api";
type Page_Room_ = components["schemas"]["Page_Room_"];
import { PaginationPage } from "../browse/_components/Pagination";
type RoomList = {