38 lines
801 B
TypeScript
Raw Normal View History

2024-05-23 11:42:14 +02:00
// SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/>
//
// SPDX-License-Identifier: AGPL-3.0-only
type NextValue = 'backend' | 'debug' | 'webchat-video' | 'prosody'
| 'external-auth-custom-oidc' | 'external-auth-google-oidc' | 'external-auth-facebook-oidc'
| 'everything-ok'
2021-05-02 16:16:19 +02:00
interface MessageWithLevel {
level: 'info' | 'warning' | 'error'
message: string
help?: {
url: string
text: string
}
2021-05-02 16:16:19 +02:00
}
export interface TestResult {
label?: string
2021-05-02 16:16:19 +02:00
messages: Array<string | MessageWithLevel>
2021-04-14 16:14:56 +02:00
debug: Array<{
title: string
message: string
}>
next: NextValue | null
ok: boolean
test: string
}
export function newResult (test: string): TestResult {
return {
test: test,
ok: false,
messages: [],
2021-04-14 16:14:56 +02:00
debug: [],
next: null
}
}