auth-runtime/dist/types.d.ts

52 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-03-11 23:33:43 +00:00
/**
* Environment configuration for auth runtime
*/
export interface EnvConfig {
/** Authentication base URL */
authBase: string;
/** Client key for authentication */
clientKey: string;
/** Directory for storing auth cache files */
authCacheDir: string;
/** Minimum TTL for cached tokens in seconds */
authMinTtlSec: number;
}
/**
* Session response from /auth/skill-credit/session
*/
export interface SessionResponse {
accessToken: string;
ownerSessionToken?: string;
hookUrl?: string;
hookToken?: string;
expiresIn: number;
}
/**
* Client config from /auth/skill-credit/client-config
*/
export interface ClientConfig {
clientId: string;
name: string;
status: string;
metadata: Record<string, unknown>;
}
2026-03-11 23:33:43 +00:00
/**
* Cached token data stored on disk
*/
export interface CachedTokenData {
accessToken: string;
expiresAtEpoch: number;
createdAtEpoch: number;
}
/**
* HTTP method used by requestApi
*/
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD';
/**
* HTTP API response
*/
export interface ApiResponse {
status: number;
body: string;
}
//# sourceMappingURL=types.d.ts.map