Files
codexbar-mobile/types/codex.ts
T
Space-Banane dc7e497388
CodexBar Mobile Build / build-android (push) Successful in 17m26s
CodexBar Mobile Build / release (push) Successful in 12s
Fix Codex auth import and reset credit details
# Conflicts:
#	app/(tabs)/codex.tsx
#	app/(tabs)/index.tsx
#	app/(tabs)/settings.tsx
#	hooks/useCodexUsage.ts
#	lib/api/codexApi.ts
#	package-lock.json
#	package.json
2026-07-04 18:59:56 +02:00

58 lines
1.4 KiB
TypeScript

export interface CodexAuth {
accessToken: string;
accountId?: string;
}
export interface CodexUsageWindow {
usedPercent: number;
resetsAt: number;
windowMinutes: number;
windowSeconds: number;
}
export interface CodexCreditsSummary {
hasCredits: boolean;
unlimited: boolean;
balance: number;
}
export interface CodexResetCredit {
index: number;
status?: string;
grantedAt?: string | null;
grantedAtLocal?: string | null;
expiresAt?: string | null;
expiresAtLocal?: string | null;
timeUntilExpiry?: string | null;
}
export interface CodexResetCoupons {
source: "live_api" | "local_state_fallback" | "unavailable";
sourceDescription: string;
availableCount?: number | null;
totalEarnedCount?: number | null;
credits?: CodexResetCredit[];
nextExpiringCredit?: CodexResetCredit | null;
dismissedAtLocal?: string | null;
latestPossibleExpiryLocal?: string | null;
latestPossibleExpiryNote?: string | null;
fallbackReason?: string;
error?: string;
}
export interface CodexDesktopSnapshot {
sessionFile?: string;
threadId?: string | null;
snapshotTimestamp?: string | null;
limitId?: string | null;
planType?: string | null;
rateLimitReachedType?: string | null;
primary: CodexUsageWindow | null;
secondary: CodexUsageWindow | null;
}
export interface CodexUsageResponse extends CodexDesktopSnapshot {
credits: CodexCreditsSummary;
resetCoupons?: CodexResetCoupons | null;
}