/** * Copyright 2022 Gravwell, Inc. All rights reserved. * * Contact: [legal@gravwell.io](mailto:legal@gravwell.io) * * This software may be modified and distributed under the terms of the MIT * license. See the LICENSE file for details. */ import { DashboardsFilter } from '../../functions/dashboards/get-many-dashboards'; import { CreatableDashboard } from '../../models/dashboard/creatable-dashboard'; import { Dashboard } from '../../models/dashboard/dashboard'; import { UpdatableDashboard } from '../../models/dashboard/updatable-dashboard'; export interface DashboardsService { readonly get: { readonly one: (dashboardID: string) => Promise; readonly many: (filter?: DashboardsFilter) => Promise>; readonly all: () => Promise>; readonly authorizedTo: { readonly me: () => Promise>; }; }; readonly create: { readonly one: (data: CreatableDashboard) => Promise; }; readonly update: { readonly one: (data: UpdatableDashboard) => Promise; }; readonly delete: { readonly one: (dashboardID: string) => Promise; }; readonly import: { readonly one: (dashboardJSON: string) => Promise; }; }