
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `Document` model and its related types.
 *
 * 🟢 You can import this file directly.
 */
import type * as runtime from "@prisma/client/runtime/client"
import type * as $Enums from "../enums"
import type * as Prisma from "../internal/prismaNamespace"

/**
 * Model Document
 * 
 */
export type DocumentModel = runtime.Types.Result.DefaultSelection<Prisma.$DocumentPayload>

export type AggregateDocument = {
  _count: DocumentCountAggregateOutputType | null
  _min: DocumentMinAggregateOutputType | null
  _max: DocumentMaxAggregateOutputType | null
}

export type DocumentMinAggregateOutputType = {
  id: string | null
  fileName: string | null
  fileUrl: string | null
  contentHash: string | null
  invoiceFingerprint: string | null
  ownerId: string | null
  categoryId: string | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type DocumentMaxAggregateOutputType = {
  id: string | null
  fileName: string | null
  fileUrl: string | null
  contentHash: string | null
  invoiceFingerprint: string | null
  ownerId: string | null
  categoryId: string | null
  createdAt: Date | null
  updatedAt: Date | null
}

export type DocumentCountAggregateOutputType = {
  id: number
  fileName: number
  fileUrl: number
  extractedData: number
  contentHash: number
  invoiceFingerprint: number
  ownerId: number
  categoryId: number
  createdAt: number
  updatedAt: number
  _all: number
}


export type DocumentMinAggregateInputType = {
  id?: true
  fileName?: true
  fileUrl?: true
  contentHash?: true
  invoiceFingerprint?: true
  ownerId?: true
  categoryId?: true
  createdAt?: true
  updatedAt?: true
}

export type DocumentMaxAggregateInputType = {
  id?: true
  fileName?: true
  fileUrl?: true
  contentHash?: true
  invoiceFingerprint?: true
  ownerId?: true
  categoryId?: true
  createdAt?: true
  updatedAt?: true
}

export type DocumentCountAggregateInputType = {
  id?: true
  fileName?: true
  fileUrl?: true
  extractedData?: true
  contentHash?: true
  invoiceFingerprint?: true
  ownerId?: true
  categoryId?: true
  createdAt?: true
  updatedAt?: true
  _all?: true
}

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

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




export type DocumentGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.DocumentWhereInput
  orderBy?: Prisma.DocumentOrderByWithAggregationInput | Prisma.DocumentOrderByWithAggregationInput[]
  by: Prisma.DocumentScalarFieldEnum[] | Prisma.DocumentScalarFieldEnum
  having?: Prisma.DocumentScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: DocumentCountAggregateInputType | true
  _min?: DocumentMinAggregateInputType
  _max?: DocumentMaxAggregateInputType
}

export type DocumentGroupByOutputType = {
  id: string
  fileName: string
  fileUrl: string
  extractedData: runtime.JsonValue | null
  contentHash: string | null
  invoiceFingerprint: string | null
  ownerId: string
  categoryId: string | null
  createdAt: Date
  updatedAt: Date
  _count: DocumentCountAggregateOutputType | null
  _min: DocumentMinAggregateOutputType | null
  _max: DocumentMaxAggregateOutputType | null
}

export type GetDocumentGroupByPayload<T extends DocumentGroupByArgs> = Prisma.PrismaPromise<
  Array<
    Prisma.PickEnumerable<DocumentGroupByOutputType, T['by']> &
      {
        [P in ((keyof T) & (keyof DocumentGroupByOutputType))]: P extends '_count'
          ? T[P] extends boolean
            ? number
            : Prisma.GetScalarType<T[P], DocumentGroupByOutputType[P]>
          : Prisma.GetScalarType<T[P], DocumentGroupByOutputType[P]>
      }
    >
  >



export type DocumentWhereInput = {
  AND?: Prisma.DocumentWhereInput | Prisma.DocumentWhereInput[]
  OR?: Prisma.DocumentWhereInput[]
  NOT?: Prisma.DocumentWhereInput | Prisma.DocumentWhereInput[]
  id?: Prisma.StringFilter<"Document"> | string
  fileName?: Prisma.StringFilter<"Document"> | string
  fileUrl?: Prisma.StringFilter<"Document"> | string
  extractedData?: Prisma.JsonNullableFilter<"Document">
  contentHash?: Prisma.StringNullableFilter<"Document"> | string | null
  invoiceFingerprint?: Prisma.StringNullableFilter<"Document"> | string | null
  ownerId?: Prisma.StringFilter<"Document"> | string
  categoryId?: Prisma.StringNullableFilter<"Document"> | string | null
  createdAt?: Prisma.DateTimeFilter<"Document"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"Document"> | Date | string
  owner?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
  category?: Prisma.XOR<Prisma.CategoryNullableScalarRelationFilter, Prisma.CategoryWhereInput> | null
  duplicateRejections?: Prisma.DuplicateRejectionListRelationFilter
}

export type DocumentOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  fileName?: Prisma.SortOrder
  fileUrl?: Prisma.SortOrder
  extractedData?: Prisma.SortOrderInput | Prisma.SortOrder
  contentHash?: Prisma.SortOrderInput | Prisma.SortOrder
  invoiceFingerprint?: Prisma.SortOrderInput | Prisma.SortOrder
  ownerId?: Prisma.SortOrder
  categoryId?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  owner?: Prisma.UserOrderByWithRelationInput
  category?: Prisma.CategoryOrderByWithRelationInput
  duplicateRejections?: Prisma.DuplicateRejectionOrderByRelationAggregateInput
  _relevance?: Prisma.DocumentOrderByRelevanceInput
}

