0.1.5•Updated 6 months ago
type KeyValidation = KeyValidationSuccess | KeyValidationFailure
interface ValidationKeyResponseSuccess extends KeyValidationSuccess {
key: string
}
interface ValidationKeyResponseFailure extends KeyValidationFailure {
key: string
}
type ValidateKeyResponse = ValidationKeyResponseSuccess | ValidationKeyResponseFailure
type KeyValidator = (key: string) => KeyValidation | boolean
type KeyFormatter = (key: string) => string | null
interface KeyValidationSuccess {
valid: true
reason: null
}
interface KeyValidationFailure {
valid: false
reason: string
}