Files
HiveGrid-Wireframes/hivegrid-cloud/packages/db/generated/prisma/client/models/TrustedDevice.ts
T

1556 lines
60 KiB
TypeScript

/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
* This file exports the `TrustedDevice` model and its related types.
*
* 🟢 You can import this file directly.
*/
import type * as runtime from "@prisma/client/runtime/client"
import type * as $Enums from "../enums.ts"
import type * as Prisma from "../internal/prismaNamespace.ts"
/**
* Model TrustedDevice
*
*/
export type TrustedDeviceModel = runtime.Types.Result.DefaultSelection<Prisma.$TrustedDevicePayload>
export type AggregateTrustedDevice = {
_count: TrustedDeviceCountAggregateOutputType | null
_min: TrustedDeviceMinAggregateOutputType | null
_max: TrustedDeviceMaxAggregateOutputType | null
}
export type TrustedDeviceMinAggregateOutputType = {
id: string | null
userId: string | null
tokenHash: string | null
createdAt: Date | null
lastUsedAt: Date | null
expiresAt: Date | null
revokedAt: Date | null
ipHash: string | null
userAgent: string | null
deviceLabel: string | null
approxLocation: string | null
}
export type TrustedDeviceMaxAggregateOutputType = {
id: string | null
userId: string | null
tokenHash: string | null
createdAt: Date | null
lastUsedAt: Date | null
expiresAt: Date | null
revokedAt: Date | null
ipHash: string | null
userAgent: string | null
deviceLabel: string | null
approxLocation: string | null
}
export type TrustedDeviceCountAggregateOutputType = {
id: number
userId: number
tokenHash: number
createdAt: number
lastUsedAt: number
expiresAt: number
revokedAt: number
ipHash: number
userAgent: number
deviceLabel: number
approxLocation: number
_all: number
}
export type TrustedDeviceMinAggregateInputType = {
id?: true
userId?: true
tokenHash?: true
createdAt?: true
lastUsedAt?: true
expiresAt?: true
revokedAt?: true
ipHash?: true
userAgent?: true
deviceLabel?: true
approxLocation?: true
}
export type TrustedDeviceMaxAggregateInputType = {
id?: true
userId?: true
tokenHash?: true
createdAt?: true
lastUsedAt?: true
expiresAt?: true
revokedAt?: true
ipHash?: true
userAgent?: true
deviceLabel?: true
approxLocation?: true
}
export type TrustedDeviceCountAggregateInputType = {
id?: true
userId?: true
tokenHash?: true
createdAt?: true
lastUsedAt?: true
expiresAt?: true
revokedAt?: true
ipHash?: true
userAgent?: true
deviceLabel?: true
approxLocation?: true
_all?: true
}
export type TrustedDeviceAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which TrustedDevice to aggregate.
*/
where?: Prisma.TrustedDeviceWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of TrustedDevices to fetch.
*/
orderBy?: Prisma.TrustedDeviceOrderByWithRelationInput | Prisma.TrustedDeviceOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: Prisma.TrustedDeviceWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` TrustedDevices from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` TrustedDevices.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned TrustedDevices
**/
_count?: true | TrustedDeviceCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: TrustedDeviceMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: TrustedDeviceMaxAggregateInputType
}
export type GetTrustedDeviceAggregateType<T extends TrustedDeviceAggregateArgs> = {
[P in keyof T & keyof AggregateTrustedDevice]: P extends '_count' | 'count'
? T[P] extends true
? number
: Prisma.GetScalarType<T[P], AggregateTrustedDevice[P]>
: Prisma.GetScalarType<T[P], AggregateTrustedDevice[P]>
}
export type TrustedDeviceGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.TrustedDeviceWhereInput
orderBy?: Prisma.TrustedDeviceOrderByWithAggregationInput | Prisma.TrustedDeviceOrderByWithAggregationInput[]
by: Prisma.TrustedDeviceScalarFieldEnum[] | Prisma.TrustedDeviceScalarFieldEnum
having?: Prisma.TrustedDeviceScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: TrustedDeviceCountAggregateInputType | true
_min?: TrustedDeviceMinAggregateInputType
_max?: TrustedDeviceMaxAggregateInputType
}
export type TrustedDeviceGroupByOutputType = {
id: string
userId: string
tokenHash: string
createdAt: Date
lastUsedAt: Date
expiresAt: Date
revokedAt: Date | null
ipHash: string | null
userAgent: string | null
deviceLabel: string | null
approxLocation: string | null
_count: TrustedDeviceCountAggregateOutputType | null
_min: TrustedDeviceMinAggregateOutputType | null
_max: TrustedDeviceMaxAggregateOutputType | null
}
export type GetTrustedDeviceGroupByPayload<T extends TrustedDeviceGroupByArgs> = Prisma.PrismaPromise<
Array<
Prisma.PickEnumerable<TrustedDeviceGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof TrustedDeviceGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: Prisma.GetScalarType<T[P], TrustedDeviceGroupByOutputType[P]>
: Prisma.GetScalarType<T[P], TrustedDeviceGroupByOutputType[P]>
}
>
>
export type TrustedDeviceWhereInput = {
AND?: Prisma.TrustedDeviceWhereInput | Prisma.TrustedDeviceWhereInput[]
OR?: Prisma.TrustedDeviceWhereInput[]
NOT?: Prisma.TrustedDeviceWhereInput | Prisma.TrustedDeviceWhereInput[]
id?: Prisma.StringFilter<"TrustedDevice"> | string
userId?: Prisma.StringFilter<"TrustedDevice"> | string
tokenHash?: Prisma.StringFilter<"TrustedDevice"> | string
createdAt?: Prisma.DateTimeFilter<"TrustedDevice"> | Date | string
lastUsedAt?: Prisma.DateTimeFilter<"TrustedDevice"> | Date | string
expiresAt?: Prisma.DateTimeFilter<"TrustedDevice"> | Date | string
revokedAt?: Prisma.DateTimeNullableFilter<"TrustedDevice"> | Date | string | null
ipHash?: Prisma.StringNullableFilter<"TrustedDevice"> | string | null
userAgent?: Prisma.StringNullableFilter<"TrustedDevice"> | string | null
deviceLabel?: Prisma.StringNullableFilter<"TrustedDevice"> | string | null
approxLocation?: Prisma.StringNullableFilter<"TrustedDevice"> | string | null
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
}
export type TrustedDeviceOrderByWithRelationInput = {
id?: Prisma.SortOrder
userId?: Prisma.SortOrder
tokenHash?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
lastUsedAt?: Prisma.SortOrder
expiresAt?: Prisma.SortOrder
revokedAt?: Prisma.SortOrderInput | Prisma.SortOrder
ipHash?: Prisma.SortOrderInput | Prisma.SortOrder
userAgent?: Prisma.SortOrderInput | Prisma.SortOrder
deviceLabel?: Prisma.SortOrderInput | Prisma.SortOrder
approxLocation?: Prisma.SortOrderInput | Prisma.SortOrder
user?: Prisma.UserOrderByWithRelationInput
}
export type TrustedDeviceWhereUniqueInput = Prisma.AtLeast<{
id?: string
tokenHash?: string
AND?: Prisma.TrustedDeviceWhereInput | Prisma.TrustedDeviceWhereInput[]
OR?: Prisma.TrustedDeviceWhereInput[]
NOT?: Prisma.TrustedDeviceWhereInput | Prisma.TrustedDeviceWhereInput[]
userId?: Prisma.StringFilter<"TrustedDevice"> | string
createdAt?: Prisma.DateTimeFilter<"TrustedDevice"> | Date | string
lastUsedAt?: Prisma.DateTimeFilter<"TrustedDevice"> | Date | string
expiresAt?: Prisma.DateTimeFilter<"TrustedDevice"> | Date | string
revokedAt?: Prisma.DateTimeNullableFilter<"TrustedDevice"> | Date | string | null
ipHash?: Prisma.StringNullableFilter<"TrustedDevice"> | string | null
userAgent?: Prisma.StringNullableFilter<"TrustedDevice"> | string | null
deviceLabel?: Prisma.StringNullableFilter<"TrustedDevice"> | string | null
approxLocation?: Prisma.StringNullableFilter<"TrustedDevice"> | string | null
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
}, "id" | "tokenHash">
export type TrustedDeviceOrderByWithAggregationInput = {
id?: Prisma.SortOrder
userId?: Prisma.SortOrder
tokenHash?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
lastUsedAt?: Prisma.SortOrder
expiresAt?: Prisma.SortOrder
revokedAt?: Prisma.SortOrderInput | Prisma.SortOrder
ipHash?: Prisma.SortOrderInput | Prisma.SortOrder
userAgent?: Prisma.SortOrderInput | Prisma.SortOrder
deviceLabel?: Prisma.SortOrderInput | Prisma.SortOrder
approxLocation?: Prisma.SortOrderInput | Prisma.SortOrder
_count?: Prisma.TrustedDeviceCountOrderByAggregateInput
_max?: Prisma.TrustedDeviceMaxOrderByAggregateInput
_min?: Prisma.TrustedDeviceMinOrderByAggregateInput
}
export type TrustedDeviceScalarWhereWithAggregatesInput = {
AND?: Prisma.TrustedDeviceScalarWhereWithAggregatesInput | Prisma.TrustedDeviceScalarWhereWithAggregatesInput[]
OR?: Prisma.TrustedDeviceScalarWhereWithAggregatesInput[]
NOT?: Prisma.TrustedDeviceScalarWhereWithAggregatesInput | Prisma.TrustedDeviceScalarWhereWithAggregatesInput[]
id?: Prisma.StringWithAggregatesFilter<"TrustedDevice"> | string
userId?: Prisma.StringWithAggregatesFilter<"TrustedDevice"> | string
tokenHash?: Prisma.StringWithAggregatesFilter<"TrustedDevice"> | string
createdAt?: Prisma.DateTimeWithAggregatesFilter<"TrustedDevice"> | Date | string
lastUsedAt?: Prisma.DateTimeWithAggregatesFilter<"TrustedDevice"> | Date | string
expiresAt?: Prisma.DateTimeWithAggregatesFilter<"TrustedDevice"> | Date | string
revokedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"TrustedDevice"> | Date | string | null
ipHash?: Prisma.StringNullableWithAggregatesFilter<"TrustedDevice"> | string | null
userAgent?: Prisma.StringNullableWithAggregatesFilter<"TrustedDevice"> | string | null
deviceLabel?: Prisma.StringNullableWithAggregatesFilter<"TrustedDevice"> | string | null
approxLocation?: Prisma.StringNullableWithAggregatesFilter<"TrustedDevice"> | string | null
}
export type TrustedDeviceCreateInput = {
id?: string
tokenHash: string
createdAt?: Date | string
lastUsedAt?: Date | string
expiresAt: Date | string
revokedAt?: Date | string | null
ipHash?: string | null
userAgent?: string | null
deviceLabel?: string | null
approxLocation?: string | null
user: Prisma.UserCreateNestedOneWithoutTrustedDevicesInput
}
export type TrustedDeviceUncheckedCreateInput = {
id?: string
userId: string
tokenHash: string
createdAt?: Date | string
lastUsedAt?: Date | string
expiresAt: Date | string
revokedAt?: Date | string | null
ipHash?: string | null
userAgent?: string | null
deviceLabel?: string | null
approxLocation?: string | null
}
export type TrustedDeviceUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
tokenHash?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
lastUsedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
ipHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
deviceLabel?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
approxLocation?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
user?: Prisma.UserUpdateOneRequiredWithoutTrustedDevicesNestedInput
}
export type TrustedDeviceUncheckedUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
userId?: Prisma.StringFieldUpdateOperationsInput | string
tokenHash?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
lastUsedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
ipHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
deviceLabel?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
approxLocation?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type TrustedDeviceCreateManyInput = {
id?: string
userId: string
tokenHash: string
createdAt?: Date | string
lastUsedAt?: Date | string
expiresAt: Date | string
revokedAt?: Date | string | null
ipHash?: string | null
userAgent?: string | null
deviceLabel?: string | null
approxLocation?: string | null
}
export type TrustedDeviceUpdateManyMutationInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
tokenHash?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
lastUsedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
ipHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
deviceLabel?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
approxLocation?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type TrustedDeviceUncheckedUpdateManyInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
userId?: Prisma.StringFieldUpdateOperationsInput | string
tokenHash?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
lastUsedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
ipHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
deviceLabel?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
approxLocation?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type TrustedDeviceListRelationFilter = {
every?: Prisma.TrustedDeviceWhereInput
some?: Prisma.TrustedDeviceWhereInput
none?: Prisma.TrustedDeviceWhereInput
}
export type TrustedDeviceOrderByRelationAggregateInput = {
_count?: Prisma.SortOrder
}
export type TrustedDeviceCountOrderByAggregateInput = {
id?: Prisma.SortOrder
userId?: Prisma.SortOrder
tokenHash?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
lastUsedAt?: Prisma.SortOrder
expiresAt?: Prisma.SortOrder
revokedAt?: Prisma.SortOrder
ipHash?: Prisma.SortOrder
userAgent?: Prisma.SortOrder
deviceLabel?: Prisma.SortOrder
approxLocation?: Prisma.SortOrder
}
export type TrustedDeviceMaxOrderByAggregateInput = {
id?: Prisma.SortOrder
userId?: Prisma.SortOrder
tokenHash?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
lastUsedAt?: Prisma.SortOrder
expiresAt?: Prisma.SortOrder
revokedAt?: Prisma.SortOrder
ipHash?: Prisma.SortOrder
userAgent?: Prisma.SortOrder
deviceLabel?: Prisma.SortOrder
approxLocation?: Prisma.SortOrder
}
export type TrustedDeviceMinOrderByAggregateInput = {
id?: Prisma.SortOrder
userId?: Prisma.SortOrder
tokenHash?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
lastUsedAt?: Prisma.SortOrder
expiresAt?: Prisma.SortOrder
revokedAt?: Prisma.SortOrder
ipHash?: Prisma.SortOrder
userAgent?: Prisma.SortOrder
deviceLabel?: Prisma.SortOrder
approxLocation?: Prisma.SortOrder
}
export type TrustedDeviceCreateNestedManyWithoutUserInput = {
create?: Prisma.XOR<Prisma.TrustedDeviceCreateWithoutUserInput, Prisma.TrustedDeviceUncheckedCreateWithoutUserInput> | Prisma.TrustedDeviceCreateWithoutUserInput[] | Prisma.TrustedDeviceUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.TrustedDeviceCreateOrConnectWithoutUserInput | Prisma.TrustedDeviceCreateOrConnectWithoutUserInput[]
createMany?: Prisma.TrustedDeviceCreateManyUserInputEnvelope
connect?: Prisma.TrustedDeviceWhereUniqueInput | Prisma.TrustedDeviceWhereUniqueInput[]
}
export type TrustedDeviceUncheckedCreateNestedManyWithoutUserInput = {
create?: Prisma.XOR<Prisma.TrustedDeviceCreateWithoutUserInput, Prisma.TrustedDeviceUncheckedCreateWithoutUserInput> | Prisma.TrustedDeviceCreateWithoutUserInput[] | Prisma.TrustedDeviceUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.TrustedDeviceCreateOrConnectWithoutUserInput | Prisma.TrustedDeviceCreateOrConnectWithoutUserInput[]
createMany?: Prisma.TrustedDeviceCreateManyUserInputEnvelope
connect?: Prisma.TrustedDeviceWhereUniqueInput | Prisma.TrustedDeviceWhereUniqueInput[]
}
export type TrustedDeviceUpdateManyWithoutUserNestedInput = {
create?: Prisma.XOR<Prisma.TrustedDeviceCreateWithoutUserInput, Prisma.TrustedDeviceUncheckedCreateWithoutUserInput> | Prisma.TrustedDeviceCreateWithoutUserInput[] | Prisma.TrustedDeviceUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.TrustedDeviceCreateOrConnectWithoutUserInput | Prisma.TrustedDeviceCreateOrConnectWithoutUserInput[]
upsert?: Prisma.TrustedDeviceUpsertWithWhereUniqueWithoutUserInput | Prisma.TrustedDeviceUpsertWithWhereUniqueWithoutUserInput[]
createMany?: Prisma.TrustedDeviceCreateManyUserInputEnvelope
set?: Prisma.TrustedDeviceWhereUniqueInput | Prisma.TrustedDeviceWhereUniqueInput[]
disconnect?: Prisma.TrustedDeviceWhereUniqueInput | Prisma.TrustedDeviceWhereUniqueInput[]
delete?: Prisma.TrustedDeviceWhereUniqueInput | Prisma.TrustedDeviceWhereUniqueInput[]
connect?: Prisma.TrustedDeviceWhereUniqueInput | Prisma.TrustedDeviceWhereUniqueInput[]
update?: Prisma.TrustedDeviceUpdateWithWhereUniqueWithoutUserInput | Prisma.TrustedDeviceUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: Prisma.TrustedDeviceUpdateManyWithWhereWithoutUserInput | Prisma.TrustedDeviceUpdateManyWithWhereWithoutUserInput[]
deleteMany?: Prisma.TrustedDeviceScalarWhereInput | Prisma.TrustedDeviceScalarWhereInput[]
}
export type TrustedDeviceUncheckedUpdateManyWithoutUserNestedInput = {
create?: Prisma.XOR<Prisma.TrustedDeviceCreateWithoutUserInput, Prisma.TrustedDeviceUncheckedCreateWithoutUserInput> | Prisma.TrustedDeviceCreateWithoutUserInput[] | Prisma.TrustedDeviceUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.TrustedDeviceCreateOrConnectWithoutUserInput | Prisma.TrustedDeviceCreateOrConnectWithoutUserInput[]
upsert?: Prisma.TrustedDeviceUpsertWithWhereUniqueWithoutUserInput | Prisma.TrustedDeviceUpsertWithWhereUniqueWithoutUserInput[]
createMany?: Prisma.TrustedDeviceCreateManyUserInputEnvelope
set?: Prisma.TrustedDeviceWhereUniqueInput | Prisma.TrustedDeviceWhereUniqueInput[]
disconnect?: Prisma.TrustedDeviceWhereUniqueInput | Prisma.TrustedDeviceWhereUniqueInput[]
delete?: Prisma.TrustedDeviceWhereUniqueInput | Prisma.TrustedDeviceWhereUniqueInput[]
connect?: Prisma.TrustedDeviceWhereUniqueInput | Prisma.TrustedDeviceWhereUniqueInput[]
update?: Prisma.TrustedDeviceUpdateWithWhereUniqueWithoutUserInput | Prisma.TrustedDeviceUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: Prisma.TrustedDeviceUpdateManyWithWhereWithoutUserInput | Prisma.TrustedDeviceUpdateManyWithWhereWithoutUserInput[]
deleteMany?: Prisma.TrustedDeviceScalarWhereInput | Prisma.TrustedDeviceScalarWhereInput[]
}
export type TrustedDeviceCreateWithoutUserInput = {
id?: string
tokenHash: string
createdAt?: Date | string
lastUsedAt?: Date | string
expiresAt: Date | string
revokedAt?: Date | string | null
ipHash?: string | null
userAgent?: string | null
deviceLabel?: string | null
approxLocation?: string | null
}
export type TrustedDeviceUncheckedCreateWithoutUserInput = {
id?: string
tokenHash: string
createdAt?: Date | string
lastUsedAt?: Date | string
expiresAt: Date | string
revokedAt?: Date | string | null
ipHash?: string | null
userAgent?: string | null
deviceLabel?: string | null
approxLocation?: string | null
}
export type TrustedDeviceCreateOrConnectWithoutUserInput = {
where: Prisma.TrustedDeviceWhereUniqueInput
create: Prisma.XOR<Prisma.TrustedDeviceCreateWithoutUserInput, Prisma.TrustedDeviceUncheckedCreateWithoutUserInput>
}
export type TrustedDeviceCreateManyUserInputEnvelope = {
data: Prisma.TrustedDeviceCreateManyUserInput | Prisma.TrustedDeviceCreateManyUserInput[]
skipDuplicates?: boolean
}
export type TrustedDeviceUpsertWithWhereUniqueWithoutUserInput = {
where: Prisma.TrustedDeviceWhereUniqueInput
update: Prisma.XOR<Prisma.TrustedDeviceUpdateWithoutUserInput, Prisma.TrustedDeviceUncheckedUpdateWithoutUserInput>
create: Prisma.XOR<Prisma.TrustedDeviceCreateWithoutUserInput, Prisma.TrustedDeviceUncheckedCreateWithoutUserInput>
}
export type TrustedDeviceUpdateWithWhereUniqueWithoutUserInput = {
where: Prisma.TrustedDeviceWhereUniqueInput
data: Prisma.XOR<Prisma.TrustedDeviceUpdateWithoutUserInput, Prisma.TrustedDeviceUncheckedUpdateWithoutUserInput>
}
export type TrustedDeviceUpdateManyWithWhereWithoutUserInput = {
where: Prisma.TrustedDeviceScalarWhereInput
data: Prisma.XOR<Prisma.TrustedDeviceUpdateManyMutationInput, Prisma.TrustedDeviceUncheckedUpdateManyWithoutUserInput>
}
export type TrustedDeviceScalarWhereInput = {
AND?: Prisma.TrustedDeviceScalarWhereInput | Prisma.TrustedDeviceScalarWhereInput[]
OR?: Prisma.TrustedDeviceScalarWhereInput[]
NOT?: Prisma.TrustedDeviceScalarWhereInput | Prisma.TrustedDeviceScalarWhereInput[]
id?: Prisma.StringFilter<"TrustedDevice"> | string
userId?: Prisma.StringFilter<"TrustedDevice"> | string
tokenHash?: Prisma.StringFilter<"TrustedDevice"> | string
createdAt?: Prisma.DateTimeFilter<"TrustedDevice"> | Date | string
lastUsedAt?: Prisma.DateTimeFilter<"TrustedDevice"> | Date | string
expiresAt?: Prisma.DateTimeFilter<"TrustedDevice"> | Date | string
revokedAt?: Prisma.DateTimeNullableFilter<"TrustedDevice"> | Date | string | null
ipHash?: Prisma.StringNullableFilter<"TrustedDevice"> | string | null
userAgent?: Prisma.StringNullableFilter<"TrustedDevice"> | string | null
deviceLabel?: Prisma.StringNullableFilter<"TrustedDevice"> | string | null
approxLocation?: Prisma.StringNullableFilter<"TrustedDevice"> | string | null
}
export type TrustedDeviceCreateManyUserInput = {
id?: string
tokenHash: string
createdAt?: Date | string
lastUsedAt?: Date | string
expiresAt: Date | string
revokedAt?: Date | string | null
ipHash?: string | null
userAgent?: string | null
deviceLabel?: string | null
approxLocation?: string | null
}
export type TrustedDeviceUpdateWithoutUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
tokenHash?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
lastUsedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
ipHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
deviceLabel?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
approxLocation?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type TrustedDeviceUncheckedUpdateWithoutUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
tokenHash?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
lastUsedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
ipHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
deviceLabel?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
approxLocation?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type TrustedDeviceUncheckedUpdateManyWithoutUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
tokenHash?: Prisma.StringFieldUpdateOperationsInput | string
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
lastUsedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
ipHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
userAgent?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
deviceLabel?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
approxLocation?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type TrustedDeviceSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
userId?: boolean
tokenHash?: boolean
createdAt?: boolean
lastUsedAt?: boolean
expiresAt?: boolean
revokedAt?: boolean
ipHash?: boolean
userAgent?: boolean
deviceLabel?: boolean
approxLocation?: boolean
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}, ExtArgs["result"]["trustedDevice"]>
export type TrustedDeviceSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
userId?: boolean
tokenHash?: boolean
createdAt?: boolean
lastUsedAt?: boolean
expiresAt?: boolean
revokedAt?: boolean
ipHash?: boolean
userAgent?: boolean
deviceLabel?: boolean
approxLocation?: boolean
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}, ExtArgs["result"]["trustedDevice"]>
export type TrustedDeviceSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
userId?: boolean
tokenHash?: boolean
createdAt?: boolean
lastUsedAt?: boolean
expiresAt?: boolean
revokedAt?: boolean
ipHash?: boolean
userAgent?: boolean
deviceLabel?: boolean
approxLocation?: boolean
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}, ExtArgs["result"]["trustedDevice"]>
export type TrustedDeviceSelectScalar = {
id?: boolean
userId?: boolean
tokenHash?: boolean
createdAt?: boolean
lastUsedAt?: boolean
expiresAt?: boolean
revokedAt?: boolean
ipHash?: boolean
userAgent?: boolean
deviceLabel?: boolean
approxLocation?: boolean
}
export type TrustedDeviceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "userId" | "tokenHash" | "createdAt" | "lastUsedAt" | "expiresAt" | "revokedAt" | "ipHash" | "userAgent" | "deviceLabel" | "approxLocation", ExtArgs["result"]["trustedDevice"]>
export type TrustedDeviceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}
export type TrustedDeviceIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}
export type TrustedDeviceIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}
export type $TrustedDevicePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "TrustedDevice"
objects: {
user: Prisma.$UserPayload<ExtArgs>
}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: string
userId: string
tokenHash: string
createdAt: Date
lastUsedAt: Date
expiresAt: Date
revokedAt: Date | null
ipHash: string | null
userAgent: string | null
deviceLabel: string | null
approxLocation: string | null
}, ExtArgs["result"]["trustedDevice"]>
composites: {}
}
export type TrustedDeviceGetPayload<S extends boolean | null | undefined | TrustedDeviceDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$TrustedDevicePayload, S>
export type TrustedDeviceCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
Omit<TrustedDeviceFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
select?: TrustedDeviceCountAggregateInputType | true
}
export interface TrustedDeviceDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['TrustedDevice'], meta: { name: 'TrustedDevice' } }
/**
* Find zero or one TrustedDevice that matches the filter.
* @param {TrustedDeviceFindUniqueArgs} args - Arguments to find a TrustedDevice
* @example
* // Get one TrustedDevice
* const trustedDevice = await prisma.trustedDevice.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends TrustedDeviceFindUniqueArgs>(args: Prisma.SelectSubset<T, TrustedDeviceFindUniqueArgs<ExtArgs>>): Prisma.Prisma__TrustedDeviceClient<runtime.Types.Result.GetResult<Prisma.$TrustedDevicePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find one TrustedDevice that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {TrustedDeviceFindUniqueOrThrowArgs} args - Arguments to find a TrustedDevice
* @example
* // Get one TrustedDevice
* const trustedDevice = await prisma.trustedDevice.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends TrustedDeviceFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, TrustedDeviceFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__TrustedDeviceClient<runtime.Types.Result.GetResult<Prisma.$TrustedDevicePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find the first TrustedDevice that matches the filter.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {TrustedDeviceFindFirstArgs} args - Arguments to find a TrustedDevice
* @example
* // Get one TrustedDevice
* const trustedDevice = await prisma.trustedDevice.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends TrustedDeviceFindFirstArgs>(args?: Prisma.SelectSubset<T, TrustedDeviceFindFirstArgs<ExtArgs>>): Prisma.Prisma__TrustedDeviceClient<runtime.Types.Result.GetResult<Prisma.$TrustedDevicePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find the first TrustedDevice that matches the filter or
* throw `PrismaKnownClientError` with `P2025` code if no matches were found.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {TrustedDeviceFindFirstOrThrowArgs} args - Arguments to find a TrustedDevice
* @example
* // Get one TrustedDevice
* const trustedDevice = await prisma.trustedDevice.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends TrustedDeviceFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, TrustedDeviceFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__TrustedDeviceClient<runtime.Types.Result.GetResult<Prisma.$TrustedDevicePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find zero or more TrustedDevices that matches the filter.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {TrustedDeviceFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all TrustedDevices
* const trustedDevices = await prisma.trustedDevice.findMany()
*
* // Get first 10 TrustedDevices
* const trustedDevices = await prisma.trustedDevice.findMany({ take: 10 })
*
* // Only select the `id`
* const trustedDeviceWithIdOnly = await prisma.trustedDevice.findMany({ select: { id: true } })
*
*/
findMany<T extends TrustedDeviceFindManyArgs>(args?: Prisma.SelectSubset<T, TrustedDeviceFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$TrustedDevicePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
/**
* Create a TrustedDevice.
* @param {TrustedDeviceCreateArgs} args - Arguments to create a TrustedDevice.
* @example
* // Create one TrustedDevice
* const TrustedDevice = await prisma.trustedDevice.create({
* data: {
* // ... data to create a TrustedDevice
* }
* })
*
*/
create<T extends TrustedDeviceCreateArgs>(args: Prisma.SelectSubset<T, TrustedDeviceCreateArgs<ExtArgs>>): Prisma.Prisma__TrustedDeviceClient<runtime.Types.Result.GetResult<Prisma.$TrustedDevicePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Create many TrustedDevices.
* @param {TrustedDeviceCreateManyArgs} args - Arguments to create many TrustedDevices.
* @example
* // Create many TrustedDevices
* const trustedDevice = await prisma.trustedDevice.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends TrustedDeviceCreateManyArgs>(args?: Prisma.SelectSubset<T, TrustedDeviceCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create many TrustedDevices and returns the data saved in the database.
* @param {TrustedDeviceCreateManyAndReturnArgs} args - Arguments to create many TrustedDevices.
* @example
* // Create many TrustedDevices
* const trustedDevice = await prisma.trustedDevice.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many TrustedDevices and only return the `id`
* const trustedDeviceWithIdOnly = await prisma.trustedDevice.createManyAndReturn({
* select: { id: true },
* data: [
* // ... provide data here
* ]
* })
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
*
*/
createManyAndReturn<T extends TrustedDeviceCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, TrustedDeviceCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$TrustedDevicePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
/**
* Delete a TrustedDevice.
* @param {TrustedDeviceDeleteArgs} args - Arguments to delete one TrustedDevice.
* @example
* // Delete one TrustedDevice
* const TrustedDevice = await prisma.trustedDevice.delete({
* where: {
* // ... filter to delete one TrustedDevice
* }
* })
*
*/
delete<T extends TrustedDeviceDeleteArgs>(args: Prisma.SelectSubset<T, TrustedDeviceDeleteArgs<ExtArgs>>): Prisma.Prisma__TrustedDeviceClient<runtime.Types.Result.GetResult<Prisma.$TrustedDevicePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Update one TrustedDevice.
* @param {TrustedDeviceUpdateArgs} args - Arguments to update one TrustedDevice.
* @example
* // Update one TrustedDevice
* const trustedDevice = await prisma.trustedDevice.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends TrustedDeviceUpdateArgs>(args: Prisma.SelectSubset<T, TrustedDeviceUpdateArgs<ExtArgs>>): Prisma.Prisma__TrustedDeviceClient<runtime.Types.Result.GetResult<Prisma.$TrustedDevicePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Delete zero or more TrustedDevices.
* @param {TrustedDeviceDeleteManyArgs} args - Arguments to filter TrustedDevices to delete.
* @example
* // Delete a few TrustedDevices
* const { count } = await prisma.trustedDevice.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends TrustedDeviceDeleteManyArgs>(args?: Prisma.SelectSubset<T, TrustedDeviceDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more TrustedDevices.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {TrustedDeviceUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many TrustedDevices
* const trustedDevice = await prisma.trustedDevice.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends TrustedDeviceUpdateManyArgs>(args: Prisma.SelectSubset<T, TrustedDeviceUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more TrustedDevices and returns the data updated in the database.
* @param {TrustedDeviceUpdateManyAndReturnArgs} args - Arguments to update many TrustedDevices.
* @example
* // Update many TrustedDevices
* const trustedDevice = await prisma.trustedDevice.updateManyAndReturn({
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
*
* // Update zero or more TrustedDevices and only return the `id`
* const trustedDeviceWithIdOnly = await prisma.trustedDevice.updateManyAndReturn({
* select: { id: true },
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
*
*/
updateManyAndReturn<T extends TrustedDeviceUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, TrustedDeviceUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$TrustedDevicePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
/**
* Create or update one TrustedDevice.
* @param {TrustedDeviceUpsertArgs} args - Arguments to update or create a TrustedDevice.
* @example
* // Update or create a TrustedDevice
* const trustedDevice = await prisma.trustedDevice.upsert({
* create: {
* // ... data to create a TrustedDevice
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the TrustedDevice we want to update
* }
* })
*/
upsert<T extends TrustedDeviceUpsertArgs>(args: Prisma.SelectSubset<T, TrustedDeviceUpsertArgs<ExtArgs>>): Prisma.Prisma__TrustedDeviceClient<runtime.Types.Result.GetResult<Prisma.$TrustedDevicePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Count the number of TrustedDevices.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {TrustedDeviceCountArgs} args - Arguments to filter TrustedDevices to count.
* @example
* // Count the number of TrustedDevices
* const count = await prisma.trustedDevice.count({
* where: {
* // ... the filter for the TrustedDevices we want to count
* }
* })
**/
count<T extends TrustedDeviceCountArgs>(
args?: Prisma.Subset<T, TrustedDeviceCountArgs>,
): Prisma.PrismaPromise<
T extends runtime.Types.Utils.Record<'select', any>
? T['select'] extends true
? number
: Prisma.GetScalarType<T['select'], TrustedDeviceCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a TrustedDevice.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {TrustedDeviceAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
* @example
* // Ordered by age ascending
* // Where email contains prisma.io
* // Limited to the 10 users
* const aggregations = await prisma.user.aggregate({
* _avg: {
* age: true,
* },
* where: {
* email: {
* contains: "prisma.io",
* },
* },
* orderBy: {
* age: "asc",
* },
* take: 10,
* })
**/
aggregate<T extends TrustedDeviceAggregateArgs>(args: Prisma.Subset<T, TrustedDeviceAggregateArgs>): Prisma.PrismaPromise<GetTrustedDeviceAggregateType<T>>
/**
* Group by TrustedDevice.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {TrustedDeviceGroupByArgs} args - Group by arguments.
* @example
* // Group by city, order by createdAt, get count
* const result = await prisma.user.groupBy({
* by: ['city', 'createdAt'],
* orderBy: {
* createdAt: true
* },
* _count: {
* _all: true
* },
* })
*
**/
groupBy<
T extends TrustedDeviceGroupByArgs,
HasSelectOrTake extends Prisma.Or<
Prisma.Extends<'skip', Prisma.Keys<T>>,
Prisma.Extends<'take', Prisma.Keys<T>>
>,
OrderByArg extends Prisma.True extends HasSelectOrTake
? { orderBy: TrustedDeviceGroupByArgs['orderBy'] }
: { orderBy?: TrustedDeviceGroupByArgs['orderBy'] },
OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
ByValid extends Prisma.Has<ByFields, OrderFields>,
HavingFields extends Prisma.GetHavingFields<T['having']>,
HavingValid extends Prisma.Has<ByFields, HavingFields>,
ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
InputErrors extends ByEmpty extends Prisma.True
? `Error: "by" must not be empty.`
: HavingValid extends Prisma.False
? {
[P in HavingFields]: P extends ByFields
? never
: P extends string
? `Error: Field "${P}" used in "having" needs to be provided in "by".`
: [
Error,
'Field ',
P,
` in "having" needs to be provided in "by"`,
]
}[HavingFields]
: 'take' extends Prisma.Keys<T>
? 'orderBy' extends Prisma.Keys<T>
? ByValid extends Prisma.True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
: 'Error: If you provide "take", you also need to provide "orderBy"'
: 'skip' extends Prisma.Keys<T>
? 'orderBy' extends Prisma.Keys<T>
? ByValid extends Prisma.True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
: 'Error: If you provide "skip", you also need to provide "orderBy"'
: ByValid extends Prisma.True
? {}
: {
[P in OrderFields]: P extends ByFields
? never
: `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
}[OrderFields]
>(args: Prisma.SubsetIntersection<T, TrustedDeviceGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetTrustedDeviceGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the TrustedDevice model
*/
readonly fields: TrustedDeviceFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for TrustedDevice.
* Why is this prefixed with `Prisma__`?
* Because we want to prevent naming conflicts as mentioned in
* https://github.com/prisma/prisma-client-js/issues/707
*/
export interface Prisma__TrustedDeviceClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
user<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
/**
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
* resolved value cannot be modified from the callback.
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
*/
finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
}
/**
* Fields of the TrustedDevice model
*/
export interface TrustedDeviceFieldRefs {
readonly id: Prisma.FieldRef<"TrustedDevice", 'String'>
readonly userId: Prisma.FieldRef<"TrustedDevice", 'String'>
readonly tokenHash: Prisma.FieldRef<"TrustedDevice", 'String'>
readonly createdAt: Prisma.FieldRef<"TrustedDevice", 'DateTime'>
readonly lastUsedAt: Prisma.FieldRef<"TrustedDevice", 'DateTime'>
readonly expiresAt: Prisma.FieldRef<"TrustedDevice", 'DateTime'>
readonly revokedAt: Prisma.FieldRef<"TrustedDevice", 'DateTime'>
readonly ipHash: Prisma.FieldRef<"TrustedDevice", 'String'>
readonly userAgent: Prisma.FieldRef<"TrustedDevice", 'String'>
readonly deviceLabel: Prisma.FieldRef<"TrustedDevice", 'String'>
readonly approxLocation: Prisma.FieldRef<"TrustedDevice", 'String'>
}
// Custom InputTypes
/**
* TrustedDevice findUnique
*/
export type TrustedDeviceFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TrustedDevice
*/
select?: Prisma.TrustedDeviceSelect<ExtArgs> | null
/**
* Omit specific fields from the TrustedDevice
*/
omit?: Prisma.TrustedDeviceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TrustedDeviceInclude<ExtArgs> | null
/**
* Filter, which TrustedDevice to fetch.
*/
where: Prisma.TrustedDeviceWhereUniqueInput
}
/**
* TrustedDevice findUniqueOrThrow
*/
export type TrustedDeviceFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TrustedDevice
*/
select?: Prisma.TrustedDeviceSelect<ExtArgs> | null
/**
* Omit specific fields from the TrustedDevice
*/
omit?: Prisma.TrustedDeviceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TrustedDeviceInclude<ExtArgs> | null
/**
* Filter, which TrustedDevice to fetch.
*/
where: Prisma.TrustedDeviceWhereUniqueInput
}
/**
* TrustedDevice findFirst
*/
export type TrustedDeviceFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TrustedDevice
*/
select?: Prisma.TrustedDeviceSelect<ExtArgs> | null
/**
* Omit specific fields from the TrustedDevice
*/
omit?: Prisma.TrustedDeviceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TrustedDeviceInclude<ExtArgs> | null
/**
* Filter, which TrustedDevice to fetch.
*/
where?: Prisma.TrustedDeviceWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of TrustedDevices to fetch.
*/
orderBy?: Prisma.TrustedDeviceOrderByWithRelationInput | Prisma.TrustedDeviceOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for TrustedDevices.
*/
cursor?: Prisma.TrustedDeviceWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` TrustedDevices from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` TrustedDevices.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of TrustedDevices.
*/
distinct?: Prisma.TrustedDeviceScalarFieldEnum | Prisma.TrustedDeviceScalarFieldEnum[]
}
/**
* TrustedDevice findFirstOrThrow
*/
export type TrustedDeviceFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TrustedDevice
*/
select?: Prisma.TrustedDeviceSelect<ExtArgs> | null
/**
* Omit specific fields from the TrustedDevice
*/
omit?: Prisma.TrustedDeviceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TrustedDeviceInclude<ExtArgs> | null
/**
* Filter, which TrustedDevice to fetch.
*/
where?: Prisma.TrustedDeviceWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of TrustedDevices to fetch.
*/
orderBy?: Prisma.TrustedDeviceOrderByWithRelationInput | Prisma.TrustedDeviceOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for TrustedDevices.
*/
cursor?: Prisma.TrustedDeviceWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` TrustedDevices from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` TrustedDevices.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of TrustedDevices.
*/
distinct?: Prisma.TrustedDeviceScalarFieldEnum | Prisma.TrustedDeviceScalarFieldEnum[]
}
/**
* TrustedDevice findMany
*/
export type TrustedDeviceFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TrustedDevice
*/
select?: Prisma.TrustedDeviceSelect<ExtArgs> | null
/**
* Omit specific fields from the TrustedDevice
*/
omit?: Prisma.TrustedDeviceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TrustedDeviceInclude<ExtArgs> | null
/**
* Filter, which TrustedDevices to fetch.
*/
where?: Prisma.TrustedDeviceWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of TrustedDevices to fetch.
*/
orderBy?: Prisma.TrustedDeviceOrderByWithRelationInput | Prisma.TrustedDeviceOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing TrustedDevices.
*/
cursor?: Prisma.TrustedDeviceWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` TrustedDevices from the position of the cursor.
*/
take?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Skip the first `n` TrustedDevices.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of TrustedDevices.
*/
distinct?: Prisma.TrustedDeviceScalarFieldEnum | Prisma.TrustedDeviceScalarFieldEnum[]
}
/**
* TrustedDevice create
*/
export type TrustedDeviceCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TrustedDevice
*/
select?: Prisma.TrustedDeviceSelect<ExtArgs> | null
/**
* Omit specific fields from the TrustedDevice
*/
omit?: Prisma.TrustedDeviceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TrustedDeviceInclude<ExtArgs> | null
/**
* The data needed to create a TrustedDevice.
*/
data: Prisma.XOR<Prisma.TrustedDeviceCreateInput, Prisma.TrustedDeviceUncheckedCreateInput>
}
/**
* TrustedDevice createMany
*/
export type TrustedDeviceCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to create many TrustedDevices.
*/
data: Prisma.TrustedDeviceCreateManyInput | Prisma.TrustedDeviceCreateManyInput[]
skipDuplicates?: boolean
}
/**
* TrustedDevice createManyAndReturn
*/
export type TrustedDeviceCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TrustedDevice
*/
select?: Prisma.TrustedDeviceSelectCreateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the TrustedDevice
*/
omit?: Prisma.TrustedDeviceOmit<ExtArgs> | null
/**
* The data used to create many TrustedDevices.
*/
data: Prisma.TrustedDeviceCreateManyInput | Prisma.TrustedDeviceCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TrustedDeviceIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
* TrustedDevice update
*/
export type TrustedDeviceUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TrustedDevice
*/
select?: Prisma.TrustedDeviceSelect<ExtArgs> | null
/**
* Omit specific fields from the TrustedDevice
*/
omit?: Prisma.TrustedDeviceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TrustedDeviceInclude<ExtArgs> | null
/**
* The data needed to update a TrustedDevice.
*/
data: Prisma.XOR<Prisma.TrustedDeviceUpdateInput, Prisma.TrustedDeviceUncheckedUpdateInput>
/**
* Choose, which TrustedDevice to update.
*/
where: Prisma.TrustedDeviceWhereUniqueInput
}
/**
* TrustedDevice updateMany
*/
export type TrustedDeviceUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to update TrustedDevices.
*/
data: Prisma.XOR<Prisma.TrustedDeviceUpdateManyMutationInput, Prisma.TrustedDeviceUncheckedUpdateManyInput>
/**
* Filter which TrustedDevices to update
*/
where?: Prisma.TrustedDeviceWhereInput
/**
* Limit how many TrustedDevices to update.
*/
limit?: number
}
/**
* TrustedDevice updateManyAndReturn
*/
export type TrustedDeviceUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TrustedDevice
*/
select?: Prisma.TrustedDeviceSelectUpdateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the TrustedDevice
*/
omit?: Prisma.TrustedDeviceOmit<ExtArgs> | null
/**
* The data used to update TrustedDevices.
*/
data: Prisma.XOR<Prisma.TrustedDeviceUpdateManyMutationInput, Prisma.TrustedDeviceUncheckedUpdateManyInput>
/**
* Filter which TrustedDevices to update
*/
where?: Prisma.TrustedDeviceWhereInput
/**
* Limit how many TrustedDevices to update.
*/
limit?: number
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TrustedDeviceIncludeUpdateManyAndReturn<ExtArgs> | null
}
/**
* TrustedDevice upsert
*/
export type TrustedDeviceUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TrustedDevice
*/
select?: Prisma.TrustedDeviceSelect<ExtArgs> | null
/**
* Omit specific fields from the TrustedDevice
*/
omit?: Prisma.TrustedDeviceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TrustedDeviceInclude<ExtArgs> | null
/**
* The filter to search for the TrustedDevice to update in case it exists.
*/
where: Prisma.TrustedDeviceWhereUniqueInput
/**
* In case the TrustedDevice found by the `where` argument doesn't exist, create a new TrustedDevice with this data.
*/
create: Prisma.XOR<Prisma.TrustedDeviceCreateInput, Prisma.TrustedDeviceUncheckedCreateInput>
/**
* In case the TrustedDevice was found with the provided `where` argument, update it with this data.
*/
update: Prisma.XOR<Prisma.TrustedDeviceUpdateInput, Prisma.TrustedDeviceUncheckedUpdateInput>
}
/**
* TrustedDevice delete
*/
export type TrustedDeviceDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TrustedDevice
*/
select?: Prisma.TrustedDeviceSelect<ExtArgs> | null
/**
* Omit specific fields from the TrustedDevice
*/
omit?: Prisma.TrustedDeviceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TrustedDeviceInclude<ExtArgs> | null
/**
* Filter which TrustedDevice to delete.
*/
where: Prisma.TrustedDeviceWhereUniqueInput
}
/**
* TrustedDevice deleteMany
*/
export type TrustedDeviceDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which TrustedDevices to delete
*/
where?: Prisma.TrustedDeviceWhereInput
/**
* Limit how many TrustedDevices to delete.
*/
limit?: number
}
/**
* TrustedDevice without action
*/
export type TrustedDeviceDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TrustedDevice
*/
select?: Prisma.TrustedDeviceSelect<ExtArgs> | null
/**
* Omit specific fields from the TrustedDevice
*/
omit?: Prisma.TrustedDeviceOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TrustedDeviceInclude<ExtArgs> | null
}