Types
This section provides a comprehensive reference for all TypeScript types and interfaces used within the @fireact.dev/app
package. These types ensure strong typing and improve code readability and maintainability across your Fireact frontend application.
Key Types:
- AppConfiguration: Comprehensive application-wide configuration settings.
- EmulatorsConfig: Configuration for connecting to Firebase Emulators.
- FirebaseConfig: Essential configuration settings for Firebase initialization.
- Invite: Defines the structure for an invitation record.
- Invoice: Defines the structure for an invoice record.
- InvoiceListResponse: Paginated response for a list of invoices.
- PagesConfig: Flexible structure for application page routes.
- PermissionsConfig: Structure for application-wide permissions.
- Plan: Defines the structure for a subscription plan.
- SocialLoginConfig: Configuration for social login providers.
- StripeConfig: Configuration settings for Stripe integration.
- Subscription: Defines the core structure for a user’s subscription.
- SubscriptionSettings: Generic type for subscription settings.
- SubscriptionUserDetails: Paginated response for a list of user details.
- UserData: Represents basic user profile information.
- UserDetails: Detailed user information within a subscription context.
- UserPermissions: Generic type for user permissions.
Firebase Authentication Augmentation
The @fireact.dev/app
package augments the firebase/auth
module to include custom claims for user permissions. This allows currentUser.permissions
to be directly accessed after a user logs in and their ID token is refreshed.
// Example of augmented User interface
declare module 'firebase/auth' {
interface User {
permissions?: UserPermissions; // Custom permissions added to Firebase User object
}
}
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.