- API clients for supporting data CRUD and team branding - AddSupportingDataModal with text snippet and screenshot tabs (paste + upload) - SupportingDataPanel collapsible section integrated into both session runners - ExportPreviewModal updated with PDF format and server-side download flow - BrandingSettings component for company name and logo management - Expose team_id in UserResponse schema for branding endpoint access Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import { apiClient } from './client'
|
|
|
|
export interface SupportingDataItem {
|
|
id: string
|
|
session_id: string
|
|
label: string
|
|
data_type: 'text_snippet' | 'screenshot'
|
|
content: string
|
|
content_type: string | null
|
|
sort_order: number
|
|
created_at: string
|
|
updated_at: string
|
|
}
|
|
|
|
export async function getSupportingData(sessionId: string): Promise<SupportingDataItem[]> {
|
|
const response = await apiClient.get(`/sessions/${sessionId}/supporting-data`)
|
|
return response.data
|
|
}
|
|
|
|
export async function createSupportingData(
|
|
sessionId: string,
|
|
data: { label: string; data_type: string; content: string; content_type?: string }
|
|
): Promise<SupportingDataItem> {
|
|
const response = await apiClient.post(`/sessions/${sessionId}/supporting-data`, data)
|
|
return response.data
|
|
}
|
|
|
|
export async function updateSupportingData(
|
|
sessionId: string,
|
|
itemId: string,
|
|
data: { label?: string; content?: string }
|
|
): Promise<SupportingDataItem> {
|
|
const response = await apiClient.patch(`/sessions/${sessionId}/supporting-data/${itemId}`, data)
|
|
return response.data
|
|
}
|
|
|
|
export async function deleteSupportingData(sessionId: string, itemId: string): Promise<void> {
|
|
await apiClient.delete(`/sessions/${sessionId}/supporting-data/${itemId}`)
|
|
}
|