export type DocumentWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  contentHash?: string
  invoiceFingerprint?: string
  AND?: Prisma.DocumentWhereInput | Prisma.DocumentWhereInput[]
  OR?: Prisma.DocumentWhereInput[]
  NOT?: Prisma.DocumentWhereInput | Prisma.DocumentWhereInput[]
  fileName?: Prisma.StringFilter<"Document"> | string
  fileUrl?: Prisma.StringFilter<"Document"> | string
  extractedData?: Prisma.JsonNullableFilter<"Document">
  ownerId?: Prisma.StringFilter<"Document"> | string
  categoryId?: Prisma.StringNullableFilter<"Document"> | string | null
  createdAt?: Prisma.DateTimeFilter<"Document"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"Document"> | Date | string
  owner?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
  category?: Prisma.XOR<Prisma.CategoryNullableScalarRelationFilter, Prisma.CategoryWhereInput> | null
  duplicateRejections?: Prisma.DuplicateRejectionListRelationFilter
}, "id" | "contentHash" | "invoiceFingerprint">

export type DocumentOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  fileName?: Prisma.SortOrder
  fileUrl?: Prisma.SortOrder
  extractedData?: Prisma.SortOrderInput | Prisma.SortOrder
  contentHash?: Prisma.SortOrderInput | Prisma.SortOrder
  invoiceFingerprint?: Prisma.SortOrderInput | Prisma.SortOrder
  ownerId?: Prisma.SortOrder
  categoryId?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
  _count?: Prisma.DocumentCountOrderByAggregateInput
  _max?: Prisma.DocumentMaxOrderByAggregateInput
  _min?: Prisma.DocumentMinOrderByAggregateInput
}

export type DocumentScalarWhereWithAggregatesInput = {
  AND?: Prisma.DocumentScalarWhereWithAggregatesInput | Prisma.DocumentScalarWhereWithAggregatesInput[]
  OR?: Prisma.DocumentScalarWhereWithAggregatesInput[]
  NOT?: Prisma.DocumentScalarWhereWithAggregatesInput | Prisma.DocumentScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"Document"> | string
  fileName?: Prisma.StringWithAggregatesFilter<"Document"> | string
  fileUrl?: Prisma.StringWithAggregatesFilter<"Document"> | string
  extractedData?: Prisma.JsonNullableWithAggregatesFilter<"Document">
  contentHash?: Prisma.StringNullableWithAggregatesFilter<"Document"> | string | null
  invoiceFingerprint?: Prisma.StringNullableWithAggregatesFilter<"Document"> | string | null
  ownerId?: Prisma.StringWithAggregatesFilter<"Document"> | string
  categoryId?: Prisma.StringNullableWithAggregatesFilter<"Document"> | string | null
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"Document"> | Date | string
  updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Document"> | Date | string
}

export type DocumentCreateInput = {
  id?: string
  fileName: string
  fileUrl: string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: string | null
  invoiceFingerprint?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  owner: Prisma.UserCreateNestedOneWithoutDocumentsInput
  category?: Prisma.CategoryCreateNestedOneWithoutDocumentsInput
  duplicateRejections?: Prisma.DuplicateRejectionCreateNestedManyWithoutDuplicateDocumentInput
}

export type DocumentUncheckedCreateInput = {
  id?: string
  fileName: string
  fileUrl: string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: string | null
  invoiceFingerprint?: string | null
  ownerId: string
  categoryId?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  duplicateRejections?: Prisma.DuplicateRejectionUncheckedCreateNestedManyWithoutDuplicateDocumentInput
}

export type DocumentUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  fileName?: Prisma.StringFieldUpdateOperationsInput | string
  fileUrl?: Prisma.StringFieldUpdateOperationsInput | string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  invoiceFingerprint?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  owner?: Prisma.UserUpdateOneRequiredWithoutDocumentsNestedInput
  category?: Prisma.CategoryUpdateOneWithoutDocumentsNestedInput
  duplicateRejections?: Prisma.DuplicateRejectionUpdateManyWithoutDuplicateDocumentNestedInput
}

export type DocumentUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  fileName?: Prisma.StringFieldUpdateOperationsInput | string
  fileUrl?: Prisma.StringFieldUpdateOperationsInput | string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  invoiceFingerprint?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  ownerId?: Prisma.StringFieldUpdateOperationsInput | string
  categoryId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  duplicateRejections?: Prisma.DuplicateRejectionUncheckedUpdateManyWithoutDuplicateDocumentNestedInput
}

