完善联调标准化与诊断链路
This commit is contained in:
@@ -237,6 +237,20 @@ export interface BackendSessionResultView {
|
||||
}
|
||||
}
|
||||
|
||||
export interface BackendClientLogInput {
|
||||
source: string
|
||||
level: 'debug' | 'info' | 'warn' | 'error'
|
||||
category: string
|
||||
message: string
|
||||
eventId?: string
|
||||
releaseId?: string
|
||||
sessionId?: string
|
||||
manifestUrl?: string
|
||||
route?: string
|
||||
occurredAt?: string
|
||||
details?: Record<string, unknown>
|
||||
}
|
||||
|
||||
type BackendEnvelope<T> = {
|
||||
data: T
|
||||
}
|
||||
@@ -428,3 +442,15 @@ export function getMyResults(input: {
|
||||
authToken: input.accessToken,
|
||||
})
|
||||
}
|
||||
|
||||
export function postClientLog(input: {
|
||||
baseUrl: string
|
||||
payload: BackendClientLogInput
|
||||
}): Promise<void> {
|
||||
return requestBackend<void>({
|
||||
method: 'POST',
|
||||
baseUrl: input.baseUrl,
|
||||
path: '/dev/client-logs',
|
||||
body: input.payload as unknown as Record<string, unknown>,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user