2019-10-18 08:16:26 +00:00
|
|
|
import Api from "./Api";
|
2019-11-25 05:07:27 +00:00
|
|
|
import { WidgetCardProps } from "widgets/BaseWidget";
|
2019-10-29 12:02:58 +00:00
|
|
|
import { AxiosPromise } from "axios";
|
2019-10-18 08:16:26 +00:00
|
|
|
|
|
|
|
|
export interface WidgetSidebarResponse {
|
|
|
|
|
cards: { [id: string]: WidgetCardProps[] };
|
|
|
|
|
}
|
|
|
|
|
// export interface WidgetCardsPaneRequest {}
|
|
|
|
|
|
|
|
|
|
class WidgetSidebarApi extends Api {
|
|
|
|
|
static url = "/widgetCards";
|
2019-10-29 12:02:58 +00:00
|
|
|
static fetchWidgetCards(): AxiosPromise<WidgetSidebarResponse> {
|
2019-10-18 08:16:26 +00:00
|
|
|
return Api.get(WidgetSidebarApi.url);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default WidgetSidebarApi;
|