Type route endpoints

This commit is contained in:
Andrew Kingston 2024-12-03 10:23:38 +00:00
parent 0e8c89d018
commit 9926e8d15c
No known key found for this signature in database
2 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,12 @@
export const buildRouteEndpoints = API => ({
import { BaseAPIClient } from "./types"
export interface RouteEndpoints {
// Missing request or response types
fetchClientAppRoutes: () => Promise<{ routes: any }>
fetchAppRoutes: () => Promise<{ routes: any }>
}
export const buildRouteEndpoints = (API: BaseAPIClient): RouteEndpoints => ({
/**
* Fetches available routes for the client app.
*/

View File

@ -22,6 +22,7 @@ import { PluginEndpoins } from "./plugins"
import { QueryEndpoints } from "./queries"
import { RelationshipEndpoints } from "./relationships"
import { RoleEndpoints } from "./roles"
import { RouteEndpoints } from "./routes"
export enum HTTPMethod {
POST = "POST",
@ -115,4 +116,5 @@ export type APIClient = BaseAPIClient &
PluginEndpoins &
QueryEndpoints &
RelationshipEndpoints &
RoleEndpoints & { [key: string]: any }
RoleEndpoints &
RouteEndpoints & { [key: string]: any }