@nestjs-mod/two-factor
Version:
Two factor module with an error filter, guard, controller, database migrations and rest-sdk for work with module from other nodejs appliaction
1,040 lines • 61.8 kB
TypeScript
/**
* This file exports the `TwoFactorCode` model and its related types.
*
* 🟢 You can import this file directly.
*/
import * as runtime from "@prisma/client/runtime/client";
import type * as Prisma from "../internal/prismaNamespace";
/**
* Model TwoFactorCode
*
*/
export type TwoFactorCodeModel = runtime.Types.Result.DefaultSelection<Prisma.$TwoFactorCodePayload>;
export type AggregateTwoFactorCode = {
_count: TwoFactorCodeCountAggregateOutputType | null;
_min: TwoFactorCodeMinAggregateOutputType | null;
_max: TwoFactorCodeMaxAggregateOutputType | null;
};
export type TwoFactorCodeMinAggregateOutputType = {
id: string | null;
type: string | null;
operationName: string | null;
code: string | null;
used: boolean | null;
outdated: boolean | null;
userId: string | null;
externalTenantId: string | null;
createdAt: Date | null;
updatedAt: Date | null;
};
export type TwoFactorCodeMaxAggregateOutputType = {
id: string | null;
type: string | null;
operationName: string | null;
code: string | null;
used: boolean | null;
outdated: boolean | null;
userId: string | null;
externalTenantId: string | null;
createdAt: Date | null;
updatedAt: Date | null;
};
export type TwoFactorCodeCountAggregateOutputType = {
id: number;
type: number;
operationName: number;
code: number;
used: number;
outdated: number;
userId: number;
externalTenantId: number;
createdAt: number;
updatedAt: number;
_all: number;
};
export type TwoFactorCodeMinAggregateInputType = {
id?: true;
type?: true;
operationName?: true;
code?: true;
used?: true;
outdated?: true;
userId?: true;
externalTenantId?: true;
createdAt?: true;
updatedAt?: true;
};
export type TwoFactorCodeMaxAggregateInputType = {
id?: true;
type?: true;
operationName?: true;
code?: true;
used?: true;
outdated?: true;
userId?: true;
externalTenantId?: true;
createdAt?: true;
updatedAt?: true;
};
export type TwoFactorCodeCountAggregateInputType = {
id?: true;
type?: true;
operationName?: true;
code?: true;
used?: true;
outdated?: true;
userId?: true;
externalTenantId?: true;
createdAt?: true;
updatedAt?: true;
_all?: true;
};
export type TwoFactorCodeAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which TwoFactorCode to aggregate.
*/
where?: Prisma.TwoFactorCodeWhereInput;
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of TwoFactorCodes to fetch.
*/
orderBy?: Prisma.TwoFactorCodeOrderByWithRelationInput | Prisma.TwoFactorCodeOrderByWithRelationInput[];
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: Prisma.TwoFactorCodeWhereUniqueInput;
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` TwoFactorCodes 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` TwoFactorCodes.
*/
skip?: number;
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned TwoFactorCodes
**/
_count?: true | TwoFactorCodeCountAggregateInputType;
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: TwoFactorCodeMinAggregateInputType;
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: TwoFactorCodeMaxAggregateInputType;
};
export type GetTwoFactorCodeAggregateType<T extends TwoFactorCodeAggregateArgs> = {
[P in keyof T & keyof AggregateTwoFactorCode]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType<T[P], AggregateTwoFactorCode[P]> : Prisma.GetScalarType<T[P], AggregateTwoFactorCode[P]>;
};
export type TwoFactorCodeGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.TwoFactorCodeWhereInput;
orderBy?: Prisma.TwoFactorCodeOrderByWithAggregationInput | Prisma.TwoFactorCodeOrderByWithAggregationInput[];
by: Prisma.TwoFactorCodeScalarFieldEnum[] | Prisma.TwoFactorCodeScalarFieldEnum;
having?: Prisma.TwoFactorCodeScalarWhereWithAggregatesInput;
take?: number;
skip?: number;
_count?: TwoFactorCodeCountAggregateInputType | true;
_min?: TwoFactorCodeMinAggregateInputType;
_max?: TwoFactorCodeMaxAggregateInputType;
};
export type TwoFactorCodeGroupByOutputType = {
id: string;
type: string;
operationName: string;
code: string;
used: boolean;
outdated: boolean;
userId: string;
externalTenantId: string;
createdAt: Date;
updatedAt: Date;
_count: TwoFactorCodeCountAggregateOutputType | null;
_min: TwoFactorCodeMinAggregateOutputType | null;
_max: TwoFactorCodeMaxAggregateOutputType | null;
};
type GetTwoFactorCodeGroupByPayload<T extends TwoFactorCodeGroupByArgs> = Prisma.PrismaPromise<Array<Prisma.PickEnumerable<TwoFactorCodeGroupByOutputType, T['by']> & {
[P in ((keyof T) & (keyof TwoFactorCodeGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType<T[P], TwoFactorCodeGroupByOutputType[P]> : Prisma.GetScalarType<T[P], TwoFactorCodeGroupByOutputType[P]>;
}>>;
export type TwoFactorCodeWhereInput = {
AND?: Prisma.TwoFactorCodeWhereInput | Prisma.TwoFactorCodeWhereInput[];
OR?: Prisma.TwoFactorCodeWhereInput[];
NOT?: Prisma.TwoFactorCodeWhereInput | Prisma.TwoFactorCodeWhereInput[];
id?: Prisma.UuidFilter<"TwoFactorCode"> | string;
type?: Prisma.StringFilter<"TwoFactorCode"> | string;
operationName?: Prisma.StringFilter<"TwoFactorCode"> | string;
code?: Prisma.StringFilter<"TwoFactorCode"> | string;
used?: Prisma.BoolFilter<"TwoFactorCode"> | boolean;
outdated?: Prisma.BoolFilter<"TwoFactorCode"> | boolean;
userId?: Prisma.UuidFilter<"TwoFactorCode"> | string;
externalTenantId?: Prisma.UuidFilter<"TwoFactorCode"> | string;
createdAt?: Prisma.DateTimeFilter<"TwoFactorCode"> | Date | string;
updatedAt?: Prisma.DateTimeFilter<"TwoFactorCode"> | Date | string;
TwoFactorUser?: Prisma.XOR<Prisma.TwoFactorUserScalarRelationFilter, Prisma.TwoFactorUserWhereInput>;
};
export type TwoFactorCodeOrderByWithRelationInput = {
id?: Prisma.SortOrder;
type?: Prisma.SortOrder;
operationName?: Prisma.SortOrder;
code?: Prisma.SortOrder;
used?: Prisma.SortOrder;
outdated?: Prisma.SortOrder;
userId?: Prisma.SortOrder;
externalTenantId?: Prisma.SortOrder;
createdAt?: Prisma.SortOrder;
updatedAt?: Prisma.SortOrder;
TwoFactorUser?: Prisma.TwoFactorUserOrderByWithRelationInput;
};
export type TwoFactorCodeWhereUniqueInput = Prisma.AtLeast<{
id?: string;
userId_operationName_type_code_externalTenantId?: Prisma.TwoFactorCodeUserIdOperationNameTypeCodeExternalTenantIdCompoundUniqueInput;
AND?: Prisma.TwoFactorCodeWhereInput | Prisma.TwoFactorCodeWhereInput[];
OR?: Prisma.TwoFactorCodeWhereInput[];
NOT?: Prisma.TwoFactorCodeWhereInput | Prisma.TwoFactorCodeWhereInput[];
type?: Prisma.StringFilter<"TwoFactorCode"> | string;
operationName?: Prisma.StringFilter<"TwoFactorCode"> | string;
code?: Prisma.StringFilter<"TwoFactorCode"> | string;
used?: Prisma.BoolFilter<"TwoFactorCode"> | boolean;
outdated?: Prisma.BoolFilter<"TwoFactorCode"> | boolean;
userId?: Prisma.UuidFilter<"TwoFactorCode"> | string;
externalTenantId?: Prisma.UuidFilter<"TwoFactorCode"> | string;
createdAt?: Prisma.DateTimeFilter<"TwoFactorCode"> | Date | string;
updatedAt?: Prisma.DateTimeFilter<"TwoFactorCode"> | Date | string;
TwoFactorUser?: Prisma.XOR<Prisma.TwoFactorUserScalarRelationFilter, Prisma.TwoFactorUserWhereInput>;
}, "id" | "userId_operationName_type_code_externalTenantId">;
export type TwoFactorCodeOrderByWithAggregationInput = {
id?: Prisma.SortOrder;
type?: Prisma.SortOrder;
operationName?: Prisma.SortOrder;
code?: Prisma.SortOrder;
used?: Prisma.SortOrder;
outdated?: Prisma.SortOrder;
userId?: Prisma.SortOrder;
externalTenantId?: Prisma.SortOrder;
createdAt?: Prisma.SortOrder;
updatedAt?: Prisma.SortOrder;
_count?: Prisma.TwoFactorCodeCountOrderByAggregateInput;
_max?: Prisma.TwoFactorCodeMaxOrderByAggregateInput;
_min?: Prisma.TwoFactorCodeMinOrderByAggregateInput;
};
export type TwoFactorCodeScalarWhereWithAggregatesInput = {
AND?: Prisma.TwoFactorCodeScalarWhereWithAggregatesInput | Prisma.TwoFactorCodeScalarWhereWithAggregatesInput[];
OR?: Prisma.TwoFactorCodeScalarWhereWithAggregatesInput[];
NOT?: Prisma.TwoFactorCodeScalarWhereWithAggregatesInput | Prisma.TwoFactorCodeScalarWhereWithAggregatesInput[];
id?: Prisma.UuidWithAggregatesFilter<"TwoFactorCode"> | string;
type?: Prisma.StringWithAggregatesFilter<"TwoFactorCode"> | string;
operationName?: Prisma.StringWithAggregatesFilter<"TwoFactorCode"> | string;
code?: Prisma.StringWithAggregatesFilter<"TwoFactorCode"> | string;
used?: Prisma.BoolWithAggregatesFilter<"TwoFactorCode"> | boolean;
outdated?: Prisma.BoolWithAggregatesFilter<"TwoFactorCode"> | boolean;
userId?: Prisma.UuidWithAggregatesFilter<"TwoFactorCode"> | string;
externalTenantId?: Prisma.UuidWithAggregatesFilter<"TwoFactorCode"> | string;
createdAt?: Prisma.DateTimeWithAggregatesFilter<"TwoFactorCode"> | Date | string;
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"TwoFactorCode"> | Date | string;
};
export type TwoFactorCodeCreateInput = {
id?: string;
type: string;
operationName: string;
code: string;
used: boolean;
outdated: boolean;
externalTenantId: string;
createdAt?: Date | string;
updatedAt?: Date | string;
TwoFactorUser: Prisma.TwoFactorUserCreateNestedOneWithoutTwoFactorCodeInput;
};
export type TwoFactorCodeUncheckedCreateInput = {
id?: string;
type: string;
operationName: string;
code: string;
used: boolean;
outdated: boolean;
userId: string;
externalTenantId: string;
createdAt?: Date | string;
updatedAt?: Date | string;
};
export type TwoFactorCodeUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string;
type?: Prisma.StringFieldUpdateOperationsInput | string;
operationName?: Prisma.StringFieldUpdateOperationsInput | string;
code?: Prisma.StringFieldUpdateOperationsInput | string;
used?: Prisma.BoolFieldUpdateOperationsInput | boolean;
outdated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
externalTenantId?: Prisma.StringFieldUpdateOperationsInput | string;
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
TwoFactorUser?: Prisma.TwoFactorUserUpdateOneRequiredWithoutTwoFactorCodeNestedInput;
};
export type TwoFactorCodeUncheckedUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string;
type?: Prisma.StringFieldUpdateOperationsInput | string;
operationName?: Prisma.StringFieldUpdateOperationsInput | string;
code?: Prisma.StringFieldUpdateOperationsInput | string;
used?: Prisma.BoolFieldUpdateOperationsInput | boolean;
outdated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
userId?: Prisma.StringFieldUpdateOperationsInput | string;
externalTenantId?: Prisma.StringFieldUpdateOperationsInput | string;
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
};
export type TwoFactorCodeCreateManyInput = {
id?: string;
type: string;
operationName: string;
code: string;
used: boolean;
outdated: boolean;
userId: string;
externalTenantId: string;
createdAt?: Date | string;
updatedAt?: Date | string;
};
export type TwoFactorCodeUpdateManyMutationInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string;
type?: Prisma.StringFieldUpdateOperationsInput | string;
operationName?: Prisma.StringFieldUpdateOperationsInput | string;
code?: Prisma.StringFieldUpdateOperationsInput | string;
used?: Prisma.BoolFieldUpdateOperationsInput | boolean;
outdated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
externalTenantId?: Prisma.StringFieldUpdateOperationsInput | string;
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
};
export type TwoFactorCodeUncheckedUpdateManyInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string;
type?: Prisma.StringFieldUpdateOperationsInput | string;
operationName?: Prisma.StringFieldUpdateOperationsInput | string;
code?: Prisma.StringFieldUpdateOperationsInput | string;
used?: Prisma.BoolFieldUpdateOperationsInput | boolean;
outdated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
userId?: Prisma.StringFieldUpdateOperationsInput | string;
externalTenantId?: Prisma.StringFieldUpdateOperationsInput | string;
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
};
export type TwoFactorCodeListRelationFilter = {
every?: Prisma.TwoFactorCodeWhereInput;
some?: Prisma.TwoFactorCodeWhereInput;
none?: Prisma.TwoFactorCodeWhereInput;
};
export type TwoFactorCodeOrderByRelationAggregateInput = {
_count?: Prisma.SortOrder;
};
export type TwoFactorCodeUserIdOperationNameTypeCodeExternalTenantIdCompoundUniqueInput = {
userId: string;
operationName: string;
type: string;
code: string;
externalTenantId: string;
};
export type TwoFactorCodeCountOrderByAggregateInput = {
id?: Prisma.SortOrder;
type?: Prisma.SortOrder;
operationName?: Prisma.SortOrder;
code?: Prisma.SortOrder;
used?: Prisma.SortOrder;
outdated?: Prisma.SortOrder;
userId?: Prisma.SortOrder;
externalTenantId?: Prisma.SortOrder;
createdAt?: Prisma.SortOrder;
updatedAt?: Prisma.SortOrder;
};
export type TwoFactorCodeMaxOrderByAggregateInput = {
id?: Prisma.SortOrder;
type?: Prisma.SortOrder;
operationName?: Prisma.SortOrder;
code?: Prisma.SortOrder;
used?: Prisma.SortOrder;
outdated?: Prisma.SortOrder;
userId?: Prisma.SortOrder;
externalTenantId?: Prisma.SortOrder;
createdAt?: Prisma.SortOrder;
updatedAt?: Prisma.SortOrder;
};
export type TwoFactorCodeMinOrderByAggregateInput = {
id?: Prisma.SortOrder;
type?: Prisma.SortOrder;
operationName?: Prisma.SortOrder;
code?: Prisma.SortOrder;
used?: Prisma.SortOrder;
outdated?: Prisma.SortOrder;
userId?: Prisma.SortOrder;
externalTenantId?: Prisma.SortOrder;
createdAt?: Prisma.SortOrder;
updatedAt?: Prisma.SortOrder;
};
export type TwoFactorCodeCreateNestedManyWithoutTwoFactorUserInput = {
create?: Prisma.XOR<Prisma.TwoFactorCodeCreateWithoutTwoFactorUserInput, Prisma.TwoFactorCodeUncheckedCreateWithoutTwoFactorUserInput> | Prisma.TwoFactorCodeCreateWithoutTwoFactorUserInput[] | Prisma.TwoFactorCodeUncheckedCreateWithoutTwoFactorUserInput[];
connectOrCreate?: Prisma.TwoFactorCodeCreateOrConnectWithoutTwoFactorUserInput | Prisma.TwoFactorCodeCreateOrConnectWithoutTwoFactorUserInput[];
createMany?: Prisma.TwoFactorCodeCreateManyTwoFactorUserInputEnvelope;
connect?: Prisma.TwoFactorCodeWhereUniqueInput | Prisma.TwoFactorCodeWhereUniqueInput[];
};
export type TwoFactorCodeUncheckedCreateNestedManyWithoutTwoFactorUserInput = {
create?: Prisma.XOR<Prisma.TwoFactorCodeCreateWithoutTwoFactorUserInput, Prisma.TwoFactorCodeUncheckedCreateWithoutTwoFactorUserInput> | Prisma.TwoFactorCodeCreateWithoutTwoFactorUserInput[] | Prisma.TwoFactorCodeUncheckedCreateWithoutTwoFactorUserInput[];
connectOrCreate?: Prisma.TwoFactorCodeCreateOrConnectWithoutTwoFactorUserInput | Prisma.TwoFactorCodeCreateOrConnectWithoutTwoFactorUserInput[];
createMany?: Prisma.TwoFactorCodeCreateManyTwoFactorUserInputEnvelope;
connect?: Prisma.TwoFactorCodeWhereUniqueInput | Prisma.TwoFactorCodeWhereUniqueInput[];
};
export type TwoFactorCodeUpdateManyWithoutTwoFactorUserNestedInput = {
create?: Prisma.XOR<Prisma.TwoFactorCodeCreateWithoutTwoFactorUserInput, Prisma.TwoFactorCodeUncheckedCreateWithoutTwoFactorUserInput> | Prisma.TwoFactorCodeCreateWithoutTwoFactorUserInput[] | Prisma.TwoFactorCodeUncheckedCreateWithoutTwoFactorUserInput[];
connectOrCreate?: Prisma.TwoFactorCodeCreateOrConnectWithoutTwoFactorUserInput | Prisma.TwoFactorCodeCreateOrConnectWithoutTwoFactorUserInput[];
upsert?: Prisma.TwoFactorCodeUpsertWithWhereUniqueWithoutTwoFactorUserInput | Prisma.TwoFactorCodeUpsertWithWhereUniqueWithoutTwoFactorUserInput[];
createMany?: Prisma.TwoFactorCodeCreateManyTwoFactorUserInputEnvelope;
set?: Prisma.TwoFactorCodeWhereUniqueInput | Prisma.TwoFactorCodeWhereUniqueInput[];
disconnect?: Prisma.TwoFactorCodeWhereUniqueInput | Prisma.TwoFactorCodeWhereUniqueInput[];
delete?: Prisma.TwoFactorCodeWhereUniqueInput | Prisma.TwoFactorCodeWhereUniqueInput[];
connect?: Prisma.TwoFactorCodeWhereUniqueInput | Prisma.TwoFactorCodeWhereUniqueInput[];
update?: Prisma.TwoFactorCodeUpdateWithWhereUniqueWithoutTwoFactorUserInput | Prisma.TwoFactorCodeUpdateWithWhereUniqueWithoutTwoFactorUserInput[];
updateMany?: Prisma.TwoFactorCodeUpdateManyWithWhereWithoutTwoFactorUserInput | Prisma.TwoFactorCodeUpdateManyWithWhereWithoutTwoFactorUserInput[];
deleteMany?: Prisma.TwoFactorCodeScalarWhereInput | Prisma.TwoFactorCodeScalarWhereInput[];
};
export type TwoFactorCodeUncheckedUpdateManyWithoutTwoFactorUserNestedInput = {
create?: Prisma.XOR<Prisma.TwoFactorCodeCreateWithoutTwoFactorUserInput, Prisma.TwoFactorCodeUncheckedCreateWithoutTwoFactorUserInput> | Prisma.TwoFactorCodeCreateWithoutTwoFactorUserInput[] | Prisma.TwoFactorCodeUncheckedCreateWithoutTwoFactorUserInput[];
connectOrCreate?: Prisma.TwoFactorCodeCreateOrConnectWithoutTwoFactorUserInput | Prisma.TwoFactorCodeCreateOrConnectWithoutTwoFactorUserInput[];
upsert?: Prisma.TwoFactorCodeUpsertWithWhereUniqueWithoutTwoFactorUserInput | Prisma.TwoFactorCodeUpsertWithWhereUniqueWithoutTwoFactorUserInput[];
createMany?: Prisma.TwoFactorCodeCreateManyTwoFactorUserInputEnvelope;
set?: Prisma.TwoFactorCodeWhereUniqueInput | Prisma.TwoFactorCodeWhereUniqueInput[];
disconnect?: Prisma.TwoFactorCodeWhereUniqueInput | Prisma.TwoFactorCodeWhereUniqueInput[];
delete?: Prisma.TwoFactorCodeWhereUniqueInput | Prisma.TwoFactorCodeWhereUniqueInput[];
connect?: Prisma.TwoFactorCodeWhereUniqueInput | Prisma.TwoFactorCodeWhereUniqueInput[];
update?: Prisma.TwoFactorCodeUpdateWithWhereUniqueWithoutTwoFactorUserInput | Prisma.TwoFactorCodeUpdateWithWhereUniqueWithoutTwoFactorUserInput[];
updateMany?: Prisma.TwoFactorCodeUpdateManyWithWhereWithoutTwoFactorUserInput | Prisma.TwoFactorCodeUpdateManyWithWhereWithoutTwoFactorUserInput[];
deleteMany?: Prisma.TwoFactorCodeScalarWhereInput | Prisma.TwoFactorCodeScalarWhereInput[];
};
export type BoolFieldUpdateOperationsInput = {
set?: boolean;
};
export type TwoFactorCodeCreateWithoutTwoFactorUserInput = {
id?: string;
type: string;
operationName: string;
code: string;
used: boolean;
outdated: boolean;
externalTenantId: string;
createdAt?: Date | string;
updatedAt?: Date | string;
};
export type TwoFactorCodeUncheckedCreateWithoutTwoFactorUserInput = {
id?: string;
type: string;
operationName: string;
code: string;
used: boolean;
outdated: boolean;
externalTenantId: string;
createdAt?: Date | string;
updatedAt?: Date | string;
};
export type TwoFactorCodeCreateOrConnectWithoutTwoFactorUserInput = {
where: Prisma.TwoFactorCodeWhereUniqueInput;
create: Prisma.XOR<Prisma.TwoFactorCodeCreateWithoutTwoFactorUserInput, Prisma.TwoFactorCodeUncheckedCreateWithoutTwoFactorUserInput>;
};
export type TwoFactorCodeCreateManyTwoFactorUserInputEnvelope = {
data: Prisma.TwoFactorCodeCreateManyTwoFactorUserInput | Prisma.TwoFactorCodeCreateManyTwoFactorUserInput[];
skipDuplicates?: boolean;
};
export type TwoFactorCodeUpsertWithWhereUniqueWithoutTwoFactorUserInput = {
where: Prisma.TwoFactorCodeWhereUniqueInput;
update: Prisma.XOR<Prisma.TwoFactorCodeUpdateWithoutTwoFactorUserInput, Prisma.TwoFactorCodeUncheckedUpdateWithoutTwoFactorUserInput>;
create: Prisma.XOR<Prisma.TwoFactorCodeCreateWithoutTwoFactorUserInput, Prisma.TwoFactorCodeUncheckedCreateWithoutTwoFactorUserInput>;
};
export type TwoFactorCodeUpdateWithWhereUniqueWithoutTwoFactorUserInput = {
where: Prisma.TwoFactorCodeWhereUniqueInput;
data: Prisma.XOR<Prisma.TwoFactorCodeUpdateWithoutTwoFactorUserInput, Prisma.TwoFactorCodeUncheckedUpdateWithoutTwoFactorUserInput>;
};
export type TwoFactorCodeUpdateManyWithWhereWithoutTwoFactorUserInput = {
where: Prisma.TwoFactorCodeScalarWhereInput;
data: Prisma.XOR<Prisma.TwoFactorCodeUpdateManyMutationInput, Prisma.TwoFactorCodeUncheckedUpdateManyWithoutTwoFactorUserInput>;
};
export type TwoFactorCodeScalarWhereInput = {
AND?: Prisma.TwoFactorCodeScalarWhereInput | Prisma.TwoFactorCodeScalarWhereInput[];
OR?: Prisma.TwoFactorCodeScalarWhereInput[];
NOT?: Prisma.TwoFactorCodeScalarWhereInput | Prisma.TwoFactorCodeScalarWhereInput[];
id?: Prisma.UuidFilter<"TwoFactorCode"> | string;
type?: Prisma.StringFilter<"TwoFactorCode"> | string;
operationName?: Prisma.StringFilter<"TwoFactorCode"> | string;
code?: Prisma.StringFilter<"TwoFactorCode"> | string;
used?: Prisma.BoolFilter<"TwoFactorCode"> | boolean;
outdated?: Prisma.BoolFilter<"TwoFactorCode"> | boolean;
userId?: Prisma.UuidFilter<"TwoFactorCode"> | string;
externalTenantId?: Prisma.UuidFilter<"TwoFactorCode"> | string;
createdAt?: Prisma.DateTimeFilter<"TwoFactorCode"> | Date | string;
updatedAt?: Prisma.DateTimeFilter<"TwoFactorCode"> | Date | string;
};
export type TwoFactorCodeCreateManyTwoFactorUserInput = {
id?: string;
type: string;
operationName: string;
code: string;
used: boolean;
outdated: boolean;
externalTenantId: string;
createdAt?: Date | string;
updatedAt?: Date | string;
};
export type TwoFactorCodeUpdateWithoutTwoFactorUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string;
type?: Prisma.StringFieldUpdateOperationsInput | string;
operationName?: Prisma.StringFieldUpdateOperationsInput | string;
code?: Prisma.StringFieldUpdateOperationsInput | string;
used?: Prisma.BoolFieldUpdateOperationsInput | boolean;
outdated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
externalTenantId?: Prisma.StringFieldUpdateOperationsInput | string;
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
};
export type TwoFactorCodeUncheckedUpdateWithoutTwoFactorUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string;
type?: Prisma.StringFieldUpdateOperationsInput | string;
operationName?: Prisma.StringFieldUpdateOperationsInput | string;
code?: Prisma.StringFieldUpdateOperationsInput | string;
used?: Prisma.BoolFieldUpdateOperationsInput | boolean;
outdated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
externalTenantId?: Prisma.StringFieldUpdateOperationsInput | string;
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
};
export type TwoFactorCodeUncheckedUpdateManyWithoutTwoFactorUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string;
type?: Prisma.StringFieldUpdateOperationsInput | string;
operationName?: Prisma.StringFieldUpdateOperationsInput | string;
code?: Prisma.StringFieldUpdateOperationsInput | string;
used?: Prisma.BoolFieldUpdateOperationsInput | boolean;
outdated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
externalTenantId?: Prisma.StringFieldUpdateOperationsInput | string;
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
};
export type TwoFactorCodeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean;
type?: boolean;
operationName?: boolean;
code?: boolean;
used?: boolean;
outdated?: boolean;
userId?: boolean;
externalTenantId?: boolean;
createdAt?: boolean;
updatedAt?: boolean;
TwoFactorUser?: boolean | Prisma.TwoFactorUserDefaultArgs<ExtArgs>;
}, ExtArgs["result"]["twoFactorCode"]>;
export type TwoFactorCodeSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean;
type?: boolean;
operationName?: boolean;
code?: boolean;
used?: boolean;
outdated?: boolean;
userId?: boolean;
externalTenantId?: boolean;
createdAt?: boolean;
updatedAt?: boolean;
TwoFactorUser?: boolean | Prisma.TwoFactorUserDefaultArgs<ExtArgs>;
}, ExtArgs["result"]["twoFactorCode"]>;
export type TwoFactorCodeSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean;
type?: boolean;
operationName?: boolean;
code?: boolean;
used?: boolean;
outdated?: boolean;
userId?: boolean;
externalTenantId?: boolean;
createdAt?: boolean;
updatedAt?: boolean;
TwoFactorUser?: boolean | Prisma.TwoFactorUserDefaultArgs<ExtArgs>;
}, ExtArgs["result"]["twoFactorCode"]>;
export type TwoFactorCodeSelectScalar = {
id?: boolean;
type?: boolean;
operationName?: boolean;
code?: boolean;
used?: boolean;
outdated?: boolean;
userId?: boolean;
externalTenantId?: boolean;
createdAt?: boolean;
updatedAt?: boolean;
};
export type TwoFactorCodeOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "type" | "operationName" | "code" | "used" | "outdated" | "userId" | "externalTenantId" | "createdAt" | "updatedAt", ExtArgs["result"]["twoFactorCode"]>;
export type TwoFactorCodeInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
TwoFactorUser?: boolean | Prisma.TwoFactorUserDefaultArgs<ExtArgs>;
};
export type TwoFactorCodeIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
TwoFactorUser?: boolean | Prisma.TwoFactorUserDefaultArgs<ExtArgs>;
};
export type TwoFactorCodeIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
TwoFactorUser?: boolean | Prisma.TwoFactorUserDefaultArgs<ExtArgs>;
};
export type $TwoFactorCodePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "TwoFactorCode";
objects: {
TwoFactorUser: Prisma.$TwoFactorUserPayload<ExtArgs>;
};
scalars: runtime.Types.Extensions.GetPayloadResult<{
/**
* @DtoCreateHidden
*/
id: string;
type: string;
operationName: string;
code: string;
used: boolean;
outdated: boolean;
userId: string;
externalTenantId: string;
/**
* @DtoCreateHidden
* @DtoUpdateHidden
*/
createdAt: Date;
/**
* @DtoCreateHidden
* @DtoUpdateHidden
*/
updatedAt: Date;
}, ExtArgs["result"]["twoFactorCode"]>;
composites: {};
};
export type TwoFactorCodeGetPayload<S extends boolean | null | undefined | TwoFactorCodeDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$TwoFactorCodePayload, S>;
export type TwoFactorCodeCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = Omit<TwoFactorCodeFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
select?: TwoFactorCodeCountAggregateInputType | true;
};
export interface TwoFactorCodeDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
[K: symbol]: {
types: Prisma.TypeMap<ExtArgs>['model']['TwoFactorCode'];
meta: {
name: 'TwoFactorCode';
};
};
/**
* Find zero or one TwoFactorCode that matches the filter.
* @param {TwoFactorCodeFindUniqueArgs} args - Arguments to find a TwoFactorCode
* @example
* // Get one TwoFactorCode
* const twoFactorCode = await prisma.twoFactorCode.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends TwoFactorCodeFindUniqueArgs>(args: Prisma.SelectSubset<T, TwoFactorCodeFindUniqueArgs<ExtArgs>>): Prisma.Prisma__TwoFactorCodeClient<runtime.Types.Result.GetResult<Prisma.$TwoFactorCodePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
/**
* Find one TwoFactorCode that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {TwoFactorCodeFindUniqueOrThrowArgs} args - Arguments to find a TwoFactorCode
* @example
* // Get one TwoFactorCode
* const twoFactorCode = await prisma.twoFactorCode.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends TwoFactorCodeFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, TwoFactorCodeFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__TwoFactorCodeClient<runtime.Types.Result.GetResult<Prisma.$TwoFactorCodePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
/**
* Find the first TwoFactorCode 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 {TwoFactorCodeFindFirstArgs} args - Arguments to find a TwoFactorCode
* @example
* // Get one TwoFactorCode
* const twoFactorCode = await prisma.twoFactorCode.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends TwoFactorCodeFindFirstArgs>(args?: Prisma.SelectSubset<T, TwoFactorCodeFindFirstArgs<ExtArgs>>): Prisma.Prisma__TwoFactorCodeClient<runtime.Types.Result.GetResult<Prisma.$TwoFactorCodePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
/**
* Find the first TwoFactorCode 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 {TwoFactorCodeFindFirstOrThrowArgs} args - Arguments to find a TwoFactorCode
* @example
* // Get one TwoFactorCode
* const twoFactorCode = await prisma.twoFactorCode.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends TwoFactorCodeFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, TwoFactorCodeFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__TwoFactorCodeClient<runtime.Types.Result.GetResult<Prisma.$TwoFactorCodePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
/**
* Find zero or more TwoFactorCodes 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 {TwoFactorCodeFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all TwoFactorCodes
* const twoFactorCodes = await prisma.twoFactorCode.findMany()
*
* // Get first 10 TwoFactorCodes
* const twoFactorCodes = await prisma.twoFactorCode.findMany({ take: 10 })
*
* // Only select the `id`
* const twoFactorCodeWithIdOnly = await prisma.twoFactorCode.findMany({ select: { id: true } })
*
*/
findMany<T extends TwoFactorCodeFindManyArgs>(args?: Prisma.SelectSubset<T, TwoFactorCodeFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$TwoFactorCodePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>;
/**
* Create a TwoFactorCode.
* @param {TwoFactorCodeCreateArgs} args - Arguments to create a TwoFactorCode.
* @example
* // Create one TwoFactorCode
* const TwoFactorCode = await prisma.twoFactorCode.create({
* data: {
* // ... data to create a TwoFactorCode
* }
* })
*
*/
create<T extends TwoFactorCodeCreateArgs>(args: Prisma.SelectSubset<T, TwoFactorCodeCreateArgs<ExtArgs>>): Prisma.Prisma__TwoFactorCodeClient<runtime.Types.Result.GetResult<Prisma.$TwoFactorCodePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
/**
* Create many TwoFactorCodes.
* @param {TwoFactorCodeCreateManyArgs} args - Arguments to create many TwoFactorCodes.
* @example
* // Create many TwoFactorCodes
* const twoFactorCode = await prisma.twoFactorCode.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends TwoFactorCodeCreateManyArgs>(args?: Prisma.SelectSubset<T, TwoFactorCodeCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
/**
* Create many TwoFactorCodes and returns the data saved in the database.
* @param {TwoFactorCodeCreateManyAndReturnArgs} args - Arguments to create many TwoFactorCodes.
* @example
* // Create many TwoFactorCodes
* const twoFactorCode = await prisma.twoFactorCode.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many TwoFactorCodes and only return the `id`
* const twoFactorCodeWithIdOnly = await prisma.twoFactorCode.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 TwoFactorCodeCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, TwoFactorCodeCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$TwoFactorCodePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>;
/**
* Delete a TwoFactorCode.
* @param {TwoFactorCodeDeleteArgs} args - Arguments to delete one TwoFactorCode.
* @example
* // Delete one TwoFactorCode
* const TwoFactorCode = await prisma.twoFactorCode.delete({
* where: {
* // ... filter to delete one TwoFactorCode
* }
* })
*
*/
delete<T extends TwoFactorCodeDeleteArgs>(args: Prisma.SelectSubset<T, TwoFactorCodeDeleteArgs<ExtArgs>>): Prisma.Prisma__TwoFactorCodeClient<runtime.Types.Result.GetResult<Prisma.$TwoFactorCodePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
/**
* Update one TwoFactorCode.
* @param {TwoFactorCodeUpdateArgs} args - Arguments to update one TwoFactorCode.
* @example
* // Update one TwoFactorCode
* const twoFactorCode = await prisma.twoFactorCode.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends TwoFactorCodeUpdateArgs>(args: Prisma.SelectSubset<T, TwoFactorCodeUpdateArgs<ExtArgs>>): Prisma.Prisma__TwoFactorCodeClient<runtime.Types.Result.GetResult<Prisma.$TwoFactorCodePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
/**
* Delete zero or more TwoFactorCodes.
* @param {TwoFactorCodeDeleteManyArgs} args - Arguments to filter TwoFactorCodes to delete.
* @example
* // Delete a few TwoFactorCodes
* const { count } = await prisma.twoFactorCode.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends TwoFactorCodeDeleteManyArgs>(args?: Prisma.SelectSubset<T, TwoFactorCodeDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
/**
* Update zero or more TwoFactorCodes.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {TwoFactorCodeUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many TwoFactorCodes
* const twoFactorCode = await prisma.twoFactorCode.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends TwoFactorCodeUpdateManyArgs>(args: Prisma.SelectSubset<T, TwoFactorCodeUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
/**
* Update zero or more TwoFactorCodes and returns the data updated in the database.
* @param {TwoFactorCodeUpdateManyAndReturnArgs} args - Arguments to update many TwoFactorCodes.
* @example
* // Update many TwoFactorCodes
* const twoFactorCode = await prisma.twoFactorCode.updateManyAndReturn({
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
*
* // Update zero or more TwoFactorCodes and only return the `id`
* const twoFactorCodeWithIdOnly = await prisma.twoFactorCode.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 TwoFactorCodeUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, TwoFactorCodeUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$TwoFactorCodePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>;
/**
* Create or update one TwoFactorCode.
* @param {TwoFactorCodeUpsertArgs} args - Arguments to update or create a TwoFactorCode.
* @example
* // Update or create a TwoFactorCode
* const twoFactorCode = await prisma.twoFactorCode.upsert({
* create: {
* // ... data to create a TwoFactorCode
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the TwoFactorCode we want to update
* }
* })
*/
upsert<T extends TwoFactorCodeUpsertArgs>(args: Prisma.SelectSubset<T, TwoFactorCodeUpsertArgs<ExtArgs>>): Prisma.Prisma__TwoFactorCodeClient<runtime.Types.Result.GetResult<Prisma.$TwoFactorCodePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
/**
* Count the number of TwoFactorCodes.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {TwoFactorCodeCountArgs} args - Arguments to filter TwoFactorCodes to count.
* @example
* // Count the number of TwoFactorCodes
* const count = await prisma.twoFactorCode.count({
* where: {
* // ... the filter for the TwoFactorCodes we want to count
* }
* })
**/
count<T extends TwoFactorCodeCountArgs>(args?: Prisma.Subset<T, TwoFactorCodeCountArgs>): Prisma.PrismaPromise<T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType<T['select'], TwoFactorCodeCountAggregateOutputType> : number>;
/**
* Allows you to perform aggregations operations on a TwoFactorCode.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {TwoFactorCodeAggregateArgs} 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 TwoFactorCodeAggregateArgs>(args: Prisma.Subset<T, TwoFactorCodeAggregateArgs>): Prisma.PrismaPromise<GetTwoFactorCodeAggregateType<T>>;
/**
* Group by TwoFactorCode.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {TwoFactorCodeGroupByArgs} 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 TwoFactorCodeGroupByArgs, HasSelectOrTake extends Prisma.Or<Prisma.Extends<'skip', Prisma.Keys<T>>, Prisma.Extends<'take', Prisma.Keys<T>>>, OrderByArg extends Prisma.True extends HasSelectOrTake ? {
orderBy: TwoFactorCodeGroupByArgs['orderBy'];
} : {
orderBy?: TwoFactorCodeGroupByArgs['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, TwoFactorCodeGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetTwoFactorCodeGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>;
/**
* Fields of the TwoFactorCode model
*/
readonly fields: TwoFactorCodeFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for TwoFactorCode.
* 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__TwoFactorCodeClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise";
TwoFactorUser<T extends Prisma.TwoFactorUserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.TwoFactorUserDefaultArgs<ExtArgs>>): Prisma.Prisma__TwoFactorUserClient<runtime.Types.Result.GetResult<Prisma.$TwoFactorUserPayload<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 TwoFactorCode model
*/
export interface TwoFactorCodeFieldRefs {
readonly id: Prisma.FieldRef<"TwoFactorCode", 'String'>;
readonly type: Prisma.FieldRef<"TwoFactorCode", 'String'>;
readonly operationName: Prisma.FieldRef<"TwoFactorCode", 'String'>;
readonly code: Prisma.FieldRef<"TwoFactorCode", 'String'>;
readonly used: Prisma.FieldRef<"TwoFactorCode", 'Boolean'>;
readonly outdated: Prisma.FieldRef<"TwoFactorCode", 'Boolean'>;
readonly userId: Prisma.FieldRef<"TwoFactorCode", 'String'>;
readonly externalTenantId: Prisma.FieldRef<"TwoFactorCode", 'String'>;
readonly createdAt: Prisma.FieldRef<"TwoFactorCode", 'DateTime'>;
readonly updatedAt: Prisma.FieldRef<"TwoFactorCode", 'DateTime'>;
}
/**
* TwoFactorCode findUnique
*/
export type TwoFactorCodeFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TwoFactorCode
*/
select?: Prisma.TwoFactorCodeSelect<ExtArgs> | null;
/**
* Omit specific fields from the TwoFactorCode
*/
omit?: Prisma.TwoFactorCodeOmit<ExtArgs> | null;
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TwoFactorCodeInclude<ExtArgs> | null;
/**
* Filter, which TwoFactorCode to fetch.
*/
where: Prisma.TwoFactorCodeWhereUniqueInput;
};
/**
* TwoFactorCode findUniqueOrThrow
*/
export type TwoFactorCodeFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TwoFactorCode
*/
select?: Prisma.TwoFactorCodeSelect<ExtArgs> | null;
/**
* Omit specific fields from the TwoFactorCode
*/
omit?: Prisma.TwoFactorCodeOmit<ExtArgs> | null;
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TwoFactorCodeInclude<ExtArgs> | null;
/**
* Filter, which TwoFactorCode to fetch.
*/
where: Prisma.TwoFactorCodeWhereUniqueInput;
};
/**
* TwoFactorCode findFirst
*/
export type TwoFactorCodeFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the TwoFactorCode
*/
select?: Prisma.TwoFactorCodeSelect<ExtArgs> | null;
/**
* Omit specific fields from the TwoFactorCode
*/
omit?: Prisma.TwoFactorCodeOmit<ExtArgs> | null;
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.TwoFactorCodeInclude<ExtArgs> | null;
/**
* Filter, which TwoFactorCode to fetch.
*/
where?: Prisma.