/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
 * This file exports the `Tag` 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'
import type * as Prisma from '../internal/prismaNamespace'

/**
 * Model Tag
 *
 */
export type TagModel = runtime.Types.Result.DefaultSelection<Prisma.$TagPayload>

export type AggregateTag = {
  _count: TagCountAggregateOutputType | null
  _min: TagMinAggregateOutputType | null
  _max: TagMaxAggregateOutputType | null
}

export type TagMinAggregateOutputType = {
  id: string | null
  name: string | null
  description: string | null
  userId: string | null
}

export type TagMaxAggregateOutputType = {
  id: string | null
  name: string | null
  description: string | null
  userId: string | null
}

export type TagCountAggregateOutputType = {
  id: number
  name: number
  description: number
  userId: number
  _all: number
}

export type TagMinAggregateInputType = {
  id?: true
  name?: true
  description?: true
  userId?: true
}

export type TagMaxAggregateInputType = {
  id?: true
  name?: true
  description?: true
  userId?: true
}

export type TagCountAggregateInputType = {
  id?: true
  name?: true
  description?: true
  userId?: true
  _all?: true
}

export type TagAggregateArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Filter which Tag to aggregate.
   */
  where?: Prisma.TagWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   *
   * Determine the order of Tags to fetch.
   */
  orderBy?: Prisma.TagOrderByWithRelationInput | Prisma.TagOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   *
   * Sets the start position
   */
  cursor?: Prisma.TagWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Take `±n` Tags 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` Tags.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   *
   * Count returned Tags
   **/
  _count?: true | TagCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   *
   * Select which fields to find the minimum value
   **/
  _min?: TagMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   *
   * Select which fields to find the maximum value
   **/
  _max?: TagMaxAggregateInputType
}

export type GetTagAggregateType<T extends TagAggregateArgs> = {
  [P in keyof T & keyof AggregateTag]: P extends '_count' | 'count'
    ? T[P] extends true
      ? number
      : Prisma.GetScalarType<T[P], AggregateTag[P]>
    : Prisma.GetScalarType<T[P], AggregateTag[P]>
}

export type TagGroupByArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  where?: Prisma.TagWhereInput
  orderBy?: Prisma.TagOrderByWithAggregationInput | Prisma.TagOrderByWithAggregationInput[]
  by: Prisma.TagScalarFieldEnum[] | Prisma.TagScalarFieldEnum
  having?: Prisma.TagScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: TagCountAggregateInputType | true
  _min?: TagMinAggregateInputType
  _max?: TagMaxAggregateInputType
}

export type TagGroupByOutputType = {
  id: string
  name: string
  description: string | null
  userId: string
  _count: TagCountAggregateOutputType | null
  _min: TagMinAggregateOutputType | null
  _max: TagMaxAggregateOutputType | null
}

type GetTagGroupByPayload<T extends TagGroupByArgs> = Prisma.PrismaPromise<
  Array<
    Prisma.PickEnumerable<TagGroupByOutputType, T['by']> & {
      [P in keyof T & keyof TagGroupByOutputType]: P extends '_count'
        ? T[P] extends boolean
          ? number
          : Prisma.GetScalarType<T[P], TagGroupByOutputType[P]>
        : Prisma.GetScalarType<T[P], TagGroupByOutputType[P]>
    }
  >
>

export type TagWhereInput = {
  AND?: Prisma.TagWhereInput | Prisma.TagWhereInput[]
  OR?: Prisma.TagWhereInput[]
  NOT?: Prisma.TagWhereInput | Prisma.TagWhereInput[]
  id?: Prisma.UuidFilter<'Tag'> | string
  name?: Prisma.StringFilter<'Tag'> | string
  description?: Prisma.StringNullableFilter<'Tag'> | string | null
  userId?: Prisma.UuidFilter<'Tag'> | string
  contacts?: Prisma.ContactListRelationFilter
  user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
}

export type TagOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  description?: Prisma.SortOrderInput | Prisma.SortOrder
  userId?: Prisma.SortOrder
  contacts?: Prisma.ContactOrderByRelationAggregateInput
  user?: Prisma.UserOrderByWithRelationInput
}

export type TagWhereUniqueInput = Prisma.AtLeast<
  {
    id?: string
    AND?: Prisma.TagWhereInput | Prisma.TagWhereInput[]
    OR?: Prisma.TagWhereInput[]
    NOT?: Prisma.TagWhereInput | Prisma.TagWhereInput[]
    name?: Prisma.StringFilter<'Tag'> | string
    description?: Prisma.StringNullableFilter<'Tag'> | string | null
    userId?: Prisma.UuidFilter<'Tag'> | string
    contacts?: Prisma.ContactListRelationFilter
    user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
  },
  'id'
>

export type TagOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  description?: Prisma.SortOrderInput | Prisma.SortOrder
  userId?: Prisma.SortOrder
  _count?: Prisma.TagCountOrderByAggregateInput
  _max?: Prisma.TagMaxOrderByAggregateInput
  _min?: Prisma.TagMinOrderByAggregateInput
}

export type TagScalarWhereWithAggregatesInput = {
  AND?: Prisma.TagScalarWhereWithAggregatesInput | Prisma.TagScalarWhereWithAggregatesInput[]
  OR?: Prisma.TagScalarWhereWithAggregatesInput[]
  NOT?: Prisma.TagScalarWhereWithAggregatesInput | Prisma.TagScalarWhereWithAggregatesInput[]
  id?: Prisma.UuidWithAggregatesFilter<'Tag'> | string
  name?: Prisma.StringWithAggregatesFilter<'Tag'> | string
  description?: Prisma.StringNullableWithAggregatesFilter<'Tag'> | string | null
  userId?: Prisma.UuidWithAggregatesFilter<'Tag'> | string
}

export type TagCreateInput = {
  id?: string
  name: string
  description?: string | null
  contacts?: Prisma.ContactCreateNestedManyWithoutTagsInput
  user: Prisma.UserCreateNestedOneWithoutTagsInput
}

export type TagUncheckedCreateInput = {
  id?: string
  name: string
  description?: string | null
  userId: string
  contacts?: Prisma.ContactUncheckedCreateNestedManyWithoutTagsInput
}

export type TagUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  contacts?: Prisma.ContactUpdateManyWithoutTagsNestedInput
  user?: Prisma.UserUpdateOneRequiredWithoutTagsNestedInput
}

export type TagUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  userId?: Prisma.StringFieldUpdateOperationsInput | string
  contacts?: Prisma.ContactUncheckedUpdateManyWithoutTagsNestedInput
}

export type TagCreateManyInput = {
  id?: string
  name: string
  description?: string | null
  userId: string
}

export type TagUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}

export type TagUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  userId?: Prisma.StringFieldUpdateOperationsInput | string
}

export type TagListRelationFilter = {
  every?: Prisma.TagWhereInput
  some?: Prisma.TagWhereInput
  none?: Prisma.TagWhereInput
}

export type TagOrderByRelationAggregateInput = {
  _count?: Prisma.SortOrder
}

export type TagCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  description?: Prisma.SortOrder
  userId?: Prisma.SortOrder
}

export type TagMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  description?: Prisma.SortOrder
  userId?: Prisma.SortOrder
}

export type TagMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  name?: Prisma.SortOrder
  description?: Prisma.SortOrder
  userId?: Prisma.SortOrder
}

export type TagCreateNestedManyWithoutContactsInput = {
  create?:
    | Prisma.XOR<Prisma.TagCreateWithoutContactsInput, Prisma.TagUncheckedCreateWithoutContactsInput>
    | Prisma.TagCreateWithoutContactsInput[]
    | Prisma.TagUncheckedCreateWithoutContactsInput[]
  connectOrCreate?: Prisma.TagCreateOrConnectWithoutContactsInput | Prisma.TagCreateOrConnectWithoutContactsInput[]
  connect?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
}

export type TagUncheckedCreateNestedManyWithoutContactsInput = {
  create?:
    | Prisma.XOR<Prisma.TagCreateWithoutContactsInput, Prisma.TagUncheckedCreateWithoutContactsInput>
    | Prisma.TagCreateWithoutContactsInput[]
    | Prisma.TagUncheckedCreateWithoutContactsInput[]
  connectOrCreate?: Prisma.TagCreateOrConnectWithoutContactsInput | Prisma.TagCreateOrConnectWithoutContactsInput[]
  connect?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
}

export type TagUpdateManyWithoutContactsNestedInput = {
  create?:
    | Prisma.XOR<Prisma.TagCreateWithoutContactsInput, Prisma.TagUncheckedCreateWithoutContactsInput>
    | Prisma.TagCreateWithoutContactsInput[]
    | Prisma.TagUncheckedCreateWithoutContactsInput[]
  connectOrCreate?: Prisma.TagCreateOrConnectWithoutContactsInput | Prisma.TagCreateOrConnectWithoutContactsInput[]
  upsert?: Prisma.TagUpsertWithWhereUniqueWithoutContactsInput | Prisma.TagUpsertWithWhereUniqueWithoutContactsInput[]
  set?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  disconnect?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  delete?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  connect?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  update?: Prisma.TagUpdateWithWhereUniqueWithoutContactsInput | Prisma.TagUpdateWithWhereUniqueWithoutContactsInput[]
  updateMany?: Prisma.TagUpdateManyWithWhereWithoutContactsInput | Prisma.TagUpdateManyWithWhereWithoutContactsInput[]
  deleteMany?: Prisma.TagScalarWhereInput | Prisma.TagScalarWhereInput[]
}

export type TagUncheckedUpdateManyWithoutContactsNestedInput = {
  create?:
    | Prisma.XOR<Prisma.TagCreateWithoutContactsInput, Prisma.TagUncheckedCreateWithoutContactsInput>
    | Prisma.TagCreateWithoutContactsInput[]
    | Prisma.TagUncheckedCreateWithoutContactsInput[]
  connectOrCreate?: Prisma.TagCreateOrConnectWithoutContactsInput | Prisma.TagCreateOrConnectWithoutContactsInput[]
  upsert?: Prisma.TagUpsertWithWhereUniqueWithoutContactsInput | Prisma.TagUpsertWithWhereUniqueWithoutContactsInput[]
  set?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  disconnect?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  delete?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  connect?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  update?: Prisma.TagUpdateWithWhereUniqueWithoutContactsInput | Prisma.TagUpdateWithWhereUniqueWithoutContactsInput[]
  updateMany?: Prisma.TagUpdateManyWithWhereWithoutContactsInput | Prisma.TagUpdateManyWithWhereWithoutContactsInput[]
  deleteMany?: Prisma.TagScalarWhereInput | Prisma.TagScalarWhereInput[]
}

export type TagCreateNestedManyWithoutUserInput = {
  create?:
    | Prisma.XOR<Prisma.TagCreateWithoutUserInput, Prisma.TagUncheckedCreateWithoutUserInput>
    | Prisma.TagCreateWithoutUserInput[]
    | Prisma.TagUncheckedCreateWithoutUserInput[]
  connectOrCreate?: Prisma.TagCreateOrConnectWithoutUserInput | Prisma.TagCreateOrConnectWithoutUserInput[]
  createMany?: Prisma.TagCreateManyUserInputEnvelope
  connect?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
}

export type TagUncheckedCreateNestedManyWithoutUserInput = {
  create?:
    | Prisma.XOR<Prisma.TagCreateWithoutUserInput, Prisma.TagUncheckedCreateWithoutUserInput>
    | Prisma.TagCreateWithoutUserInput[]
    | Prisma.TagUncheckedCreateWithoutUserInput[]
  connectOrCreate?: Prisma.TagCreateOrConnectWithoutUserInput | Prisma.TagCreateOrConnectWithoutUserInput[]
  createMany?: Prisma.TagCreateManyUserInputEnvelope
  connect?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
}

export type TagUpdateManyWithoutUserNestedInput = {
  create?:
    | Prisma.XOR<Prisma.TagCreateWithoutUserInput, Prisma.TagUncheckedCreateWithoutUserInput>
    | Prisma.TagCreateWithoutUserInput[]
    | Prisma.TagUncheckedCreateWithoutUserInput[]
  connectOrCreate?: Prisma.TagCreateOrConnectWithoutUserInput | Prisma.TagCreateOrConnectWithoutUserInput[]
  upsert?: Prisma.TagUpsertWithWhereUniqueWithoutUserInput | Prisma.TagUpsertWithWhereUniqueWithoutUserInput[]
  createMany?: Prisma.TagCreateManyUserInputEnvelope
  set?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  disconnect?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  delete?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  connect?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  update?: Prisma.TagUpdateWithWhereUniqueWithoutUserInput | Prisma.TagUpdateWithWhereUniqueWithoutUserInput[]
  updateMany?: Prisma.TagUpdateManyWithWhereWithoutUserInput | Prisma.TagUpdateManyWithWhereWithoutUserInput[]
  deleteMany?: Prisma.TagScalarWhereInput | Prisma.TagScalarWhereInput[]
}

export type TagUncheckedUpdateManyWithoutUserNestedInput = {
  create?:
    | Prisma.XOR<Prisma.TagCreateWithoutUserInput, Prisma.TagUncheckedCreateWithoutUserInput>
    | Prisma.TagCreateWithoutUserInput[]
    | Prisma.TagUncheckedCreateWithoutUserInput[]
  connectOrCreate?: Prisma.TagCreateOrConnectWithoutUserInput | Prisma.TagCreateOrConnectWithoutUserInput[]
  upsert?: Prisma.TagUpsertWithWhereUniqueWithoutUserInput | Prisma.TagUpsertWithWhereUniqueWithoutUserInput[]
  createMany?: Prisma.TagCreateManyUserInputEnvelope
  set?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  disconnect?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  delete?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  connect?: Prisma.TagWhereUniqueInput | Prisma.TagWhereUniqueInput[]
  update?: Prisma.TagUpdateWithWhereUniqueWithoutUserInput | Prisma.TagUpdateWithWhereUniqueWithoutUserInput[]
  updateMany?: Prisma.TagUpdateManyWithWhereWithoutUserInput | Prisma.TagUpdateManyWithWhereWithoutUserInput[]
  deleteMany?: Prisma.TagScalarWhereInput | Prisma.TagScalarWhereInput[]
}

export type TagCreateWithoutContactsInput = {
  id?: string
  name: string
  description?: string | null
  user: Prisma.UserCreateNestedOneWithoutTagsInput
}

export type TagUncheckedCreateWithoutContactsInput = {
  id?: string
  name: string
  description?: string | null
  userId: string
}

export type TagCreateOrConnectWithoutContactsInput = {
  where: Prisma.TagWhereUniqueInput
  create: Prisma.XOR<Prisma.TagCreateWithoutContactsInput, Prisma.TagUncheckedCreateWithoutContactsInput>
}

export type TagUpsertWithWhereUniqueWithoutContactsInput = {
  where: Prisma.TagWhereUniqueInput
  update: Prisma.XOR<Prisma.TagUpdateWithoutContactsInput, Prisma.TagUncheckedUpdateWithoutContactsInput>
  create: Prisma.XOR<Prisma.TagCreateWithoutContactsInput, Prisma.TagUncheckedCreateWithoutContactsInput>
}

export type TagUpdateWithWhereUniqueWithoutContactsInput = {
  where: Prisma.TagWhereUniqueInput
  data: Prisma.XOR<Prisma.TagUpdateWithoutContactsInput, Prisma.TagUncheckedUpdateWithoutContactsInput>
}

export type TagUpdateManyWithWhereWithoutContactsInput = {
  where: Prisma.TagScalarWhereInput
  data: Prisma.XOR<Prisma.TagUpdateManyMutationInput, Prisma.TagUncheckedUpdateManyWithoutContactsInput>
}

export type TagScalarWhereInput = {
  AND?: Prisma.TagScalarWhereInput | Prisma.TagScalarWhereInput[]
  OR?: Prisma.TagScalarWhereInput[]
  NOT?: Prisma.TagScalarWhereInput | Prisma.TagScalarWhereInput[]
  id?: Prisma.UuidFilter<'Tag'> | string
  name?: Prisma.StringFilter<'Tag'> | string
  description?: Prisma.StringNullableFilter<'Tag'> | string | null
  userId?: Prisma.UuidFilter<'Tag'> | string
}

export type TagCreateWithoutUserInput = {
  id?: string
  name: string
  description?: string | null
  contacts?: Prisma.ContactCreateNestedManyWithoutTagsInput
}

export type TagUncheckedCreateWithoutUserInput = {
  id?: string
  name: string
  description?: string | null
  contacts?: Prisma.ContactUncheckedCreateNestedManyWithoutTagsInput
}

export type TagCreateOrConnectWithoutUserInput = {
  where: Prisma.TagWhereUniqueInput
  create: Prisma.XOR<Prisma.TagCreateWithoutUserInput, Prisma.TagUncheckedCreateWithoutUserInput>
}

export type TagCreateManyUserInputEnvelope = {
  data: Prisma.TagCreateManyUserInput | Prisma.TagCreateManyUserInput[]
  skipDuplicates?: boolean
}

export type TagUpsertWithWhereUniqueWithoutUserInput = {
  where: Prisma.TagWhereUniqueInput
  update: Prisma.XOR<Prisma.TagUpdateWithoutUserInput, Prisma.TagUncheckedUpdateWithoutUserInput>
  create: Prisma.XOR<Prisma.TagCreateWithoutUserInput, Prisma.TagUncheckedCreateWithoutUserInput>
}

export type TagUpdateWithWhereUniqueWithoutUserInput = {
  where: Prisma.TagWhereUniqueInput
  data: Prisma.XOR<Prisma.TagUpdateWithoutUserInput, Prisma.TagUncheckedUpdateWithoutUserInput>
}

export type TagUpdateManyWithWhereWithoutUserInput = {
  where: Prisma.TagScalarWhereInput
  data: Prisma.XOR<Prisma.TagUpdateManyMutationInput, Prisma.TagUncheckedUpdateManyWithoutUserInput>
}

export type TagUpdateWithoutContactsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  user?: Prisma.UserUpdateOneRequiredWithoutTagsNestedInput
}

export type TagUncheckedUpdateWithoutContactsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  userId?: Prisma.StringFieldUpdateOperationsInput | string
}

export type TagUncheckedUpdateManyWithoutContactsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  userId?: Prisma.StringFieldUpdateOperationsInput | string
}

export type TagCreateManyUserInput = {
  id?: string
  name: string
  description?: string | null
}

export type TagUpdateWithoutUserInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  contacts?: Prisma.ContactUpdateManyWithoutTagsNestedInput
}

export type TagUncheckedUpdateWithoutUserInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  contacts?: Prisma.ContactUncheckedUpdateManyWithoutTagsNestedInput
}

export type TagUncheckedUpdateManyWithoutUserInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}

/**
 * Count Type TagCountOutputType
 */

export type TagCountOutputType = {
  contacts: number
}

export type TagCountOutputTypeSelect<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  contacts?: boolean | TagCountOutputTypeCountContactsArgs
}

/**
 * TagCountOutputType without action
 */
export type TagCountOutputTypeDefaultArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Select specific fields to fetch from the TagCountOutputType
   */
  select?: Prisma.TagCountOutputTypeSelect<ExtArgs> | null
}

/**
 * TagCountOutputType without action
 */
export type TagCountOutputTypeCountContactsArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  where?: Prisma.ContactWhereInput
}

export type TagSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
  runtime.Types.Extensions.GetSelect<
    {
      id?: boolean
      name?: boolean
      description?: boolean
      userId?: boolean
      contacts?: boolean | Prisma.Tag$contactsArgs<ExtArgs>
      user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
      _count?: boolean | Prisma.TagCountOutputTypeDefaultArgs<ExtArgs>
    },
    ExtArgs['result']['tag']
  >

export type TagSelectCreateManyAndReturn<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = runtime.Types.Extensions.GetSelect<
  {
    id?: boolean
    name?: boolean
    description?: boolean
    userId?: boolean
    user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
  },
  ExtArgs['result']['tag']
>

export type TagSelectUpdateManyAndReturn<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = runtime.Types.Extensions.GetSelect<
  {
    id?: boolean
    name?: boolean
    description?: boolean
    userId?: boolean
    user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
  },
  ExtArgs['result']['tag']
>

export type TagSelectScalar = {
  id?: boolean
  name?: boolean
  description?: boolean
  userId?: boolean
}

export type TagOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
  runtime.Types.Extensions.GetOmit<'id' | 'name' | 'description' | 'userId', ExtArgs['result']['tag']>
export type TagInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  contacts?: boolean | Prisma.Tag$contactsArgs<ExtArgs>
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
  _count?: boolean | Prisma.TagCountOutputTypeDefaultArgs<ExtArgs>
}
export type TagIncludeCreateManyAndReturn<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}
export type TagIncludeUpdateManyAndReturn<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}

export type $TagPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
  {
    name: 'Tag'
    objects: {
      contacts: Prisma.$ContactPayload<ExtArgs>[]
      user: Prisma.$UserPayload<ExtArgs>
    }
    scalars: runtime.Types.Extensions.GetPayloadResult<
      {
        id: string
        name: string
        description: string | null
        userId: string
      },
      ExtArgs['result']['tag']
    >
    composites: {}
  }

export type TagGetPayload<S extends boolean | null | undefined | TagDefaultArgs> = runtime.Types.Result.GetResult<
  Prisma.$TagPayload,
  S
>

export type TagCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
  Omit<TagFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
    select?: TagCountAggregateInputType | true
  }

export interface TagDelegate<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
  GlobalOmitOptions = {},
> {
  [K: symbol]: {types: Prisma.TypeMap<ExtArgs>['model']['Tag']; meta: {name: 'Tag'}}
  /**
   * Find zero or one Tag that matches the filter.
   * @param {TagFindUniqueArgs} args - Arguments to find a Tag
   * @example
   * // Get one Tag
   * const tag = await prisma.tag.findUnique({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findUnique<T extends TagFindUniqueArgs>(
    args: Prisma.SelectSubset<T, TagFindUniqueArgs<ExtArgs>>,
  ): Prisma.Prisma__TagClient<
    runtime.Types.Result.GetResult<Prisma.$TagPayload<ExtArgs>, T, 'findUnique', GlobalOmitOptions> | null,
    null,
    ExtArgs,
    GlobalOmitOptions
  >

  /**
   * Find one Tag that matches the filter or throw an error with `error.code='P2025'`
   * if no matches were found.
   * @param {TagFindUniqueOrThrowArgs} args - Arguments to find a Tag
   * @example
   * // Get one Tag
   * const tag = await prisma.tag.findUniqueOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findUniqueOrThrow<T extends TagFindUniqueOrThrowArgs>(
    args: Prisma.SelectSubset<T, TagFindUniqueOrThrowArgs<ExtArgs>>,
  ): Prisma.Prisma__TagClient<
    runtime.Types.Result.GetResult<Prisma.$TagPayload<ExtArgs>, T, 'findUniqueOrThrow', GlobalOmitOptions>,
    never,
    ExtArgs,
    GlobalOmitOptions
  >

  /**
   * Find the first Tag 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 {TagFindFirstArgs} args - Arguments to find a Tag
   * @example
   * // Get one Tag
   * const tag = await prisma.tag.findFirst({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirst<T extends TagFindFirstArgs>(
    args?: Prisma.SelectSubset<T, TagFindFirstArgs<ExtArgs>>,
  ): Prisma.Prisma__TagClient<
    runtime.Types.Result.GetResult<Prisma.$TagPayload<ExtArgs>, T, 'findFirst', GlobalOmitOptions> | null,
    null,
    ExtArgs,
    GlobalOmitOptions
  >

  /**
   * Find the first Tag 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 {TagFindFirstOrThrowArgs} args - Arguments to find a Tag
   * @example
   * // Get one Tag
   * const tag = await prisma.tag.findFirstOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirstOrThrow<T extends TagFindFirstOrThrowArgs>(
    args?: Prisma.SelectSubset<T, TagFindFirstOrThrowArgs<ExtArgs>>,
  ): Prisma.Prisma__TagClient<
    runtime.Types.Result.GetResult<Prisma.$TagPayload<ExtArgs>, T, 'findFirstOrThrow', GlobalOmitOptions>,
    never,
    ExtArgs,
    GlobalOmitOptions
  >

  /**
   * Find zero or more Tags 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 {TagFindManyArgs} args - Arguments to filter and select certain fields only.
   * @example
   * // Get all Tags
   * const tags = await prisma.tag.findMany()
   *
   * // Get first 10 Tags
   * const tags = await prisma.tag.findMany({ take: 10 })
   *
   * // Only select the `id`
   * const tagWithIdOnly = await prisma.tag.findMany({ select: { id: true } })
   *
   */
  findMany<T extends TagFindManyArgs>(
    args?: Prisma.SelectSubset<T, TagFindManyArgs<ExtArgs>>,
  ): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$TagPayload<ExtArgs>, T, 'findMany', GlobalOmitOptions>>

  /**
   * Create a Tag.
   * @param {TagCreateArgs} args - Arguments to create a Tag.
   * @example
   * // Create one Tag
   * const Tag = await prisma.tag.create({
   *   data: {
   *     // ... data to create a Tag
   *   }
   * })
   *
   */
  create<T extends TagCreateArgs>(
    args: Prisma.SelectSubset<T, TagCreateArgs<ExtArgs>>,
  ): Prisma.Prisma__TagClient<
    runtime.Types.Result.GetResult<Prisma.$TagPayload<ExtArgs>, T, 'create', GlobalOmitOptions>,
    never,
    ExtArgs,
    GlobalOmitOptions
  >

  /**
   * Create many Tags.
   * @param {TagCreateManyArgs} args - Arguments to create many Tags.
   * @example
   * // Create many Tags
   * const tag = await prisma.tag.createMany({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   *
   */
  createMany<T extends TagCreateManyArgs>(
    args?: Prisma.SelectSubset<T, TagCreateManyArgs<ExtArgs>>,
  ): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Create many Tags and returns the data saved in the database.
   * @param {TagCreateManyAndReturnArgs} args - Arguments to create many Tags.
   * @example
   * // Create many Tags
   * const tag = await prisma.tag.createManyAndReturn({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   *
   * // Create many Tags and only return the `id`
   * const tagWithIdOnly = await prisma.tag.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 TagCreateManyAndReturnArgs>(
    args?: Prisma.SelectSubset<T, TagCreateManyAndReturnArgs<ExtArgs>>,
  ): Prisma.PrismaPromise<
    runtime.Types.Result.GetResult<Prisma.$TagPayload<ExtArgs>, T, 'createManyAndReturn', GlobalOmitOptions>
  >

  /**
   * Delete a Tag.
   * @param {TagDeleteArgs} args - Arguments to delete one Tag.
   * @example
   * // Delete one Tag
   * const Tag = await prisma.tag.delete({
   *   where: {
   *     // ... filter to delete one Tag
   *   }
   * })
   *
   */
  delete<T extends TagDeleteArgs>(
    args: Prisma.SelectSubset<T, TagDeleteArgs<ExtArgs>>,
  ): Prisma.Prisma__TagClient<
    runtime.Types.Result.GetResult<Prisma.$TagPayload<ExtArgs>, T, 'delete', GlobalOmitOptions>,
    never,
    ExtArgs,
    GlobalOmitOptions
  >

  /**
   * Update one Tag.
   * @param {TagUpdateArgs} args - Arguments to update one Tag.
   * @example
   * // Update one Tag
   * const tag = await prisma.tag.update({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   *
   */
  update<T extends TagUpdateArgs>(
    args: Prisma.SelectSubset<T, TagUpdateArgs<ExtArgs>>,
  ): Prisma.Prisma__TagClient<
    runtime.Types.Result.GetResult<Prisma.$TagPayload<ExtArgs>, T, 'update', GlobalOmitOptions>,
    never,
    ExtArgs,
    GlobalOmitOptions
  >

  /**
   * Delete zero or more Tags.
   * @param {TagDeleteManyArgs} args - Arguments to filter Tags to delete.
   * @example
   * // Delete a few Tags
   * const { count } = await prisma.tag.deleteMany({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   *
   */
  deleteMany<T extends TagDeleteManyArgs>(
    args?: Prisma.SelectSubset<T, TagDeleteManyArgs<ExtArgs>>,
  ): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Update zero or more Tags.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {TagUpdateManyArgs} args - Arguments to update one or more rows.
   * @example
   * // Update many Tags
   * const tag = await prisma.tag.updateMany({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   *
   */
  updateMany<T extends TagUpdateManyArgs>(
    args: Prisma.SelectSubset<T, TagUpdateManyArgs<ExtArgs>>,
  ): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Update zero or more Tags and returns the data updated in the database.
   * @param {TagUpdateManyAndReturnArgs} args - Arguments to update many Tags.
   * @example
   * // Update many Tags
   * const tag = await prisma.tag.updateManyAndReturn({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   *
   * // Update zero or more Tags and only return the `id`
   * const tagWithIdOnly = await prisma.tag.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 TagUpdateManyAndReturnArgs>(
    args: Prisma.SelectSubset<T, TagUpdateManyAndReturnArgs<ExtArgs>>,
  ): Prisma.PrismaPromise<
    runtime.Types.Result.GetResult<Prisma.$TagPayload<ExtArgs>, T, 'updateManyAndReturn', GlobalOmitOptions>
  >

  /**
   * Create or update one Tag.
   * @param {TagUpsertArgs} args - Arguments to update or create a Tag.
   * @example
   * // Update or create a Tag
   * const tag = await prisma.tag.upsert({
   *   create: {
   *     // ... data to create a Tag
   *   },
   *   update: {
   *     // ... in case it already exists, update
   *   },
   *   where: {
   *     // ... the filter for the Tag we want to update
   *   }
   * })
   */
  upsert<T extends TagUpsertArgs>(
    args: Prisma.SelectSubset<T, TagUpsertArgs<ExtArgs>>,
  ): Prisma.Prisma__TagClient<
    runtime.Types.Result.GetResult<Prisma.$TagPayload<ExtArgs>, T, 'upsert', GlobalOmitOptions>,
    never,
    ExtArgs,
    GlobalOmitOptions
  >

  /**
   * Count the number of Tags.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {TagCountArgs} args - Arguments to filter Tags to count.
   * @example
   * // Count the number of Tags
   * const count = await prisma.tag.count({
   *   where: {
   *     // ... the filter for the Tags we want to count
   *   }
   * })
   **/
  count<T extends TagCountArgs>(
    args?: Prisma.Subset<T, TagCountArgs>,
  ): Prisma.PrismaPromise<
    T extends runtime.Types.Utils.Record<'select', any>
      ? T['select'] extends true
        ? number
        : Prisma.GetScalarType<T['select'], TagCountAggregateOutputType>
      : number
  >

  /**
   * Allows you to perform aggregations operations on a Tag.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {TagAggregateArgs} 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 TagAggregateArgs>(
    args: Prisma.Subset<T, TagAggregateArgs>,
  ): Prisma.PrismaPromise<GetTagAggregateType<T>>

  /**
   * Group by Tag.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {TagGroupByArgs} 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 TagGroupByArgs,
    HasSelectOrTake extends Prisma.Or<Prisma.Extends<'skip', Prisma.Keys<T>>, Prisma.Extends<'take', Prisma.Keys<T>>>,
    OrderByArg extends Prisma.True extends HasSelectOrTake
      ? {orderBy: TagGroupByArgs['orderBy']}
      : {orderBy?: TagGroupByArgs['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, TagGroupByArgs, OrderByArg> & InputErrors,
  ): {} extends InputErrors ? GetTagGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
  /**
   * Fields of the Tag model
   */
  readonly fields: TagFieldRefs
}

/**
 * The delegate class that acts as a "Promise-like" for Tag.
 * 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__TagClient<
  T,
  Null = never,
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
  GlobalOmitOptions = {},
> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: 'PrismaPromise'
  contacts<T extends Prisma.Tag$contactsArgs<ExtArgs> = {}>(
    args?: Prisma.Subset<T, Prisma.Tag$contactsArgs<ExtArgs>>,
  ): Prisma.PrismaPromise<
    runtime.Types.Result.GetResult<Prisma.$ContactPayload<ExtArgs>, T, 'findMany', GlobalOmitOptions> | Null
  >
  user<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(
    args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>,
  ): Prisma.Prisma__UserClient<
    runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, 'findUniqueOrThrow', GlobalOmitOptions> | Null,
    Null,
    ExtArgs,
    GlobalOmitOptions
  >
  /**
   * Attaches callbacks for the resolution and/or rejection of the Promise.
   * @param onfulfilled The callback to execute when the Promise is resolved.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of which ever callback is executed.
   */
  then<TResult1 = T, TResult2 = never>(
    onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null,
    onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null,
  ): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
  /**
   * Attaches a callback for only the rejection of the Promise.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of the callback.
   */
  catch<TResult = never>(
    onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null,
  ): runtime.Types.Utils.JsPromise<T | TResult>
  /**
   * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
   * resolved value cannot be modified from the callback.
   * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
   * @returns A Promise for the completion of the callback.
   */
  finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
}

/**
 * Fields of the Tag model
 */
export interface TagFieldRefs {
  readonly id: Prisma.FieldRef<'Tag', 'String'>
  readonly name: Prisma.FieldRef<'Tag', 'String'>
  readonly description: Prisma.FieldRef<'Tag', 'String'>
  readonly userId: Prisma.FieldRef<'Tag', 'String'>
}

// Custom InputTypes
/**
 * Tag findUnique
 */
export type TagFindUniqueArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Select specific fields to fetch from the Tag
   */
  select?: Prisma.TagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Tag
   */
  omit?: Prisma.TagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TagInclude<ExtArgs> | null
  /**
   * Filter, which Tag to fetch.
   */
  where: Prisma.TagWhereUniqueInput
}

/**
 * Tag findUniqueOrThrow
 */
export type TagFindUniqueOrThrowArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Select specific fields to fetch from the Tag
   */
  select?: Prisma.TagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Tag
   */
  omit?: Prisma.TagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TagInclude<ExtArgs> | null
  /**
   * Filter, which Tag to fetch.
   */
  where: Prisma.TagWhereUniqueInput
}

/**
 * Tag findFirst
 */
export type TagFindFirstArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Select specific fields to fetch from the Tag
   */
  select?: Prisma.TagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Tag
   */
  omit?: Prisma.TagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TagInclude<ExtArgs> | null
  /**
   * Filter, which Tag to fetch.
   */
  where?: Prisma.TagWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   *
   * Determine the order of Tags to fetch.
   */
  orderBy?: Prisma.TagOrderByWithRelationInput | Prisma.TagOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   *
   * Sets the position for searching for Tags.
   */
  cursor?: Prisma.TagWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Take `±n` Tags 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` Tags.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   *
   * Filter by unique combinations of Tags.
   */
  distinct?: Prisma.TagScalarFieldEnum | Prisma.TagScalarFieldEnum[]
}