export type DocumentCreateManyInput = {
  id?: string
  fileName: string
  fileUrl: string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: string | null
  invoiceFingerprint?: string | null
  ownerId: string
  categoryId?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type DocumentUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  fileName?: Prisma.StringFieldUpdateOperationsInput | string
  fileUrl?: Prisma.StringFieldUpdateOperationsInput | string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  invoiceFingerprint?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type DocumentUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  fileName?: Prisma.StringFieldUpdateOperationsInput | string
  fileUrl?: Prisma.StringFieldUpdateOperationsInput | string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  invoiceFingerprint?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  ownerId?: Prisma.StringFieldUpdateOperationsInput | string
  categoryId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type DocumentListRelationFilter = {
  every?: Prisma.DocumentWhereInput
  some?: Prisma.DocumentWhereInput
  none?: Prisma.DocumentWhereInput
}

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

export type DocumentOrderByRelevanceInput = {
  fields: Prisma.DocumentOrderByRelevanceFieldEnum | Prisma.DocumentOrderByRelevanceFieldEnum[]
  sort: Prisma.SortOrder
  search: string
}

export type DocumentCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  fileName?: Prisma.SortOrder
  fileUrl?: Prisma.SortOrder
  extractedData?: Prisma.SortOrder
  contentHash?: Prisma.SortOrder
  invoiceFingerprint?: Prisma.SortOrder
  ownerId?: Prisma.SortOrder
  categoryId?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type DocumentMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  fileName?: Prisma.SortOrder
  fileUrl?: Prisma.SortOrder
  contentHash?: Prisma.SortOrder
  invoiceFingerprint?: Prisma.SortOrder
  ownerId?: Prisma.SortOrder
  categoryId?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type DocumentMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  fileName?: Prisma.SortOrder
  fileUrl?: Prisma.SortOrder
  contentHash?: Prisma.SortOrder
  invoiceFingerprint?: Prisma.SortOrder
  ownerId?: Prisma.SortOrder
  categoryId?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  updatedAt?: Prisma.SortOrder
}

export type DocumentNullableScalarRelationFilter = {
  is?: Prisma.DocumentWhereInput | null
  isNot?: Prisma.DocumentWhereInput | null
}

export type DocumentCreateNestedManyWithoutOwnerInput = {
  create?: Prisma.XOR<Prisma.DocumentCreateWithoutOwnerInput, Prisma.DocumentUncheckedCreateWithoutOwnerInput> | Prisma.DocumentCreateWithoutOwnerInput[] | Prisma.DocumentUncheckedCreateWithoutOwnerInput[]
  connectOrCreate?: Prisma.DocumentCreateOrConnectWithoutOwnerInput | Prisma.DocumentCreateOrConnectWithoutOwnerInput[]
  createMany?: Prisma.DocumentCreateManyOwnerInputEnvelope
  connect?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
}

export type DocumentUncheckedCreateNestedManyWithoutOwnerInput = {
  create?: Prisma.XOR<Prisma.DocumentCreateWithoutOwnerInput, Prisma.DocumentUncheckedCreateWithoutOwnerInput> | Prisma.DocumentCreateWithoutOwnerInput[] | Prisma.DocumentUncheckedCreateWithoutOwnerInput[]
  connectOrCreate?: Prisma.DocumentCreateOrConnectWithoutOwnerInput | Prisma.DocumentCreateOrConnectWithoutOwnerInput[]
  createMany?: Prisma.DocumentCreateManyOwnerInputEnvelope
  connect?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
}

export type DocumentUpdateManyWithoutOwnerNestedInput = {
  create?: Prisma.XOR<Prisma.DocumentCreateWithoutOwnerInput, Prisma.DocumentUncheckedCreateWithoutOwnerInput> | Prisma.DocumentCreateWithoutOwnerInput[] | Prisma.DocumentUncheckedCreateWithoutOwnerInput[]
  connectOrCreate?: Prisma.DocumentCreateOrConnectWithoutOwnerInput | Prisma.DocumentCreateOrConnectWithoutOwnerInput[]
  upsert?: Prisma.DocumentUpsertWithWhereUniqueWithoutOwnerInput | Prisma.DocumentUpsertWithWhereUniqueWithoutOwnerInput[]
  createMany?: Prisma.DocumentCreateManyOwnerInputEnvelope
  set?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  disconnect?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  delete?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  connect?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  update?: Prisma.DocumentUpdateWithWhereUniqueWithoutOwnerInput | Prisma.DocumentUpdateWithWhereUniqueWithoutOwnerInput[]
  updateMany?: Prisma.DocumentUpdateManyWithWhereWithoutOwnerInput | Prisma.DocumentUpdateManyWithWhereWithoutOwnerInput[]
  deleteMany?: Prisma.DocumentScalarWhereInput | Prisma.DocumentScalarWhereInput[]
}

export type DocumentUncheckedUpdateManyWithoutOwnerNestedInput = {
  create?: Prisma.XOR<Prisma.DocumentCreateWithoutOwnerInput, Prisma.DocumentUncheckedCreateWithoutOwnerInput> | Prisma.DocumentCreateWithoutOwnerInput[] | Prisma.DocumentUncheckedCreateWithoutOwnerInput[]
  connectOrCreate?: Prisma.DocumentCreateOrConnectWithoutOwnerInput | Prisma.DocumentCreateOrConnectWithoutOwnerInput[]
  upsert?: Prisma.DocumentUpsertWithWhereUniqueWithoutOwnerInput | Prisma.DocumentUpsertWithWhereUniqueWithoutOwnerInput[]
  createMany?: Prisma.DocumentCreateManyOwnerInputEnvelope
  set?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  disconnect?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  delete?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  connect?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  update?: Prisma.DocumentUpdateWithWhereUniqueWithoutOwnerInput | Prisma.DocumentUpdateWithWhereUniqueWithoutOwnerInput[]
  updateMany?: Prisma.DocumentUpdateManyWithWhereWithoutOwnerInput | Prisma.DocumentUpdateManyWithWhereWithoutOwnerInput[]
  deleteMany?: Prisma.DocumentScalarWhereInput | Prisma.DocumentScalarWhereInput[]
}

