Files
shumai/packages/db/src/generated/prisma/models/AiUsage.ts
T

1816 lines
67 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 `AiUsage` 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 AiUsage
*
*/
export type AiUsageModel = runtime.Types.Result.DefaultSelection<Prisma.$AiUsagePayload>
export type AggregateAiUsage = {
_count: AiUsageCountAggregateOutputType | null
_avg: AiUsageAvgAggregateOutputType | null
_sum: AiUsageSumAggregateOutputType | null
_min: AiUsageMinAggregateOutputType | null
_max: AiUsageMaxAggregateOutputType | null
}
export type AiUsageAvgAggregateOutputType = {
inputTokens: number | null
outputTokens: number | null
cacheReadTokens: number | null
totalTokens: number | null
cost: number | null
}
export type AiUsageSumAggregateOutputType = {
inputTokens: bigint | null
outputTokens: bigint | null
cacheReadTokens: bigint | null
totalTokens: bigint | null
cost: number | null
}
export type AiUsageMinAggregateOutputType = {
id: string | null
teamId: string | null
userId: string | null
periodStart: Date | null
inputTokens: bigint | null
outputTokens: bigint | null
cacheReadTokens: bigint | null
totalTokens: bigint | null
cost: number | null
createdAt: Date | null
updatedAt: Date | null
}
export type AiUsageMaxAggregateOutputType = {
id: string | null
teamId: string | null
userId: string | null
periodStart: Date | null
inputTokens: bigint | null
outputTokens: bigint | null
cacheReadTokens: bigint | null
totalTokens: bigint | null
cost: number | null
createdAt: Date | null
updatedAt: Date | null
}
export type AiUsageCountAggregateOutputType = {
id: number
teamId: number
userId: number
periodStart: number
inputTokens: number
outputTokens: number
cacheReadTokens: number
totalTokens: number
cost: number
createdAt: number
updatedAt: number
_all: number
}
export type AiUsageAvgAggregateInputType = {
inputTokens?: true
outputTokens?: true
cacheReadTokens?: true
totalTokens?: true
cost?: true
}
export type AiUsageSumAggregateInputType = {
inputTokens?: true
outputTokens?: true
cacheReadTokens?: true
totalTokens?: true
cost?: true
}
export type AiUsageMinAggregateInputType = {
id?: true
teamId?: true
userId?: true
periodStart?: true
inputTokens?: true
outputTokens?: true
cacheReadTokens?: true
totalTokens?: true
cost?: true
createdAt?: true
updatedAt?: true
}
export type AiUsageMaxAggregateInputType = {
id?: true
teamId?: true
userId?: true
periodStart?: true
inputTokens?: true
outputTokens?: true
cacheReadTokens?: true
totalTokens?: true
cost?: true
createdAt?: true
updatedAt?: true
}
export type AiUsageCountAggregateInputType = {
id?: true
teamId?: true
userId?: true
periodStart?: true
inputTokens?: true
outputTokens?: true
cacheReadTokens?: true
totalTokens?: true
cost?: true
createdAt?: true
updatedAt?: true
_all?: true
}
export type AiUsageAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which AiUsage to aggregate.
*/
where?: Prisma.AiUsageWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of AiUsages to fetch.
*/
orderBy?: Prisma.AiUsageOrderByWithRelationInput | Prisma.AiUsageOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: Prisma.AiUsageWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` AiUsages 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` AiUsages.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned AiUsages
**/
_count?: true | AiUsageCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to average
**/
_avg?: AiUsageAvgAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to sum
**/
_sum?: AiUsageSumAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: AiUsageMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: AiUsageMaxAggregateInputType
}
export type GetAiUsageAggregateType<T extends AiUsageAggregateArgs> = {
[P in keyof T & keyof AggregateAiUsage]: P extends '_count' | 'count'
? T[P] extends true
? number
: Prisma.GetScalarType<T[P], AggregateAiUsage[P]>
: Prisma.GetScalarType<T[P], AggregateAiUsage[P]>
}
export type AiUsageGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.AiUsageWhereInput
orderBy?: Prisma.AiUsageOrderByWithAggregationInput | Prisma.AiUsageOrderByWithAggregationInput[]
by: Prisma.AiUsageScalarFieldEnum[] | Prisma.AiUsageScalarFieldEnum
having?: Prisma.AiUsageScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: AiUsageCountAggregateInputType | true
_avg?: AiUsageAvgAggregateInputType
_sum?: AiUsageSumAggregateInputType
_min?: AiUsageMinAggregateInputType
_max?: AiUsageMaxAggregateInputType
}
export type AiUsageGroupByOutputType = {
id: string
teamId: string
userId: string | null
periodStart: Date
inputTokens: bigint
outputTokens: bigint
cacheReadTokens: bigint
totalTokens: bigint
cost: number
createdAt: Date
updatedAt: Date
_count: AiUsageCountAggregateOutputType | null
_avg: AiUsageAvgAggregateOutputType | null
_sum: AiUsageSumAggregateOutputType | null
_min: AiUsageMinAggregateOutputType | null
_max: AiUsageMaxAggregateOutputType | null
}
export type GetAiUsageGroupByPayload<T extends AiUsageGroupByArgs> = Prisma.PrismaPromise<
Array<
Prisma.PickEnumerable<AiUsageGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof AiUsageGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: Prisma.GetScalarType<T[P], AiUsageGroupByOutputType[P]>
: Prisma.GetScalarType<T[P], AiUsageGroupByOutputType[P]>
}
>
>
export type AiUsageWhereInput = {
AND?: Prisma.AiUsageWhereInput | Prisma.AiUsageWhereInput[]
OR?: Prisma.AiUsageWhereInput[]
NOT?: Prisma.AiUsageWhereInput | Prisma.AiUsageWhereInput[]
id?: Prisma.StringFilter<"AiUsage"> | string
teamId?: Prisma.StringFilter<"AiUsage"> | string
userId?: Prisma.StringNullableFilter<"AiUsage"> | string | null
periodStart?: Prisma.DateTimeFilter<"AiUsage"> | Date | string
inputTokens?: Prisma.BigIntFilter<"AiUsage"> | bigint | number
outputTokens?: Prisma.BigIntFilter<"AiUsage"> | bigint | number
cacheReadTokens?: Prisma.BigIntFilter<"AiUsage"> | bigint | number
totalTokens?: Prisma.BigIntFilter<"AiUsage"> | bigint | number
cost?: Prisma.FloatFilter<"AiUsage"> | number
createdAt?: Prisma.DateTimeFilter<"AiUsage"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"AiUsage"> | Date | string
team?: Prisma.XOR<Prisma.TeamScalarRelationFilter, Prisma.TeamWhereInput>
user?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
}
export type AiUsageOrderByWithRelationInput = {
id?: Prisma.SortOrder
teamId?: Prisma.SortOrder
userId?: Prisma.SortOrderInput | Prisma.SortOrder
periodStart?: Prisma.SortOrder
inputTokens?: Prisma.SortOrder
outputTokens?: Prisma.SortOrder
cacheReadTokens?: Prisma.SortOrder
totalTokens?: Prisma.SortOrder
cost?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
team?: Prisma.TeamOrderByWithRelationInput
user?: Prisma.UserOrderByWithRelationInput
}
export type AiUsageWhereUniqueInput = Prisma.AtLeast<{
id?: string
teamId_userId_periodStart?: Prisma.AiUsageTeamIdUserIdPeriodStartCompoundUniqueInput
AND?: Prisma.AiUsageWhereInput | Prisma.AiUsageWhereInput[]
OR?: Prisma.AiUsageWhereInput[]
NOT?: Prisma.AiUsageWhereInput | Prisma.AiUsageWhereInput[]
teamId?: Prisma.StringFilter<"AiUsage"> | string
userId?: Prisma.StringNullableFilter<"AiUsage"> | string | null
periodStart?: Prisma.DateTimeFilter<"AiUsage"> | Date | string
inputTokens?: Prisma.BigIntFilter<"AiUsage"> | bigint | number
outputTokens?: Prisma.BigIntFilter<"AiUsage"> | bigint | number
cacheReadTokens?: Prisma.BigIntFilter<"AiUsage"> | bigint | number
totalTokens?: Prisma.BigIntFilter<"AiUsage"> | bigint | number
cost?: Prisma.FloatFilter<"AiUsage"> | number
createdAt?: Prisma.DateTimeFilter<"AiUsage"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"AiUsage"> | Date | string
team?: Prisma.XOR<Prisma.TeamScalarRelationFilter, Prisma.TeamWhereInput>
user?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
}, "id" | "teamId_userId_periodStart">
export type AiUsageOrderByWithAggregationInput = {
id?: Prisma.SortOrder
teamId?: Prisma.SortOrder
userId?: Prisma.SortOrderInput | Prisma.SortOrder
periodStart?: Prisma.SortOrder
inputTokens?: Prisma.SortOrder
outputTokens?: Prisma.SortOrder
cacheReadTokens?: Prisma.SortOrder
totalTokens?: Prisma.SortOrder
cost?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
_count?: Prisma.AiUsageCountOrderByAggregateInput
_avg?: Prisma.AiUsageAvgOrderByAggregateInput
_max?: Prisma.AiUsageMaxOrderByAggregateInput
_min?: Prisma.AiUsageMinOrderByAggregateInput
_sum?: Prisma.AiUsageSumOrderByAggregateInput
}
export type AiUsageScalarWhereWithAggregatesInput = {
AND?: Prisma.AiUsageScalarWhereWithAggregatesInput | Prisma.AiUsageScalarWhereWithAggregatesInput[]
OR?: Prisma.AiUsageScalarWhereWithAggregatesInput[]
NOT?: Prisma.AiUsageScalarWhereWithAggregatesInput | Prisma.AiUsageScalarWhereWithAggregatesInput[]
id?: Prisma.StringWithAggregatesFilter<"AiUsage"> | string
teamId?: Prisma.StringWithAggregatesFilter<"AiUsage"> | string
userId?: Prisma.StringNullableWithAggregatesFilter<"AiUsage"> | string | null
periodStart?: Prisma.DateTimeWithAggregatesFilter<"AiUsage"> | Date | string
inputTokens?: Prisma.BigIntWithAggregatesFilter<"AiUsage"> | bigint | number
outputTokens?: Prisma.BigIntWithAggregatesFilter<"AiUsage"> | bigint | number
cacheReadTokens?: Prisma.BigIntWithAggregatesFilter<"AiUsage"> | bigint | number
totalTokens?: Prisma.BigIntWithAggregatesFilter<"AiUsage"> | bigint | number
cost?: Prisma.FloatWithAggregatesFilter<"AiUsage"> | number
createdAt?: Prisma.DateTimeWithAggregatesFilter<"AiUsage"> | Date | string
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"AiUsage"> | Date | string
}
export type AiUsageCreateInput = {
id?: string
periodStart: Date | string
inputTokens?: bigint | number
outputTokens?: bigint | number
cacheReadTokens?: bigint | number
totalTokens?: bigint | number
cost?: number
createdAt?: Date | string
updatedAt?: Date | string
team: Prisma.TeamCreateNestedOneWithoutAiUsagesInput
user?: Prisma.UserCreateNestedOneWithoutAiUsagesInput
}
export type AiUsageUncheckedCreateInput = {
id?: string
teamId: string
userId?: string | null
periodStart: Date | string
inputTokens?: bigint | number
outputTokens?: bigint | number
cacheReadTokens?: bigint | number
totalTokens?: bigint | number
cost?: number
createdAt?: Date | string
updatedAt?: Date | string
}
export type AiUsageUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
periodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
outputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cacheReadTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
totalTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cost?: Prisma.FloatFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
team?: Prisma.TeamUpdateOneRequiredWithoutAiUsagesNestedInput
user?: Prisma.UserUpdateOneWithoutAiUsagesNestedInput
}
export type AiUsageUncheckedUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
teamId?: Prisma.StringFieldUpdateOperationsInput | string
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
periodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
outputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cacheReadTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
totalTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cost?: Prisma.FloatFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type AiUsageCreateManyInput = {
id?: string
teamId: string
userId?: string | null
periodStart: Date | string
inputTokens?: bigint | number
outputTokens?: bigint | number
cacheReadTokens?: bigint | number
totalTokens?: bigint | number
cost?: number
createdAt?: Date | string
updatedAt?: Date | string
}
export type AiUsageUpdateManyMutationInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
periodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
outputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cacheReadTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
totalTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cost?: Prisma.FloatFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type AiUsageUncheckedUpdateManyInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
teamId?: Prisma.StringFieldUpdateOperationsInput | string
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
periodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
outputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cacheReadTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
totalTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cost?: Prisma.FloatFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type AiUsageListRelationFilter = {
every?: Prisma.AiUsageWhereInput
some?: Prisma.AiUsageWhereInput
none?: Prisma.AiUsageWhereInput
}
export type AiUsageOrderByRelationAggregateInput = {
_count?: Prisma.SortOrder
}
export type AiUsageTeamIdUserIdPeriodStartCompoundUniqueInput = {
teamId: string
userId: string
periodStart: Date | string
}
export type AiUsageCountOrderByAggregateInput = {
id?: Prisma.SortOrder
teamId?: Prisma.SortOrder
userId?: Prisma.SortOrder
periodStart?: Prisma.SortOrder
inputTokens?: Prisma.SortOrder
outputTokens?: Prisma.SortOrder
cacheReadTokens?: Prisma.SortOrder
totalTokens?: Prisma.SortOrder
cost?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
}
export type AiUsageAvgOrderByAggregateInput = {
inputTokens?: Prisma.SortOrder
outputTokens?: Prisma.SortOrder
cacheReadTokens?: Prisma.SortOrder
totalTokens?: Prisma.SortOrder
cost?: Prisma.SortOrder
}
export type AiUsageMaxOrderByAggregateInput = {
id?: Prisma.SortOrder
teamId?: Prisma.SortOrder
userId?: Prisma.SortOrder
periodStart?: Prisma.SortOrder
inputTokens?: Prisma.SortOrder
outputTokens?: Prisma.SortOrder
cacheReadTokens?: Prisma.SortOrder
totalTokens?: Prisma.SortOrder
cost?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
}
export type AiUsageMinOrderByAggregateInput = {
id?: Prisma.SortOrder
teamId?: Prisma.SortOrder
userId?: Prisma.SortOrder
periodStart?: Prisma.SortOrder
inputTokens?: Prisma.SortOrder
outputTokens?: Prisma.SortOrder
cacheReadTokens?: Prisma.SortOrder
totalTokens?: Prisma.SortOrder
cost?: Prisma.SortOrder
createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder
}
export type AiUsageSumOrderByAggregateInput = {
inputTokens?: Prisma.SortOrder
outputTokens?: Prisma.SortOrder
cacheReadTokens?: Prisma.SortOrder
totalTokens?: Prisma.SortOrder
cost?: Prisma.SortOrder
}
export type AiUsageCreateNestedManyWithoutUserInput = {
create?: Prisma.XOR<Prisma.AiUsageCreateWithoutUserInput, Prisma.AiUsageUncheckedCreateWithoutUserInput> | Prisma.AiUsageCreateWithoutUserInput[] | Prisma.AiUsageUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.AiUsageCreateOrConnectWithoutUserInput | Prisma.AiUsageCreateOrConnectWithoutUserInput[]
createMany?: Prisma.AiUsageCreateManyUserInputEnvelope
connect?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
}
export type AiUsageUncheckedCreateNestedManyWithoutUserInput = {
create?: Prisma.XOR<Prisma.AiUsageCreateWithoutUserInput, Prisma.AiUsageUncheckedCreateWithoutUserInput> | Prisma.AiUsageCreateWithoutUserInput[] | Prisma.AiUsageUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.AiUsageCreateOrConnectWithoutUserInput | Prisma.AiUsageCreateOrConnectWithoutUserInput[]
createMany?: Prisma.AiUsageCreateManyUserInputEnvelope
connect?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
}
export type AiUsageUpdateManyWithoutUserNestedInput = {
create?: Prisma.XOR<Prisma.AiUsageCreateWithoutUserInput, Prisma.AiUsageUncheckedCreateWithoutUserInput> | Prisma.AiUsageCreateWithoutUserInput[] | Prisma.AiUsageUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.AiUsageCreateOrConnectWithoutUserInput | Prisma.AiUsageCreateOrConnectWithoutUserInput[]
upsert?: Prisma.AiUsageUpsertWithWhereUniqueWithoutUserInput | Prisma.AiUsageUpsertWithWhereUniqueWithoutUserInput[]
createMany?: Prisma.AiUsageCreateManyUserInputEnvelope
set?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
disconnect?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
delete?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
connect?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
update?: Prisma.AiUsageUpdateWithWhereUniqueWithoutUserInput | Prisma.AiUsageUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: Prisma.AiUsageUpdateManyWithWhereWithoutUserInput | Prisma.AiUsageUpdateManyWithWhereWithoutUserInput[]
deleteMany?: Prisma.AiUsageScalarWhereInput | Prisma.AiUsageScalarWhereInput[]
}
export type AiUsageUncheckedUpdateManyWithoutUserNestedInput = {
create?: Prisma.XOR<Prisma.AiUsageCreateWithoutUserInput, Prisma.AiUsageUncheckedCreateWithoutUserInput> | Prisma.AiUsageCreateWithoutUserInput[] | Prisma.AiUsageUncheckedCreateWithoutUserInput[]
connectOrCreate?: Prisma.AiUsageCreateOrConnectWithoutUserInput | Prisma.AiUsageCreateOrConnectWithoutUserInput[]
upsert?: Prisma.AiUsageUpsertWithWhereUniqueWithoutUserInput | Prisma.AiUsageUpsertWithWhereUniqueWithoutUserInput[]
createMany?: Prisma.AiUsageCreateManyUserInputEnvelope
set?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
disconnect?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
delete?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
connect?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
update?: Prisma.AiUsageUpdateWithWhereUniqueWithoutUserInput | Prisma.AiUsageUpdateWithWhereUniqueWithoutUserInput[]
updateMany?: Prisma.AiUsageUpdateManyWithWhereWithoutUserInput | Prisma.AiUsageUpdateManyWithWhereWithoutUserInput[]
deleteMany?: Prisma.AiUsageScalarWhereInput | Prisma.AiUsageScalarWhereInput[]
}
export type AiUsageCreateNestedManyWithoutTeamInput = {
create?: Prisma.XOR<Prisma.AiUsageCreateWithoutTeamInput, Prisma.AiUsageUncheckedCreateWithoutTeamInput> | Prisma.AiUsageCreateWithoutTeamInput[] | Prisma.AiUsageUncheckedCreateWithoutTeamInput[]
connectOrCreate?: Prisma.AiUsageCreateOrConnectWithoutTeamInput | Prisma.AiUsageCreateOrConnectWithoutTeamInput[]
createMany?: Prisma.AiUsageCreateManyTeamInputEnvelope
connect?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
}
export type AiUsageUncheckedCreateNestedManyWithoutTeamInput = {
create?: Prisma.XOR<Prisma.AiUsageCreateWithoutTeamInput, Prisma.AiUsageUncheckedCreateWithoutTeamInput> | Prisma.AiUsageCreateWithoutTeamInput[] | Prisma.AiUsageUncheckedCreateWithoutTeamInput[]
connectOrCreate?: Prisma.AiUsageCreateOrConnectWithoutTeamInput | Prisma.AiUsageCreateOrConnectWithoutTeamInput[]
createMany?: Prisma.AiUsageCreateManyTeamInputEnvelope
connect?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
}
export type AiUsageUpdateManyWithoutTeamNestedInput = {
create?: Prisma.XOR<Prisma.AiUsageCreateWithoutTeamInput, Prisma.AiUsageUncheckedCreateWithoutTeamInput> | Prisma.AiUsageCreateWithoutTeamInput[] | Prisma.AiUsageUncheckedCreateWithoutTeamInput[]
connectOrCreate?: Prisma.AiUsageCreateOrConnectWithoutTeamInput | Prisma.AiUsageCreateOrConnectWithoutTeamInput[]
upsert?: Prisma.AiUsageUpsertWithWhereUniqueWithoutTeamInput | Prisma.AiUsageUpsertWithWhereUniqueWithoutTeamInput[]
createMany?: Prisma.AiUsageCreateManyTeamInputEnvelope
set?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
disconnect?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
delete?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
connect?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
update?: Prisma.AiUsageUpdateWithWhereUniqueWithoutTeamInput | Prisma.AiUsageUpdateWithWhereUniqueWithoutTeamInput[]
updateMany?: Prisma.AiUsageUpdateManyWithWhereWithoutTeamInput | Prisma.AiUsageUpdateManyWithWhereWithoutTeamInput[]
deleteMany?: Prisma.AiUsageScalarWhereInput | Prisma.AiUsageScalarWhereInput[]
}
export type AiUsageUncheckedUpdateManyWithoutTeamNestedInput = {
create?: Prisma.XOR<Prisma.AiUsageCreateWithoutTeamInput, Prisma.AiUsageUncheckedCreateWithoutTeamInput> | Prisma.AiUsageCreateWithoutTeamInput[] | Prisma.AiUsageUncheckedCreateWithoutTeamInput[]
connectOrCreate?: Prisma.AiUsageCreateOrConnectWithoutTeamInput | Prisma.AiUsageCreateOrConnectWithoutTeamInput[]
upsert?: Prisma.AiUsageUpsertWithWhereUniqueWithoutTeamInput | Prisma.AiUsageUpsertWithWhereUniqueWithoutTeamInput[]
createMany?: Prisma.AiUsageCreateManyTeamInputEnvelope
set?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
disconnect?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
delete?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
connect?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[]
update?: Prisma.AiUsageUpdateWithWhereUniqueWithoutTeamInput | Prisma.AiUsageUpdateWithWhereUniqueWithoutTeamInput[]
updateMany?: Prisma.AiUsageUpdateManyWithWhereWithoutTeamInput | Prisma.AiUsageUpdateManyWithWhereWithoutTeamInput[]
deleteMany?: Prisma.AiUsageScalarWhereInput | Prisma.AiUsageScalarWhereInput[]
}
export type FloatFieldUpdateOperationsInput = {
set?: number
increment?: number
decrement?: number
multiply?: number
divide?: number
}
export type AiUsageCreateWithoutUserInput = {
id?: string
periodStart: Date | string
inputTokens?: bigint | number
outputTokens?: bigint | number
cacheReadTokens?: bigint | number
totalTokens?: bigint | number
cost?: number
createdAt?: Date | string
updatedAt?: Date | string
team: Prisma.TeamCreateNestedOneWithoutAiUsagesInput
}
export type AiUsageUncheckedCreateWithoutUserInput = {
id?: string
teamId: string
periodStart: Date | string
inputTokens?: bigint | number
outputTokens?: bigint | number
cacheReadTokens?: bigint | number
totalTokens?: bigint | number
cost?: number
createdAt?: Date | string
updatedAt?: Date | string
}
export type AiUsageCreateOrConnectWithoutUserInput = {
where: Prisma.AiUsageWhereUniqueInput
create: Prisma.XOR<Prisma.AiUsageCreateWithoutUserInput, Prisma.AiUsageUncheckedCreateWithoutUserInput>
}
export type AiUsageCreateManyUserInputEnvelope = {
data: Prisma.AiUsageCreateManyUserInput | Prisma.AiUsageCreateManyUserInput[]
skipDuplicates?: boolean
}
export type AiUsageUpsertWithWhereUniqueWithoutUserInput = {
where: Prisma.AiUsageWhereUniqueInput
update: Prisma.XOR<Prisma.AiUsageUpdateWithoutUserInput, Prisma.AiUsageUncheckedUpdateWithoutUserInput>
create: Prisma.XOR<Prisma.AiUsageCreateWithoutUserInput, Prisma.AiUsageUncheckedCreateWithoutUserInput>
}
export type AiUsageUpdateWithWhereUniqueWithoutUserInput = {
where: Prisma.AiUsageWhereUniqueInput
data: Prisma.XOR<Prisma.AiUsageUpdateWithoutUserInput, Prisma.AiUsageUncheckedUpdateWithoutUserInput>
}
export type AiUsageUpdateManyWithWhereWithoutUserInput = {
where: Prisma.AiUsageScalarWhereInput
data: Prisma.XOR<Prisma.AiUsageUpdateManyMutationInput, Prisma.AiUsageUncheckedUpdateManyWithoutUserInput>
}
export type AiUsageScalarWhereInput = {
AND?: Prisma.AiUsageScalarWhereInput | Prisma.AiUsageScalarWhereInput[]
OR?: Prisma.AiUsageScalarWhereInput[]
NOT?: Prisma.AiUsageScalarWhereInput | Prisma.AiUsageScalarWhereInput[]
id?: Prisma.StringFilter<"AiUsage"> | string
teamId?: Prisma.StringFilter<"AiUsage"> | string
userId?: Prisma.StringNullableFilter<"AiUsage"> | string | null
periodStart?: Prisma.DateTimeFilter<"AiUsage"> | Date | string
inputTokens?: Prisma.BigIntFilter<"AiUsage"> | bigint | number
outputTokens?: Prisma.BigIntFilter<"AiUsage"> | bigint | number
cacheReadTokens?: Prisma.BigIntFilter<"AiUsage"> | bigint | number
totalTokens?: Prisma.BigIntFilter<"AiUsage"> | bigint | number
cost?: Prisma.FloatFilter<"AiUsage"> | number
createdAt?: Prisma.DateTimeFilter<"AiUsage"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"AiUsage"> | Date | string
}
export type AiUsageCreateWithoutTeamInput = {
id?: string
periodStart: Date | string
inputTokens?: bigint | number
outputTokens?: bigint | number
cacheReadTokens?: bigint | number
totalTokens?: bigint | number
cost?: number
createdAt?: Date | string
updatedAt?: Date | string
user?: Prisma.UserCreateNestedOneWithoutAiUsagesInput
}
export type AiUsageUncheckedCreateWithoutTeamInput = {
id?: string
userId?: string | null
periodStart: Date | string
inputTokens?: bigint | number
outputTokens?: bigint | number
cacheReadTokens?: bigint | number
totalTokens?: bigint | number
cost?: number
createdAt?: Date | string
updatedAt?: Date | string
}
export type AiUsageCreateOrConnectWithoutTeamInput = {
where: Prisma.AiUsageWhereUniqueInput
create: Prisma.XOR<Prisma.AiUsageCreateWithoutTeamInput, Prisma.AiUsageUncheckedCreateWithoutTeamInput>
}
export type AiUsageCreateManyTeamInputEnvelope = {
data: Prisma.AiUsageCreateManyTeamInput | Prisma.AiUsageCreateManyTeamInput[]
skipDuplicates?: boolean
}
export type AiUsageUpsertWithWhereUniqueWithoutTeamInput = {
where: Prisma.AiUsageWhereUniqueInput
update: Prisma.XOR<Prisma.AiUsageUpdateWithoutTeamInput, Prisma.AiUsageUncheckedUpdateWithoutTeamInput>
create: Prisma.XOR<Prisma.AiUsageCreateWithoutTeamInput, Prisma.AiUsageUncheckedCreateWithoutTeamInput>
}
export type AiUsageUpdateWithWhereUniqueWithoutTeamInput = {
where: Prisma.AiUsageWhereUniqueInput
data: Prisma.XOR<Prisma.AiUsageUpdateWithoutTeamInput, Prisma.AiUsageUncheckedUpdateWithoutTeamInput>
}
export type AiUsageUpdateManyWithWhereWithoutTeamInput = {
where: Prisma.AiUsageScalarWhereInput
data: Prisma.XOR<Prisma.AiUsageUpdateManyMutationInput, Prisma.AiUsageUncheckedUpdateManyWithoutTeamInput>
}
export type AiUsageCreateManyUserInput = {
id?: string
teamId: string
periodStart: Date | string
inputTokens?: bigint | number
outputTokens?: bigint | number
cacheReadTokens?: bigint | number
totalTokens?: bigint | number
cost?: number
createdAt?: Date | string
updatedAt?: Date | string
}
export type AiUsageUpdateWithoutUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
periodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
outputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cacheReadTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
totalTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cost?: Prisma.FloatFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
team?: Prisma.TeamUpdateOneRequiredWithoutAiUsagesNestedInput
}
export type AiUsageUncheckedUpdateWithoutUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
teamId?: Prisma.StringFieldUpdateOperationsInput | string
periodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
outputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cacheReadTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
totalTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cost?: Prisma.FloatFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type AiUsageUncheckedUpdateManyWithoutUserInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
teamId?: Prisma.StringFieldUpdateOperationsInput | string
periodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
outputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cacheReadTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
totalTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cost?: Prisma.FloatFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type AiUsageCreateManyTeamInput = {
id?: string
userId?: string | null
periodStart: Date | string
inputTokens?: bigint | number
outputTokens?: bigint | number
cacheReadTokens?: bigint | number
totalTokens?: bigint | number
cost?: number
createdAt?: Date | string
updatedAt?: Date | string
}
export type AiUsageUpdateWithoutTeamInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
periodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
outputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cacheReadTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
totalTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cost?: Prisma.FloatFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
user?: Prisma.UserUpdateOneWithoutAiUsagesNestedInput
}
export type AiUsageUncheckedUpdateWithoutTeamInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
periodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
outputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cacheReadTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
totalTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cost?: Prisma.FloatFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type AiUsageUncheckedUpdateManyWithoutTeamInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
periodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
inputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
outputTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cacheReadTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
totalTokens?: Prisma.BigIntFieldUpdateOperationsInput | bigint | number
cost?: Prisma.FloatFieldUpdateOperationsInput | number
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type AiUsageSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
teamId?: boolean
userId?: boolean
periodStart?: boolean
inputTokens?: boolean
outputTokens?: boolean
cacheReadTokens?: boolean
totalTokens?: boolean
cost?: boolean
createdAt?: boolean
updatedAt?: boolean
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
user?: boolean | Prisma.AiUsage$userArgs<ExtArgs>
}, ExtArgs["result"]["aiUsage"]>
export type AiUsageSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
teamId?: boolean
userId?: boolean
periodStart?: boolean
inputTokens?: boolean
outputTokens?: boolean
cacheReadTokens?: boolean
totalTokens?: boolean
cost?: boolean
createdAt?: boolean
updatedAt?: boolean
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
user?: boolean | Prisma.AiUsage$userArgs<ExtArgs>
}, ExtArgs["result"]["aiUsage"]>
export type AiUsageSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
teamId?: boolean
userId?: boolean
periodStart?: boolean
inputTokens?: boolean
outputTokens?: boolean
cacheReadTokens?: boolean
totalTokens?: boolean
cost?: boolean
createdAt?: boolean
updatedAt?: boolean
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
user?: boolean | Prisma.AiUsage$userArgs<ExtArgs>
}, ExtArgs["result"]["aiUsage"]>
export type AiUsageSelectScalar = {
id?: boolean
teamId?: boolean
userId?: boolean
periodStart?: boolean
inputTokens?: boolean
outputTokens?: boolean
cacheReadTokens?: boolean
totalTokens?: boolean
cost?: boolean
createdAt?: boolean
updatedAt?: boolean
}
export type AiUsageOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "teamId" | "userId" | "periodStart" | "inputTokens" | "outputTokens" | "cacheReadTokens" | "totalTokens" | "cost" | "createdAt" | "updatedAt", ExtArgs["result"]["aiUsage"]>
export type AiUsageInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
user?: boolean | Prisma.AiUsage$userArgs<ExtArgs>
}
export type AiUsageIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
user?: boolean | Prisma.AiUsage$userArgs<ExtArgs>
}
export type AiUsageIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
user?: boolean | Prisma.AiUsage$userArgs<ExtArgs>
}
export type $AiUsagePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "AiUsage"
objects: {
team: Prisma.$TeamPayload<ExtArgs>
user: Prisma.$UserPayload<ExtArgs> | null
}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: string
teamId: string
userId: string | null
periodStart: Date
inputTokens: bigint
outputTokens: bigint
cacheReadTokens: bigint
totalTokens: bigint
cost: number
createdAt: Date
updatedAt: Date
}, ExtArgs["result"]["aiUsage"]>
composites: {}
}
export type AiUsageGetPayload<S extends boolean | null | undefined | AiUsageDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$AiUsagePayload, S>
export type AiUsageCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
Omit<AiUsageFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
select?: AiUsageCountAggregateInputType | true
}
export interface AiUsageDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['AiUsage'], meta: { name: 'AiUsage' } }
/**
* Find zero or one AiUsage that matches the filter.
* @param {AiUsageFindUniqueArgs} args - Arguments to find a AiUsage
* @example
* // Get one AiUsage
* const aiUsage = await prisma.aiUsage.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends AiUsageFindUniqueArgs>(args: Prisma.SelectSubset<T, AiUsageFindUniqueArgs<ExtArgs>>): Prisma.Prisma__AiUsageClient<runtime.Types.Result.GetResult<Prisma.$AiUsagePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find one AiUsage that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {AiUsageFindUniqueOrThrowArgs} args - Arguments to find a AiUsage
* @example
* // Get one AiUsage
* const aiUsage = await prisma.aiUsage.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends AiUsageFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, AiUsageFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__AiUsageClient<runtime.Types.Result.GetResult<Prisma.$AiUsagePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find the first AiUsage 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 {AiUsageFindFirstArgs} args - Arguments to find a AiUsage
* @example
* // Get one AiUsage
* const aiUsage = await prisma.aiUsage.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends AiUsageFindFirstArgs>(args?: Prisma.SelectSubset<T, AiUsageFindFirstArgs<ExtArgs>>): Prisma.Prisma__AiUsageClient<runtime.Types.Result.GetResult<Prisma.$AiUsagePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find the first AiUsage 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 {AiUsageFindFirstOrThrowArgs} args - Arguments to find a AiUsage
* @example
* // Get one AiUsage
* const aiUsage = await prisma.aiUsage.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends AiUsageFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, AiUsageFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__AiUsageClient<runtime.Types.Result.GetResult<Prisma.$AiUsagePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find zero or more AiUsages 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 {AiUsageFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all AiUsages
* const aiUsages = await prisma.aiUsage.findMany()
*
* // Get first 10 AiUsages
* const aiUsages = await prisma.aiUsage.findMany({ take: 10 })
*
* // Only select the `id`
* const aiUsageWithIdOnly = await prisma.aiUsage.findMany({ select: { id: true } })
*
*/
findMany<T extends AiUsageFindManyArgs>(args?: Prisma.SelectSubset<T, AiUsageFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AiUsagePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
/**
* Create a AiUsage.
* @param {AiUsageCreateArgs} args - Arguments to create a AiUsage.
* @example
* // Create one AiUsage
* const AiUsage = await prisma.aiUsage.create({
* data: {
* // ... data to create a AiUsage
* }
* })
*
*/
create<T extends AiUsageCreateArgs>(args: Prisma.SelectSubset<T, AiUsageCreateArgs<ExtArgs>>): Prisma.Prisma__AiUsageClient<runtime.Types.Result.GetResult<Prisma.$AiUsagePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Create many AiUsages.
* @param {AiUsageCreateManyArgs} args - Arguments to create many AiUsages.
* @example
* // Create many AiUsages
* const aiUsage = await prisma.aiUsage.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends AiUsageCreateManyArgs>(args?: Prisma.SelectSubset<T, AiUsageCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create many AiUsages and returns the data saved in the database.
* @param {AiUsageCreateManyAndReturnArgs} args - Arguments to create many AiUsages.
* @example
* // Create many AiUsages
* const aiUsage = await prisma.aiUsage.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many AiUsages and only return the `id`
* const aiUsageWithIdOnly = await prisma.aiUsage.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 AiUsageCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, AiUsageCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AiUsagePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
/**
* Delete a AiUsage.
* @param {AiUsageDeleteArgs} args - Arguments to delete one AiUsage.
* @example
* // Delete one AiUsage
* const AiUsage = await prisma.aiUsage.delete({
* where: {
* // ... filter to delete one AiUsage
* }
* })
*
*/
delete<T extends AiUsageDeleteArgs>(args: Prisma.SelectSubset<T, AiUsageDeleteArgs<ExtArgs>>): Prisma.Prisma__AiUsageClient<runtime.Types.Result.GetResult<Prisma.$AiUsagePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Update one AiUsage.
* @param {AiUsageUpdateArgs} args - Arguments to update one AiUsage.
* @example
* // Update one AiUsage
* const aiUsage = await prisma.aiUsage.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends AiUsageUpdateArgs>(args: Prisma.SelectSubset<T, AiUsageUpdateArgs<ExtArgs>>): Prisma.Prisma__AiUsageClient<runtime.Types.Result.GetResult<Prisma.$AiUsagePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Delete zero or more AiUsages.
* @param {AiUsageDeleteManyArgs} args - Arguments to filter AiUsages to delete.
* @example
* // Delete a few AiUsages
* const { count } = await prisma.aiUsage.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends AiUsageDeleteManyArgs>(args?: Prisma.SelectSubset<T, AiUsageDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more AiUsages.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AiUsageUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many AiUsages
* const aiUsage = await prisma.aiUsage.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends AiUsageUpdateManyArgs>(args: Prisma.SelectSubset<T, AiUsageUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more AiUsages and returns the data updated in the database.
* @param {AiUsageUpdateManyAndReturnArgs} args - Arguments to update many AiUsages.
* @example
* // Update many AiUsages
* const aiUsage = await prisma.aiUsage.updateManyAndReturn({
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
*
* // Update zero or more AiUsages and only return the `id`
* const aiUsageWithIdOnly = await prisma.aiUsage.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 AiUsageUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, AiUsageUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AiUsagePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
/**
* Create or update one AiUsage.
* @param {AiUsageUpsertArgs} args - Arguments to update or create a AiUsage.
* @example
* // Update or create a AiUsage
* const aiUsage = await prisma.aiUsage.upsert({
* create: {
* // ... data to create a AiUsage
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the AiUsage we want to update
* }
* })
*/
upsert<T extends AiUsageUpsertArgs>(args: Prisma.SelectSubset<T, AiUsageUpsertArgs<ExtArgs>>): Prisma.Prisma__AiUsageClient<runtime.Types.Result.GetResult<Prisma.$AiUsagePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Count the number of AiUsages.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AiUsageCountArgs} args - Arguments to filter AiUsages to count.
* @example
* // Count the number of AiUsages
* const count = await prisma.aiUsage.count({
* where: {
* // ... the filter for the AiUsages we want to count
* }
* })
**/
count<T extends AiUsageCountArgs>(
args?: Prisma.Subset<T, AiUsageCountArgs>,
): Prisma.PrismaPromise<
T extends runtime.Types.Utils.Record<'select', any>
? T['select'] extends true
? number
: Prisma.GetScalarType<T['select'], AiUsageCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a AiUsage.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AiUsageAggregateArgs} 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 AiUsageAggregateArgs>(args: Prisma.Subset<T, AiUsageAggregateArgs>): Prisma.PrismaPromise<GetAiUsageAggregateType<T>>
/**
* Group by AiUsage.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {AiUsageGroupByArgs} 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 AiUsageGroupByArgs,
HasSelectOrTake extends Prisma.Or<
Prisma.Extends<'skip', Prisma.Keys<T>>,
Prisma.Extends<'take', Prisma.Keys<T>>
>,
OrderByArg extends Prisma.True extends HasSelectOrTake
? { orderBy: AiUsageGroupByArgs['orderBy'] }
: { orderBy?: AiUsageGroupByArgs['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, AiUsageGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetAiUsageGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the AiUsage model
*/
readonly fields: AiUsageFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for AiUsage.
* 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__AiUsageClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
team<T extends Prisma.TeamDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.TeamDefaultArgs<ExtArgs>>): Prisma.Prisma__TeamClient<runtime.Types.Result.GetResult<Prisma.$TeamPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
user<T extends Prisma.AiUsage$userArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AiUsage$userArgs<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 AiUsage model
*/
export interface AiUsageFieldRefs {
readonly id: Prisma.FieldRef<"AiUsage", 'String'>
readonly teamId: Prisma.FieldRef<"AiUsage", 'String'>
readonly userId: Prisma.FieldRef<"AiUsage", 'String'>
readonly periodStart: Prisma.FieldRef<"AiUsage", 'DateTime'>
readonly inputTokens: Prisma.FieldRef<"AiUsage", 'BigInt'>
readonly outputTokens: Prisma.FieldRef<"AiUsage", 'BigInt'>
readonly cacheReadTokens: Prisma.FieldRef<"AiUsage", 'BigInt'>
readonly totalTokens: Prisma.FieldRef<"AiUsage", 'BigInt'>
readonly cost: Prisma.FieldRef<"AiUsage", 'Float'>
readonly createdAt: Prisma.FieldRef<"AiUsage", 'DateTime'>
readonly updatedAt: Prisma.FieldRef<"AiUsage", 'DateTime'>
}
// Custom InputTypes
/**
* AiUsage findUnique
*/
export type AiUsageFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AiUsage
*/
select?: Prisma.AiUsageSelect<ExtArgs> | null
/**
* Omit specific fields from the AiUsage
*/
omit?: Prisma.AiUsageOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AiUsageInclude<ExtArgs> | null
/**
* Filter, which AiUsage to fetch.
*/
where: Prisma.AiUsageWhereUniqueInput
}
/**
* AiUsage findUniqueOrThrow
*/
export type AiUsageFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AiUsage
*/
select?: Prisma.AiUsageSelect<ExtArgs> | null
/**
* Omit specific fields from the AiUsage
*/
omit?: Prisma.AiUsageOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AiUsageInclude<ExtArgs> | null
/**
* Filter, which AiUsage to fetch.
*/
where: Prisma.AiUsageWhereUniqueInput
}
/**
* AiUsage findFirst
*/
export type AiUsageFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AiUsage
*/
select?: Prisma.AiUsageSelect<ExtArgs> | null
/**
* Omit specific fields from the AiUsage
*/
omit?: Prisma.AiUsageOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AiUsageInclude<ExtArgs> | null
/**
* Filter, which AiUsage to fetch.
*/
where?: Prisma.AiUsageWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of AiUsages to fetch.
*/
orderBy?: Prisma.AiUsageOrderByWithRelationInput | Prisma.AiUsageOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for AiUsages.
*/
cursor?: Prisma.AiUsageWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` AiUsages 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` AiUsages.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of AiUsages.
*/
distinct?: Prisma.AiUsageScalarFieldEnum | Prisma.AiUsageScalarFieldEnum[]
}
/**
* AiUsage findFirstOrThrow
*/
export type AiUsageFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AiUsage
*/
select?: Prisma.AiUsageSelect<ExtArgs> | null
/**
* Omit specific fields from the AiUsage
*/
omit?: Prisma.AiUsageOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AiUsageInclude<ExtArgs> | null
/**
* Filter, which AiUsage to fetch.
*/
where?: Prisma.AiUsageWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of AiUsages to fetch.
*/
orderBy?: Prisma.AiUsageOrderByWithRelationInput | Prisma.AiUsageOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for AiUsages.
*/
cursor?: Prisma.AiUsageWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` AiUsages 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` AiUsages.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of AiUsages.
*/
distinct?: Prisma.AiUsageScalarFieldEnum | Prisma.AiUsageScalarFieldEnum[]
}
/**
* AiUsage findMany
*/
export type AiUsageFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AiUsage
*/
select?: Prisma.AiUsageSelect<ExtArgs> | null
/**
* Omit specific fields from the AiUsage
*/
omit?: Prisma.AiUsageOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AiUsageInclude<ExtArgs> | null
/**
* Filter, which AiUsages to fetch.
*/
where?: Prisma.AiUsageWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of AiUsages to fetch.
*/
orderBy?: Prisma.AiUsageOrderByWithRelationInput | Prisma.AiUsageOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing AiUsages.
*/
cursor?: Prisma.AiUsageWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` AiUsages 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` AiUsages.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of AiUsages.
*/
distinct?: Prisma.AiUsageScalarFieldEnum | Prisma.AiUsageScalarFieldEnum[]
}
/**
* AiUsage create
*/
export type AiUsageCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AiUsage
*/
select?: Prisma.AiUsageSelect<ExtArgs> | null
/**
* Omit specific fields from the AiUsage
*/
omit?: Prisma.AiUsageOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AiUsageInclude<ExtArgs> | null
/**
* The data needed to create a AiUsage.
*/
data: Prisma.XOR<Prisma.AiUsageCreateInput, Prisma.AiUsageUncheckedCreateInput>
}
/**
* AiUsage createMany
*/
export type AiUsageCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to create many AiUsages.
*/
data: Prisma.AiUsageCreateManyInput | Prisma.AiUsageCreateManyInput[]
skipDuplicates?: boolean
}
/**
* AiUsage createManyAndReturn
*/
export type AiUsageCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AiUsage
*/
select?: Prisma.AiUsageSelectCreateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the AiUsage
*/
omit?: Prisma.AiUsageOmit<ExtArgs> | null
/**
* The data used to create many AiUsages.
*/
data: Prisma.AiUsageCreateManyInput | Prisma.AiUsageCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AiUsageIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
* AiUsage update
*/
export type AiUsageUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AiUsage
*/
select?: Prisma.AiUsageSelect<ExtArgs> | null
/**
* Omit specific fields from the AiUsage
*/
omit?: Prisma.AiUsageOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AiUsageInclude<ExtArgs> | null
/**
* The data needed to update a AiUsage.
*/
data: Prisma.XOR<Prisma.AiUsageUpdateInput, Prisma.AiUsageUncheckedUpdateInput>
/**
* Choose, which AiUsage to update.
*/
where: Prisma.AiUsageWhereUniqueInput
}
/**
* AiUsage updateMany
*/
export type AiUsageUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to update AiUsages.
*/
data: Prisma.XOR<Prisma.AiUsageUpdateManyMutationInput, Prisma.AiUsageUncheckedUpdateManyInput>
/**
* Filter which AiUsages to update
*/
where?: Prisma.AiUsageWhereInput
/**
* Limit how many AiUsages to update.
*/
limit?: number
}
/**
* AiUsage updateManyAndReturn
*/
export type AiUsageUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AiUsage
*/
select?: Prisma.AiUsageSelectUpdateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the AiUsage
*/
omit?: Prisma.AiUsageOmit<ExtArgs> | null
/**
* The data used to update AiUsages.
*/
data: Prisma.XOR<Prisma.AiUsageUpdateManyMutationInput, Prisma.AiUsageUncheckedUpdateManyInput>
/**
* Filter which AiUsages to update
*/
where?: Prisma.AiUsageWhereInput
/**
* Limit how many AiUsages to update.
*/
limit?: number
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AiUsageIncludeUpdateManyAndReturn<ExtArgs> | null
}
/**
* AiUsage upsert
*/
export type AiUsageUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AiUsage
*/
select?: Prisma.AiUsageSelect<ExtArgs> | null
/**
* Omit specific fields from the AiUsage
*/
omit?: Prisma.AiUsageOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AiUsageInclude<ExtArgs> | null
/**
* The filter to search for the AiUsage to update in case it exists.
*/
where: Prisma.AiUsageWhereUniqueInput
/**
* In case the AiUsage found by the `where` argument doesn't exist, create a new AiUsage with this data.
*/
create: Prisma.XOR<Prisma.AiUsageCreateInput, Prisma.AiUsageUncheckedCreateInput>
/**
* In case the AiUsage was found with the provided `where` argument, update it with this data.
*/
update: Prisma.XOR<Prisma.AiUsageUpdateInput, Prisma.AiUsageUncheckedUpdateInput>
}
/**
* AiUsage delete
*/
export type AiUsageDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AiUsage
*/
select?: Prisma.AiUsageSelect<ExtArgs> | null
/**
* Omit specific fields from the AiUsage
*/
omit?: Prisma.AiUsageOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AiUsageInclude<ExtArgs> | null
/**
* Filter which AiUsage to delete.
*/
where: Prisma.AiUsageWhereUniqueInput
}
/**
* AiUsage deleteMany
*/
export type AiUsageDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which AiUsages to delete
*/
where?: Prisma.AiUsageWhereInput
/**
* Limit how many AiUsages to delete.
*/
limit?: number
}
/**
* AiUsage.user
*/
export type AiUsage$userArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the User
*/
select?: Prisma.UserSelect<ExtArgs> | null
/**
* Omit specific fields from the User
*/
omit?: Prisma.UserOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.UserInclude<ExtArgs> | null
where?: Prisma.UserWhereInput
}
/**
* AiUsage without action
*/
export type AiUsageDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AiUsage
*/
select?: Prisma.AiUsageSelect<ExtArgs> | null
/**
* Omit specific fields from the AiUsage
*/
omit?: Prisma.AiUsageOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AiUsageInclude<ExtArgs> | null
}