refactor: integrate Better-Auth for authentication and remove Supabase dependencies
This commit is contained in:
@@ -32,6 +32,7 @@ export type UserMinAggregateOutputType = {
|
||||
image: string | null
|
||||
createdAt: Date | null
|
||||
updatedAt: Date | null
|
||||
role: string | null
|
||||
}
|
||||
|
||||
export type UserMaxAggregateOutputType = {
|
||||
@@ -42,6 +43,7 @@ export type UserMaxAggregateOutputType = {
|
||||
image: string | null
|
||||
createdAt: Date | null
|
||||
updatedAt: Date | null
|
||||
role: string | null
|
||||
}
|
||||
|
||||
export type UserCountAggregateOutputType = {
|
||||
@@ -52,6 +54,7 @@ export type UserCountAggregateOutputType = {
|
||||
image: number
|
||||
createdAt: number
|
||||
updatedAt: number
|
||||
role: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
@@ -64,6 +67,7 @@ export type UserMinAggregateInputType = {
|
||||
image?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
role?: true
|
||||
}
|
||||
|
||||
export type UserMaxAggregateInputType = {
|
||||
@@ -74,6 +78,7 @@ export type UserMaxAggregateInputType = {
|
||||
image?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
role?: true
|
||||
}
|
||||
|
||||
export type UserCountAggregateInputType = {
|
||||
@@ -84,6 +89,7 @@ export type UserCountAggregateInputType = {
|
||||
image?: true
|
||||
createdAt?: true
|
||||
updatedAt?: true
|
||||
role?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -167,6 +173,7 @@ export type UserGroupByOutputType = {
|
||||
image: string | null
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
role: string
|
||||
_count: UserCountAggregateOutputType | null
|
||||
_min: UserMinAggregateOutputType | null
|
||||
_max: UserMaxAggregateOutputType | null
|
||||
@@ -198,6 +205,7 @@ export type UserWhereInput = {
|
||||
image?: Prisma.StringNullableFilter<"User"> | string | null
|
||||
createdAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
||||
role?: Prisma.StringFilter<"User"> | string
|
||||
sessions?: Prisma.SessionListRelationFilter
|
||||
accounts?: Prisma.AccountListRelationFilter
|
||||
complexes?: Prisma.ComplexUserListRelationFilter
|
||||
@@ -211,6 +219,7 @@ export type UserOrderByWithRelationInput = {
|
||||
image?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
role?: Prisma.SortOrder
|
||||
sessions?: Prisma.SessionOrderByRelationAggregateInput
|
||||
accounts?: Prisma.AccountOrderByRelationAggregateInput
|
||||
complexes?: Prisma.ComplexUserOrderByRelationAggregateInput
|
||||
@@ -227,6 +236,7 @@ export type UserWhereUniqueInput = Prisma.AtLeast<{
|
||||
image?: Prisma.StringNullableFilter<"User"> | string | null
|
||||
createdAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
||||
role?: Prisma.StringFilter<"User"> | string
|
||||
sessions?: Prisma.SessionListRelationFilter
|
||||
accounts?: Prisma.AccountListRelationFilter
|
||||
complexes?: Prisma.ComplexUserListRelationFilter
|
||||
@@ -240,6 +250,7 @@ export type UserOrderByWithAggregationInput = {
|
||||
image?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
role?: Prisma.SortOrder
|
||||
_count?: Prisma.UserCountOrderByAggregateInput
|
||||
_max?: Prisma.UserMaxOrderByAggregateInput
|
||||
_min?: Prisma.UserMinOrderByAggregateInput
|
||||
@@ -256,6 +267,7 @@ export type UserScalarWhereWithAggregatesInput = {
|
||||
image?: Prisma.StringNullableWithAggregatesFilter<"User"> | string | null
|
||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"User"> | Date | string
|
||||
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"User"> | Date | string
|
||||
role?: Prisma.StringWithAggregatesFilter<"User"> | string
|
||||
}
|
||||
|
||||
export type UserCreateInput = {
|
||||
@@ -266,6 +278,7 @@ export type UserCreateInput = {
|
||||
image?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
role?: string
|
||||
sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
|
||||
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
|
||||
complexes?: Prisma.ComplexUserCreateNestedManyWithoutUserInput
|
||||
@@ -279,6 +292,7 @@ export type UserUncheckedCreateInput = {
|
||||
image?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
role?: string
|
||||
sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
|
||||
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
|
||||
complexes?: Prisma.ComplexUserUncheckedCreateNestedManyWithoutUserInput
|
||||
@@ -292,6 +306,7 @@ export type UserUpdateInput = {
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
role?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
|
||||
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
|
||||
complexes?: Prisma.ComplexUserUpdateManyWithoutUserNestedInput
|
||||
@@ -305,6 +320,7 @@ export type UserUncheckedUpdateInput = {
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
role?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
|
||||
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
|
||||
complexes?: Prisma.ComplexUserUncheckedUpdateManyWithoutUserNestedInput
|
||||
@@ -318,6 +334,7 @@ export type UserCreateManyInput = {
|
||||
image?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
role?: string
|
||||
}
|
||||
|
||||
export type UserUpdateManyMutationInput = {
|
||||
@@ -328,6 +345,7 @@ export type UserUpdateManyMutationInput = {
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
role?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type UserUncheckedUpdateManyInput = {
|
||||
@@ -338,6 +356,7 @@ export type UserUncheckedUpdateManyInput = {
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
role?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type UserCountOrderByAggregateInput = {
|
||||
@@ -348,6 +367,7 @@ export type UserCountOrderByAggregateInput = {
|
||||
image?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
role?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type UserMaxOrderByAggregateInput = {
|
||||
@@ -358,6 +378,7 @@ export type UserMaxOrderByAggregateInput = {
|
||||
image?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
role?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type UserMinOrderByAggregateInput = {
|
||||
@@ -368,6 +389,7 @@ export type UserMinOrderByAggregateInput = {
|
||||
image?: Prisma.SortOrder
|
||||
createdAt?: Prisma.SortOrder
|
||||
updatedAt?: Prisma.SortOrder
|
||||
role?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type UserScalarRelationFilter = {
|
||||
@@ -441,6 +463,7 @@ export type UserCreateWithoutSessionsInput = {
|
||||
image?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
role?: string
|
||||
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
|
||||
complexes?: Prisma.ComplexUserCreateNestedManyWithoutUserInput
|
||||
}
|
||||
@@ -453,6 +476,7 @@ export type UserUncheckedCreateWithoutSessionsInput = {
|
||||
image?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
role?: string
|
||||
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
|
||||
complexes?: Prisma.ComplexUserUncheckedCreateNestedManyWithoutUserInput
|
||||
}
|
||||
@@ -481,6 +505,7 @@ export type UserUpdateWithoutSessionsInput = {
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
role?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
|
||||
complexes?: Prisma.ComplexUserUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
@@ -493,6 +518,7 @@ export type UserUncheckedUpdateWithoutSessionsInput = {
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
role?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
|
||||
complexes?: Prisma.ComplexUserUncheckedUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
@@ -505,6 +531,7 @@ export type UserCreateWithoutAccountsInput = {
|
||||
image?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
role?: string
|
||||
sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
|
||||
complexes?: Prisma.ComplexUserCreateNestedManyWithoutUserInput
|
||||
}
|
||||
@@ -517,6 +544,7 @@ export type UserUncheckedCreateWithoutAccountsInput = {
|
||||
image?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
role?: string
|
||||
sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
|
||||
complexes?: Prisma.ComplexUserUncheckedCreateNestedManyWithoutUserInput
|
||||
}
|
||||
@@ -545,6 +573,7 @@ export type UserUpdateWithoutAccountsInput = {
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
role?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
|
||||
complexes?: Prisma.ComplexUserUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
@@ -557,6 +586,7 @@ export type UserUncheckedUpdateWithoutAccountsInput = {
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
role?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
|
||||
complexes?: Prisma.ComplexUserUncheckedUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
@@ -569,6 +599,7 @@ export type UserCreateWithoutComplexesInput = {
|
||||
image?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
role?: string
|
||||
sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
|
||||
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
|
||||
}
|
||||
@@ -581,6 +612,7 @@ export type UserUncheckedCreateWithoutComplexesInput = {
|
||||
image?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
role?: string
|
||||
sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
|
||||
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
|
||||
}
|
||||
@@ -609,6 +641,7 @@ export type UserUpdateWithoutComplexesInput = {
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
role?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
|
||||
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
@@ -621,6 +654,7 @@ export type UserUncheckedUpdateWithoutComplexesInput = {
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
role?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
|
||||
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
@@ -682,6 +716,7 @@ export type UserSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = r
|
||||
image?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
role?: boolean
|
||||
sessions?: boolean | Prisma.User$sessionsArgs<ExtArgs>
|
||||
accounts?: boolean | Prisma.User$accountsArgs<ExtArgs>
|
||||
complexes?: boolean | Prisma.User$complexesArgs<ExtArgs>
|
||||
@@ -696,6 +731,7 @@ export type UserSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensio
|
||||
image?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
role?: boolean
|
||||
}, ExtArgs["result"]["user"]>
|
||||
|
||||
export type UserSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
@@ -706,6 +742,7 @@ export type UserSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensio
|
||||
image?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
role?: boolean
|
||||
}, ExtArgs["result"]["user"]>
|
||||
|
||||
export type UserSelectScalar = {
|
||||
@@ -716,9 +753,10 @@ export type UserSelectScalar = {
|
||||
image?: boolean
|
||||
createdAt?: boolean
|
||||
updatedAt?: boolean
|
||||
role?: boolean
|
||||
}
|
||||
|
||||
export type UserOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "email" | "emailVerified" | "image" | "createdAt" | "updatedAt", ExtArgs["result"]["user"]>
|
||||
export type UserOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "email" | "emailVerified" | "image" | "createdAt" | "updatedAt" | "role", ExtArgs["result"]["user"]>
|
||||
export type UserInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
sessions?: boolean | Prisma.User$sessionsArgs<ExtArgs>
|
||||
accounts?: boolean | Prisma.User$accountsArgs<ExtArgs>
|
||||
@@ -743,6 +781,7 @@ export type $UserPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
image: string | null
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
role: string
|
||||
}, ExtArgs["result"]["user"]>
|
||||
composites: {}
|
||||
}
|
||||
@@ -1176,6 +1215,7 @@ export interface UserFieldRefs {
|
||||
readonly image: Prisma.FieldRef<"User", 'String'>
|
||||
readonly createdAt: Prisma.FieldRef<"User", 'DateTime'>
|
||||
readonly updatedAt: Prisma.FieldRef<"User", 'DateTime'>
|
||||
readonly role: Prisma.FieldRef<"User", 'String'>
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user