export type DocumentCreateNestedManyWithoutCategoryInput = {
  create?: Prisma.XOR<Prisma.DocumentCreateWithoutCategoryInput, Prisma.DocumentUncheckedCreateWithoutCategoryInput> | Prisma.DocumentCreateWithoutCategoryInput[] | Prisma.DocumentUncheckedCreateWithoutCategoryInput[]
  connectOrCreate?: Prisma.DocumentCreateOrConnectWithoutCategoryInput | Prisma.DocumentCreateOrConnectWithoutCategoryInput[]
  createMany?: Prisma.DocumentCreateManyCategoryInputEnvelope
  connect?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
}

export type DocumentUncheckedCreateNestedManyWithoutCategoryInput = {
  create?: Prisma.XOR<Prisma.DocumentCreateWithoutCategoryInput, Prisma.DocumentUncheckedCreateWithoutCategoryInput> | Prisma.DocumentCreateWithoutCategoryInput[] | Prisma.DocumentUncheckedCreateWithoutCategoryInput[]
  connectOrCreate?: Prisma.DocumentCreateOrConnectWithoutCategoryInput | Prisma.DocumentCreateOrConnectWithoutCategoryInput[]
  createMany?: Prisma.DocumentCreateManyCategoryInputEnvelope
  connect?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
}

export type DocumentUpdateManyWithoutCategoryNestedInput = {
  create?: Prisma.XOR<Prisma.DocumentCreateWithoutCategoryInput, Prisma.DocumentUncheckedCreateWithoutCategoryInput> | Prisma.DocumentCreateWithoutCategoryInput[] | Prisma.DocumentUncheckedCreateWithoutCategoryInput[]
  connectOrCreate?: Prisma.DocumentCreateOrConnectWithoutCategoryInput | Prisma.DocumentCreateOrConnectWithoutCategoryInput[]
  upsert?: Prisma.DocumentUpsertWithWhereUniqueWithoutCategoryInput | Prisma.DocumentUpsertWithWhereUniqueWithoutCategoryInput[]
  createMany?: Prisma.DocumentCreateManyCategoryInputEnvelope
  set?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  disconnect?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  delete?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  connect?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  update?: Prisma.DocumentUpdateWithWhereUniqueWithoutCategoryInput | Prisma.DocumentUpdateWithWhereUniqueWithoutCategoryInput[]
  updateMany?: Prisma.DocumentUpdateManyWithWhereWithoutCategoryInput | Prisma.DocumentUpdateManyWithWhereWithoutCategoryInput[]
  deleteMany?: Prisma.DocumentScalarWhereInput | Prisma.DocumentScalarWhereInput[]
}

export type DocumentUncheckedUpdateManyWithoutCategoryNestedInput = {
  create?: Prisma.XOR<Prisma.DocumentCreateWithoutCategoryInput, Prisma.DocumentUncheckedCreateWithoutCategoryInput> | Prisma.DocumentCreateWithoutCategoryInput[] | Prisma.DocumentUncheckedCreateWithoutCategoryInput[]
  connectOrCreate?: Prisma.DocumentCreateOrConnectWithoutCategoryInput | Prisma.DocumentCreateOrConnectWithoutCategoryInput[]
  upsert?: Prisma.DocumentUpsertWithWhereUniqueWithoutCategoryInput | Prisma.DocumentUpsertWithWhereUniqueWithoutCategoryInput[]
  createMany?: Prisma.DocumentCreateManyCategoryInputEnvelope
  set?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  disconnect?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  delete?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  connect?: Prisma.DocumentWhereUniqueInput | Prisma.DocumentWhereUniqueInput[]
  update?: Prisma.DocumentUpdateWithWhereUniqueWithoutCategoryInput | Prisma.DocumentUpdateWithWhereUniqueWithoutCategoryInput[]
  updateMany?: Prisma.DocumentUpdateManyWithWhereWithoutCategoryInput | Prisma.DocumentUpdateManyWithWhereWithoutCategoryInput[]
  deleteMany?: Prisma.DocumentScalarWhereInput | Prisma.DocumentScalarWhereInput[]
}

export type DocumentCreateNestedOneWithoutDuplicateRejectionsInput = {
  create?: Prisma.XOR<Prisma.DocumentCreateWithoutDuplicateRejectionsInput, Prisma.DocumentUncheckedCreateWithoutDuplicateRejectionsInput>
  connectOrCreate?: Prisma.DocumentCreateOrConnectWithoutDuplicateRejectionsInput
  connect?: Prisma.DocumentWhereUniqueInput
}

export type DocumentUpdateOneWithoutDuplicateRejectionsNestedInput = {
  create?: Prisma.XOR<Prisma.DocumentCreateWithoutDuplicateRejectionsInput, Prisma.DocumentUncheckedCreateWithoutDuplicateRejectionsInput>
  connectOrCreate?: Prisma.DocumentCreateOrConnectWithoutDuplicateRejectionsInput
  upsert?: Prisma.DocumentUpsertWithoutDuplicateRejectionsInput
  disconnect?: Prisma.DocumentWhereInput | boolean
  delete?: Prisma.DocumentWhereInput | boolean
  connect?: Prisma.DocumentWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.DocumentUpdateToOneWithWhereWithoutDuplicateRejectionsInput, Prisma.DocumentUpdateWithoutDuplicateRejectionsInput>, Prisma.DocumentUncheckedUpdateWithoutDuplicateRejectionsInput>
}

