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.
|
* Fetches available routes for the client app.
|
||||||
*/
|
*/
|
|
@ -22,6 +22,7 @@ import { PluginEndpoins } from "./plugins"
|
||||||
import { QueryEndpoints } from "./queries"
|
import { QueryEndpoints } from "./queries"
|
||||||
import { RelationshipEndpoints } from "./relationships"
|
import { RelationshipEndpoints } from "./relationships"
|
||||||
import { RoleEndpoints } from "./roles"
|
import { RoleEndpoints } from "./roles"
|
||||||
|
import { RouteEndpoints } from "./routes"
|
||||||
|
|
||||||
export enum HTTPMethod {
|
export enum HTTPMethod {
|
||||||
POST = "POST",
|
POST = "POST",
|
||||||
|
@ -115,4 +116,5 @@ export type APIClient = BaseAPIClient &
|
||||||
PluginEndpoins &
|
PluginEndpoins &
|
||||||
QueryEndpoints &
|
QueryEndpoints &
|
||||||
RelationshipEndpoints &
|
RelationshipEndpoints &
|
||||||
RoleEndpoints & { [key: string]: any }
|
RoleEndpoints &
|
||||||
|
RouteEndpoints & { [key: string]: any }
|
||||||
|
|
Loading…
Reference in New Issue