Download src/lib/api/support.ts from asnannp/DocDoeAI: direct link, hf CLI and curl.
- Browser
- Download file 808 Bytes
-
https://huggingface.co/spaces/asnannp/DocDoeAI/resolve/main/src/lib/api/support.ts
- Command line
-
hf download hf://spaces/asnannp/DocDoeAI/src/lib/api/support.ts
-
curl -L -o support.ts https://huggingface.co/spaces/asnannp/DocDoeAI/resolve/main/src/lib/api/support.ts
808 Bytes
| import { apiPost } from "@/lib/api/client"; | |
| /** | |
| * Bug reports and product feedback. The backend accepts these with or without | |
| * a signed-in user (beta students may report before logging in); apiPost adds | |
| * the auth token automatically when a session exists. | |
| */ | |
| export type SupportKind = "bug" | "feedback"; | |
| export type SupportSubmissionInput = { | |
| kind: SupportKind; | |
| message: string; | |
| category?: string | null; | |
| title?: string | null; | |
| rating?: number | null; | |
| page_url?: string | null; | |
| }; | |
| export type SupportSubmissionResult = { | |
| id: string; | |
| kind: string; | |
| status: string; | |
| created_at: string; | |
| }; | |
| export function submitSupport( | |
| input: SupportSubmissionInput, | |
| ): Promise<SupportSubmissionResult> { | |
| return apiPost<SupportSubmissionResult, SupportSubmissionInput>("/support", input); | |
| } | |