fix: align frontend API paths with backend endpoints
- 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>
This commit is contained in:
@@ -32,8 +32,8 @@ export const branchesApi = {
|
||||
reason?: string
|
||||
): Promise<void> {
|
||||
await apiClient.patch(
|
||||
`/ai-sessions/${sessionId}/branches/${branchId}/status`,
|
||||
{ status, reason }
|
||||
`/ai-sessions/${sessionId}/branches/${branchId}`,
|
||||
{ status, status_reason: reason }
|
||||
)
|
||||
},
|
||||
|
||||
|
||||
@@ -21,15 +21,15 @@ export const handoffsApi = {
|
||||
return response.data
|
||||
},
|
||||
|
||||
async claimHandoff(handoffId: string): Promise<HandoffResponse> {
|
||||
async claimHandoff(sessionId: string, handoffId: string): Promise<HandoffResponse> {
|
||||
const response = await apiClient.post<HandoffResponse>(
|
||||
`/handoffs/${handoffId}/claim`
|
||||
`/ai-sessions/${sessionId}/handoffs/${handoffId}/claim`
|
||||
)
|
||||
return response.data
|
||||
},
|
||||
|
||||
async getQueue(params?: { intent?: 'park' | 'escalate'; limit?: number }): Promise<QueueItemResponse[]> {
|
||||
const response = await apiClient.get<QueueItemResponse[]>('/handoffs/queue', {
|
||||
const response = await apiClient.get<QueueItemResponse[]>('/ai-sessions/queue', {
|
||||
params,
|
||||
})
|
||||
return response.data
|
||||
|
||||
@@ -9,7 +9,7 @@ import type {
|
||||
export const resolutionsApi = {
|
||||
async getOutputs(sessionId: string): Promise<AllResolutionOutputsResponse> {
|
||||
const response = await apiClient.get<AllResolutionOutputsResponse>(
|
||||
`/ai-sessions/${sessionId}/resolution-outputs`
|
||||
`/ai-sessions/${sessionId}/outputs`
|
||||
)
|
||||
return response.data
|
||||
},
|
||||
@@ -20,7 +20,7 @@ export const resolutionsApi = {
|
||||
data: ResolutionOutputEditRequest
|
||||
): Promise<ResolutionOutputResponse> {
|
||||
const response = await apiClient.patch<ResolutionOutputResponse>(
|
||||
`/ai-sessions/${sessionId}/resolution-outputs/${outputId}`,
|
||||
`/ai-sessions/${sessionId}/outputs/${outputId}`,
|
||||
data
|
||||
)
|
||||
return response.data
|
||||
@@ -32,7 +32,7 @@ export const resolutionsApi = {
|
||||
data: ResolutionOutputPushRequest
|
||||
): Promise<ResolutionOutputResponse> {
|
||||
const response = await apiClient.post<ResolutionOutputResponse>(
|
||||
`/ai-sessions/${sessionId}/resolution-outputs/${outputId}/push`,
|
||||
`/ai-sessions/${sessionId}/outputs/${outputId}/push`,
|
||||
data
|
||||
)
|
||||
return response.data
|
||||
|
||||
Reference in New Issue
Block a user