export type DocumentCreateWithoutOwnerInput = {
  id?: string
  fileName: string
  fileUrl: string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: string | null
  invoiceFingerprint?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  category?: Prisma.CategoryCreateNestedOneWithoutDocumentsInput
  duplicateRejections?: Prisma.DuplicateRejectionCreateNestedManyWithoutDuplicateDocumentInput
}

export type DocumentUncheckedCreateWithoutOwnerInput = {
  id?: string
  fileName: string
  fileUrl: string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: string | null
  invoiceFingerprint?: string | null
  categoryId?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  duplicateRejections?: Prisma.DuplicateRejectionUncheckedCreateNestedManyWithoutDuplicateDocumentInput
}

export type DocumentCreateOrConnectWithoutOwnerInput = {
  where: Prisma.DocumentWhereUniqueInput
  create: Prisma.XOR<Prisma.DocumentCreateWithoutOwnerInput, Prisma.DocumentUncheckedCreateWithoutOwnerInput>
}

export type DocumentCreateManyOwnerInputEnvelope = {
  data: Prisma.DocumentCreateManyOwnerInput | Prisma.DocumentCreateManyOwnerInput[]
  skipDuplicates?: boolean
}

export type DocumentUpsertWithWhereUniqueWithoutOwnerInput = {
  where: Prisma.DocumentWhereUniqueInput
  update: Prisma.XOR<Prisma.DocumentUpdateWithoutOwnerInput, Prisma.DocumentUncheckedUpdateWithoutOwnerInput>
  create: Prisma.XOR<Prisma.DocumentCreateWithoutOwnerInput, Prisma.DocumentUncheckedCreateWithoutOwnerInput>
}

export type DocumentUpdateWithWhereUniqueWithoutOwnerInput = {
  where: Prisma.DocumentWhereUniqueInput
  data: Prisma.XOR<Prisma.DocumentUpdateWithoutOwnerInput, Prisma.DocumentUncheckedUpdateWithoutOwnerInput>
}

export type DocumentUpdateManyWithWhereWithoutOwnerInput = {
  where: Prisma.DocumentScalarWhereInput
  data: Prisma.XOR<Prisma.DocumentUpdateManyMutationInput, Prisma.DocumentUncheckedUpdateManyWithoutOwnerInput>
}

export type DocumentScalarWhereInput = {
  AND?: Prisma.DocumentScalarWhereInput | Prisma.DocumentScalarWhereInput[]
  OR?: Prisma.DocumentScalarWhereInput[]
  NOT?: Prisma.DocumentScalarWhereInput | Prisma.DocumentScalarWhereInput[]
  id?: Prisma.StringFilter<"Document"> | string
  fileName?: Prisma.StringFilter<"Document"> | string
  fileUrl?: Prisma.StringFilter<"Document"> | string
  extractedData?: Prisma.JsonNullableFilter<"Document">
  contentHash?: Prisma.StringNullableFilter<"Document"> | string | null
  invoiceFingerprint?: Prisma.StringNullableFilter<"Document"> | string | null
  ownerId?: Prisma.StringFilter<"Document"> | string
  categoryId?: Prisma.StringNullableFilter<"Document"> | string | null
  createdAt?: Prisma.DateTimeFilter<"Document"> | Date | string
  updatedAt?: Prisma.DateTimeFilter<"Document"> | Date | string
}

export type DocumentCreateWithoutCategoryInput = {
  id?: string
  fileName: string
  fileUrl: string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: string | null
  invoiceFingerprint?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  owner: Prisma.UserCreateNestedOneWithoutDocumentsInput
  duplicateRejections?: Prisma.DuplicateRejectionCreateNestedManyWithoutDuplicateDocumentInput
}

export type DocumentUncheckedCreateWithoutCategoryInput = {
  id?: string
  fileName: string
  fileUrl: string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: string | null
  invoiceFingerprint?: string | null
  ownerId: string
  createdAt?: Date | string
  updatedAt?: Date | string
  duplicateRejections?: Prisma.DuplicateRejectionUncheckedCreateNestedManyWithoutDuplicateDocumentInput
}

export type DocumentCreateOrConnectWithoutCategoryInput = {
  where: Prisma.DocumentWhereUniqueInput
  create: Prisma.XOR<Prisma.DocumentCreateWithoutCategoryInput, Prisma.DocumentUncheckedCreateWithoutCategoryInput>
}

export type DocumentCreateManyCategoryInputEnvelope = {
  data: Prisma.DocumentCreateManyCategoryInput | Prisma.DocumentCreateManyCategoryInput[]
  skipDuplicates?: boolean
}

export type DocumentUpsertWithWhereUniqueWithoutCategoryInput = {
  where: Prisma.DocumentWhereUniqueInput
  update: Prisma.XOR<Prisma.DocumentUpdateWithoutCategoryInput, Prisma.DocumentUncheckedUpdateWithoutCategoryInput>
  create: Prisma.XOR<Prisma.DocumentCreateWithoutCategoryInput, Prisma.DocumentUncheckedCreateWithoutCategoryInput>
}

export type DocumentUpdateWithWhereUniqueWithoutCategoryInput = {
  where: Prisma.DocumentWhereUniqueInput
  data: Prisma.XOR<Prisma.DocumentUpdateWithoutCategoryInput, Prisma.DocumentUncheckedUpdateWithoutCategoryInput>
}