/**
 * Tag findFirstOrThrow
 */
export type TagFindFirstOrThrowArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Select specific fields to fetch from the Tag
   */
  select?: Prisma.TagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Tag
   */
  omit?: Prisma.TagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TagInclude<ExtArgs> | null
  /**
   * Filter, which Tag to fetch.
   */
  where?: Prisma.TagWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   *
   * Determine the order of Tags to fetch.
   */
  orderBy?: Prisma.TagOrderByWithRelationInput | Prisma.TagOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   *
   * Sets the position for searching for Tags.
   */
  cursor?: Prisma.TagWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Take `±n` Tags 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` Tags.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   *
   * Filter by unique combinations of Tags.
   */
  distinct?: Prisma.TagScalarFieldEnum | Prisma.TagScalarFieldEnum[]
}

/**
 * Tag findMany
 */
export type TagFindManyArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Select specific fields to fetch from the Tag
   */
  select?: Prisma.TagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Tag
   */
  omit?: Prisma.TagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TagInclude<ExtArgs> | null
  /**
   * Filter, which Tags to fetch.
   */
  where?: Prisma.TagWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   *
   * Determine the order of Tags to fetch.
   */
  orderBy?: Prisma.TagOrderByWithRelationInput | Prisma.TagOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   *
   * Sets the position for listing Tags.
   */
  cursor?: Prisma.TagWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   *
   * Take `±n` Tags 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` Tags.
   */
  skip?: number
  distinct?: Prisma.TagScalarFieldEnum | Prisma.TagScalarFieldEnum[]
}

