import { BaseResource } from '@gitbeaker/requester-utils'; import { RequestHelper, endpoint } from '../infrastructure'; import type { GitlabAPIResponse, ShowExpanded, Sudo } from '../infrastructure'; export interface StarredDashboardSchema extends Record { id: number; dashboard_path: string; user_id: number; project_id: number; } export class UserStarredMetricsDashboard extends BaseResource { create( projectId: string | number, dashboardPath: string, options?: Sudo & ShowExpanded, ): Promise> { return RequestHelper.get()( this, endpoint`projects/${projectId}/metrics/user_starred_dashboards`, { dashboardPath, ...options, }, ); } remove( projectId: string | number, options?: { dashboard_path?: string } & Sudo & ShowExpanded, ): Promise> { return RequestHelper.del<{ deleted_rows: number }>()( this, endpoint`projects/${projectId}/metrics/user_starred_dashboards`, options, ); } }