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
|
reason?: string
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
await apiClient.patch(
|
await apiClient.patch(
|
||||||
`/ai-sessions/${sessionId}/branches/${branchId}/status`,
|
`/ai-sessions/${sessionId}/branches/${branchId}`,
|
||||||
{ status, reason }
|
{ status, status_reason: reason }
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -21,15 +21,15 @@ export const handoffsApi = {
|
|||||||
return response.data
|
return response.data
|
||||||
},
|
},
|
||||||
|
|
||||||
async claimHandoff(handoffId: string): Promise<HandoffResponse> {
|
async claimHandoff(sessionId: string, handoffId: string): Promise<HandoffResponse> {
|
||||||
const response = await apiClient.post<HandoffResponse>(
|
const response = await apiClient.post<HandoffResponse>(
|
||||||
`/handoffs/${handoffId}/claim`
|
`/ai-sessions/${sessionId}/handoffs/${handoffId}/claim`
|
||||||
)
|
)
|
||||||
return response.data
|
return response.data
|
||||||
},
|
},
|
||||||
|
|
||||||
async getQueue(params?: { intent?: 'park' | 'escalate'; limit?: number }): Promise<QueueItemResponse[]> {
|
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,
|
params,
|
||||||
})
|
})
|
||||||
return response.data
|
return response.data
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import type {
|
|||||||
export const resolutionsApi = {
|
export const resolutionsApi = {
|
||||||
async getOutputs(sessionId: string): Promise<AllResolutionOutputsResponse> {
|
async getOutputs(sessionId: string): Promise<AllResolutionOutputsResponse> {
|
||||||
const response = await apiClient.get<AllResolutionOutputsResponse>(
|
const response = await apiClient.get<AllResolutionOutputsResponse>(
|
||||||
`/ai-sessions/${sessionId}/resolution-outputs`
|
`/ai-sessions/${sessionId}/outputs`
|
||||||
)
|
)
|
||||||
return response.data
|
return response.data
|
||||||
},
|
},
|
||||||
@@ -20,7 +20,7 @@ export const resolutionsApi = {
|
|||||||
data: ResolutionOutputEditRequest
|
data: ResolutionOutputEditRequest
|
||||||
): Promise<ResolutionOutputResponse> {
|
): Promise<ResolutionOutputResponse> {
|
||||||
const response = await apiClient.patch<ResolutionOutputResponse>(
|
const response = await apiClient.patch<ResolutionOutputResponse>(
|
||||||
`/ai-sessions/${sessionId}/resolution-outputs/${outputId}`,
|
`/ai-sessions/${sessionId}/outputs/${outputId}`,
|
||||||
data
|
data
|
||||||
)
|
)
|
||||||
return response.data
|
return response.data
|
||||||
@@ -32,7 +32,7 @@ export const resolutionsApi = {
|
|||||||
data: ResolutionOutputPushRequest
|
data: ResolutionOutputPushRequest
|
||||||
): Promise<ResolutionOutputResponse> {
|
): Promise<ResolutionOutputResponse> {
|
||||||
const response = await apiClient.post<ResolutionOutputResponse>(
|
const response = await apiClient.post<ResolutionOutputResponse>(
|
||||||
`/ai-sessions/${sessionId}/resolution-outputs/${outputId}/push`,
|
`/ai-sessions/${sessionId}/outputs/${outputId}/push`,
|
||||||
data
|
data
|
||||||
)
|
)
|
||||||
return response.data
|
return response.data
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ const ReviewQueuePage = lazyWithRetry(() => import('@/pages/ReviewQueuePage'))
|
|||||||
const FlowPilotAnalyticsPage = lazyWithRetry(() => import('@/pages/FlowPilotAnalyticsPage'))
|
const FlowPilotAnalyticsPage = lazyWithRetry(() => import('@/pages/FlowPilotAnalyticsPage'))
|
||||||
const ScriptBuilderPage = lazyWithRetry(() => import('@/pages/ScriptBuilderPage'))
|
const ScriptBuilderPage = lazyWithRetry(() => import('@/pages/ScriptBuilderPage'))
|
||||||
const KBAcceleratorPage = lazyWithRetry(() => import('@/pages/KBAcceleratorPage'))
|
const KBAcceleratorPage = lazyWithRetry(() => import('@/pages/KBAcceleratorPage'))
|
||||||
|
const SessionQueuePage = lazyWithRetry(() => import('@/pages/SessionQueuePage'))
|
||||||
const GuidesHubPage = lazyWithRetry(() => import('@/pages/GuidesHubPage'))
|
const GuidesHubPage = lazyWithRetry(() => import('@/pages/GuidesHubPage'))
|
||||||
const GuideDetailPage = lazyWithRetry(() => import('@/pages/GuideDetailPage'))
|
const GuideDetailPage = lazyWithRetry(() => import('@/pages/GuideDetailPage'))
|
||||||
const AccountSettingsPage = lazyWithRetry(() => import('@/pages/AccountSettingsPage'))
|
const AccountSettingsPage = lazyWithRetry(() => import('@/pages/AccountSettingsPage'))
|
||||||
@@ -200,6 +201,7 @@ export const router = sentryCreateBrowserRouter([
|
|||||||
{ path: 'pilot', element: page(FlowPilotSessionPage) },
|
{ path: 'pilot', element: page(FlowPilotSessionPage) },
|
||||||
{ path: 'pilot/:sessionId', element: page(FlowPilotSessionPage) },
|
{ path: 'pilot/:sessionId', element: page(FlowPilotSessionPage) },
|
||||||
{ path: 'escalations', element: page(EscalationQueuePage) },
|
{ path: 'escalations', element: page(EscalationQueuePage) },
|
||||||
|
{ path: 'queue', element: page(SessionQueuePage) },
|
||||||
{ path: 'review-queue', element: page(ReviewQueuePage) },
|
{ path: 'review-queue', element: page(ReviewQueuePage) },
|
||||||
{ path: 'analytics/flowpilot', element: page(FlowPilotAnalyticsPage) },
|
{ path: 'analytics/flowpilot', element: page(FlowPilotAnalyticsPage) },
|
||||||
{ path: 'guides', element: page(GuidesHubPage) },
|
{ path: 'guides', element: page(GuidesHubPage) },
|
||||||
|
|||||||
Reference in New Issue
Block a user