import { api } from './client' import type { Encounter, CreateEncounterInput, UpdateEncounterInput, } from '../types/game' export function createEncounter( runId: number, data: CreateEncounterInput, ): Promise { return api.post(`/runs/${runId}/encounters`, data) } export function updateEncounter( id: number, data: UpdateEncounterInput, ): Promise { return api.patch(`/encounters/${id}`, data) } export function deleteEncounter(id: number): Promise { return api.del(`/encounters/${id}`) }