/**
 * Tag create
 */
export type TagCreateArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Select specific fields to fetch from the Tag
   */
  select?: Prisma.TagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Tag
   */
  omit?: Prisma.TagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TagInclude<ExtArgs> | null
  /**
   * The data needed to create a Tag.
   */
  data: Prisma.XOR<Prisma.TagCreateInput, Prisma.TagUncheckedCreateInput>
}

/**
 * Tag createMany
 */
export type TagCreateManyArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * The data used to create many Tags.
   */
  data: Prisma.TagCreateManyInput | Prisma.TagCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * Tag createManyAndReturn
 */
export type TagCreateManyAndReturnArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Select specific fields to fetch from the Tag
   */
  select?: Prisma.TagSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Tag
   */
  omit?: Prisma.TagOmit<ExtArgs> | null
  /**
   * The data used to create many Tags.
   */
  data: Prisma.TagCreateManyInput | Prisma.TagCreateManyInput[]
  skipDuplicates?: boolean
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TagIncludeCreateManyAndReturn<ExtArgs> | null
}

/**
 * Tag update
 */
export type TagUpdateArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Select specific fields to fetch from the Tag
   */
  select?: Prisma.TagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Tag
   */
  omit?: Prisma.TagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TagInclude<ExtArgs> | null
  /**
   * The data needed to update a Tag.
   */
  data: Prisma.XOR<Prisma.TagUpdateInput, Prisma.TagUncheckedUpdateInput>
  /**
   * Choose, which Tag to update.
   */
  where: Prisma.TagWhereUniqueInput
}

