16 lines
638 B
TypeScript
16 lines
638 B
TypeScript
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
import type { KeyInfo } from "./KeyInfo";
|
|
|
|
/**
|
|
* Result of validating an API key, suitable for serialization across language boundaries
|
|
* (NAPI → TypeScript). Auth-related outcomes are encoded as variants here so that
|
|
* callers can distinguish them from infrastructure failures (which propagate as thrown
|
|
* errors at the NAPI layer).
|
|
*/
|
|
export type ApiKeyValidationResult =
|
|
| { type: "success"; key_info: KeyInfo }
|
|
| { type: "invalid_format" }
|
|
| { type: "missing" }
|
|
| { type: "disabled" }
|
|
| { type: "expired" };
|