export type DocumentUpdateManyWithWhereWithoutCategoryInput = {
  where: Prisma.DocumentScalarWhereInput
  data: Prisma.XOR<Prisma.DocumentUpdateManyMutationInput, Prisma.DocumentUncheckedUpdateManyWithoutCategoryInput>
}

export type DocumentCreateWithoutDuplicateRejectionsInput = {
  id?: string
  fileName: string
  fileUrl: string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: string | null
  invoiceFingerprint?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
  owner: Prisma.UserCreateNestedOneWithoutDocumentsInput
  category?: Prisma.CategoryCreateNestedOneWithoutDocumentsInput
}

export type DocumentUncheckedCreateWithoutDuplicateRejectionsInput = {
  id?: string
  fileName: string
  fileUrl: string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: string | null
  invoiceFingerprint?: string | null
  ownerId: string
  categoryId?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type DocumentCreateOrConnectWithoutDuplicateRejectionsInput = {
  where: Prisma.DocumentWhereUniqueInput
  create: Prisma.XOR<Prisma.DocumentCreateWithoutDuplicateRejectionsInput, Prisma.DocumentUncheckedCreateWithoutDuplicateRejectionsInput>
}

export type DocumentUpsertWithoutDuplicateRejectionsInput = {
  update: Prisma.XOR<Prisma.DocumentUpdateWithoutDuplicateRejectionsInput, Prisma.DocumentUncheckedUpdateWithoutDuplicateRejectionsInput>
  create: Prisma.XOR<Prisma.DocumentCreateWithoutDuplicateRejectionsInput, Prisma.DocumentUncheckedCreateWithoutDuplicateRejectionsInput>
  where?: Prisma.DocumentWhereInput
}

export type DocumentUpdateToOneWithWhereWithoutDuplicateRejectionsInput = {
  where?: Prisma.DocumentWhereInput
  data: Prisma.XOR<Prisma.DocumentUpdateWithoutDuplicateRejectionsInput, Prisma.DocumentUncheckedUpdateWithoutDuplicateRejectionsInput>
}

export type DocumentUpdateWithoutDuplicateRejectionsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  fileName?: Prisma.StringFieldUpdateOperationsInput | string
  fileUrl?: Prisma.StringFieldUpdateOperationsInput | string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  invoiceFingerprint?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  owner?: Prisma.UserUpdateOneRequiredWithoutDocumentsNestedInput
  category?: Prisma.CategoryUpdateOneWithoutDocumentsNestedInput
}

export type DocumentUncheckedUpdateWithoutDuplicateRejectionsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  fileName?: Prisma.StringFieldUpdateOperationsInput | string
  fileUrl?: Prisma.StringFieldUpdateOperationsInput | string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  invoiceFingerprint?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  ownerId?: Prisma.StringFieldUpdateOperationsInput | string
  categoryId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type DocumentCreateManyOwnerInput = {
  id?: string
  fileName: string
  fileUrl: string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: string | null
  invoiceFingerprint?: string | null
  categoryId?: string | null
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type DocumentUpdateWithoutOwnerInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  fileName?: Prisma.StringFieldUpdateOperationsInput | string
  fileUrl?: Prisma.StringFieldUpdateOperationsInput | string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  invoiceFingerprint?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  category?: Prisma.CategoryUpdateOneWithoutDocumentsNestedInput
  duplicateRejections?: Prisma.DuplicateRejectionUpdateManyWithoutDuplicateDocumentNestedInput
}

export type DocumentUncheckedUpdateWithoutOwnerInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  fileName?: Prisma.StringFieldUpdateOperationsInput | string
  fileUrl?: Prisma.StringFieldUpdateOperationsInput | string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  invoiceFingerprint?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  categoryId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  duplicateRejections?: Prisma.DuplicateRejectionUncheckedUpdateManyWithoutDuplicateDocumentNestedInput
}

export type DocumentUncheckedUpdateManyWithoutOwnerInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  fileName?: Prisma.StringFieldUpdateOperationsInput | string
  fileUrl?: Prisma.StringFieldUpdateOperationsInput | string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  invoiceFingerprint?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  categoryId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}

export type DocumentCreateManyCategoryInput = {
  id?: string
  fileName: string
  fileUrl: string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: string | null
  invoiceFingerprint?: string | null
  ownerId: string
  createdAt?: Date | string
  updatedAt?: Date | string
}

export type DocumentUpdateWithoutCategoryInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  fileName?: Prisma.StringFieldUpdateOperationsInput | string
  fileUrl?: Prisma.StringFieldUpdateOperationsInput | string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  invoiceFingerprint?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  owner?: Prisma.UserUpdateOneRequiredWithoutDocumentsNestedInput
  duplicateRejections?: Prisma.DuplicateRejectionUpdateManyWithoutDuplicateDocumentNestedInput
}

export type DocumentUncheckedUpdateWithoutCategoryInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  fileName?: Prisma.StringFieldUpdateOperationsInput | string
  fileUrl?: Prisma.StringFieldUpdateOperationsInput | string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  invoiceFingerprint?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  ownerId?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  duplicateRejections?: Prisma.DuplicateRejectionUncheckedUpdateManyWithoutDuplicateDocumentNestedInput
}

