dify/web/contract/console/apps.ts
hjlarry 3288f5e100 fix(collaboration): align online-users keys to app_id
Switch /apps/workflows/online-users request and response schema from workflow_ids/workflow_id to app_ids/app_id without compatibility fallback.

Align app list online avatar lookup and online-user map indexing to app.id, matching socket room identity.

Update backend access checks, API fields, frontend contract/types, and unit tests accordingly.
2026-04-12 16:16:47 +08:00

28 lines
566 B
TypeScript

import type { WorkflowOnlineUsersResponse } from '@/models/app'
import { type } from '@orpc/contract'
import { base } from '../base'
export const appDeleteContract = base
.route({
path: '/apps/{appId}',
method: 'DELETE',
})
.input(type<{
params: {
appId: string
}
}>())
.output(type<unknown>())
export const workflowOnlineUsersContract = base
.route({
path: '/apps/workflows/online-users',
method: 'GET',
})
.input(type<{
query: {
app_ids: string
}
}>())
.output(type<WorkflowOnlineUsersResponse>())