2019-11-29 05:22:49 +00:00
|
|
|
import Api from "./Api";
|
|
|
|
|
import { AxiosPromise } from "axios";
|
|
|
|
|
import { GenericApiResponse } from "api/ApiResponses";
|
|
|
|
|
|
|
|
|
|
export interface Plugin {
|
|
|
|
|
id: string;
|
|
|
|
|
name: string;
|
|
|
|
|
type: "API" | "DB";
|
2020-04-14 12:34:14 +00:00
|
|
|
packageName: string;
|
|
|
|
|
uiComponent: "ApiEditorForm" | "RapidApiEditorForm" | "DbEditorForm";
|
2019-11-29 05:22:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class PluginsApi extends Api {
|
|
|
|
|
static url = "v1/plugins";
|
|
|
|
|
static fetchPlugins(): AxiosPromise<GenericApiResponse<Plugin[]>> {
|
|
|
|
|
return Api.get(PluginsApi.url);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default PluginsApi;
|