export type DocumentUncheckedUpdateManyWithoutCategoryInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  fileName?: Prisma.StringFieldUpdateOperationsInput | string
  fileUrl?: Prisma.StringFieldUpdateOperationsInput | string
  extractedData?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
  contentHash?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  invoiceFingerprint?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  ownerId?: Prisma.StringFieldUpdateOperationsInput | string
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}


/**
 * Count Type DocumentCountOutputType
 */

export type DocumentCountOutputType = {
  duplicateRejections: number
}

export type DocumentCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  duplicateRejections?: boolean | DocumentCountOutputTypeCountDuplicateRejectionsArgs
}

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

/**
 * DocumentCountOutputType without action
 */
export type DocumentCountOutputTypeCountDuplicateRejectionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.DuplicateRejectionWhereInput
}


export type DocumentSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  fileName?: boolean
  fileUrl?: boolean
  extractedData?: boolean
  contentHash?: boolean
  invoiceFingerprint?: boolean
  ownerId?: boolean
  categoryId?: boolean
  createdAt?: boolean
  updatedAt?: boolean
  owner?: boolean | Prisma.UserDefaultArgs<ExtArgs>
  category?: boolean | Prisma.Document$categoryArgs<ExtArgs>
  duplicateRejections?: boolean | Prisma.Document$duplicateRejectionsArgs<ExtArgs>
  _count?: boolean | Prisma.DocumentCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["document"]>



export type DocumentSelectScalar = {
  id?: boolean
  fileName?: boolean
  fileUrl?: boolean
  extractedData?: boolean
  contentHash?: boolean
  invoiceFingerprint?: boolean
  ownerId?: boolean
  categoryId?: boolean
  createdAt?: boolean
  updatedAt?: boolean
}

export type DocumentOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "fileName" | "fileUrl" | "extractedData" | "contentHash" | "invoiceFingerprint" | "ownerId" | "categoryId" | "createdAt" | "updatedAt", ExtArgs["result"]["document"]>
export type DocumentInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  owner?: boolean | Prisma.UserDefaultArgs<ExtArgs>
  category?: boolean | Prisma.Document$categoryArgs<ExtArgs>
  duplicateRejections?: boolean | Prisma.Document$duplicateRejectionsArgs<ExtArgs>
  _count?: boolean | Prisma.DocumentCountOutputTypeDefaultArgs<ExtArgs>
}

export type $DocumentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "Document"
  objects: {
    owner: Prisma.$UserPayload<ExtArgs>
    category: Prisma.$CategoryPayload<ExtArgs> | null
    duplicateRejections: Prisma.$DuplicateRejectionPayload<ExtArgs>[]
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    fileName: string
    fileUrl: string
    extractedData: runtime.JsonValue | null
    contentHash: string | null
    invoiceFingerprint: string | null
    ownerId: string
    categoryId: string | null
    createdAt: Date
    updatedAt: Date
  }, ExtArgs["result"]["document"]>
  composites: {}
}

export type DocumentGetPayload<S extends boolean | null | undefined | DocumentDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$DocumentPayload, S>

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

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

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

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

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

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

  /**
   * Create a Document.
   * @param {DocumentCreateArgs} args - Arguments to create a Document.
   * @example
   * // Create one Document
   * const Document = await prisma.document.create({
   *   data: {
   *     // ... data to create a Document
   *   }
   * })
   * 
   */
  create<T extends DocumentCreateArgs>(args: Prisma.SelectSubset<T, DocumentCreateArgs<ExtArgs>>): Prisma.Prisma__DocumentClient<runtime.Types.Result.GetResult<Prisma.$DocumentPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

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

  /**
   * Delete a Document.
   * @param {DocumentDeleteArgs} args - Arguments to delete one Document.
   * @example
   * // Delete one Document
   * const Document = await prisma.document.delete({
   *   where: {
   *     // ... filter to delete one Document
   *   }
   * })
   * 
   */
  delete<T extends DocumentDeleteArgs>(args: Prisma.SelectSubset<T, DocumentDeleteArgs<ExtArgs>>): Prisma.Prisma__DocumentClient<runtime.Types.Result.GetResult<Prisma.$DocumentPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Update one Document.
   * @param {DocumentUpdateArgs} args - Arguments to update one Document.
   * @example
   * // Update one Document
   * const document = await prisma.document.update({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   * 
   */
  update<T extends DocumentUpdateArgs>(args: Prisma.SelectSubset<T, DocumentUpdateArgs<ExtArgs>>): Prisma.Prisma__DocumentClient<runtime.Types.Result.GetResult<Prisma.$DocumentPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for Document.
 * 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__DocumentClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  owner<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>
  category<T extends Prisma.Document$categoryArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Document$categoryArgs<ExtArgs>>): Prisma.Prisma__CategoryClient<runtime.Types.Result.GetResult<Prisma.$CategoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
  duplicateRejections<T extends Prisma.Document$duplicateRejectionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Document$duplicateRejectionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$DuplicateRejectionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  /**
   * 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 Document model
 */
export interface DocumentFieldRefs {
  readonly id: Prisma.FieldRef<"Document", 'String'>
  readonly fileName: Prisma.FieldRef<"Document", 'String'>
  readonly fileUrl: Prisma.FieldRef<"Document", 'String'>
  readonly extractedData: Prisma.FieldRef<"Document", 'Json'>
  readonly contentHash: Prisma.FieldRef<"Document", 'String'>
  readonly invoiceFingerprint: Prisma.FieldRef<"Document", 'String'>
  readonly ownerId: Prisma.FieldRef<"Document", 'String'>
  readonly categoryId: Prisma.FieldRef<"Document", 'String'>
  readonly createdAt: Prisma.FieldRef<"Document", 'DateTime'>
  readonly updatedAt: Prisma.FieldRef<"Document", 'DateTime'>
}
    

// Custom InputTypes
/**
 * Document findUnique
 */
export type DocumentFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Document
   */
  select?: Prisma.DocumentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Document
   */
  omit?: Prisma.DocumentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DocumentInclude<ExtArgs> | null
  /**
   * Filter, which Document to fetch.
   */
  where: Prisma.DocumentWhereUniqueInput
}

