import type * as runtime from "@prisma/client/runtime/client"; import type * as $Enums from "../enums"; import type * as Prisma from "../internal/prismaNamespace"; /** * Model Token * */ export type TokenModel = runtime.Types.Result.DefaultSelection; export type AggregateToken = { _count: TokenCountAggregateOutputType | null; _avg: TokenAvgAggregateOutputType | null; _sum: TokenSumAggregateOutputType | null; _min: TokenMinAggregateOutputType | null; _max: TokenMaxAggregateOutputType | null; }; export type TokenAvgAggregateOutputType = { id: number | null; userId: number | null; }; export type TokenSumAggregateOutputType = { id: number | null; userId: number | null; }; export type TokenMinAggregateOutputType = { id: number | null; tokenHash: string | null; userId: number | null; scope: $Enums.TokenScope | null; surface: $Enums.Surface | null; createdAt: Date | null; lastUsedAt: Date | null; revokedAt: Date | null; }; export type TokenMaxAggregateOutputType = { id: number | null; tokenHash: string | null; userId: number | null; scope: $Enums.TokenScope | null; surface: $Enums.Surface | null; createdAt: Date | null; lastUsedAt: Date | null; revokedAt: Date | null; }; export type TokenCountAggregateOutputType = { id: number; tokenHash: number; userId: number; scope: number; surface: number; createdAt: number; lastUsedAt: number; revokedAt: number; _all: number; }; export type TokenAvgAggregateInputType = { id?: true; userId?: true; }; export type TokenSumAggregateInputType = { id?: true; userId?: true; }; export type TokenMinAggregateInputType = { id?: true; tokenHash?: true; userId?: true; scope?: true; surface?: true; createdAt?: true; lastUsedAt?: true; revokedAt?: true; }; export type TokenMaxAggregateInputType = { id?: true; tokenHash?: true; userId?: true; scope?: true; surface?: true; createdAt?: true; lastUsedAt?: true; revokedAt?: true; }; export type TokenCountAggregateInputType = { id?: true; tokenHash?: true; userId?: true; scope?: true; surface?: true; createdAt?: true; lastUsedAt?: true; revokedAt?: true; _all?: true; }; export type TokenAggregateArgs = { /** * Filter which Token to aggregate. */ where?: Prisma.TokenWhereInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Tokens to fetch. */ orderBy?: Prisma.TokenOrderByWithRelationInput | Prisma.TokenOrderByWithRelationInput[]; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.TokenWhereUniqueInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Tokens 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` Tokens. */ skip?: number; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Tokens **/ _count?: true | TokenCountAggregateInputType; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: TokenAvgAggregateInputType; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: TokenSumAggregateInputType; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: TokenMinAggregateInputType; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: TokenMaxAggregateInputType; }; export type GetTokenAggregateType = { [P in keyof T & keyof AggregateToken]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType; }; export type TokenGroupByArgs = { where?: Prisma.TokenWhereInput; orderBy?: Prisma.TokenOrderByWithAggregationInput | Prisma.TokenOrderByWithAggregationInput[]; by: Prisma.TokenScalarFieldEnum[] | Prisma.TokenScalarFieldEnum; having?: Prisma.TokenScalarWhereWithAggregatesInput; take?: number; skip?: number; _count?: TokenCountAggregateInputType | true; _avg?: TokenAvgAggregateInputType; _sum?: TokenSumAggregateInputType; _min?: TokenMinAggregateInputType; _max?: TokenMaxAggregateInputType; }; export type TokenGroupByOutputType = { id: number; tokenHash: string; userId: number; scope: $Enums.TokenScope; surface: $Enums.Surface; createdAt: Date; lastUsedAt: Date; revokedAt: Date | null; _count: TokenCountAggregateOutputType | null; _avg: TokenAvgAggregateOutputType | null; _sum: TokenSumAggregateOutputType | null; _min: TokenMinAggregateOutputType | null; _max: TokenMaxAggregateOutputType | null; }; type GetTokenGroupByPayload = Prisma.PrismaPromise & { [P in ((keyof T) & (keyof TokenGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType; }>>; export type TokenWhereInput = { AND?: Prisma.TokenWhereInput | Prisma.TokenWhereInput[]; OR?: Prisma.TokenWhereInput[]; NOT?: Prisma.TokenWhereInput | Prisma.TokenWhereInput[]; id?: Prisma.IntFilter<"Token"> | number; tokenHash?: Prisma.StringFilter<"Token"> | string; userId?: Prisma.IntFilter<"Token"> | number; scope?: Prisma.EnumTokenScopeFilter<"Token"> | $Enums.TokenScope; surface?: Prisma.EnumSurfaceFilter<"Token"> | $Enums.Surface; createdAt?: Prisma.DateTimeFilter<"Token"> | Date | string; lastUsedAt?: Prisma.DateTimeFilter<"Token"> | Date | string; revokedAt?: Prisma.DateTimeNullableFilter<"Token"> | Date | string | null; user?: Prisma.XOR; }; export type TokenOrderByWithRelationInput = { id?: Prisma.SortOrder; tokenHash?: Prisma.SortOrder; userId?: Prisma.SortOrder; scope?: Prisma.SortOrder; surface?: Prisma.SortOrder; createdAt?: Prisma.SortOrder; lastUsedAt?: Prisma.SortOrder; revokedAt?: Prisma.SortOrderInput | Prisma.SortOrder; user?: Prisma.UserOrderByWithRelationInput; }; export type TokenWhereUniqueInput = Prisma.AtLeast<{ id?: number; tokenHash?: string; AND?: Prisma.TokenWhereInput | Prisma.TokenWhereInput[]; OR?: Prisma.TokenWhereInput[]; NOT?: Prisma.TokenWhereInput | Prisma.TokenWhereInput[]; userId?: Prisma.IntFilter<"Token"> | number; scope?: Prisma.EnumTokenScopeFilter<"Token"> | $Enums.TokenScope; surface?: Prisma.EnumSurfaceFilter<"Token"> | $Enums.Surface; createdAt?: Prisma.DateTimeFilter<"Token"> | Date | string; lastUsedAt?: Prisma.DateTimeFilter<"Token"> | Date | string; revokedAt?: Prisma.DateTimeNullableFilter<"Token"> | Date | string | null; user?: Prisma.XOR; }, "id" | "tokenHash">; export type TokenOrderByWithAggregationInput = { id?: Prisma.SortOrder; tokenHash?: Prisma.SortOrder; userId?: Prisma.SortOrder; scope?: Prisma.SortOrder; surface?: Prisma.SortOrder; createdAt?: Prisma.SortOrder; lastUsedAt?: Prisma.SortOrder; revokedAt?: Prisma.SortOrderInput | Prisma.SortOrder; _count?: Prisma.TokenCountOrderByAggregateInput; _avg?: Prisma.TokenAvgOrderByAggregateInput; _max?: Prisma.TokenMaxOrderByAggregateInput; _min?: Prisma.TokenMinOrderByAggregateInput; _sum?: Prisma.TokenSumOrderByAggregateInput; }; export type TokenScalarWhereWithAggregatesInput = { AND?: Prisma.TokenScalarWhereWithAggregatesInput | Prisma.TokenScalarWhereWithAggregatesInput[]; OR?: Prisma.TokenScalarWhereWithAggregatesInput[]; NOT?: Prisma.TokenScalarWhereWithAggregatesInput | Prisma.TokenScalarWhereWithAggregatesInput[]; id?: Prisma.IntWithAggregatesFilter<"Token"> | number; tokenHash?: Prisma.StringWithAggregatesFilter<"Token"> | string; userId?: Prisma.IntWithAggregatesFilter<"Token"> | number; scope?: Prisma.EnumTokenScopeWithAggregatesFilter<"Token"> | $Enums.TokenScope; surface?: Prisma.EnumSurfaceWithAggregatesFilter<"Token"> | $Enums.Surface; createdAt?: Prisma.DateTimeWithAggregatesFilter<"Token"> | Date | string; lastUsedAt?: Prisma.DateTimeWithAggregatesFilter<"Token"> | Date | string; revokedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Token"> | Date | string | null; }; export type TokenCreateInput = { tokenHash: string; scope: $Enums.TokenScope; surface: $Enums.Surface; createdAt?: Date | string; lastUsedAt?: Date | string; revokedAt?: Date | string | null; user: Prisma.UserCreateNestedOneWithoutTokensInput; }; export type TokenUncheckedCreateInput = { id?: number; tokenHash: string; userId: number; scope: $Enums.TokenScope; surface: $Enums.Surface; createdAt?: Date | string; lastUsedAt?: Date | string; revokedAt?: Date | string | null; }; export type TokenUpdateInput = { tokenHash?: Prisma.StringFieldUpdateOperationsInput | string; scope?: Prisma.EnumTokenScopeFieldUpdateOperationsInput | $Enums.TokenScope; surface?: Prisma.EnumSurfaceFieldUpdateOperationsInput | $Enums.Surface; createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; lastUsedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; user?: Prisma.UserUpdateOneRequiredWithoutTokensNestedInput; }; export type TokenUncheckedUpdateInput = { id?: Prisma.IntFieldUpdateOperationsInput | number; tokenHash?: Prisma.StringFieldUpdateOperationsInput | string; userId?: Prisma.IntFieldUpdateOperationsInput | number; scope?: Prisma.EnumTokenScopeFieldUpdateOperationsInput | $Enums.TokenScope; surface?: Prisma.EnumSurfaceFieldUpdateOperationsInput | $Enums.Surface; createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; lastUsedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; }; export type TokenCreateManyInput = { id?: number; tokenHash: string; userId: number; scope: $Enums.TokenScope; surface: $Enums.Surface; createdAt?: Date | string; lastUsedAt?: Date | string; revokedAt?: Date | string | null; }; export type TokenUpdateManyMutationInput = { tokenHash?: Prisma.StringFieldUpdateOperationsInput | string; scope?: Prisma.EnumTokenScopeFieldUpdateOperationsInput | $Enums.TokenScope; surface?: Prisma.EnumSurfaceFieldUpdateOperationsInput | $Enums.Surface; createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; lastUsedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; }; export type TokenUncheckedUpdateManyInput = { id?: Prisma.IntFieldUpdateOperationsInput | number; tokenHash?: Prisma.StringFieldUpdateOperationsInput | string; userId?: Prisma.IntFieldUpdateOperationsInput | number; scope?: Prisma.EnumTokenScopeFieldUpdateOperationsInput | $Enums.TokenScope; surface?: Prisma.EnumSurfaceFieldUpdateOperationsInput | $Enums.Surface; createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; lastUsedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; }; export type TokenListRelationFilter = { every?: Prisma.TokenWhereInput; some?: Prisma.TokenWhereInput; none?: Prisma.TokenWhereInput; }; export type TokenOrderByRelationAggregateInput = { _count?: Prisma.SortOrder; }; export type TokenCountOrderByAggregateInput = { id?: Prisma.SortOrder; tokenHash?: Prisma.SortOrder; userId?: Prisma.SortOrder; scope?: Prisma.SortOrder; surface?: Prisma.SortOrder; createdAt?: Prisma.SortOrder; lastUsedAt?: Prisma.SortOrder; revokedAt?: Prisma.SortOrder; }; export type TokenAvgOrderByAggregateInput = { id?: Prisma.SortOrder; userId?: Prisma.SortOrder; }; export type TokenMaxOrderByAggregateInput = { id?: Prisma.SortOrder; tokenHash?: Prisma.SortOrder; userId?: Prisma.SortOrder; scope?: Prisma.SortOrder; surface?: Prisma.SortOrder; createdAt?: Prisma.SortOrder; lastUsedAt?: Prisma.SortOrder; revokedAt?: Prisma.SortOrder; }; export type TokenMinOrderByAggregateInput = { id?: Prisma.SortOrder; tokenHash?: Prisma.SortOrder; userId?: Prisma.SortOrder; scope?: Prisma.SortOrder; surface?: Prisma.SortOrder; createdAt?: Prisma.SortOrder; lastUsedAt?: Prisma.SortOrder; revokedAt?: Prisma.SortOrder; }; export type TokenSumOrderByAggregateInput = { id?: Prisma.SortOrder; userId?: Prisma.SortOrder; }; export type TokenCreateNestedManyWithoutUserInput = { create?: Prisma.XOR | Prisma.TokenCreateWithoutUserInput[] | Prisma.TokenUncheckedCreateWithoutUserInput[]; connectOrCreate?: Prisma.TokenCreateOrConnectWithoutUserInput | Prisma.TokenCreateOrConnectWithoutUserInput[]; createMany?: Prisma.TokenCreateManyUserInputEnvelope; connect?: Prisma.TokenWhereUniqueInput | Prisma.TokenWhereUniqueInput[]; }; export type TokenUncheckedCreateNestedManyWithoutUserInput = { create?: Prisma.XOR | Prisma.TokenCreateWithoutUserInput[] | Prisma.TokenUncheckedCreateWithoutUserInput[]; connectOrCreate?: Prisma.TokenCreateOrConnectWithoutUserInput | Prisma.TokenCreateOrConnectWithoutUserInput[]; createMany?: Prisma.TokenCreateManyUserInputEnvelope; connect?: Prisma.TokenWhereUniqueInput | Prisma.TokenWhereUniqueInput[]; }; export type TokenUpdateManyWithoutUserNestedInput = { create?: Prisma.XOR | Prisma.TokenCreateWithoutUserInput[] | Prisma.TokenUncheckedCreateWithoutUserInput[]; connectOrCreate?: Prisma.TokenCreateOrConnectWithoutUserInput | Prisma.TokenCreateOrConnectWithoutUserInput[]; upsert?: Prisma.TokenUpsertWithWhereUniqueWithoutUserInput | Prisma.TokenUpsertWithWhereUniqueWithoutUserInput[]; createMany?: Prisma.TokenCreateManyUserInputEnvelope; set?: Prisma.TokenWhereUniqueInput | Prisma.TokenWhereUniqueInput[]; disconnect?: Prisma.TokenWhereUniqueInput | Prisma.TokenWhereUniqueInput[]; delete?: Prisma.TokenWhereUniqueInput | Prisma.TokenWhereUniqueInput[]; connect?: Prisma.TokenWhereUniqueInput | Prisma.TokenWhereUniqueInput[]; update?: Prisma.TokenUpdateWithWhereUniqueWithoutUserInput | Prisma.TokenUpdateWithWhereUniqueWithoutUserInput[]; updateMany?: Prisma.TokenUpdateManyWithWhereWithoutUserInput | Prisma.TokenUpdateManyWithWhereWithoutUserInput[]; deleteMany?: Prisma.TokenScalarWhereInput | Prisma.TokenScalarWhereInput[]; }; export type TokenUncheckedUpdateManyWithoutUserNestedInput = { create?: Prisma.XOR | Prisma.TokenCreateWithoutUserInput[] | Prisma.TokenUncheckedCreateWithoutUserInput[]; connectOrCreate?: Prisma.TokenCreateOrConnectWithoutUserInput | Prisma.TokenCreateOrConnectWithoutUserInput[]; upsert?: Prisma.TokenUpsertWithWhereUniqueWithoutUserInput | Prisma.TokenUpsertWithWhereUniqueWithoutUserInput[]; createMany?: Prisma.TokenCreateManyUserInputEnvelope; set?: Prisma.TokenWhereUniqueInput | Prisma.TokenWhereUniqueInput[]; disconnect?: Prisma.TokenWhereUniqueInput | Prisma.TokenWhereUniqueInput[]; delete?: Prisma.TokenWhereUniqueInput | Prisma.TokenWhereUniqueInput[]; connect?: Prisma.TokenWhereUniqueInput | Prisma.TokenWhereUniqueInput[]; update?: Prisma.TokenUpdateWithWhereUniqueWithoutUserInput | Prisma.TokenUpdateWithWhereUniqueWithoutUserInput[]; updateMany?: Prisma.TokenUpdateManyWithWhereWithoutUserInput | Prisma.TokenUpdateManyWithWhereWithoutUserInput[]; deleteMany?: Prisma.TokenScalarWhereInput | Prisma.TokenScalarWhereInput[]; }; export type StringFieldUpdateOperationsInput = { set?: string; }; export type EnumTokenScopeFieldUpdateOperationsInput = { set?: $Enums.TokenScope; }; export type EnumSurfaceFieldUpdateOperationsInput = { set?: $Enums.Surface; }; export type NullableDateTimeFieldUpdateOperationsInput = { set?: Date | string | null; }; export type TokenCreateWithoutUserInput = { tokenHash: string; scope: $Enums.TokenScope; surface: $Enums.Surface; createdAt?: Date | string; lastUsedAt?: Date | string; revokedAt?: Date | string | null; }; export type TokenUncheckedCreateWithoutUserInput = { id?: number; tokenHash: string; scope: $Enums.TokenScope; surface: $Enums.Surface; createdAt?: Date | string; lastUsedAt?: Date | string; revokedAt?: Date | string | null; }; export type TokenCreateOrConnectWithoutUserInput = { where: Prisma.TokenWhereUniqueInput; create: Prisma.XOR; }; export type TokenCreateManyUserInputEnvelope = { data: Prisma.TokenCreateManyUserInput | Prisma.TokenCreateManyUserInput[]; skipDuplicates?: boolean; }; export type TokenUpsertWithWhereUniqueWithoutUserInput = { where: Prisma.TokenWhereUniqueInput; update: Prisma.XOR; create: Prisma.XOR; }; export type TokenUpdateWithWhereUniqueWithoutUserInput = { where: Prisma.TokenWhereUniqueInput; data: Prisma.XOR; }; export type TokenUpdateManyWithWhereWithoutUserInput = { where: Prisma.TokenScalarWhereInput; data: Prisma.XOR; }; export type TokenScalarWhereInput = { AND?: Prisma.TokenScalarWhereInput | Prisma.TokenScalarWhereInput[]; OR?: Prisma.TokenScalarWhereInput[]; NOT?: Prisma.TokenScalarWhereInput | Prisma.TokenScalarWhereInput[]; id?: Prisma.IntFilter<"Token"> | number; tokenHash?: Prisma.StringFilter<"Token"> | string; userId?: Prisma.IntFilter<"Token"> | number; scope?: Prisma.EnumTokenScopeFilter<"Token"> | $Enums.TokenScope; surface?: Prisma.EnumSurfaceFilter<"Token"> | $Enums.Surface; createdAt?: Prisma.DateTimeFilter<"Token"> | Date | string; lastUsedAt?: Prisma.DateTimeFilter<"Token"> | Date | string; revokedAt?: Prisma.DateTimeNullableFilter<"Token"> | Date | string | null; }; export type TokenCreateManyUserInput = { id?: number; tokenHash: string; scope: $Enums.TokenScope; surface: $Enums.Surface; createdAt?: Date | string; lastUsedAt?: Date | string; revokedAt?: Date | string | null; }; export type TokenUpdateWithoutUserInput = { tokenHash?: Prisma.StringFieldUpdateOperationsInput | string; scope?: Prisma.EnumTokenScopeFieldUpdateOperationsInput | $Enums.TokenScope; surface?: Prisma.EnumSurfaceFieldUpdateOperationsInput | $Enums.Surface; createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; lastUsedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; }; export type TokenUncheckedUpdateWithoutUserInput = { id?: Prisma.IntFieldUpdateOperationsInput | number; tokenHash?: Prisma.StringFieldUpdateOperationsInput | string; scope?: Prisma.EnumTokenScopeFieldUpdateOperationsInput | $Enums.TokenScope; surface?: Prisma.EnumSurfaceFieldUpdateOperationsInput | $Enums.Surface; createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; lastUsedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; }; export type TokenUncheckedUpdateManyWithoutUserInput = { id?: Prisma.IntFieldUpdateOperationsInput | number; tokenHash?: Prisma.StringFieldUpdateOperationsInput | string; scope?: Prisma.EnumTokenScopeFieldUpdateOperationsInput | $Enums.TokenScope; surface?: Prisma.EnumSurfaceFieldUpdateOperationsInput | $Enums.Surface; createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; lastUsedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string; revokedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null; }; export type TokenSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean; tokenHash?: boolean; userId?: boolean; scope?: boolean; surface?: boolean; createdAt?: boolean; lastUsedAt?: boolean; revokedAt?: boolean; user?: boolean | Prisma.UserDefaultArgs; }, ExtArgs["result"]["token"]>; export type TokenSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean; tokenHash?: boolean; userId?: boolean; scope?: boolean; surface?: boolean; createdAt?: boolean; lastUsedAt?: boolean; revokedAt?: boolean; user?: boolean | Prisma.UserDefaultArgs; }, ExtArgs["result"]["token"]>; export type TokenSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean; tokenHash?: boolean; userId?: boolean; scope?: boolean; surface?: boolean; createdAt?: boolean; lastUsedAt?: boolean; revokedAt?: boolean; user?: boolean | Prisma.UserDefaultArgs; }, ExtArgs["result"]["token"]>; export type TokenSelectScalar = { id?: boolean; tokenHash?: boolean; userId?: boolean; scope?: boolean; surface?: boolean; createdAt?: boolean; lastUsedAt?: boolean; revokedAt?: boolean; }; export type TokenOmit = runtime.Types.Extensions.GetOmit<"id" | "tokenHash" | "userId" | "scope" | "surface" | "createdAt" | "lastUsedAt" | "revokedAt", ExtArgs["result"]["token"]>; export type TokenInclude = { user?: boolean | Prisma.UserDefaultArgs; }; export type TokenIncludeCreateManyAndReturn = { user?: boolean | Prisma.UserDefaultArgs; }; export type TokenIncludeUpdateManyAndReturn = { user?: boolean | Prisma.UserDefaultArgs; }; export type $TokenPayload = { name: "Token"; objects: { user: Prisma.$UserPayload; }; scalars: runtime.Types.Extensions.GetPayloadResult<{ id: number; tokenHash: string; userId: number; scope: $Enums.TokenScope; surface: $Enums.Surface; createdAt: Date; lastUsedAt: Date; revokedAt: Date | null; }, ExtArgs["result"]["token"]>; composites: {}; }; export type TokenGetPayload = runtime.Types.Result.GetResult; export type TokenCountArgs = Omit & { select?: TokenCountAggregateInputType | true; }; export interface TokenDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['Token']; meta: { name: 'Token'; }; }; /** * Find zero or one Token that matches the filter. * @param {TokenFindUniqueArgs} args - Arguments to find a Token * @example * // Get one Token * const token = await prisma.token.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__TokenClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>; /** * Find one Token that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {TokenFindUniqueOrThrowArgs} args - Arguments to find a Token * @example * // Get one Token * const token = await prisma.token.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__TokenClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>; /** * Find the first Token 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 {TokenFindFirstArgs} args - Arguments to find a Token * @example * // Get one Token * const token = await prisma.token.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__TokenClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>; /** * Find the first Token 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 {TokenFindFirstOrThrowArgs} args - Arguments to find a Token * @example * // Get one Token * const token = await prisma.token.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__TokenClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>; /** * Find zero or more Tokens 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 {TokenFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Tokens * const tokens = await prisma.token.findMany() * * // Get first 10 Tokens * const tokens = await prisma.token.findMany({ take: 10 }) * * // Only select the `id` * const tokenWithIdOnly = await prisma.token.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>>; /** * Create a Token. * @param {TokenCreateArgs} args - Arguments to create a Token. * @example * // Create one Token * const Token = await prisma.token.create({ * data: { * // ... data to create a Token * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__TokenClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>; /** * Create many Tokens. * @param {TokenCreateManyArgs} args - Arguments to create many Tokens. * @example * // Create many Tokens * const token = await prisma.token.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise; /** * Create many Tokens and returns the data saved in the database. * @param {TokenCreateManyAndReturnArgs} args - Arguments to create many Tokens. * @example * // Create many Tokens * const token = await prisma.token.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Tokens and only return the `id` * const tokenWithIdOnly = await prisma.token.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(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>>; /** * Delete a Token. * @param {TokenDeleteArgs} args - Arguments to delete one Token. * @example * // Delete one Token * const Token = await prisma.token.delete({ * where: { * // ... filter to delete one Token * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__TokenClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>; /** * Update one Token. * @param {TokenUpdateArgs} args - Arguments to update one Token. * @example * // Update one Token * const token = await prisma.token.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__TokenClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>; /** * Delete zero or more Tokens. * @param {TokenDeleteManyArgs} args - Arguments to filter Tokens to delete. * @example * // Delete a few Tokens * const { count } = await prisma.token.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise; /** * Update zero or more Tokens. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {TokenUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Tokens * const token = await prisma.token.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise; /** * Update zero or more Tokens and returns the data updated in the database. * @param {TokenUpdateManyAndReturnArgs} args - Arguments to update many Tokens. * @example * // Update many Tokens * const token = await prisma.token.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more Tokens and only return the `id` * const tokenWithIdOnly = await prisma.token.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(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>>; /** * Create or update one Token. * @param {TokenUpsertArgs} args - Arguments to update or create a Token. * @example * // Update or create a Token * const token = await prisma.token.upsert({ * create: { * // ... data to create a Token * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Token we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__TokenClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>; /** * Count the number of Tokens. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {TokenCountArgs} args - Arguments to filter Tokens to count. * @example * // Count the number of Tokens * const count = await prisma.token.count({ * where: { * // ... the filter for the Tokens we want to count * } * }) **/ count(args?: Prisma.Subset): Prisma.PrismaPromise ? T['select'] extends true ? number : Prisma.GetScalarType : number>; /** * Allows you to perform aggregations operations on a Token. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {TokenAggregateArgs} 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(args: Prisma.Subset): Prisma.PrismaPromise>; /** * Group by Token. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {TokenGroupByArgs} 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>, Prisma.Extends<'take', Prisma.Keys>>, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: TokenGroupByArgs['orderBy']; } : { orderBy?: TokenGroupByArgs['orderBy']; }, OrderFields extends Prisma.ExcludeUnderscoreKeys>>, ByFields extends Prisma.MaybeTupleToUnion, ByValid extends Prisma.Has, HavingFields extends Prisma.GetHavingFields, HavingValid extends Prisma.Has, 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 ? 'orderBy' extends Prisma.Keys ? 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 ? 'orderBy' extends Prisma.Keys ? 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 & InputErrors): {} extends InputErrors ? GetTokenGroupByPayload : Prisma.PrismaPromise; /** * Fields of the Token model */ readonly fields: TokenFieldRefs; } /** * The delegate class that acts as a "Promise-like" for Token. * 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__TokenClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise"; user = {}>(args?: Prisma.Subset>): Prisma.Prisma__UserClient, 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(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise; /** * 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(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise; /** * 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; } /** * Fields of the Token model */ export interface TokenFieldRefs { readonly id: Prisma.FieldRef<"Token", 'Int'>; readonly tokenHash: Prisma.FieldRef<"Token", 'String'>; readonly userId: Prisma.FieldRef<"Token", 'Int'>; readonly scope: Prisma.FieldRef<"Token", 'TokenScope'>; readonly surface: Prisma.FieldRef<"Token", 'Surface'>; readonly createdAt: Prisma.FieldRef<"Token", 'DateTime'>; readonly lastUsedAt: Prisma.FieldRef<"Token", 'DateTime'>; readonly revokedAt: Prisma.FieldRef<"Token", 'DateTime'>; } /** * Token findUnique */ export type TokenFindUniqueArgs = { /** * Select specific fields to fetch from the Token */ select?: Prisma.TokenSelect | null; /** * Omit specific fields from the Token */ omit?: Prisma.TokenOmit | null; /** * Choose, which related nodes to fetch as well */ include?: Prisma.TokenInclude | null; /** * Filter, which Token to fetch. */ where: Prisma.TokenWhereUniqueInput; }; /** * Token findUniqueOrThrow */ export type TokenFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Token */ select?: Prisma.TokenSelect | null; /** * Omit specific fields from the Token */ omit?: Prisma.TokenOmit | null; /** * Choose, which related nodes to fetch as well */ include?: Prisma.TokenInclude | null; /** * Filter, which Token to fetch. */ where: Prisma.TokenWhereUniqueInput; }; /** * Token findFirst */ export type TokenFindFirstArgs = { /** * Select specific fields to fetch from the Token */ select?: Prisma.TokenSelect | null; /** * Omit specific fields from the Token */ omit?: Prisma.TokenOmit | null; /** * Choose, which related nodes to fetch as well */ include?: Prisma.TokenInclude | null; /** * Filter, which Token to fetch. */ where?: Prisma.TokenWhereInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Tokens to fetch. */ orderBy?: Prisma.TokenOrderByWithRelationInput | Prisma.TokenOrderByWithRelationInput[]; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Tokens. */ cursor?: Prisma.TokenWhereUniqueInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Tokens 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` Tokens. */ skip?: number; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Tokens. */ distinct?: Prisma.TokenScalarFieldEnum | Prisma.TokenScalarFieldEnum[]; }; /** * Token findFirstOrThrow */ export type TokenFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Token */ select?: Prisma.TokenSelect | null; /** * Omit specific fields from the Token */ omit?: Prisma.TokenOmit | null; /** * Choose, which related nodes to fetch as well */ include?: Prisma.TokenInclude | null; /** * Filter, which Token to fetch. */ where?: Prisma.TokenWhereInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Tokens to fetch. */ orderBy?: Prisma.TokenOrderByWithRelationInput | Prisma.TokenOrderByWithRelationInput[]; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Tokens. */ cursor?: Prisma.TokenWhereUniqueInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Tokens 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` Tokens. */ skip?: number; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Tokens. */ distinct?: Prisma.TokenScalarFieldEnum | Prisma.TokenScalarFieldEnum[]; }; /** * Token findMany */ export type TokenFindManyArgs = { /** * Select specific fields to fetch from the Token */ select?: Prisma.TokenSelect | null; /** * Omit specific fields from the Token */ omit?: Prisma.TokenOmit | null; /** * Choose, which related nodes to fetch as well */ include?: Prisma.TokenInclude | null; /** * Filter, which Tokens to fetch. */ where?: Prisma.TokenWhereInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Tokens to fetch. */ orderBy?: Prisma.TokenOrderByWithRelationInput | Prisma.TokenOrderByWithRelationInput[]; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Tokens. */ cursor?: Prisma.TokenWhereUniqueInput; /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Tokens 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` Tokens. */ skip?: number; distinct?: Prisma.TokenScalarFieldEnum | Prisma.TokenScalarFieldEnum[]; }; /** * Token create */ export type TokenCreateArgs = { /** * Select specific fields to fetch from the Token */ select?: Prisma.TokenSelect | null; /** * Omit specific fields from the Token */ omit?: Prisma.TokenOmit | null; /** * Choose, which related nodes to fetch as well */ include?: Prisma.TokenInclude | null; /** * The data needed to create a Token. */ data: Prisma.XOR; }; /** * Token createMany */ export type TokenCreateManyArgs = { /** * The data used to create many Tokens. */ data: Prisma.TokenCreateManyInput | Prisma.TokenCreateManyInput[]; skipDuplicates?: boolean; }; /** * Token createManyAndReturn */ export type TokenCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the Token */ select?: Prisma.TokenSelectCreateManyAndReturn | null; /** * Omit specific fields from the Token */ omit?: Prisma.TokenOmit | null; /** * The data used to create many Tokens. */ data: Prisma.TokenCreateManyInput | Prisma.TokenCreateManyInput[]; skipDuplicates?: boolean; /** * Choose, which related nodes to fetch as well */ include?: Prisma.TokenIncludeCreateManyAndReturn | null; }; /** * Token update */ export type TokenUpdateArgs = { /** * Select specific fields to fetch from the Token */ select?: Prisma.TokenSelect | null; /** * Omit specific fields from the Token */ omit?: Prisma.TokenOmit | null; /** * Choose, which related nodes to fetch as well */ include?: Prisma.TokenInclude | null; /** * The data needed to update a Token. */ data: Prisma.XOR; /** * Choose, which Token to update. */ where: Prisma.TokenWhereUniqueInput; }; /** * Token updateMany */ export type TokenUpdateManyArgs = { /** * The data used to update Tokens. */ data: Prisma.XOR; /** * Filter which Tokens to update */ where?: Prisma.TokenWhereInput; /** * Limit how many Tokens to update. */ limit?: number; }; /** * Token updateManyAndReturn */ export type TokenUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the Token */ select?: Prisma.TokenSelectUpdateManyAndReturn | null; /** * Omit specific fields from the Token */ omit?: Prisma.TokenOmit | null; /** * The data used to update Tokens. */ data: Prisma.XOR; /** * Filter which Tokens to update */ where?: Prisma.TokenWhereInput; /** * Limit how many Tokens to update. */ limit?: number; /** * Choose, which related nodes to fetch as well */ include?: Prisma.TokenIncludeUpdateManyAndReturn | null; }; /** * Token upsert */ export type TokenUpsertArgs = { /** * Select specific fields to fetch from the Token */ select?: Prisma.TokenSelect | null; /** * Omit specific fields from the Token */ omit?: Prisma.TokenOmit | null; /** * Choose, which related nodes to fetch as well */ include?: Prisma.TokenInclude | null; /** * The filter to search for the Token to update in case it exists. */ where: Prisma.TokenWhereUniqueInput; /** * In case the Token found by the `where` argument doesn't exist, create a new Token with this data. */ create: Prisma.XOR; /** * In case the Token was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR; }; /** * Token delete */ export type TokenDeleteArgs = { /** * Select specific fields to fetch from the Token */ select?: Prisma.TokenSelect | null; /** * Omit specific fields from the Token */ omit?: Prisma.TokenOmit | null; /** * Choose, which related nodes to fetch as well */ include?: Prisma.TokenInclude | null; /** * Filter which Token to delete. */ where: Prisma.TokenWhereUniqueInput; }; /** * Token deleteMany */ export type TokenDeleteManyArgs = { /** * Filter which Tokens to delete */ where?: Prisma.TokenWhereInput; /** * Limit how many Tokens to delete. */ limit?: number; }; /** * Token without action */ export type TokenDefaultArgs = { /** * Select specific fields to fetch from the Token */ select?: Prisma.TokenSelect | null; /** * Omit specific fields from the Token */ omit?: Prisma.TokenOmit | null; /** * Choose, which related nodes to fetch as well */ include?: Prisma.TokenInclude | null; }; export {}; //# sourceMappingURL=Token.d.ts.map