Files
chat_web_app/llm-fe/src/react-app-env.d.ts
T
westfarn ce86f56d37
Deploy Beta / unit-tests (push) Successful in 12s
Unit Tests / test (push) Successful in 11s
Deploy Beta / deploy-beta (push) Failing after 2m20s
RevenueCat Capacitor IAP; keep Stripe on web (#100) (#102)
## Summary
- Native Capacitor: RevenueCat purchase/restore (`@revenuecat/purchases-capacitor`)
- Web: Stripe checkout/portal unchanged
- Billing history shows store rows (`provider` / `revenuecat_store`)
- RC `logIn`/`logOut` on auth lifecycle; appUserID = user pk

Closes #100. Depends on backend [chat_backend#68](ai_ml_operations/chat_backend#68) / monetization PR.

## Test plan
- [x] Unit tests: BillingSection, revenueCat, finance helpers, SignIn/Up, AuthCallback, Header2, DeleteAccount (38 OK)
- [ ] Fill `REACT_APP_REVENUECAT_*` keys in `.env.mobile`
- [ ] Align RC offerings/products with plan slugs
- [ ] `npm run build:mobile` + `cap sync`; sandbox purchase on Android/iOS
- [ ] Confirm web Stripe checkout/portal still work
- [ ] After RC webhook, Account → Billing history shows store invoiceReviewed-on: #102
2026-08-04 03:43:10 -07:00

23 lines
643 B
TypeScript

/// <reference types="react-scripts" />
interface CapacitorPreferencesPlugin {
get?: (options: { key: string }) => Promise<{ value?: string | null }>;
set?: (options: { key: string; value: string }) => Promise<void>;
remove?: (options: { key: string }) => Promise<void>;
}
interface CapacitorBridge {
isNativePlatform?: () => boolean;
isNative?: boolean;
getPlatform?: () => string;
Plugins?: {
Preferences?: CapacitorPreferencesPlugin;
App?: { addListener?: (...args: unknown[]) => unknown };
Network?: { addListener?: (...args: unknown[]) => unknown };
};
}
interface Window {
Capacitor?: CapacitorBridge;
}