diff --git a/module/src/auth.ts b/module/src/auth.ts index 1e4e37d..e186dad 100644 --- a/module/src/auth.ts +++ b/module/src/auth.ts @@ -299,6 +299,7 @@ interface Subscription { }; interface BaseAccountData { + userId?: string; email?: string; subscription?: Subscription; banned: boolean; @@ -444,6 +445,7 @@ function parseUserData(appData: UserAppData | null): User { if (!appData) return anonUser(); return { + userId: appData.user_id, email: appData.email, subscription: parseSubscriptionData(appData), teamSubscription: appData.team_subscription diff --git a/module/src/types.ts b/module/src/types.ts index 173ad5a..32737c1 100644 --- a/module/src/types.ts +++ b/module/src/types.ts @@ -36,6 +36,7 @@ export interface SubscriptionPricing { // User app data, as returned by the API export type UserAppData = { + user_id: string; email: string; feature_flags?: string[]; banned?: boolean; @@ -49,6 +50,7 @@ export type UserAppData = { // User billing data, as returned by the API export type UserBillingData = { + user_id: string; email: string; banned?: boolean; transactions: TransactionData[] | null;