- handoffs: /handoffs/queue → /ai-sessions/queue, claim needs sessionId - resolutions: /resolution-outputs → /outputs - branches: /status suffix removed from PATCH path - Add SessionQueuePage route at /queue Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import apiClient from './client'
|
|
import type {
|
|
AllResolutionOutputsResponse,
|
|
ResolutionOutputResponse,
|
|
ResolutionOutputEditRequest,
|
|
ResolutionOutputPushRequest,
|
|
} from '@/types/branching'
|
|
|
|
export const resolutionsApi = {
|
|
async getOutputs(sessionId: string): Promise<AllResolutionOutputsResponse> {
|
|
const response = await apiClient.get<AllResolutionOutputsResponse>(
|
|
`/ai-sessions/${sessionId}/outputs`
|
|
)
|
|
return response.data
|
|
},
|
|
|
|
async editOutput(
|
|
sessionId: string,
|
|
outputId: string,
|
|
data: ResolutionOutputEditRequest
|
|
): Promise<ResolutionOutputResponse> {
|
|
const response = await apiClient.patch<ResolutionOutputResponse>(
|
|
`/ai-sessions/${sessionId}/outputs/${outputId}`,
|
|
data
|
|
)
|
|
return response.data
|
|
},
|
|
|
|
async pushOutput(
|
|
sessionId: string,
|
|
outputId: string,
|
|
data: ResolutionOutputPushRequest
|
|
): Promise<ResolutionOutputResponse> {
|
|
const response = await apiClient.post<ResolutionOutputResponse>(
|
|
`/ai-sessions/${sessionId}/outputs/${outputId}/push`,
|
|
data
|
|
)
|
|
return response.data
|
|
},
|
|
}
|
|
|
|
export default resolutionsApi
|