diff --git a/packages/pockethost/src/common/schema/Instance.ts b/packages/pockethost/src/common/schema/Instance.ts index 2fbddddc..1ad7373b 100644 --- a/packages/pockethost/src/common/schema/Instance.ts +++ b/packages/pockethost/src/common/schema/Instance.ts @@ -19,7 +19,7 @@ export type InstanceSecretCollection = { [name: InstanceSecretKey]: InstanceSecretValue } -export type InstanceFields = BaseFields & { +export type InstanceFields = BaseFields & { region: string subdomain: Subdomain uid: UserId @@ -33,13 +33,13 @@ export type InstanceFields = BaseFields & { dev: boolean cname_active: boolean notifyMaintenanceMode: boolean +} & TExtra + +export type WithUser = { + expand: { uid: TUser } } -export type WithUser = { - expand: { uid: UserFields } -} - -export type InstanceFields_WithUser = InstanceFields & WithUser +export type InstanceFields_WithUser = InstanceFields export type InstanceFields_Create = Omit diff --git a/packages/pockethost/src/common/schema/User.ts b/packages/pockethost/src/common/schema/User.ts index 758772c9..535170b6 100644 --- a/packages/pockethost/src/common/schema/User.ts +++ b/packages/pockethost/src/common/schema/User.ts @@ -14,11 +14,18 @@ export const PLAN_NAMES = { [SubscriptionType.Lifetime]: `Founder's Edition`, } -export type UserFields = BaseFields & { +export type UserFields = BaseFields & { email: string verified: boolean isLegacy: boolean isFounder: boolean subscription: SubscriptionType notifyMaintenanceMode: boolean +} & TExtra + +export type WithCredentials = { + tokenKey: string + passwordHash: string } + +export type UserFields_WithCredentials = UserFields