Type route endpoints
This commit is contained in:
parent
0e8c89d018
commit
9926e8d15c
|
@ -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.
|
||||
*/
|
|
@ -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 }
|
||||
|
|
Loading…
Reference in New Issue