/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `EntityLink` 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.ts" import type * as Prisma from "../internal/prismaNamespace.ts" /** * Model EntityLink * A directed, role-labelled link from one entity to another, scoped per tenant. * Idempotent on the unique tuple (upsert in entityLinkService). */ export type EntityLinkModel = runtime.Types.Result.DefaultSelection export type AggregateEntityLink = { _count: EntityLinkCountAggregateOutputType | null _min: EntityLinkMinAggregateOutputType | null _max: EntityLinkMaxAggregateOutputType | null } export type EntityLinkMinAggregateOutputType = { id: string | null createdAt: Date | null tenantId: string | null createdByUserId: string | null sourceType: $Enums.LinkableEntityType | null sourceId: string | null targetType: $Enums.LinkableEntityType | null targetId: string | null linkRole: string | null } export type EntityLinkMaxAggregateOutputType = { id: string | null createdAt: Date | null tenantId: string | null createdByUserId: string | null sourceType: $Enums.LinkableEntityType | null sourceId: string | null targetType: $Enums.LinkableEntityType | null targetId: string | null linkRole: string | null } export type EntityLinkCountAggregateOutputType = { id: number createdAt: number tenantId: number createdByUserId: number sourceType: number sourceId: number targetType: number targetId: number linkRole: number _all: number } export type EntityLinkMinAggregateInputType = { id?: true createdAt?: true tenantId?: true createdByUserId?: true sourceType?: true sourceId?: true targetType?: true targetId?: true linkRole?: true } export type EntityLinkMaxAggregateInputType = { id?: true createdAt?: true tenantId?: true createdByUserId?: true sourceType?: true sourceId?: true targetType?: true targetId?: true linkRole?: true } export type EntityLinkCountAggregateInputType = { id?: true createdAt?: true tenantId?: true createdByUserId?: true sourceType?: true sourceId?: true targetType?: true targetId?: true linkRole?: true _all?: true } export type EntityLinkAggregateArgs = { /** * Filter which EntityLink to aggregate. */ where?: Prisma.EntityLinkWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of EntityLinks to fetch. */ orderBy?: Prisma.EntityLinkOrderByWithRelationInput | Prisma.EntityLinkOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.EntityLinkWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` EntityLinks 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` EntityLinks. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned EntityLinks **/ _count?: true | EntityLinkCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: EntityLinkMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: EntityLinkMaxAggregateInputType } export type GetEntityLinkAggregateType = { [P in keyof T & keyof AggregateEntityLink]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type EntityLinkGroupByArgs = { where?: Prisma.EntityLinkWhereInput orderBy?: Prisma.EntityLinkOrderByWithAggregationInput | Prisma.EntityLinkOrderByWithAggregationInput[] by: Prisma.EntityLinkScalarFieldEnum[] | Prisma.EntityLinkScalarFieldEnum having?: Prisma.EntityLinkScalarWhereWithAggregatesInput take?: number skip?: number _count?: EntityLinkCountAggregateInputType | true _min?: EntityLinkMinAggregateInputType _max?: EntityLinkMaxAggregateInputType } export type EntityLinkGroupByOutputType = { id: string createdAt: Date tenantId: string createdByUserId: string sourceType: $Enums.LinkableEntityType sourceId: string targetType: $Enums.LinkableEntityType targetId: string linkRole: string | null _count: EntityLinkCountAggregateOutputType | null _min: EntityLinkMinAggregateOutputType | null _max: EntityLinkMaxAggregateOutputType | null } export type GetEntityLinkGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof EntityLinkGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type EntityLinkWhereInput = { AND?: Prisma.EntityLinkWhereInput | Prisma.EntityLinkWhereInput[] OR?: Prisma.EntityLinkWhereInput[] NOT?: Prisma.EntityLinkWhereInput | Prisma.EntityLinkWhereInput[] id?: Prisma.StringFilter<"EntityLink"> | string createdAt?: Prisma.DateTimeFilter<"EntityLink"> | Date | string tenantId?: Prisma.StringFilter<"EntityLink"> | string createdByUserId?: Prisma.StringFilter<"EntityLink"> | string sourceType?: Prisma.EnumLinkableEntityTypeFilter<"EntityLink"> | $Enums.LinkableEntityType sourceId?: Prisma.StringFilter<"EntityLink"> | string targetType?: Prisma.EnumLinkableEntityTypeFilter<"EntityLink"> | $Enums.LinkableEntityType targetId?: Prisma.StringFilter<"EntityLink"> | string linkRole?: Prisma.StringNullableFilter<"EntityLink"> | string | null } export type EntityLinkOrderByWithRelationInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder createdByUserId?: Prisma.SortOrder sourceType?: Prisma.SortOrder sourceId?: Prisma.SortOrder targetType?: Prisma.SortOrder targetId?: Prisma.SortOrder linkRole?: Prisma.SortOrderInput | Prisma.SortOrder } export type EntityLinkWhereUniqueInput = Prisma.AtLeast<{ id?: string tenantId_sourceType_sourceId_targetType_targetId?: Prisma.EntityLinkTenantIdSourceTypeSourceIdTargetTypeTargetIdCompoundUniqueInput AND?: Prisma.EntityLinkWhereInput | Prisma.EntityLinkWhereInput[] OR?: Prisma.EntityLinkWhereInput[] NOT?: Prisma.EntityLinkWhereInput | Prisma.EntityLinkWhereInput[] createdAt?: Prisma.DateTimeFilter<"EntityLink"> | Date | string tenantId?: Prisma.StringFilter<"EntityLink"> | string createdByUserId?: Prisma.StringFilter<"EntityLink"> | string sourceType?: Prisma.EnumLinkableEntityTypeFilter<"EntityLink"> | $Enums.LinkableEntityType sourceId?: Prisma.StringFilter<"EntityLink"> | string targetType?: Prisma.EnumLinkableEntityTypeFilter<"EntityLink"> | $Enums.LinkableEntityType targetId?: Prisma.StringFilter<"EntityLink"> | string linkRole?: Prisma.StringNullableFilter<"EntityLink"> | string | null }, "id" | "tenantId_sourceType_sourceId_targetType_targetId"> export type EntityLinkOrderByWithAggregationInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder createdByUserId?: Prisma.SortOrder sourceType?: Prisma.SortOrder sourceId?: Prisma.SortOrder targetType?: Prisma.SortOrder targetId?: Prisma.SortOrder linkRole?: Prisma.SortOrderInput | Prisma.SortOrder _count?: Prisma.EntityLinkCountOrderByAggregateInput _max?: Prisma.EntityLinkMaxOrderByAggregateInput _min?: Prisma.EntityLinkMinOrderByAggregateInput } export type EntityLinkScalarWhereWithAggregatesInput = { AND?: Prisma.EntityLinkScalarWhereWithAggregatesInput | Prisma.EntityLinkScalarWhereWithAggregatesInput[] OR?: Prisma.EntityLinkScalarWhereWithAggregatesInput[] NOT?: Prisma.EntityLinkScalarWhereWithAggregatesInput | Prisma.EntityLinkScalarWhereWithAggregatesInput[] id?: Prisma.StringWithAggregatesFilter<"EntityLink"> | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"EntityLink"> | Date | string tenantId?: Prisma.StringWithAggregatesFilter<"EntityLink"> | string createdByUserId?: Prisma.StringWithAggregatesFilter<"EntityLink"> | string sourceType?: Prisma.EnumLinkableEntityTypeWithAggregatesFilter<"EntityLink"> | $Enums.LinkableEntityType sourceId?: Prisma.StringWithAggregatesFilter<"EntityLink"> | string targetType?: Prisma.EnumLinkableEntityTypeWithAggregatesFilter<"EntityLink"> | $Enums.LinkableEntityType targetId?: Prisma.StringWithAggregatesFilter<"EntityLink"> | string linkRole?: Prisma.StringNullableWithAggregatesFilter<"EntityLink"> | string | null } export type EntityLinkCreateInput = { id?: string createdAt?: Date | string tenantId: string createdByUserId: string sourceType: $Enums.LinkableEntityType sourceId: string targetType: $Enums.LinkableEntityType targetId: string linkRole?: string | null } export type EntityLinkUncheckedCreateInput = { id?: string createdAt?: Date | string tenantId: string createdByUserId: string sourceType: $Enums.LinkableEntityType sourceId: string targetType: $Enums.LinkableEntityType targetId: string linkRole?: string | null } export type EntityLinkUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.StringFieldUpdateOperationsInput | string createdByUserId?: Prisma.StringFieldUpdateOperationsInput | string sourceType?: Prisma.EnumLinkableEntityTypeFieldUpdateOperationsInput | $Enums.LinkableEntityType sourceId?: Prisma.StringFieldUpdateOperationsInput | string targetType?: Prisma.EnumLinkableEntityTypeFieldUpdateOperationsInput | $Enums.LinkableEntityType targetId?: Prisma.StringFieldUpdateOperationsInput | string linkRole?: Prisma.NullableStringFieldUpdateOperationsInput | string | null } export type EntityLinkUncheckedUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.StringFieldUpdateOperationsInput | string createdByUserId?: Prisma.StringFieldUpdateOperationsInput | string sourceType?: Prisma.EnumLinkableEntityTypeFieldUpdateOperationsInput | $Enums.LinkableEntityType sourceId?: Prisma.StringFieldUpdateOperationsInput | string targetType?: Prisma.EnumLinkableEntityTypeFieldUpdateOperationsInput | $Enums.LinkableEntityType targetId?: Prisma.StringFieldUpdateOperationsInput | string linkRole?: Prisma.NullableStringFieldUpdateOperationsInput | string | null } export type EntityLinkCreateManyInput = { id?: string createdAt?: Date | string tenantId: string createdByUserId: string sourceType: $Enums.LinkableEntityType sourceId: string targetType: $Enums.LinkableEntityType targetId: string linkRole?: string | null } export type EntityLinkUpdateManyMutationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.StringFieldUpdateOperationsInput | string createdByUserId?: Prisma.StringFieldUpdateOperationsInput | string sourceType?: Prisma.EnumLinkableEntityTypeFieldUpdateOperationsInput | $Enums.LinkableEntityType sourceId?: Prisma.StringFieldUpdateOperationsInput | string targetType?: Prisma.EnumLinkableEntityTypeFieldUpdateOperationsInput | $Enums.LinkableEntityType targetId?: Prisma.StringFieldUpdateOperationsInput | string linkRole?: Prisma.NullableStringFieldUpdateOperationsInput | string | null } export type EntityLinkUncheckedUpdateManyInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.StringFieldUpdateOperationsInput | string createdByUserId?: Prisma.StringFieldUpdateOperationsInput | string sourceType?: Prisma.EnumLinkableEntityTypeFieldUpdateOperationsInput | $Enums.LinkableEntityType sourceId?: Prisma.StringFieldUpdateOperationsInput | string targetType?: Prisma.EnumLinkableEntityTypeFieldUpdateOperationsInput | $Enums.LinkableEntityType targetId?: Prisma.StringFieldUpdateOperationsInput | string linkRole?: Prisma.NullableStringFieldUpdateOperationsInput | string | null } export type EntityLinkTenantIdSourceTypeSourceIdTargetTypeTargetIdCompoundUniqueInput = { tenantId: string sourceType: $Enums.LinkableEntityType sourceId: string targetType: $Enums.LinkableEntityType targetId: string } export type EntityLinkCountOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder createdByUserId?: Prisma.SortOrder sourceType?: Prisma.SortOrder sourceId?: Prisma.SortOrder targetType?: Prisma.SortOrder targetId?: Prisma.SortOrder linkRole?: Prisma.SortOrder } export type EntityLinkMaxOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder createdByUserId?: Prisma.SortOrder sourceType?: Prisma.SortOrder sourceId?: Prisma.SortOrder targetType?: Prisma.SortOrder targetId?: Prisma.SortOrder linkRole?: Prisma.SortOrder } export type EntityLinkMinOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder createdByUserId?: Prisma.SortOrder sourceType?: Prisma.SortOrder sourceId?: Prisma.SortOrder targetType?: Prisma.SortOrder targetId?: Prisma.SortOrder linkRole?: Prisma.SortOrder } export type EnumLinkableEntityTypeFieldUpdateOperationsInput = { set?: $Enums.LinkableEntityType } export type EntityLinkSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean tenantId?: boolean createdByUserId?: boolean sourceType?: boolean sourceId?: boolean targetType?: boolean targetId?: boolean linkRole?: boolean }, ExtArgs["result"]["entityLink"]> export type EntityLinkSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean tenantId?: boolean createdByUserId?: boolean sourceType?: boolean sourceId?: boolean targetType?: boolean targetId?: boolean linkRole?: boolean }, ExtArgs["result"]["entityLink"]> export type EntityLinkSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean tenantId?: boolean createdByUserId?: boolean sourceType?: boolean sourceId?: boolean targetType?: boolean targetId?: boolean linkRole?: boolean }, ExtArgs["result"]["entityLink"]> export type EntityLinkSelectScalar = { id?: boolean createdAt?: boolean tenantId?: boolean createdByUserId?: boolean sourceType?: boolean sourceId?: boolean targetType?: boolean targetId?: boolean linkRole?: boolean } export type EntityLinkOmit = runtime.Types.Extensions.GetOmit<"id" | "createdAt" | "tenantId" | "createdByUserId" | "sourceType" | "sourceId" | "targetType" | "targetId" | "linkRole", ExtArgs["result"]["entityLink"]> export type $EntityLinkPayload = { name: "EntityLink" objects: {} scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string createdAt: Date tenantId: string createdByUserId: string sourceType: $Enums.LinkableEntityType sourceId: string targetType: $Enums.LinkableEntityType targetId: string linkRole: string | null }, ExtArgs["result"]["entityLink"]> composites: {} } export type EntityLinkGetPayload = runtime.Types.Result.GetResult export type EntityLinkCountArgs = Omit & { select?: EntityLinkCountAggregateInputType | true } export interface EntityLinkDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['EntityLink'], meta: { name: 'EntityLink' } } /** * Find zero or one EntityLink that matches the filter. * @param {EntityLinkFindUniqueArgs} args - Arguments to find a EntityLink * @example * // Get one EntityLink * const entityLink = await prisma.entityLink.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__EntityLinkClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one EntityLink that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {EntityLinkFindUniqueOrThrowArgs} args - Arguments to find a EntityLink * @example * // Get one EntityLink * const entityLink = await prisma.entityLink.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__EntityLinkClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first EntityLink 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 {EntityLinkFindFirstArgs} args - Arguments to find a EntityLink * @example * // Get one EntityLink * const entityLink = await prisma.entityLink.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__EntityLinkClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first EntityLink 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 {EntityLinkFindFirstOrThrowArgs} args - Arguments to find a EntityLink * @example * // Get one EntityLink * const entityLink = await prisma.entityLink.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__EntityLinkClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more EntityLinks 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 {EntityLinkFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all EntityLinks * const entityLinks = await prisma.entityLink.findMany() * * // Get first 10 EntityLinks * const entityLinks = await prisma.entityLink.findMany({ take: 10 }) * * // Only select the `id` * const entityLinkWithIdOnly = await prisma.entityLink.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a EntityLink. * @param {EntityLinkCreateArgs} args - Arguments to create a EntityLink. * @example * // Create one EntityLink * const EntityLink = await prisma.entityLink.create({ * data: { * // ... data to create a EntityLink * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__EntityLinkClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many EntityLinks. * @param {EntityLinkCreateManyArgs} args - Arguments to create many EntityLinks. * @example * // Create many EntityLinks * const entityLink = await prisma.entityLink.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many EntityLinks and returns the data saved in the database. * @param {EntityLinkCreateManyAndReturnArgs} args - Arguments to create many EntityLinks. * @example * // Create many EntityLinks * const entityLink = await prisma.entityLink.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many EntityLinks and only return the `id` * const entityLinkWithIdOnly = await prisma.entityLink.createManyAndReturn({ * select: { id: true }, * data: [ * // ... provide data here * ] * }) * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * */ createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> /** * Delete a EntityLink. * @param {EntityLinkDeleteArgs} args - Arguments to delete one EntityLink. * @example * // Delete one EntityLink * const EntityLink = await prisma.entityLink.delete({ * where: { * // ... filter to delete one EntityLink * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__EntityLinkClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one EntityLink. * @param {EntityLinkUpdateArgs} args - Arguments to update one EntityLink. * @example * // Update one EntityLink * const entityLink = await prisma.entityLink.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__EntityLinkClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more EntityLinks. * @param {EntityLinkDeleteManyArgs} args - Arguments to filter EntityLinks to delete. * @example * // Delete a few EntityLinks * const { count } = await prisma.entityLink.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more EntityLinks. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {EntityLinkUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many EntityLinks * const entityLink = await prisma.entityLink.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more EntityLinks and returns the data updated in the database. * @param {EntityLinkUpdateManyAndReturnArgs} args - Arguments to update many EntityLinks. * @example * // Update many EntityLinks * const entityLink = await prisma.entityLink.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more EntityLinks and only return the `id` * const entityLinkWithIdOnly = await prisma.entityLink.updateManyAndReturn({ * select: { id: true }, * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * */ updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> /** * Create or update one EntityLink. * @param {EntityLinkUpsertArgs} args - Arguments to update or create a EntityLink. * @example * // Update or create a EntityLink * const entityLink = await prisma.entityLink.upsert({ * create: { * // ... data to create a EntityLink * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the EntityLink we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__EntityLinkClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of EntityLinks. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {EntityLinkCountArgs} args - Arguments to filter EntityLinks to count. * @example * // Count the number of EntityLinks * const count = await prisma.entityLink.count({ * where: { * // ... the filter for the EntityLinks we want to count * } * }) **/ count( args?: Prisma.Subset, ): Prisma.PrismaPromise< T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType : number > /** * Allows you to perform aggregations operations on a EntityLink. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {EntityLinkAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Prisma.Subset): Prisma.PrismaPromise> /** * Group by EntityLink. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {EntityLinkGroupByArgs} 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 EntityLinkGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: EntityLinkGroupByArgs['orderBy'] } : { orderBy?: EntityLinkGroupByArgs['orderBy'] }, OrderFields extends Prisma.ExcludeUnderscoreKeys>>, ByFields extends Prisma.MaybeTupleToUnion, ByValid extends Prisma.Has, HavingFields extends Prisma.GetHavingFields, HavingValid extends Prisma.Has, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True ? `Error: "by" must not be empty.` : HavingValid extends Prisma.False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Prisma.Keys ? 'orderBy' extends Prisma.Keys ? ByValid extends Prisma.True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Prisma.Keys ? 'orderBy' extends Prisma.Keys ? ByValid extends Prisma.True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetEntityLinkGroupByPayload : Prisma.PrismaPromise /** * Fields of the EntityLink model */ readonly fields: EntityLinkFieldRefs; } /** * The delegate class that acts as a "Promise-like" for EntityLink. * 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__EntityLinkClient extends Prisma.PrismaPromise { 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(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise } /** * Fields of the EntityLink model */ export interface EntityLinkFieldRefs { readonly id: Prisma.FieldRef<"EntityLink", 'String'> readonly createdAt: Prisma.FieldRef<"EntityLink", 'DateTime'> readonly tenantId: Prisma.FieldRef<"EntityLink", 'String'> readonly createdByUserId: Prisma.FieldRef<"EntityLink", 'String'> readonly sourceType: Prisma.FieldRef<"EntityLink", 'LinkableEntityType'> readonly sourceId: Prisma.FieldRef<"EntityLink", 'String'> readonly targetType: Prisma.FieldRef<"EntityLink", 'LinkableEntityType'> readonly targetId: Prisma.FieldRef<"EntityLink", 'String'> readonly linkRole: Prisma.FieldRef<"EntityLink", 'String'> } // Custom InputTypes /** * EntityLink findUnique */ export type EntityLinkFindUniqueArgs = { /** * Select specific fields to fetch from the EntityLink */ select?: Prisma.EntityLinkSelect | null /** * Omit specific fields from the EntityLink */ omit?: Prisma.EntityLinkOmit | null /** * Filter, which EntityLink to fetch. */ where: Prisma.EntityLinkWhereUniqueInput } /** * EntityLink findUniqueOrThrow */ export type EntityLinkFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the EntityLink */ select?: Prisma.EntityLinkSelect | null /** * Omit specific fields from the EntityLink */ omit?: Prisma.EntityLinkOmit | null /** * Filter, which EntityLink to fetch. */ where: Prisma.EntityLinkWhereUniqueInput } /** * EntityLink findFirst */ export type EntityLinkFindFirstArgs = { /** * Select specific fields to fetch from the EntityLink */ select?: Prisma.EntityLinkSelect | null /** * Omit specific fields from the EntityLink */ omit?: Prisma.EntityLinkOmit | null /** * Filter, which EntityLink to fetch. */ where?: Prisma.EntityLinkWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of EntityLinks to fetch. */ orderBy?: Prisma.EntityLinkOrderByWithRelationInput | Prisma.EntityLinkOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for EntityLinks. */ cursor?: Prisma.EntityLinkWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` EntityLinks 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` EntityLinks. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of EntityLinks. */ distinct?: Prisma.EntityLinkScalarFieldEnum | Prisma.EntityLinkScalarFieldEnum[] } /** * EntityLink findFirstOrThrow */ export type EntityLinkFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the EntityLink */ select?: Prisma.EntityLinkSelect | null /** * Omit specific fields from the EntityLink */ omit?: Prisma.EntityLinkOmit | null /** * Filter, which EntityLink to fetch. */ where?: Prisma.EntityLinkWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of EntityLinks to fetch. */ orderBy?: Prisma.EntityLinkOrderByWithRelationInput | Prisma.EntityLinkOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for EntityLinks. */ cursor?: Prisma.EntityLinkWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` EntityLinks 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` EntityLinks. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of EntityLinks. */ distinct?: Prisma.EntityLinkScalarFieldEnum | Prisma.EntityLinkScalarFieldEnum[] } /** * EntityLink findMany */ export type EntityLinkFindManyArgs = { /** * Select specific fields to fetch from the EntityLink */ select?: Prisma.EntityLinkSelect | null /** * Omit specific fields from the EntityLink */ omit?: Prisma.EntityLinkOmit | null /** * Filter, which EntityLinks to fetch. */ where?: Prisma.EntityLinkWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of EntityLinks to fetch. */ orderBy?: Prisma.EntityLinkOrderByWithRelationInput | Prisma.EntityLinkOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing EntityLinks. */ cursor?: Prisma.EntityLinkWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` EntityLinks 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` EntityLinks. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of EntityLinks. */ distinct?: Prisma.EntityLinkScalarFieldEnum | Prisma.EntityLinkScalarFieldEnum[] } /** * EntityLink create */ export type EntityLinkCreateArgs = { /** * Select specific fields to fetch from the EntityLink */ select?: Prisma.EntityLinkSelect | null /** * Omit specific fields from the EntityLink */ omit?: Prisma.EntityLinkOmit | null /** * The data needed to create a EntityLink. */ data: Prisma.XOR } /** * EntityLink createMany */ export type EntityLinkCreateManyArgs = { /** * The data used to create many EntityLinks. */ data: Prisma.EntityLinkCreateManyInput | Prisma.EntityLinkCreateManyInput[] skipDuplicates?: boolean } /** * EntityLink createManyAndReturn */ export type EntityLinkCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the EntityLink */ select?: Prisma.EntityLinkSelectCreateManyAndReturn | null /** * Omit specific fields from the EntityLink */ omit?: Prisma.EntityLinkOmit | null /** * The data used to create many EntityLinks. */ data: Prisma.EntityLinkCreateManyInput | Prisma.EntityLinkCreateManyInput[] skipDuplicates?: boolean } /** * EntityLink update */ export type EntityLinkUpdateArgs = { /** * Select specific fields to fetch from the EntityLink */ select?: Prisma.EntityLinkSelect | null /** * Omit specific fields from the EntityLink */ omit?: Prisma.EntityLinkOmit | null /** * The data needed to update a EntityLink. */ data: Prisma.XOR /** * Choose, which EntityLink to update. */ where: Prisma.EntityLinkWhereUniqueInput } /** * EntityLink updateMany */ export type EntityLinkUpdateManyArgs = { /** * The data used to update EntityLinks. */ data: Prisma.XOR /** * Filter which EntityLinks to update */ where?: Prisma.EntityLinkWhereInput /** * Limit how many EntityLinks to update. */ limit?: number } /** * EntityLink updateManyAndReturn */ export type EntityLinkUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the EntityLink */ select?: Prisma.EntityLinkSelectUpdateManyAndReturn | null /** * Omit specific fields from the EntityLink */ omit?: Prisma.EntityLinkOmit | null /** * The data used to update EntityLinks. */ data: Prisma.XOR /** * Filter which EntityLinks to update */ where?: Prisma.EntityLinkWhereInput /** * Limit how many EntityLinks to update. */ limit?: number } /** * EntityLink upsert */ export type EntityLinkUpsertArgs = { /** * Select specific fields to fetch from the EntityLink */ select?: Prisma.EntityLinkSelect | null /** * Omit specific fields from the EntityLink */ omit?: Prisma.EntityLinkOmit | null /** * The filter to search for the EntityLink to update in case it exists. */ where: Prisma.EntityLinkWhereUniqueInput /** * In case the EntityLink found by the `where` argument doesn't exist, create a new EntityLink with this data. */ create: Prisma.XOR /** * In case the EntityLink was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * EntityLink delete */ export type EntityLinkDeleteArgs = { /** * Select specific fields to fetch from the EntityLink */ select?: Prisma.EntityLinkSelect | null /** * Omit specific fields from the EntityLink */ omit?: Prisma.EntityLinkOmit | null /** * Filter which EntityLink to delete. */ where: Prisma.EntityLinkWhereUniqueInput } /** * EntityLink deleteMany */ export type EntityLinkDeleteManyArgs = { /** * Filter which EntityLinks to delete */ where?: Prisma.EntityLinkWhereInput /** * Limit how many EntityLinks to delete. */ limit?: number } /** * EntityLink without action */ export type EntityLinkDefaultArgs = { /** * Select specific fields to fetch from the EntityLink */ select?: Prisma.EntityLinkSelect | null /** * Omit specific fields from the EntityLink */ omit?: Prisma.EntityLinkOmit | null }