release: @marketplaces/auth 0.1.0 (built from main)
This commit is contained in:
15
dist/ed25519/models/auth-error.model.d.ts
vendored
Normal file
15
dist/ed25519/models/auth-error.model.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Error codes the Ed25519 admin auth flow can surface to the UI. Each maps to
|
||||
* a dedicated screen rather than a generic toast, because the recovery
|
||||
* action differs per code (re-login vs. retry vs. wait).
|
||||
*/
|
||||
export type AuthErrorCode = 'session-expired' | 'invalid-signature' | 'unauthorized' | 'forbidden' | 'backend-unavailable';
|
||||
export interface AuthError {
|
||||
code: AuthErrorCode;
|
||||
message: string;
|
||||
/** HTTP status that produced this error, when known (absent for client-side errors, e.g. no Ed25519 support). */
|
||||
status?: number;
|
||||
}
|
||||
export declare function authErrorCodeFromBackendCode(code: unknown): AuthErrorCode | undefined;
|
||||
/** Maps a backend HTTP status to the AuthErrorCode screen it should route to. */
|
||||
export declare function authErrorCodeFromStatus(status: number): AuthErrorCode;
|
||||
Reference in New Issue
Block a user