/**
 * Tag updateMany
 */
export type TagUpdateManyArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * The data used to update Tags.
   */
  data: Prisma.XOR<Prisma.TagUpdateManyMutationInput, Prisma.TagUncheckedUpdateManyInput>
  /**
   * Filter which Tags to update
   */
  where?: Prisma.TagWhereInput
  /**
   * Limit how many Tags to update.
   */
  limit?: number
}

/**
 * Tag updateManyAndReturn
 */
export type TagUpdateManyAndReturnArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Select specific fields to fetch from the Tag
   */
  select?: Prisma.TagSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Tag
   */
  omit?: Prisma.TagOmit<ExtArgs> | null
  /**
   * The data used to update Tags.
   */
  data: Prisma.XOR<Prisma.TagUpdateManyMutationInput, Prisma.TagUncheckedUpdateManyInput>
  /**
   * Filter which Tags to update
   */
  where?: Prisma.TagWhereInput
  /**
   * Limit how many Tags to update.
   */
  limit?: number
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TagIncludeUpdateManyAndReturn<ExtArgs> | null
}

/**
 * Tag upsert
 */
export type TagUpsertArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Select specific fields to fetch from the Tag
   */
  select?: Prisma.TagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Tag
   */
  omit?: Prisma.TagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TagInclude<ExtArgs> | null
  /**
   * The filter to search for the Tag to update in case it exists.
   */
  where: Prisma.TagWhereUniqueInput
  /**
   * In case the Tag found by the `where` argument doesn't exist, create a new Tag with this data.
   */
  create: Prisma.XOR<Prisma.TagCreateInput, Prisma.TagUncheckedCreateInput>
  /**
   * In case the Tag was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.TagUpdateInput, Prisma.TagUncheckedUpdateInput>
}

/**
 * Tag delete
 */
