Files
pulse/frontend-modern/src/api/guestMetadata.ts
T
rcourtman 53d7776d6b wip: AI chat integration with multi-provider support
- Add AI service with Anthropic, OpenAI, and Ollama providers
- Add AI chat UI component with streaming responses
- Add AI settings page for configuration
- Add agent exec framework for command execution
- Add API endpoints for AI chat and configuration
2025-12-04 20:16:53 +00:00

43 lines
1.1 KiB
TypeScript

// Guest Metadata API
import { apiFetchJSON } from '@/utils/apiClient';
export interface GuestMetadata {
id: string;
customUrl?: string;
description?: string;
tags?: string[];
notes?: string[]; // User annotations for AI context
}
export class GuestMetadataAPI {
private static baseUrl = '/api/guests/metadata';
// Get metadata for a specific guest
static async getMetadata(guestId: string): Promise<GuestMetadata> {
return apiFetchJSON(`${this.baseUrl}/${encodeURIComponent(guestId)}`);
}
// Get all guest metadata
static async getAllMetadata(): Promise<Record<string, GuestMetadata>> {
return apiFetchJSON(this.baseUrl);
}
// Update metadata for a guest
static async updateMetadata(
guestId: string,
metadata: Partial<GuestMetadata>,
): Promise<GuestMetadata> {
return apiFetchJSON(`${this.baseUrl}/${encodeURIComponent(guestId)}`, {
method: 'PUT',
body: JSON.stringify(metadata),
});
}
// Delete metadata for a guest
static async deleteMetadata(guestId: string): Promise<void> {
await apiFetchJSON(`${this.baseUrl}/${encodeURIComponent(guestId)}`, {
method: 'DELETE',
});
}
}