/**
 * Document findUniqueOrThrow
 */
export type DocumentFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Document
   */
  select?: Prisma.DocumentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Document
   */
  omit?: Prisma.DocumentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DocumentInclude<ExtArgs> | null
  /**
   * Filter, which Document to fetch.
   */
  where: Prisma.DocumentWhereUniqueInput
}

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

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

/**
 * Document findMany
 */
export type DocumentFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Document
   */
  select?: Prisma.DocumentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Document
   */
  omit?: Prisma.DocumentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DocumentInclude<ExtArgs> | null
  /**
   * Filter, which Documents to fetch.
   */
  where?: Prisma.DocumentWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Documents to fetch.
   */
  orderBy?: Prisma.DocumentOrderByWithRelationInput | Prisma.DocumentOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing Documents.
   */
  cursor?: Prisma.DocumentWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Documents 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` Documents.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of Documents.
   */
  distinct?: Prisma.DocumentScalarFieldEnum | Prisma.DocumentScalarFieldEnum[]
}

/**
 * Document create
 */
export type DocumentCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Document
   */
  select?: Prisma.DocumentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Document
   */
  omit?: Prisma.DocumentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DocumentInclude<ExtArgs> | null
  /**
   * The data needed to create a Document.
   */
  data: Prisma.XOR<Prisma.DocumentCreateInput, Prisma.DocumentUncheckedCreateInput>
}

/**
 * Document createMany
 */
export type DocumentCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to create many Documents.
   */
  data: Prisma.DocumentCreateManyInput | Prisma.DocumentCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * Document update
 */
export type DocumentUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Document
   */
  select?: Prisma.DocumentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Document
   */
  omit?: Prisma.DocumentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DocumentInclude<ExtArgs> | null
  /**
   * The data needed to update a Document.
   */
  data: Prisma.XOR<Prisma.DocumentUpdateInput, Prisma.DocumentUncheckedUpdateInput>
  /**
   * Choose, which Document to update.
   */
  where: Prisma.DocumentWhereUniqueInput
}

/**
 * Document updateMany
 */
export type DocumentUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update Documents.
   */
  data: Prisma.XOR<Prisma.DocumentUpdateManyMutationInput, Prisma.DocumentUncheckedUpdateManyInput>
  /**
   * Filter which Documents to update
   */
  where?: Prisma.DocumentWhereInput
  /**
   * Limit how many Documents to update.
   */
  limit?: number
}

/**
 * Document upsert
 */
export type DocumentUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Document
   */
  select?: Prisma.DocumentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Document
   */
  omit?: Prisma.DocumentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DocumentInclude<ExtArgs> | null
  /**
   * The filter to search for the Document to update in case it exists.
   */
  where: Prisma.DocumentWhereUniqueInput
  /**
   * In case the Document found by the `where` argument doesn't exist, create a new Document with this data.
   */
  create: Prisma.XOR<Prisma.DocumentCreateInput, Prisma.DocumentUncheckedCreateInput>
  /**
   * In case the Document was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.DocumentUpdateInput, Prisma.DocumentUncheckedUpdateInput>
}

/**
 * Document delete
 */
export type DocumentDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Document
   */
  select?: Prisma.DocumentSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Document
   */
  omit?: Prisma.DocumentOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DocumentInclude<ExtArgs> | null
  /**
   * Filter which Document to delete.
   */
  where: Prisma.DocumentWhereUniqueInput
}

/**
 * Document deleteMany
 */
export type DocumentDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Documents to delete
   */
  where?: Prisma.DocumentWhereInput
  /**
   * Limit how many Documents to delete.
   */
  limit?: number
}

/**
 * Document.category
 */
export type Document$categoryArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Category
   */
  select?: Prisma.CategorySelect<ExtArgs> | null
  /**
   * Omit specific fields from the Category
   */
  omit?: Prisma.CategoryOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.CategoryInclude<ExtArgs> | null
  where?: Prisma.CategoryWhereInput
}

/**
 * Document.duplicateRejections
 */
export type Document$duplicateRejectionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the DuplicateRejection
   */
  select?: Prisma.DuplicateRejectionSelect<ExtArgs> | null
  /**
   * Omit specific fields from the DuplicateRejection
   */
  omit?: Prisma.DuplicateRejectionOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DuplicateRejectionInclude<ExtArgs> | null
  where?: Prisma.DuplicateRejectionWhereInput
  orderBy?: Prisma.DuplicateRejectionOrderByWithRelationInput | Prisma.DuplicateRejectionOrderByWithRelationInput[]
  cursor?: Prisma.DuplicateRejectionWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.DuplicateRejectionScalarFieldEnum | Prisma.DuplicateRejectionScalarFieldEnum[]
}

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