export type TagDeleteArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Select specific fields to fetch from the Tag
   */
  select?: Prisma.TagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Tag
   */
  omit?: Prisma.TagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TagInclude<ExtArgs> | null
  /**
   * Filter which Tag to delete.
   */
  where: Prisma.TagWhereUniqueInput
}

/**
 * Tag deleteMany
 */
export type TagDeleteManyArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Filter which Tags to delete
   */
  where?: Prisma.TagWhereInput
  /**
   * Limit how many Tags to delete.
   */
  limit?: number
}

/**
 * Tag.contacts
 */
export type Tag$contactsArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Select specific fields to fetch from the Contact
   */
  select?: Prisma.ContactSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Contact
   */
  omit?: Prisma.ContactOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.ContactInclude<ExtArgs> | null
  where?: Prisma.ContactWhereInput
  orderBy?: Prisma.ContactOrderByWithRelationInput | Prisma.ContactOrderByWithRelationInput[]
  cursor?: Prisma.ContactWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.ContactScalarFieldEnum | Prisma.ContactScalarFieldEnum[]
}

/**
 * Tag without action
 */
export type TagDefaultArgs<
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> = {
  /**
   * Select specific fields to fetch from the Tag
   */
  select?: Prisma.TagSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Tag
   */
  omit?: Prisma.TagOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.TagInclude<ExtArgs> | null
}
