mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 11:38:47 +00:00
1383 lines
49 KiB
TypeScript
Generated
1383 lines
49 KiB
TypeScript
Generated
|
|
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
/* eslint-disable */
|
|
// biome-ignore-all lint: generated file
|
|
// @ts-nocheck
|
|
/*
|
|
* This file exports the `ApiToken` model and its related types.
|
|
*
|
|
* 🟢 You can import this file directly.
|
|
*/
|
|
|
|
import type * as PJTG from '../pjtg';
|
|
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 ApiToken
|
|
*
|
|
*/
|
|
export type ApiTokenModel = runtime.Types.Result.DefaultSelection<Prisma.$ApiTokenPayload>
|
|
|
|
export type AggregateApiToken = {
|
|
_count: ApiTokenCountAggregateOutputType | null
|
|
_min: ApiTokenMinAggregateOutputType | null
|
|
_max: ApiTokenMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type ApiTokenMinAggregateOutputType = {
|
|
id: string | null
|
|
token: string | null
|
|
name: string | null
|
|
userId: string | null
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
}
|
|
|
|
export type ApiTokenMaxAggregateOutputType = {
|
|
id: string | null
|
|
token: string | null
|
|
name: string | null
|
|
userId: string | null
|
|
createdAt: Date | null
|
|
updatedAt: Date | null
|
|
}
|
|
|
|
export type ApiTokenCountAggregateOutputType = {
|
|
id: number
|
|
token: number
|
|
name: number
|
|
userId: number
|
|
createdAt: number
|
|
updatedAt: number
|
|
_all: number
|
|
}
|
|
|
|
|
|
export type ApiTokenMinAggregateInputType = {
|
|
id?: true
|
|
token?: true
|
|
name?: true
|
|
userId?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
}
|
|
|
|
export type ApiTokenMaxAggregateInputType = {
|
|
id?: true
|
|
token?: true
|
|
name?: true
|
|
userId?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
}
|
|
|
|
export type ApiTokenCountAggregateInputType = {
|
|
id?: true
|
|
token?: true
|
|
name?: true
|
|
userId?: true
|
|
createdAt?: true
|
|
updatedAt?: true
|
|
_all?: true
|
|
}
|
|
|
|
export type ApiTokenAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which ApiToken to aggregate.
|
|
*/
|
|
where?: Prisma.ApiTokenWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of ApiTokens to fetch.
|
|
*/
|
|
orderBy?: Prisma.ApiTokenOrderByWithRelationInput | Prisma.ApiTokenOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the start position
|
|
*/
|
|
cursor?: Prisma.ApiTokenWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` ApiTokens 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` ApiTokens.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Count returned ApiTokens
|
|
**/
|
|
_count?: true | ApiTokenCountAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the minimum value
|
|
**/
|
|
_min?: ApiTokenMinAggregateInputType
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
*
|
|
* Select which fields to find the maximum value
|
|
**/
|
|
_max?: ApiTokenMaxAggregateInputType
|
|
}
|
|
|
|
export type GetApiTokenAggregateType<T extends ApiTokenAggregateArgs> = {
|
|
[P in keyof T & keyof AggregateApiToken]: P extends '_count' | 'count'
|
|
? T[P] extends true
|
|
? number
|
|
: Prisma.GetScalarType<T[P], AggregateApiToken[P]>
|
|
: Prisma.GetScalarType<T[P], AggregateApiToken[P]>
|
|
}
|
|
|
|
|
|
|
|
|
|
export type ApiTokenGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
where?: Prisma.ApiTokenWhereInput
|
|
orderBy?: Prisma.ApiTokenOrderByWithAggregationInput | Prisma.ApiTokenOrderByWithAggregationInput[]
|
|
by: Prisma.ApiTokenScalarFieldEnum[] | Prisma.ApiTokenScalarFieldEnum
|
|
having?: Prisma.ApiTokenScalarWhereWithAggregatesInput
|
|
take?: number
|
|
skip?: number
|
|
_count?: ApiTokenCountAggregateInputType | true
|
|
_min?: ApiTokenMinAggregateInputType
|
|
_max?: ApiTokenMaxAggregateInputType
|
|
}
|
|
|
|
export type ApiTokenGroupByOutputType = {
|
|
id: string
|
|
token: string
|
|
name: string
|
|
userId: string
|
|
createdAt: Date
|
|
updatedAt: Date
|
|
_count: ApiTokenCountAggregateOutputType | null
|
|
_min: ApiTokenMinAggregateOutputType | null
|
|
_max: ApiTokenMaxAggregateOutputType | null
|
|
}
|
|
|
|
export type GetApiTokenGroupByPayload<T extends ApiTokenGroupByArgs> = Prisma.PrismaPromise<
|
|
Array<
|
|
Prisma.PickEnumerable<ApiTokenGroupByOutputType, T['by']> &
|
|
{
|
|
[P in ((keyof T) & (keyof ApiTokenGroupByOutputType))]: P extends '_count'
|
|
? T[P] extends boolean
|
|
? number
|
|
: Prisma.GetScalarType<T[P], ApiTokenGroupByOutputType[P]>
|
|
: Prisma.GetScalarType<T[P], ApiTokenGroupByOutputType[P]>
|
|
}
|
|
>
|
|
>
|
|
|
|
|
|
|
|
export type ApiTokenWhereInput = {
|
|
AND?: Prisma.ApiTokenWhereInput | Prisma.ApiTokenWhereInput[]
|
|
OR?: Prisma.ApiTokenWhereInput[]
|
|
NOT?: Prisma.ApiTokenWhereInput | Prisma.ApiTokenWhereInput[]
|
|
id?: Prisma.StringFilter<"ApiToken"> | string
|
|
token?: Prisma.StringFilter<"ApiToken"> | string
|
|
name?: Prisma.StringFilter<"ApiToken"> | string
|
|
userId?: Prisma.StringFilter<"ApiToken"> | string
|
|
createdAt?: Prisma.DateTimeFilter<"ApiToken"> | Date | string
|
|
updatedAt?: Prisma.DateTimeFilter<"ApiToken"> | Date | string
|
|
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
|
}
|
|
|
|
export type ApiTokenOrderByWithRelationInput = {
|
|
id?: Prisma.SortOrder
|
|
token?: Prisma.SortOrder
|
|
name?: Prisma.SortOrder
|
|
userId?: Prisma.SortOrder
|
|
createdAt?: Prisma.SortOrder
|
|
updatedAt?: Prisma.SortOrder
|
|
user?: Prisma.UserOrderByWithRelationInput
|
|
}
|
|
|
|
export type ApiTokenWhereUniqueInput = Prisma.AtLeast<{
|
|
id?: string
|
|
token?: string
|
|
AND?: Prisma.ApiTokenWhereInput | Prisma.ApiTokenWhereInput[]
|
|
OR?: Prisma.ApiTokenWhereInput[]
|
|
NOT?: Prisma.ApiTokenWhereInput | Prisma.ApiTokenWhereInput[]
|
|
name?: Prisma.StringFilter<"ApiToken"> | string
|
|
userId?: Prisma.StringFilter<"ApiToken"> | string
|
|
createdAt?: Prisma.DateTimeFilter<"ApiToken"> | Date | string
|
|
updatedAt?: Prisma.DateTimeFilter<"ApiToken"> | Date | string
|
|
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
|
}, "id" | "token">
|
|
|
|
export type ApiTokenOrderByWithAggregationInput = {
|
|
id?: Prisma.SortOrder
|
|
token?: Prisma.SortOrder
|
|
name?: Prisma.SortOrder
|
|
userId?: Prisma.SortOrder
|
|
createdAt?: Prisma.SortOrder
|
|
updatedAt?: Prisma.SortOrder
|
|
_count?: Prisma.ApiTokenCountOrderByAggregateInput
|
|
_max?: Prisma.ApiTokenMaxOrderByAggregateInput
|
|
_min?: Prisma.ApiTokenMinOrderByAggregateInput
|
|
}
|
|
|
|
export type ApiTokenScalarWhereWithAggregatesInput = {
|
|
AND?: Prisma.ApiTokenScalarWhereWithAggregatesInput | Prisma.ApiTokenScalarWhereWithAggregatesInput[]
|
|
OR?: Prisma.ApiTokenScalarWhereWithAggregatesInput[]
|
|
NOT?: Prisma.ApiTokenScalarWhereWithAggregatesInput | Prisma.ApiTokenScalarWhereWithAggregatesInput[]
|
|
id?: Prisma.StringWithAggregatesFilter<"ApiToken"> | string
|
|
token?: Prisma.StringWithAggregatesFilter<"ApiToken"> | string
|
|
name?: Prisma.StringWithAggregatesFilter<"ApiToken"> | string
|
|
userId?: Prisma.StringWithAggregatesFilter<"ApiToken"> | string
|
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"ApiToken"> | Date | string
|
|
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"ApiToken"> | Date | string
|
|
}
|
|
|
|
export type ApiTokenCreateInput = {
|
|
id?: string
|
|
token?: string
|
|
name: string
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
user: Prisma.UserCreateNestedOneWithoutApiTokensInput
|
|
}
|
|
|
|
export type ApiTokenUncheckedCreateInput = {
|
|
id?: string
|
|
token?: string
|
|
name: string
|
|
userId: string
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type ApiTokenUpdateInput = {
|
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
token?: Prisma.StringFieldUpdateOperationsInput | string
|
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
user?: Prisma.UserUpdateOneRequiredWithoutApiTokensNestedInput
|
|
}
|
|
|
|
export type ApiTokenUncheckedUpdateInput = {
|
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
token?: Prisma.StringFieldUpdateOperationsInput | string
|
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type ApiTokenCreateManyInput = {
|
|
id?: string
|
|
token?: string
|
|
name: string
|
|
userId: string
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type ApiTokenUpdateManyMutationInput = {
|
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
token?: Prisma.StringFieldUpdateOperationsInput | string
|
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type ApiTokenUncheckedUpdateManyInput = {
|
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
token?: Prisma.StringFieldUpdateOperationsInput | string
|
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type ApiTokenListRelationFilter = {
|
|
every?: Prisma.ApiTokenWhereInput
|
|
some?: Prisma.ApiTokenWhereInput
|
|
none?: Prisma.ApiTokenWhereInput
|
|
}
|
|
|
|
export type ApiTokenOrderByRelationAggregateInput = {
|
|
_count?: Prisma.SortOrder
|
|
}
|
|
|
|
export type ApiTokenCountOrderByAggregateInput = {
|
|
id?: Prisma.SortOrder
|
|
token?: Prisma.SortOrder
|
|
name?: Prisma.SortOrder
|
|
userId?: Prisma.SortOrder
|
|
createdAt?: Prisma.SortOrder
|
|
updatedAt?: Prisma.SortOrder
|
|
}
|
|
|
|
export type ApiTokenMaxOrderByAggregateInput = {
|
|
id?: Prisma.SortOrder
|
|
token?: Prisma.SortOrder
|
|
name?: Prisma.SortOrder
|
|
userId?: Prisma.SortOrder
|
|
createdAt?: Prisma.SortOrder
|
|
updatedAt?: Prisma.SortOrder
|
|
}
|
|
|
|
export type ApiTokenMinOrderByAggregateInput = {
|
|
id?: Prisma.SortOrder
|
|
token?: Prisma.SortOrder
|
|
name?: Prisma.SortOrder
|
|
userId?: Prisma.SortOrder
|
|
createdAt?: Prisma.SortOrder
|
|
updatedAt?: Prisma.SortOrder
|
|
}
|
|
|
|
export type ApiTokenCreateNestedManyWithoutUserInput = {
|
|
create?: Prisma.XOR<Prisma.ApiTokenCreateWithoutUserInput, Prisma.ApiTokenUncheckedCreateWithoutUserInput> | Prisma.ApiTokenCreateWithoutUserInput[] | Prisma.ApiTokenUncheckedCreateWithoutUserInput[]
|
|
connectOrCreate?: Prisma.ApiTokenCreateOrConnectWithoutUserInput | Prisma.ApiTokenCreateOrConnectWithoutUserInput[]
|
|
createMany?: Prisma.ApiTokenCreateManyUserInputEnvelope
|
|
connect?: Prisma.ApiTokenWhereUniqueInput | Prisma.ApiTokenWhereUniqueInput[]
|
|
}
|
|
|
|
export type ApiTokenUncheckedCreateNestedManyWithoutUserInput = {
|
|
create?: Prisma.XOR<Prisma.ApiTokenCreateWithoutUserInput, Prisma.ApiTokenUncheckedCreateWithoutUserInput> | Prisma.ApiTokenCreateWithoutUserInput[] | Prisma.ApiTokenUncheckedCreateWithoutUserInput[]
|
|
connectOrCreate?: Prisma.ApiTokenCreateOrConnectWithoutUserInput | Prisma.ApiTokenCreateOrConnectWithoutUserInput[]
|
|
createMany?: Prisma.ApiTokenCreateManyUserInputEnvelope
|
|
connect?: Prisma.ApiTokenWhereUniqueInput | Prisma.ApiTokenWhereUniqueInput[]
|
|
}
|
|
|
|
export type ApiTokenUpdateManyWithoutUserNestedInput = {
|
|
create?: Prisma.XOR<Prisma.ApiTokenCreateWithoutUserInput, Prisma.ApiTokenUncheckedCreateWithoutUserInput> | Prisma.ApiTokenCreateWithoutUserInput[] | Prisma.ApiTokenUncheckedCreateWithoutUserInput[]
|
|
connectOrCreate?: Prisma.ApiTokenCreateOrConnectWithoutUserInput | Prisma.ApiTokenCreateOrConnectWithoutUserInput[]
|
|
upsert?: Prisma.ApiTokenUpsertWithWhereUniqueWithoutUserInput | Prisma.ApiTokenUpsertWithWhereUniqueWithoutUserInput[]
|
|
createMany?: Prisma.ApiTokenCreateManyUserInputEnvelope
|
|
set?: Prisma.ApiTokenWhereUniqueInput | Prisma.ApiTokenWhereUniqueInput[]
|
|
disconnect?: Prisma.ApiTokenWhereUniqueInput | Prisma.ApiTokenWhereUniqueInput[]
|
|
delete?: Prisma.ApiTokenWhereUniqueInput | Prisma.ApiTokenWhereUniqueInput[]
|
|
connect?: Prisma.ApiTokenWhereUniqueInput | Prisma.ApiTokenWhereUniqueInput[]
|
|
update?: Prisma.ApiTokenUpdateWithWhereUniqueWithoutUserInput | Prisma.ApiTokenUpdateWithWhereUniqueWithoutUserInput[]
|
|
updateMany?: Prisma.ApiTokenUpdateManyWithWhereWithoutUserInput | Prisma.ApiTokenUpdateManyWithWhereWithoutUserInput[]
|
|
deleteMany?: Prisma.ApiTokenScalarWhereInput | Prisma.ApiTokenScalarWhereInput[]
|
|
}
|
|
|
|
export type ApiTokenUncheckedUpdateManyWithoutUserNestedInput = {
|
|
create?: Prisma.XOR<Prisma.ApiTokenCreateWithoutUserInput, Prisma.ApiTokenUncheckedCreateWithoutUserInput> | Prisma.ApiTokenCreateWithoutUserInput[] | Prisma.ApiTokenUncheckedCreateWithoutUserInput[]
|
|
connectOrCreate?: Prisma.ApiTokenCreateOrConnectWithoutUserInput | Prisma.ApiTokenCreateOrConnectWithoutUserInput[]
|
|
upsert?: Prisma.ApiTokenUpsertWithWhereUniqueWithoutUserInput | Prisma.ApiTokenUpsertWithWhereUniqueWithoutUserInput[]
|
|
createMany?: Prisma.ApiTokenCreateManyUserInputEnvelope
|
|
set?: Prisma.ApiTokenWhereUniqueInput | Prisma.ApiTokenWhereUniqueInput[]
|
|
disconnect?: Prisma.ApiTokenWhereUniqueInput | Prisma.ApiTokenWhereUniqueInput[]
|
|
delete?: Prisma.ApiTokenWhereUniqueInput | Prisma.ApiTokenWhereUniqueInput[]
|
|
connect?: Prisma.ApiTokenWhereUniqueInput | Prisma.ApiTokenWhereUniqueInput[]
|
|
update?: Prisma.ApiTokenUpdateWithWhereUniqueWithoutUserInput | Prisma.ApiTokenUpdateWithWhereUniqueWithoutUserInput[]
|
|
updateMany?: Prisma.ApiTokenUpdateManyWithWhereWithoutUserInput | Prisma.ApiTokenUpdateManyWithWhereWithoutUserInput[]
|
|
deleteMany?: Prisma.ApiTokenScalarWhereInput | Prisma.ApiTokenScalarWhereInput[]
|
|
}
|
|
|
|
export type ApiTokenCreateWithoutUserInput = {
|
|
id?: string
|
|
token?: string
|
|
name: string
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type ApiTokenUncheckedCreateWithoutUserInput = {
|
|
id?: string
|
|
token?: string
|
|
name: string
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type ApiTokenCreateOrConnectWithoutUserInput = {
|
|
where: Prisma.ApiTokenWhereUniqueInput
|
|
create: Prisma.XOR<Prisma.ApiTokenCreateWithoutUserInput, Prisma.ApiTokenUncheckedCreateWithoutUserInput>
|
|
}
|
|
|
|
export type ApiTokenCreateManyUserInputEnvelope = {
|
|
data: Prisma.ApiTokenCreateManyUserInput | Prisma.ApiTokenCreateManyUserInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
export type ApiTokenUpsertWithWhereUniqueWithoutUserInput = {
|
|
where: Prisma.ApiTokenWhereUniqueInput
|
|
update: Prisma.XOR<Prisma.ApiTokenUpdateWithoutUserInput, Prisma.ApiTokenUncheckedUpdateWithoutUserInput>
|
|
create: Prisma.XOR<Prisma.ApiTokenCreateWithoutUserInput, Prisma.ApiTokenUncheckedCreateWithoutUserInput>
|
|
}
|
|
|
|
export type ApiTokenUpdateWithWhereUniqueWithoutUserInput = {
|
|
where: Prisma.ApiTokenWhereUniqueInput
|
|
data: Prisma.XOR<Prisma.ApiTokenUpdateWithoutUserInput, Prisma.ApiTokenUncheckedUpdateWithoutUserInput>
|
|
}
|
|
|
|
export type ApiTokenUpdateManyWithWhereWithoutUserInput = {
|
|
where: Prisma.ApiTokenScalarWhereInput
|
|
data: Prisma.XOR<Prisma.ApiTokenUpdateManyMutationInput, Prisma.ApiTokenUncheckedUpdateManyWithoutUserInput>
|
|
}
|
|
|
|
export type ApiTokenScalarWhereInput = {
|
|
AND?: Prisma.ApiTokenScalarWhereInput | Prisma.ApiTokenScalarWhereInput[]
|
|
OR?: Prisma.ApiTokenScalarWhereInput[]
|
|
NOT?: Prisma.ApiTokenScalarWhereInput | Prisma.ApiTokenScalarWhereInput[]
|
|
id?: Prisma.StringFilter<"ApiToken"> | string
|
|
token?: Prisma.StringFilter<"ApiToken"> | string
|
|
name?: Prisma.StringFilter<"ApiToken"> | string
|
|
userId?: Prisma.StringFilter<"ApiToken"> | string
|
|
createdAt?: Prisma.DateTimeFilter<"ApiToken"> | Date | string
|
|
updatedAt?: Prisma.DateTimeFilter<"ApiToken"> | Date | string
|
|
}
|
|
|
|
export type ApiTokenCreateManyUserInput = {
|
|
id?: string
|
|
token?: string
|
|
name: string
|
|
createdAt?: Date | string
|
|
updatedAt?: Date | string
|
|
}
|
|
|
|
export type ApiTokenUpdateWithoutUserInput = {
|
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
token?: Prisma.StringFieldUpdateOperationsInput | string
|
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type ApiTokenUncheckedUpdateWithoutUserInput = {
|
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
token?: Prisma.StringFieldUpdateOperationsInput | string
|
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
export type ApiTokenUncheckedUpdateManyWithoutUserInput = {
|
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
token?: Prisma.StringFieldUpdateOperationsInput | string
|
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
}
|
|
|
|
|
|
|
|
export type ApiTokenSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
|
id?: boolean
|
|
token?: boolean
|
|
name?: boolean
|
|
userId?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["apiToken"]>
|
|
|
|
export type ApiTokenSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
|
id?: boolean
|
|
token?: boolean
|
|
name?: boolean
|
|
userId?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["apiToken"]>
|
|
|
|
export type ApiTokenSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
|
id?: boolean
|
|
token?: boolean
|
|
name?: boolean
|
|
userId?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
}, ExtArgs["result"]["apiToken"]>
|
|
|
|
export type ApiTokenSelectScalar = {
|
|
id?: boolean
|
|
token?: boolean
|
|
name?: boolean
|
|
userId?: boolean
|
|
createdAt?: boolean
|
|
updatedAt?: boolean
|
|
}
|
|
|
|
export type ApiTokenOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "token" | "name" | "userId" | "createdAt" | "updatedAt", ExtArgs["result"]["apiToken"]>
|
|
export type ApiTokenInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
}
|
|
export type ApiTokenIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
}
|
|
export type ApiTokenIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
}
|
|
|
|
export type $ApiTokenPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
name: "ApiToken"
|
|
objects: {
|
|
user: Prisma.$UserPayload<ExtArgs>
|
|
}
|
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
|
id: string
|
|
token: string
|
|
name: string
|
|
userId: string
|
|
createdAt: Date
|
|
updatedAt: Date
|
|
}, ExtArgs["result"]["apiToken"]>
|
|
composites: {}
|
|
}
|
|
|
|
export type ApiTokenGetPayload<S extends boolean | null | undefined | ApiTokenDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$ApiTokenPayload, S>
|
|
|
|
export type ApiTokenCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
|
|
Omit<ApiTokenFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
|
|
select?: ApiTokenCountAggregateInputType | true
|
|
}
|
|
|
|
export interface ApiTokenDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
|
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['ApiToken'], meta: { name: 'ApiToken' } }
|
|
/**
|
|
* Find zero or one ApiToken that matches the filter.
|
|
* @param {ApiTokenFindUniqueArgs} args - Arguments to find a ApiToken
|
|
* @example
|
|
* // Get one ApiToken
|
|
* const apiToken = await prisma.apiToken.findUnique({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUnique<T extends ApiTokenFindUniqueArgs>(args: Prisma.SelectSubset<T, ApiTokenFindUniqueArgs<ExtArgs>>): Prisma.Prisma__ApiTokenClient<runtime.Types.Result.GetResult<Prisma.$ApiTokenPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find one ApiToken that matches the filter or throw an error with `error.code='P2025'`
|
|
* if no matches were found.
|
|
* @param {ApiTokenFindUniqueOrThrowArgs} args - Arguments to find a ApiToken
|
|
* @example
|
|
* // Get one ApiToken
|
|
* const apiToken = await prisma.apiToken.findUniqueOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findUniqueOrThrow<T extends ApiTokenFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, ApiTokenFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__ApiTokenClient<runtime.Types.Result.GetResult<Prisma.$ApiTokenPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find the first ApiToken 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 {ApiTokenFindFirstArgs} args - Arguments to find a ApiToken
|
|
* @example
|
|
* // Get one ApiToken
|
|
* const apiToken = await prisma.apiToken.findFirst({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirst<T extends ApiTokenFindFirstArgs>(args?: Prisma.SelectSubset<T, ApiTokenFindFirstArgs<ExtArgs>>): Prisma.Prisma__ApiTokenClient<runtime.Types.Result.GetResult<Prisma.$ApiTokenPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find the first ApiToken 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 {ApiTokenFindFirstOrThrowArgs} args - Arguments to find a ApiToken
|
|
* @example
|
|
* // Get one ApiToken
|
|
* const apiToken = await prisma.apiToken.findFirstOrThrow({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*/
|
|
findFirstOrThrow<T extends ApiTokenFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, ApiTokenFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__ApiTokenClient<runtime.Types.Result.GetResult<Prisma.$ApiTokenPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Find zero or more ApiTokens 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 {ApiTokenFindManyArgs} args - Arguments to filter and select certain fields only.
|
|
* @example
|
|
* // Get all ApiTokens
|
|
* const apiTokens = await prisma.apiToken.findMany()
|
|
*
|
|
* // Get first 10 ApiTokens
|
|
* const apiTokens = await prisma.apiToken.findMany({ take: 10 })
|
|
*
|
|
* // Only select the `id`
|
|
* const apiTokenWithIdOnly = await prisma.apiToken.findMany({ select: { id: true } })
|
|
*
|
|
*/
|
|
findMany<T extends ApiTokenFindManyArgs>(args?: Prisma.SelectSubset<T, ApiTokenFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ApiTokenPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
|
|
|
|
/**
|
|
* Create a ApiToken.
|
|
* @param {ApiTokenCreateArgs} args - Arguments to create a ApiToken.
|
|
* @example
|
|
* // Create one ApiToken
|
|
* const ApiToken = await prisma.apiToken.create({
|
|
* data: {
|
|
* // ... data to create a ApiToken
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
create<T extends ApiTokenCreateArgs>(args: Prisma.SelectSubset<T, ApiTokenCreateArgs<ExtArgs>>): Prisma.Prisma__ApiTokenClient<runtime.Types.Result.GetResult<Prisma.$ApiTokenPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Create many ApiTokens.
|
|
* @param {ApiTokenCreateManyArgs} args - Arguments to create many ApiTokens.
|
|
* @example
|
|
* // Create many ApiTokens
|
|
* const apiToken = await prisma.apiToken.createMany({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
*/
|
|
createMany<T extends ApiTokenCreateManyArgs>(args?: Prisma.SelectSubset<T, ApiTokenCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
|
|
|
|
/**
|
|
* Create many ApiTokens and returns the data saved in the database.
|
|
* @param {ApiTokenCreateManyAndReturnArgs} args - Arguments to create many ApiTokens.
|
|
* @example
|
|
* // Create many ApiTokens
|
|
* const apiToken = await prisma.apiToken.createManyAndReturn({
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
* // Create many ApiTokens and only return the `id`
|
|
* const apiTokenWithIdOnly = await prisma.apiToken.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 ApiTokenCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, ApiTokenCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ApiTokenPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
|
|
|
|
/**
|
|
* Delete a ApiToken.
|
|
* @param {ApiTokenDeleteArgs} args - Arguments to delete one ApiToken.
|
|
* @example
|
|
* // Delete one ApiToken
|
|
* const ApiToken = await prisma.apiToken.delete({
|
|
* where: {
|
|
* // ... filter to delete one ApiToken
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
delete<T extends ApiTokenDeleteArgs>(args: Prisma.SelectSubset<T, ApiTokenDeleteArgs<ExtArgs>>): Prisma.Prisma__ApiTokenClient<runtime.Types.Result.GetResult<Prisma.$ApiTokenPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Update one ApiToken.
|
|
* @param {ApiTokenUpdateArgs} args - Arguments to update one ApiToken.
|
|
* @example
|
|
* // Update one ApiToken
|
|
* const apiToken = await prisma.apiToken.update({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
update<T extends ApiTokenUpdateArgs>(args: Prisma.SelectSubset<T, ApiTokenUpdateArgs<ExtArgs>>): Prisma.Prisma__ApiTokenClient<runtime.Types.Result.GetResult<Prisma.$ApiTokenPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
/**
|
|
* Delete zero or more ApiTokens.
|
|
* @param {ApiTokenDeleteManyArgs} args - Arguments to filter ApiTokens to delete.
|
|
* @example
|
|
* // Delete a few ApiTokens
|
|
* const { count } = await prisma.apiToken.deleteMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
deleteMany<T extends ApiTokenDeleteManyArgs>(args?: Prisma.SelectSubset<T, ApiTokenDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more ApiTokens.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ApiTokenUpdateManyArgs} args - Arguments to update one or more rows.
|
|
* @example
|
|
* // Update many ApiTokens
|
|
* const apiToken = await prisma.apiToken.updateMany({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: {
|
|
* // ... provide data here
|
|
* }
|
|
* })
|
|
*
|
|
*/
|
|
updateMany<T extends ApiTokenUpdateManyArgs>(args: Prisma.SelectSubset<T, ApiTokenUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
|
|
|
|
/**
|
|
* Update zero or more ApiTokens and returns the data updated in the database.
|
|
* @param {ApiTokenUpdateManyAndReturnArgs} args - Arguments to update many ApiTokens.
|
|
* @example
|
|
* // Update many ApiTokens
|
|
* const apiToken = await prisma.apiToken.updateManyAndReturn({
|
|
* where: {
|
|
* // ... provide filter here
|
|
* },
|
|
* data: [
|
|
* // ... provide data here
|
|
* ]
|
|
* })
|
|
*
|
|
* // Update zero or more ApiTokens and only return the `id`
|
|
* const apiTokenWithIdOnly = await prisma.apiToken.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 ApiTokenUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, ApiTokenUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ApiTokenPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
|
|
|
|
/**
|
|
* Create or update one ApiToken.
|
|
* @param {ApiTokenUpsertArgs} args - Arguments to update or create a ApiToken.
|
|
* @example
|
|
* // Update or create a ApiToken
|
|
* const apiToken = await prisma.apiToken.upsert({
|
|
* create: {
|
|
* // ... data to create a ApiToken
|
|
* },
|
|
* update: {
|
|
* // ... in case it already exists, update
|
|
* },
|
|
* where: {
|
|
* // ... the filter for the ApiToken we want to update
|
|
* }
|
|
* })
|
|
*/
|
|
upsert<T extends ApiTokenUpsertArgs>(args: Prisma.SelectSubset<T, ApiTokenUpsertArgs<ExtArgs>>): Prisma.Prisma__ApiTokenClient<runtime.Types.Result.GetResult<Prisma.$ApiTokenPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
|
|
|
|
/**
|
|
* Count the number of ApiTokens.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ApiTokenCountArgs} args - Arguments to filter ApiTokens to count.
|
|
* @example
|
|
* // Count the number of ApiTokens
|
|
* const count = await prisma.apiToken.count({
|
|
* where: {
|
|
* // ... the filter for the ApiTokens we want to count
|
|
* }
|
|
* })
|
|
**/
|
|
count<T extends ApiTokenCountArgs>(
|
|
args?: Prisma.Subset<T, ApiTokenCountArgs>,
|
|
): Prisma.PrismaPromise<
|
|
T extends runtime.Types.Utils.Record<'select', any>
|
|
? T['select'] extends true
|
|
? number
|
|
: Prisma.GetScalarType<T['select'], ApiTokenCountAggregateOutputType>
|
|
: number
|
|
>
|
|
|
|
/**
|
|
* Allows you to perform aggregations operations on a ApiToken.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ApiTokenAggregateArgs} 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 ApiTokenAggregateArgs>(args: Prisma.Subset<T, ApiTokenAggregateArgs>): Prisma.PrismaPromise<GetApiTokenAggregateType<T>>
|
|
|
|
/**
|
|
* Group by ApiToken.
|
|
* Note, that providing `undefined` is treated as the value not being there.
|
|
* Read more here: https://pris.ly/d/null-undefined
|
|
* @param {ApiTokenGroupByArgs} 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 ApiTokenGroupByArgs,
|
|
HasSelectOrTake extends Prisma.Or<
|
|
Prisma.Extends<'skip', Prisma.Keys<T>>,
|
|
Prisma.Extends<'take', Prisma.Keys<T>>
|
|
>,
|
|
OrderByArg extends Prisma.True extends HasSelectOrTake
|
|
? { orderBy: ApiTokenGroupByArgs['orderBy'] }
|
|
: { orderBy?: ApiTokenGroupByArgs['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, ApiTokenGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetApiTokenGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
|
/**
|
|
* Fields of the ApiToken model
|
|
*/
|
|
readonly fields: ApiTokenFieldRefs;
|
|
}
|
|
|
|
/**
|
|
* The delegate class that acts as a "Promise-like" for ApiToken.
|
|
* 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__ApiTokenClient<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 ApiToken model
|
|
*/
|
|
export interface ApiTokenFieldRefs {
|
|
readonly id: Prisma.FieldRef<"ApiToken", 'String'>
|
|
readonly token: Prisma.FieldRef<"ApiToken", 'String'>
|
|
readonly name: Prisma.FieldRef<"ApiToken", 'String'>
|
|
readonly userId: Prisma.FieldRef<"ApiToken", 'String'>
|
|
readonly createdAt: Prisma.FieldRef<"ApiToken", 'DateTime'>
|
|
readonly updatedAt: Prisma.FieldRef<"ApiToken", 'DateTime'>
|
|
}
|
|
|
|
|
|
// Custom InputTypes
|
|
/**
|
|
* ApiToken findUnique
|
|
*/
|
|
export type ApiTokenFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the ApiToken
|
|
*/
|
|
select?: Prisma.ApiTokenSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the ApiToken
|
|
*/
|
|
omit?: Prisma.ApiTokenOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.ApiTokenInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which ApiToken to fetch.
|
|
*/
|
|
where: Prisma.ApiTokenWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* ApiToken findUniqueOrThrow
|
|
*/
|
|
export type ApiTokenFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the ApiToken
|
|
*/
|
|
select?: Prisma.ApiTokenSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the ApiToken
|
|
*/
|
|
omit?: Prisma.ApiTokenOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.ApiTokenInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which ApiToken to fetch.
|
|
*/
|
|
where: Prisma.ApiTokenWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* ApiToken findFirst
|
|
*/
|
|
export type ApiTokenFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the ApiToken
|
|
*/
|
|
select?: Prisma.ApiTokenSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the ApiToken
|
|
*/
|
|
omit?: Prisma.ApiTokenOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.ApiTokenInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which ApiToken to fetch.
|
|
*/
|
|
where?: Prisma.ApiTokenWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of ApiTokens to fetch.
|
|
*/
|
|
orderBy?: Prisma.ApiTokenOrderByWithRelationInput | Prisma.ApiTokenOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for ApiTokens.
|
|
*/
|
|
cursor?: Prisma.ApiTokenWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` ApiTokens 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` ApiTokens.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of ApiTokens.
|
|
*/
|
|
distinct?: Prisma.ApiTokenScalarFieldEnum | Prisma.ApiTokenScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* ApiToken findFirstOrThrow
|
|
*/
|
|
export type ApiTokenFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the ApiToken
|
|
*/
|
|
select?: Prisma.ApiTokenSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the ApiToken
|
|
*/
|
|
omit?: Prisma.ApiTokenOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.ApiTokenInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which ApiToken to fetch.
|
|
*/
|
|
where?: Prisma.ApiTokenWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of ApiTokens to fetch.
|
|
*/
|
|
orderBy?: Prisma.ApiTokenOrderByWithRelationInput | Prisma.ApiTokenOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for searching for ApiTokens.
|
|
*/
|
|
cursor?: Prisma.ApiTokenWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` ApiTokens 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` ApiTokens.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of ApiTokens.
|
|
*/
|
|
distinct?: Prisma.ApiTokenScalarFieldEnum | Prisma.ApiTokenScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* ApiToken findMany
|
|
*/
|
|
export type ApiTokenFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the ApiToken
|
|
*/
|
|
select?: Prisma.ApiTokenSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the ApiToken
|
|
*/
|
|
omit?: Prisma.ApiTokenOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.ApiTokenInclude<ExtArgs> | null
|
|
/**
|
|
* Filter, which ApiTokens to fetch.
|
|
*/
|
|
where?: Prisma.ApiTokenWhereInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
*
|
|
* Determine the order of ApiTokens to fetch.
|
|
*/
|
|
orderBy?: Prisma.ApiTokenOrderByWithRelationInput | Prisma.ApiTokenOrderByWithRelationInput[]
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
|
|
*
|
|
* Sets the position for listing ApiTokens.
|
|
*/
|
|
cursor?: Prisma.ApiTokenWhereUniqueInput
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
*
|
|
* Take `±n` ApiTokens 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` ApiTokens.
|
|
*/
|
|
skip?: number
|
|
/**
|
|
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
*
|
|
* Filter by unique combinations of ApiTokens.
|
|
*/
|
|
distinct?: Prisma.ApiTokenScalarFieldEnum | Prisma.ApiTokenScalarFieldEnum[]
|
|
}
|
|
|
|
/**
|
|
* ApiToken create
|
|
*/
|
|
export type ApiTokenCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the ApiToken
|
|
*/
|
|
select?: Prisma.ApiTokenSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the ApiToken
|
|
*/
|
|
omit?: Prisma.ApiTokenOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.ApiTokenInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to create a ApiToken.
|
|
*/
|
|
data: Prisma.XOR<Prisma.ApiTokenCreateInput, Prisma.ApiTokenUncheckedCreateInput>
|
|
}
|
|
|
|
/**
|
|
* ApiToken createMany
|
|
*/
|
|
export type ApiTokenCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to create many ApiTokens.
|
|
*/
|
|
data: Prisma.ApiTokenCreateManyInput | Prisma.ApiTokenCreateManyInput[]
|
|
skipDuplicates?: boolean
|
|
}
|
|
|
|
/**
|
|
* ApiToken createManyAndReturn
|
|
*/
|
|
export type ApiTokenCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the ApiToken
|
|
*/
|
|
select?: Prisma.ApiTokenSelectCreateManyAndReturn<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the ApiToken
|
|
*/
|
|
omit?: Prisma.ApiTokenOmit<ExtArgs> | null
|
|
/**
|
|
* The data used to create many ApiTokens.
|
|
*/
|
|
data: Prisma.ApiTokenCreateManyInput | Prisma.ApiTokenCreateManyInput[]
|
|
skipDuplicates?: boolean
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.ApiTokenIncludeCreateManyAndReturn<ExtArgs> | null
|
|
}
|
|
|
|
/**
|
|
* ApiToken update
|
|
*/
|
|
export type ApiTokenUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the ApiToken
|
|
*/
|
|
select?: Prisma.ApiTokenSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the ApiToken
|
|
*/
|
|
omit?: Prisma.ApiTokenOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.ApiTokenInclude<ExtArgs> | null
|
|
/**
|
|
* The data needed to update a ApiToken.
|
|
*/
|
|
data: Prisma.XOR<Prisma.ApiTokenUpdateInput, Prisma.ApiTokenUncheckedUpdateInput>
|
|
/**
|
|
* Choose, which ApiToken to update.
|
|
*/
|
|
where: Prisma.ApiTokenWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* ApiToken updateMany
|
|
*/
|
|
export type ApiTokenUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* The data used to update ApiTokens.
|
|
*/
|
|
data: Prisma.XOR<Prisma.ApiTokenUpdateManyMutationInput, Prisma.ApiTokenUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which ApiTokens to update
|
|
*/
|
|
where?: Prisma.ApiTokenWhereInput
|
|
/**
|
|
* Limit how many ApiTokens to update.
|
|
*/
|
|
limit?: number
|
|
}
|
|
|
|
/**
|
|
* ApiToken updateManyAndReturn
|
|
*/
|
|
export type ApiTokenUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the ApiToken
|
|
*/
|
|
select?: Prisma.ApiTokenSelectUpdateManyAndReturn<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the ApiToken
|
|
*/
|
|
omit?: Prisma.ApiTokenOmit<ExtArgs> | null
|
|
/**
|
|
* The data used to update ApiTokens.
|
|
*/
|
|
data: Prisma.XOR<Prisma.ApiTokenUpdateManyMutationInput, Prisma.ApiTokenUncheckedUpdateManyInput>
|
|
/**
|
|
* Filter which ApiTokens to update
|
|
*/
|
|
where?: Prisma.ApiTokenWhereInput
|
|
/**
|
|
* Limit how many ApiTokens to update.
|
|
*/
|
|
limit?: number
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.ApiTokenIncludeUpdateManyAndReturn<ExtArgs> | null
|
|
}
|
|
|
|
/**
|
|
* ApiToken upsert
|
|
*/
|
|
export type ApiTokenUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the ApiToken
|
|
*/
|
|
select?: Prisma.ApiTokenSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the ApiToken
|
|
*/
|
|
omit?: Prisma.ApiTokenOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.ApiTokenInclude<ExtArgs> | null
|
|
/**
|
|
* The filter to search for the ApiToken to update in case it exists.
|
|
*/
|
|
where: Prisma.ApiTokenWhereUniqueInput
|
|
/**
|
|
* In case the ApiToken found by the `where` argument doesn't exist, create a new ApiToken with this data.
|
|
*/
|
|
create: Prisma.XOR<Prisma.ApiTokenCreateInput, Prisma.ApiTokenUncheckedCreateInput>
|
|
/**
|
|
* In case the ApiToken was found with the provided `where` argument, update it with this data.
|
|
*/
|
|
update: Prisma.XOR<Prisma.ApiTokenUpdateInput, Prisma.ApiTokenUncheckedUpdateInput>
|
|
}
|
|
|
|
/**
|
|
* ApiToken delete
|
|
*/
|
|
export type ApiTokenDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the ApiToken
|
|
*/
|
|
select?: Prisma.ApiTokenSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the ApiToken
|
|
*/
|
|
omit?: Prisma.ApiTokenOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.ApiTokenInclude<ExtArgs> | null
|
|
/**
|
|
* Filter which ApiToken to delete.
|
|
*/
|
|
where: Prisma.ApiTokenWhereUniqueInput
|
|
}
|
|
|
|
/**
|
|
* ApiToken deleteMany
|
|
*/
|
|
export type ApiTokenDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Filter which ApiTokens to delete
|
|
*/
|
|
where?: Prisma.ApiTokenWhereInput
|
|
/**
|
|
* Limit how many ApiTokens to delete.
|
|
*/
|
|
limit?: number
|
|
}
|
|
|
|
/**
|
|
* ApiToken without action
|
|
*/
|
|
export type ApiTokenDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
/**
|
|
* Select specific fields to fetch from the ApiToken
|
|
*/
|
|
select?: Prisma.ApiTokenSelect<ExtArgs> | null
|
|
/**
|
|
* Omit specific fields from the ApiToken
|
|
*/
|
|
omit?: Prisma.ApiTokenOmit<ExtArgs> | null
|
|
/**
|
|
* Choose, which related nodes to fetch as well
|
|
*/
|
|
include?: Prisma.ApiTokenInclude<ExtArgs> | null
|
|
}
|