export type UpdateApiInternalV1DashboardsProjectIdDashboardIdUnpinnedArgs = {project_id: number, dashboard_id: number}; export type UpdateApiInternalV1DashboardsProjectIdDashboardIdUnpinnedOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Unpin a dashboard * * PUT /internal/v1/dashboards/{project_id}/{dashboard_id}/unpinned * * Also accepts auth: authTokenQuery */ export const updateApiInternalV1DashboardsProjectIdDashboardIdUnpinned = async (args: UpdateApiInternalV1DashboardsProjectIdDashboardIdUnpinnedArgs, options?: UpdateApiInternalV1DashboardsProjectIdDashboardIdUnpinnedOptions) => { const {baseUrl = "https://api.uptrace.dev", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/internal/v1/dashboards/${encodeURIComponent(String(args.project_id))}/${encodeURIComponent(String(args.dashboard_id))}/unpinned${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };