
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `pbx_fax` 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 pbx_fax
 * 
 */
export type pbx_faxModel = runtime.Types.Result.DefaultSelection<Prisma.$pbx_faxPayload>

export type AggregatePbx_fax = {
  _count: Pbx_faxCountAggregateOutputType | null
  _avg: Pbx_faxAvgAggregateOutputType | null
  _sum: Pbx_faxSumAggregateOutputType | null
  _min: Pbx_faxMinAggregateOutputType | null
  _max: Pbx_faxMaxAggregateOutputType | null
}

export type Pbx_faxAvgAggregateOutputType = {
  id: number | null
  service_id: number | null
}

export type Pbx_faxSumAggregateOutputType = {
  id: number | null
  service_id: number | null
}

export type Pbx_faxMinAggregateOutputType = {
  id: number | null
  number: string | null
  email: string | null
  description: string | null
  service_id: number | null
}

export type Pbx_faxMaxAggregateOutputType = {
  id: number | null
  number: string | null
  email: string | null
  description: string | null
  service_id: number | null
}

export type Pbx_faxCountAggregateOutputType = {
  id: number
  number: number
  email: number
  description: number
  service_id: number
  _all: number
}


export type Pbx_faxAvgAggregateInputType = {
  id?: true
  service_id?: true
}

export type Pbx_faxSumAggregateInputType = {
  id?: true
  service_id?: true
}

export type Pbx_faxMinAggregateInputType = {
  id?: true
  number?: true
  email?: true
  description?: true
  service_id?: true
}

export type Pbx_faxMaxAggregateInputType = {
  id?: true
  number?: true
  email?: true
  description?: true
  service_id?: true
}

export type Pbx_faxCountAggregateInputType = {
  id?: true
  number?: true
  email?: true
  description?: true
  service_id?: true
  _all?: true
}

export type Pbx_faxAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which pbx_fax to aggregate.
   */
  where?: Prisma.pbx_faxWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of pbx_faxes to fetch.
   */
  orderBy?: Prisma.pbx_faxOrderByWithRelationInput | Prisma.pbx_faxOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.pbx_faxWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` pbx_faxes 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` pbx_faxes.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned pbx_faxes
  **/
  _count?: true | Pbx_faxCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: Pbx_faxAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: Pbx_faxSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: Pbx_faxMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: Pbx_faxMaxAggregateInputType
}

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




export type pbx_faxGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.pbx_faxWhereInput
  orderBy?: Prisma.pbx_faxOrderByWithAggregationInput | Prisma.pbx_faxOrderByWithAggregationInput[]
  by: Prisma.Pbx_faxScalarFieldEnum[] | Prisma.Pbx_faxScalarFieldEnum
  having?: Prisma.pbx_faxScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: Pbx_faxCountAggregateInputType | true
  _avg?: Pbx_faxAvgAggregateInputType
  _sum?: Pbx_faxSumAggregateInputType
  _min?: Pbx_faxMinAggregateInputType
  _max?: Pbx_faxMaxAggregateInputType
}

export type Pbx_faxGroupByOutputType = {
  id: number
  number: string
  email: string
  description: string | null
  service_id: number
  _count: Pbx_faxCountAggregateOutputType | null
  _avg: Pbx_faxAvgAggregateOutputType | null
  _sum: Pbx_faxSumAggregateOutputType | null
  _min: Pbx_faxMinAggregateOutputType | null
  _max: Pbx_faxMaxAggregateOutputType | null
}

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



export type pbx_faxWhereInput = {
  AND?: Prisma.pbx_faxWhereInput | Prisma.pbx_faxWhereInput[]
  OR?: Prisma.pbx_faxWhereInput[]
  NOT?: Prisma.pbx_faxWhereInput | Prisma.pbx_faxWhereInput[]
  id?: Prisma.IntFilter<"pbx_fax"> | number
  number?: Prisma.StringFilter<"pbx_fax"> | string
  email?: Prisma.StringFilter<"pbx_fax"> | string
  description?: Prisma.StringNullableFilter<"pbx_fax"> | string | null
  service_id?: Prisma.IntFilter<"pbx_fax"> | number
}

export type pbx_faxOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  number?: Prisma.SortOrder
  email?: Prisma.SortOrder
  description?: Prisma.SortOrderInput | Prisma.SortOrder
  service_id?: Prisma.SortOrder
  _relevance?: Prisma.pbx_faxOrderByRelevanceInput
}

export type pbx_faxWhereUniqueInput = Prisma.AtLeast<{
  id?: number
  AND?: Prisma.pbx_faxWhereInput | Prisma.pbx_faxWhereInput[]
  OR?: Prisma.pbx_faxWhereInput[]
  NOT?: Prisma.pbx_faxWhereInput | Prisma.pbx_faxWhereInput[]
  number?: Prisma.StringFilter<"pbx_fax"> | string
  email?: Prisma.StringFilter<"pbx_fax"> | string
  description?: Prisma.StringNullableFilter<"pbx_fax"> | string | null
  service_id?: Prisma.IntFilter<"pbx_fax"> | number
}, "id">

export type pbx_faxOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  number?: Prisma.SortOrder
  email?: Prisma.SortOrder
  description?: Prisma.SortOrderInput | Prisma.SortOrder
  service_id?: Prisma.SortOrder
  _count?: Prisma.pbx_faxCountOrderByAggregateInput
  _avg?: Prisma.pbx_faxAvgOrderByAggregateInput
  _max?: Prisma.pbx_faxMaxOrderByAggregateInput
  _min?: Prisma.pbx_faxMinOrderByAggregateInput
  _sum?: Prisma.pbx_faxSumOrderByAggregateInput
}

export type pbx_faxScalarWhereWithAggregatesInput = {
  AND?: Prisma.pbx_faxScalarWhereWithAggregatesInput | Prisma.pbx_faxScalarWhereWithAggregatesInput[]
  OR?: Prisma.pbx_faxScalarWhereWithAggregatesInput[]
  NOT?: Prisma.pbx_faxScalarWhereWithAggregatesInput | Prisma.pbx_faxScalarWhereWithAggregatesInput[]
  id?: Prisma.IntWithAggregatesFilter<"pbx_fax"> | number
  number?: Prisma.StringWithAggregatesFilter<"pbx_fax"> | string
  email?: Prisma.StringWithAggregatesFilter<"pbx_fax"> | string
  description?: Prisma.StringNullableWithAggregatesFilter<"pbx_fax"> | string | null
  service_id?: Prisma.IntWithAggregatesFilter<"pbx_fax"> | number
}

export type pbx_faxCreateInput = {
  number: string
  email: string
  description?: string | null
  service_id?: number
}

export type pbx_faxUncheckedCreateInput = {
  id?: number
  number: string
  email: string
  description?: string | null
  service_id?: number
}

export type pbx_faxUpdateInput = {
  number?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  service_id?: Prisma.IntFieldUpdateOperationsInput | number
}

export type pbx_faxUncheckedUpdateInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  number?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  service_id?: Prisma.IntFieldUpdateOperationsInput | number
}

export type pbx_faxCreateManyInput = {
  id?: number
  number: string
  email: string
  description?: string | null
  service_id?: number
}

export type pbx_faxUpdateManyMutationInput = {
  number?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  service_id?: Prisma.IntFieldUpdateOperationsInput | number
}

export type pbx_faxUncheckedUpdateManyInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  number?: Prisma.StringFieldUpdateOperationsInput | string
  email?: Prisma.StringFieldUpdateOperationsInput | string
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
  service_id?: Prisma.IntFieldUpdateOperationsInput | number
}

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

export type pbx_faxCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  number?: Prisma.SortOrder
  email?: Prisma.SortOrder
  description?: Prisma.SortOrder
  service_id?: Prisma.SortOrder
}

export type pbx_faxAvgOrderByAggregateInput = {
  id?: Prisma.SortOrder
  service_id?: Prisma.SortOrder
}

export type pbx_faxMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  number?: Prisma.SortOrder
  email?: Prisma.SortOrder
  description?: Prisma.SortOrder
  service_id?: Prisma.SortOrder
}

export type pbx_faxMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  number?: Prisma.SortOrder
  email?: Prisma.SortOrder
  description?: Prisma.SortOrder
  service_id?: Prisma.SortOrder
}

export type pbx_faxSumOrderByAggregateInput = {
  id?: Prisma.SortOrder
  service_id?: Prisma.SortOrder
}



export type pbx_faxSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  number?: boolean
  email?: boolean
  description?: boolean
  service_id?: boolean
}, ExtArgs["result"]["pbx_fax"]>



export type pbx_faxSelectScalar = {
  id?: boolean
  number?: boolean
  email?: boolean
  description?: boolean
  service_id?: boolean
}

export type pbx_faxOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "number" | "email" | "description" | "service_id", ExtArgs["result"]["pbx_fax"]>

export type $pbx_faxPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "pbx_fax"
  objects: {}
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: number
    number: string
    email: string
    description: string | null
    service_id: number
  }, ExtArgs["result"]["pbx_fax"]>
  composites: {}
}

export type pbx_faxGetPayload<S extends boolean | null | undefined | pbx_faxDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$pbx_faxPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

/**
 * The delegate class that acts as a "Promise-like" for pbx_fax.
 * 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__pbx_faxClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  /**
   * 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 pbx_fax model
 */
export interface pbx_faxFieldRefs {
  readonly id: Prisma.FieldRef<"pbx_fax", 'Int'>
  readonly number: Prisma.FieldRef<"pbx_fax", 'String'>
  readonly email: Prisma.FieldRef<"pbx_fax", 'String'>
  readonly description: Prisma.FieldRef<"pbx_fax", 'String'>
  readonly service_id: Prisma.FieldRef<"pbx_fax", 'Int'>
}
    

// Custom InputTypes
/**
 * pbx_fax findUnique
 */
export type pbx_faxFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_fax
   */
  select?: Prisma.pbx_faxSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_fax
   */
  omit?: Prisma.pbx_faxOmit<ExtArgs> | null
  /**
   * Filter, which pbx_fax to fetch.
   */
  where: Prisma.pbx_faxWhereUniqueInput
}

/**
 * pbx_fax findUniqueOrThrow
 */
export type pbx_faxFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_fax
   */
  select?: Prisma.pbx_faxSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_fax
   */
  omit?: Prisma.pbx_faxOmit<ExtArgs> | null
  /**
   * Filter, which pbx_fax to fetch.
   */
  where: Prisma.pbx_faxWhereUniqueInput
}

/**
 * pbx_fax findFirst
 */
export type pbx_faxFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_fax
   */
  select?: Prisma.pbx_faxSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_fax
   */
  omit?: Prisma.pbx_faxOmit<ExtArgs> | null
  /**
   * Filter, which pbx_fax to fetch.
   */
  where?: Prisma.pbx_faxWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of pbx_faxes to fetch.
   */
  orderBy?: Prisma.pbx_faxOrderByWithRelationInput | Prisma.pbx_faxOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for pbx_faxes.
   */
  cursor?: Prisma.pbx_faxWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` pbx_faxes 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` pbx_faxes.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of pbx_faxes.
   */
  distinct?: Prisma.Pbx_faxScalarFieldEnum | Prisma.Pbx_faxScalarFieldEnum[]
}

/**
 * pbx_fax findFirstOrThrow
 */
export type pbx_faxFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_fax
   */
  select?: Prisma.pbx_faxSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_fax
   */
  omit?: Prisma.pbx_faxOmit<ExtArgs> | null
  /**
   * Filter, which pbx_fax to fetch.
   */
  where?: Prisma.pbx_faxWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of pbx_faxes to fetch.
   */
  orderBy?: Prisma.pbx_faxOrderByWithRelationInput | Prisma.pbx_faxOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for pbx_faxes.
   */
  cursor?: Prisma.pbx_faxWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` pbx_faxes 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` pbx_faxes.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of pbx_faxes.
   */
  distinct?: Prisma.Pbx_faxScalarFieldEnum | Prisma.Pbx_faxScalarFieldEnum[]
}

/**
 * pbx_fax findMany
 */
export type pbx_faxFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_fax
   */
  select?: Prisma.pbx_faxSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_fax
   */
  omit?: Prisma.pbx_faxOmit<ExtArgs> | null
  /**
   * Filter, which pbx_faxes to fetch.
   */
  where?: Prisma.pbx_faxWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of pbx_faxes to fetch.
   */
  orderBy?: Prisma.pbx_faxOrderByWithRelationInput | Prisma.pbx_faxOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing pbx_faxes.
   */
  cursor?: Prisma.pbx_faxWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` pbx_faxes 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` pbx_faxes.
   */
  skip?: number
  distinct?: Prisma.Pbx_faxScalarFieldEnum | Prisma.Pbx_faxScalarFieldEnum[]
}

/**
 * pbx_fax create
 */
export type pbx_faxCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_fax
   */
  select?: Prisma.pbx_faxSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_fax
   */
  omit?: Prisma.pbx_faxOmit<ExtArgs> | null
  /**
   * The data needed to create a pbx_fax.
   */
  data: Prisma.XOR<Prisma.pbx_faxCreateInput, Prisma.pbx_faxUncheckedCreateInput>
}

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

/**
 * pbx_fax update
 */
export type pbx_faxUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_fax
   */
  select?: Prisma.pbx_faxSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_fax
   */
  omit?: Prisma.pbx_faxOmit<ExtArgs> | null
  /**
   * The data needed to update a pbx_fax.
   */
  data: Prisma.XOR<Prisma.pbx_faxUpdateInput, Prisma.pbx_faxUncheckedUpdateInput>
  /**
   * Choose, which pbx_fax to update.
   */
  where: Prisma.pbx_faxWhereUniqueInput
}

/**
 * pbx_fax updateMany
 */
export type pbx_faxUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update pbx_faxes.
   */
  data: Prisma.XOR<Prisma.pbx_faxUpdateManyMutationInput, Prisma.pbx_faxUncheckedUpdateManyInput>
  /**
   * Filter which pbx_faxes to update
   */
  where?: Prisma.pbx_faxWhereInput
  /**
   * Limit how many pbx_faxes to update.
   */
  limit?: number
}

/**
 * pbx_fax upsert
 */
export type pbx_faxUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_fax
   */
  select?: Prisma.pbx_faxSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_fax
   */
  omit?: Prisma.pbx_faxOmit<ExtArgs> | null
  /**
   * The filter to search for the pbx_fax to update in case it exists.
   */
  where: Prisma.pbx_faxWhereUniqueInput
  /**
   * In case the pbx_fax found by the `where` argument doesn't exist, create a new pbx_fax with this data.
   */
  create: Prisma.XOR<Prisma.pbx_faxCreateInput, Prisma.pbx_faxUncheckedCreateInput>
  /**
   * In case the pbx_fax was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.pbx_faxUpdateInput, Prisma.pbx_faxUncheckedUpdateInput>
}

/**
 * pbx_fax delete
 */
export type pbx_faxDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_fax
   */
  select?: Prisma.pbx_faxSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_fax
   */
  omit?: Prisma.pbx_faxOmit<ExtArgs> | null
  /**
   * Filter which pbx_fax to delete.
   */
  where: Prisma.pbx_faxWhereUniqueInput
}

/**
 * pbx_fax deleteMany
 */
export type pbx_faxDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which pbx_faxes to delete
   */
  where?: Prisma.pbx_faxWhereInput
  /**
   * Limit how many pbx_faxes to delete.
   */
  limit?: number
}

/**
 * pbx_fax without action
 */
export type pbx_faxDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the pbx_fax
   */
  select?: Prisma.pbx_faxSelect<ExtArgs> | null
  /**
   * Omit specific fields from the pbx_fax
   */
  omit?: Prisma.pbx_faxOmit<ExtArgs> | null
}
