mirror of
https://github.com/pockethost/pockethost.git
synced 2025-06-07 22:56:39 +00:00
feat(pockethost): extend models
This commit is contained in:
parent
aa228303cb
commit
aa1e2bee6e
@ -19,7 +19,7 @@ export type InstanceSecretCollection = {
|
|||||||
[name: InstanceSecretKey]: InstanceSecretValue
|
[name: InstanceSecretKey]: InstanceSecretValue
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InstanceFields = BaseFields & {
|
export type InstanceFields<TExtra = {}> = BaseFields & {
|
||||||
region: string
|
region: string
|
||||||
subdomain: Subdomain
|
subdomain: Subdomain
|
||||||
uid: UserId
|
uid: UserId
|
||||||
@ -33,13 +33,13 @@ export type InstanceFields = BaseFields & {
|
|||||||
dev: boolean
|
dev: boolean
|
||||||
cname_active: boolean
|
cname_active: boolean
|
||||||
notifyMaintenanceMode: boolean
|
notifyMaintenanceMode: boolean
|
||||||
|
} & TExtra
|
||||||
|
|
||||||
|
export type WithUser<TUser = UserFields> = {
|
||||||
|
expand: { uid: TUser }
|
||||||
}
|
}
|
||||||
|
|
||||||
export type WithUser = {
|
export type InstanceFields_WithUser = InstanceFields<WithUser>
|
||||||
expand: { uid: UserFields }
|
|
||||||
}
|
|
||||||
|
|
||||||
export type InstanceFields_WithUser = InstanceFields & WithUser
|
|
||||||
|
|
||||||
export type InstanceFields_Create = Omit<InstanceFields, keyof BaseFields>
|
export type InstanceFields_Create = Omit<InstanceFields, keyof BaseFields>
|
||||||
|
|
||||||
|
@ -14,11 +14,18 @@ export const PLAN_NAMES = {
|
|||||||
[SubscriptionType.Lifetime]: `Founder's Edition`,
|
[SubscriptionType.Lifetime]: `Founder's Edition`,
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UserFields = BaseFields & {
|
export type UserFields<TExtra = {}> = BaseFields & {
|
||||||
email: string
|
email: string
|
||||||
verified: boolean
|
verified: boolean
|
||||||
isLegacy: boolean
|
isLegacy: boolean
|
||||||
isFounder: boolean
|
isFounder: boolean
|
||||||
subscription: SubscriptionType
|
subscription: SubscriptionType
|
||||||
notifyMaintenanceMode: boolean
|
notifyMaintenanceMode: boolean
|
||||||
|
} & TExtra
|
||||||
|
|
||||||
|
export type WithCredentials = {
|
||||||
|
tokenKey: string
|
||||||
|
passwordHash: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type UserFields_WithCredentials = UserFields<WithCredentials>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user