/* !!! 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 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 = { /** * 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 = { [P in keyof T & keyof AggregateAiUsage]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type AiUsageGroupByArgs = { 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 = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof AiUsageGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > 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 user?: Prisma.XOR | 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 user?: Prisma.XOR | 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[] connectOrCreate?: Prisma.AiUsageCreateOrConnectWithoutUserInput | Prisma.AiUsageCreateOrConnectWithoutUserInput[] createMany?: Prisma.AiUsageCreateManyUserInputEnvelope connect?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[] } export type AiUsageUncheckedCreateNestedManyWithoutUserInput = { create?: Prisma.XOR | 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[] 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[] 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[] connectOrCreate?: Prisma.AiUsageCreateOrConnectWithoutTeamInput | Prisma.AiUsageCreateOrConnectWithoutTeamInput[] createMany?: Prisma.AiUsageCreateManyTeamInputEnvelope connect?: Prisma.AiUsageWhereUniqueInput | Prisma.AiUsageWhereUniqueInput[] } export type AiUsageUncheckedCreateNestedManyWithoutTeamInput = { create?: Prisma.XOR | 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[] 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[] 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 } export type AiUsageCreateManyUserInputEnvelope = { data: Prisma.AiUsageCreateManyUserInput | Prisma.AiUsageCreateManyUserInput[] skipDuplicates?: boolean } export type AiUsageUpsertWithWhereUniqueWithoutUserInput = { where: Prisma.AiUsageWhereUniqueInput update: Prisma.XOR create: Prisma.XOR } export type AiUsageUpdateWithWhereUniqueWithoutUserInput = { where: Prisma.AiUsageWhereUniqueInput data: Prisma.XOR } export type AiUsageUpdateManyWithWhereWithoutUserInput = { where: Prisma.AiUsageScalarWhereInput data: Prisma.XOR } 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 } export type AiUsageCreateManyTeamInputEnvelope = { data: Prisma.AiUsageCreateManyTeamInput | Prisma.AiUsageCreateManyTeamInput[] skipDuplicates?: boolean } export type AiUsageUpsertWithWhereUniqueWithoutTeamInput = { where: Prisma.AiUsageWhereUniqueInput update: Prisma.XOR create: Prisma.XOR } export type AiUsageUpdateWithWhereUniqueWithoutTeamInput = { where: Prisma.AiUsageWhereUniqueInput data: Prisma.XOR } export type AiUsageUpdateManyWithWhereWithoutTeamInput = { where: Prisma.AiUsageScalarWhereInput data: Prisma.XOR } 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 = 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 user?: boolean | Prisma.AiUsage$userArgs }, ExtArgs["result"]["aiUsage"]> export type AiUsageSelectCreateManyAndReturn = 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 user?: boolean | Prisma.AiUsage$userArgs }, ExtArgs["result"]["aiUsage"]> export type AiUsageSelectUpdateManyAndReturn = 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 user?: boolean | Prisma.AiUsage$userArgs }, 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 = runtime.Types.Extensions.GetOmit<"id" | "teamId" | "userId" | "periodStart" | "inputTokens" | "outputTokens" | "cacheReadTokens" | "totalTokens" | "cost" | "createdAt" | "updatedAt", ExtArgs["result"]["aiUsage"]> export type AiUsageInclude = { team?: boolean | Prisma.TeamDefaultArgs user?: boolean | Prisma.AiUsage$userArgs } export type AiUsageIncludeCreateManyAndReturn = { team?: boolean | Prisma.TeamDefaultArgs user?: boolean | Prisma.AiUsage$userArgs } export type AiUsageIncludeUpdateManyAndReturn = { team?: boolean | Prisma.TeamDefaultArgs user?: boolean | Prisma.AiUsage$userArgs } export type $AiUsagePayload = { name: "AiUsage" objects: { team: Prisma.$TeamPayload user: Prisma.$UserPayload | 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 = runtime.Types.Result.GetResult export type AiUsageCountArgs = Omit & { select?: AiUsageCountAggregateInputType | true } export interface AiUsageDelegate { [K: symbol]: { types: Prisma.TypeMap['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(args: Prisma.SelectSubset>): Prisma.Prisma__AiUsageClient, 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(args: Prisma.SelectSubset>): Prisma.Prisma__AiUsageClient, 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(args?: Prisma.SelectSubset>): Prisma.Prisma__AiUsageClient, 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(args?: Prisma.SelectSubset>): Prisma.Prisma__AiUsageClient, 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(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, 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(args: Prisma.SelectSubset>): Prisma.Prisma__AiUsageClient, 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(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * 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(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, 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(args: Prisma.SelectSubset>): Prisma.Prisma__AiUsageClient, 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(args: Prisma.SelectSubset>): Prisma.Prisma__AiUsageClient, 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(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * 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(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * 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(args: Prisma.SelectSubset>): Prisma.PrismaPromise, 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(args: Prisma.SelectSubset>): Prisma.Prisma__AiUsageClient, 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( args?: Prisma.Subset, ): Prisma.PrismaPromise< T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType : 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(args: Prisma.Subset): Prisma.PrismaPromise> /** * 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>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: AiUsageGroupByArgs['orderBy'] } : { orderBy?: AiUsageGroupByArgs['orderBy'] }, OrderFields extends Prisma.ExcludeUnderscoreKeys>>, ByFields extends Prisma.MaybeTupleToUnion, ByValid extends Prisma.Has, HavingFields extends Prisma.GetHavingFields, HavingValid extends Prisma.Has, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True ? `Error: "by" must not be empty.` : HavingValid extends Prisma.False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Prisma.Keys ? 'orderBy' extends Prisma.Keys ? ByValid extends Prisma.True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Prisma.Keys ? 'orderBy' extends Prisma.Keys ? ByValid extends Prisma.True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetAiUsageGroupByPayload : Prisma.PrismaPromise /** * 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 extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" team = {}>(args?: Prisma.Subset>): Prisma.Prisma__TeamClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> user = {}>(args?: Prisma.Subset>): Prisma.Prisma__UserClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise } /** * Fields of the 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 = { /** * Select specific fields to fetch from the AiUsage */ select?: Prisma.AiUsageSelect | null /** * Omit specific fields from the AiUsage */ omit?: Prisma.AiUsageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AiUsageInclude | null /** * Filter, which AiUsage to fetch. */ where: Prisma.AiUsageWhereUniqueInput } /** * AiUsage findUniqueOrThrow */ export type AiUsageFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the AiUsage */ select?: Prisma.AiUsageSelect | null /** * Omit specific fields from the AiUsage */ omit?: Prisma.AiUsageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AiUsageInclude | null /** * Filter, which AiUsage to fetch. */ where: Prisma.AiUsageWhereUniqueInput } /** * AiUsage findFirst */ export type AiUsageFindFirstArgs = { /** * Select specific fields to fetch from the AiUsage */ select?: Prisma.AiUsageSelect | null /** * Omit specific fields from the AiUsage */ omit?: Prisma.AiUsageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AiUsageInclude | 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 = { /** * Select specific fields to fetch from the AiUsage */ select?: Prisma.AiUsageSelect | null /** * Omit specific fields from the AiUsage */ omit?: Prisma.AiUsageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AiUsageInclude | 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 = { /** * Select specific fields to fetch from the AiUsage */ select?: Prisma.AiUsageSelect | null /** * Omit specific fields from the AiUsage */ omit?: Prisma.AiUsageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AiUsageInclude | 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 = { /** * Select specific fields to fetch from the AiUsage */ select?: Prisma.AiUsageSelect | null /** * Omit specific fields from the AiUsage */ omit?: Prisma.AiUsageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AiUsageInclude | null /** * The data needed to create a AiUsage. */ data: Prisma.XOR } /** * AiUsage createMany */ export type AiUsageCreateManyArgs = { /** * The data used to create many AiUsages. */ data: Prisma.AiUsageCreateManyInput | Prisma.AiUsageCreateManyInput[] skipDuplicates?: boolean } /** * AiUsage createManyAndReturn */ export type AiUsageCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the AiUsage */ select?: Prisma.AiUsageSelectCreateManyAndReturn | null /** * Omit specific fields from the AiUsage */ omit?: Prisma.AiUsageOmit | 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 | null } /** * AiUsage update */ export type AiUsageUpdateArgs = { /** * Select specific fields to fetch from the AiUsage */ select?: Prisma.AiUsageSelect | null /** * Omit specific fields from the AiUsage */ omit?: Prisma.AiUsageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AiUsageInclude | null /** * The data needed to update a AiUsage. */ data: Prisma.XOR /** * Choose, which AiUsage to update. */ where: Prisma.AiUsageWhereUniqueInput } /** * AiUsage updateMany */ export type AiUsageUpdateManyArgs = { /** * The data used to update AiUsages. */ data: Prisma.XOR /** * Filter which AiUsages to update */ where?: Prisma.AiUsageWhereInput /** * Limit how many AiUsages to update. */ limit?: number } /** * AiUsage updateManyAndReturn */ export type AiUsageUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the AiUsage */ select?: Prisma.AiUsageSelectUpdateManyAndReturn | null /** * Omit specific fields from the AiUsage */ omit?: Prisma.AiUsageOmit | null /** * The data used to update AiUsages. */ data: Prisma.XOR /** * 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 | null } /** * AiUsage upsert */ export type AiUsageUpsertArgs = { /** * Select specific fields to fetch from the AiUsage */ select?: Prisma.AiUsageSelect | null /** * Omit specific fields from the AiUsage */ omit?: Prisma.AiUsageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AiUsageInclude | 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 /** * In case the AiUsage was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * AiUsage delete */ export type AiUsageDeleteArgs = { /** * Select specific fields to fetch from the AiUsage */ select?: Prisma.AiUsageSelect | null /** * Omit specific fields from the AiUsage */ omit?: Prisma.AiUsageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AiUsageInclude | null /** * Filter which AiUsage to delete. */ where: Prisma.AiUsageWhereUniqueInput } /** * AiUsage deleteMany */ export type AiUsageDeleteManyArgs = { /** * Filter which AiUsages to delete */ where?: Prisma.AiUsageWhereInput /** * Limit how many AiUsages to delete. */ limit?: number } /** * AiUsage.user */ export type AiUsage$userArgs = { /** * Select specific fields to fetch from the User */ select?: Prisma.UserSelect | null /** * Omit specific fields from the User */ omit?: Prisma.UserOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.UserInclude | null where?: Prisma.UserWhereInput } /** * AiUsage without action */ export type AiUsageDefaultArgs = { /** * Select specific fields to fetch from the AiUsage */ select?: Prisma.AiUsageSelect | null /** * Omit specific fields from the AiUsage */ omit?: Prisma.AiUsageOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.AiUsageInclude | null }