/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `LeadEvent` 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 LeadEvent * */ export type LeadEventModel = runtime.Types.Result.DefaultSelection export type AggregateLeadEvent = { _count: LeadEventCountAggregateOutputType | null _min: LeadEventMinAggregateOutputType | null _max: LeadEventMaxAggregateOutputType | null } export type LeadEventMinAggregateOutputType = { id: string | null leadId: string | null type: string | null actorId: string | null createdAt: Date | null } export type LeadEventMaxAggregateOutputType = { id: string | null leadId: string | null type: string | null actorId: string | null createdAt: Date | null } export type LeadEventCountAggregateOutputType = { id: number leadId: number type: number actorId: number payload: number createdAt: number _all: number } export type LeadEventMinAggregateInputType = { id?: true leadId?: true type?: true actorId?: true createdAt?: true } export type LeadEventMaxAggregateInputType = { id?: true leadId?: true type?: true actorId?: true createdAt?: true } export type LeadEventCountAggregateInputType = { id?: true leadId?: true type?: true actorId?: true payload?: true createdAt?: true _all?: true } export type LeadEventAggregateArgs = { /** * Filter which LeadEvent to aggregate. */ where?: Prisma.LeadEventWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of LeadEvents to fetch. */ orderBy?: Prisma.LeadEventOrderByWithRelationInput | Prisma.LeadEventOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.LeadEventWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` LeadEvents 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` LeadEvents. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned LeadEvents **/ _count?: true | LeadEventCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: LeadEventMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: LeadEventMaxAggregateInputType } export type GetLeadEventAggregateType = { [P in keyof T & keyof AggregateLeadEvent]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type LeadEventGroupByArgs = { where?: Prisma.LeadEventWhereInput orderBy?: Prisma.LeadEventOrderByWithAggregationInput | Prisma.LeadEventOrderByWithAggregationInput[] by: Prisma.LeadEventScalarFieldEnum[] | Prisma.LeadEventScalarFieldEnum having?: Prisma.LeadEventScalarWhereWithAggregatesInput take?: number skip?: number _count?: LeadEventCountAggregateInputType | true _min?: LeadEventMinAggregateInputType _max?: LeadEventMaxAggregateInputType } export type LeadEventGroupByOutputType = { id: string leadId: string type: string actorId: string | null payload: runtime.JsonValue createdAt: Date _count: LeadEventCountAggregateOutputType | null _min: LeadEventMinAggregateOutputType | null _max: LeadEventMaxAggregateOutputType | null } export type GetLeadEventGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof LeadEventGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type LeadEventWhereInput = { AND?: Prisma.LeadEventWhereInput | Prisma.LeadEventWhereInput[] OR?: Prisma.LeadEventWhereInput[] NOT?: Prisma.LeadEventWhereInput | Prisma.LeadEventWhereInput[] id?: Prisma.StringFilter<"LeadEvent"> | string leadId?: Prisma.StringFilter<"LeadEvent"> | string type?: Prisma.StringFilter<"LeadEvent"> | string actorId?: Prisma.StringNullableFilter<"LeadEvent"> | string | null payload?: Prisma.JsonFilter<"LeadEvent"> createdAt?: Prisma.DateTimeFilter<"LeadEvent"> | Date | string lead?: Prisma.XOR } export type LeadEventOrderByWithRelationInput = { id?: Prisma.SortOrder leadId?: Prisma.SortOrder type?: Prisma.SortOrder actorId?: Prisma.SortOrderInput | Prisma.SortOrder payload?: Prisma.SortOrder createdAt?: Prisma.SortOrder lead?: Prisma.LeadOrderByWithRelationInput } export type LeadEventWhereUniqueInput = Prisma.AtLeast<{ id?: string AND?: Prisma.LeadEventWhereInput | Prisma.LeadEventWhereInput[] OR?: Prisma.LeadEventWhereInput[] NOT?: Prisma.LeadEventWhereInput | Prisma.LeadEventWhereInput[] leadId?: Prisma.StringFilter<"LeadEvent"> | string type?: Prisma.StringFilter<"LeadEvent"> | string actorId?: Prisma.StringNullableFilter<"LeadEvent"> | string | null payload?: Prisma.JsonFilter<"LeadEvent"> createdAt?: Prisma.DateTimeFilter<"LeadEvent"> | Date | string lead?: Prisma.XOR }, "id"> export type LeadEventOrderByWithAggregationInput = { id?: Prisma.SortOrder leadId?: Prisma.SortOrder type?: Prisma.SortOrder actorId?: Prisma.SortOrderInput | Prisma.SortOrder payload?: Prisma.SortOrder createdAt?: Prisma.SortOrder _count?: Prisma.LeadEventCountOrderByAggregateInput _max?: Prisma.LeadEventMaxOrderByAggregateInput _min?: Prisma.LeadEventMinOrderByAggregateInput } export type LeadEventScalarWhereWithAggregatesInput = { AND?: Prisma.LeadEventScalarWhereWithAggregatesInput | Prisma.LeadEventScalarWhereWithAggregatesInput[] OR?: Prisma.LeadEventScalarWhereWithAggregatesInput[] NOT?: Prisma.LeadEventScalarWhereWithAggregatesInput | Prisma.LeadEventScalarWhereWithAggregatesInput[] id?: Prisma.StringWithAggregatesFilter<"LeadEvent"> | string leadId?: Prisma.StringWithAggregatesFilter<"LeadEvent"> | string type?: Prisma.StringWithAggregatesFilter<"LeadEvent"> | string actorId?: Prisma.StringNullableWithAggregatesFilter<"LeadEvent"> | string | null payload?: Prisma.JsonWithAggregatesFilter<"LeadEvent"> createdAt?: Prisma.DateTimeWithAggregatesFilter<"LeadEvent"> | Date | string } export type LeadEventCreateInput = { id?: string type: string actorId?: string | null payload: Prisma.JsonNullValueInput | runtime.InputJsonValue createdAt?: Date | string lead: Prisma.LeadCreateNestedOneWithoutEventsInput } export type LeadEventUncheckedCreateInput = { id?: string leadId: string type: string actorId?: string | null payload: Prisma.JsonNullValueInput | runtime.InputJsonValue createdAt?: Date | string } export type LeadEventUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string actorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string lead?: Prisma.LeadUpdateOneRequiredWithoutEventsNestedInput } export type LeadEventUncheckedUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string leadId?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string actorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type LeadEventCreateManyInput = { id?: string leadId: string type: string actorId?: string | null payload: Prisma.JsonNullValueInput | runtime.InputJsonValue createdAt?: Date | string } export type LeadEventUpdateManyMutationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string actorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type LeadEventUncheckedUpdateManyInput = { id?: Prisma.StringFieldUpdateOperationsInput | string leadId?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string actorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type LeadEventListRelationFilter = { every?: Prisma.LeadEventWhereInput some?: Prisma.LeadEventWhereInput none?: Prisma.LeadEventWhereInput } export type LeadEventOrderByRelationAggregateInput = { _count?: Prisma.SortOrder } export type LeadEventCountOrderByAggregateInput = { id?: Prisma.SortOrder leadId?: Prisma.SortOrder type?: Prisma.SortOrder actorId?: Prisma.SortOrder payload?: Prisma.SortOrder createdAt?: Prisma.SortOrder } export type LeadEventMaxOrderByAggregateInput = { id?: Prisma.SortOrder leadId?: Prisma.SortOrder type?: Prisma.SortOrder actorId?: Prisma.SortOrder createdAt?: Prisma.SortOrder } export type LeadEventMinOrderByAggregateInput = { id?: Prisma.SortOrder leadId?: Prisma.SortOrder type?: Prisma.SortOrder actorId?: Prisma.SortOrder createdAt?: Prisma.SortOrder } export type LeadEventCreateNestedManyWithoutLeadInput = { create?: Prisma.XOR | Prisma.LeadEventCreateWithoutLeadInput[] | Prisma.LeadEventUncheckedCreateWithoutLeadInput[] connectOrCreate?: Prisma.LeadEventCreateOrConnectWithoutLeadInput | Prisma.LeadEventCreateOrConnectWithoutLeadInput[] createMany?: Prisma.LeadEventCreateManyLeadInputEnvelope connect?: Prisma.LeadEventWhereUniqueInput | Prisma.LeadEventWhereUniqueInput[] } export type LeadEventUncheckedCreateNestedManyWithoutLeadInput = { create?: Prisma.XOR | Prisma.LeadEventCreateWithoutLeadInput[] | Prisma.LeadEventUncheckedCreateWithoutLeadInput[] connectOrCreate?: Prisma.LeadEventCreateOrConnectWithoutLeadInput | Prisma.LeadEventCreateOrConnectWithoutLeadInput[] createMany?: Prisma.LeadEventCreateManyLeadInputEnvelope connect?: Prisma.LeadEventWhereUniqueInput | Prisma.LeadEventWhereUniqueInput[] } export type LeadEventUpdateManyWithoutLeadNestedInput = { create?: Prisma.XOR | Prisma.LeadEventCreateWithoutLeadInput[] | Prisma.LeadEventUncheckedCreateWithoutLeadInput[] connectOrCreate?: Prisma.LeadEventCreateOrConnectWithoutLeadInput | Prisma.LeadEventCreateOrConnectWithoutLeadInput[] upsert?: Prisma.LeadEventUpsertWithWhereUniqueWithoutLeadInput | Prisma.LeadEventUpsertWithWhereUniqueWithoutLeadInput[] createMany?: Prisma.LeadEventCreateManyLeadInputEnvelope set?: Prisma.LeadEventWhereUniqueInput | Prisma.LeadEventWhereUniqueInput[] disconnect?: Prisma.LeadEventWhereUniqueInput | Prisma.LeadEventWhereUniqueInput[] delete?: Prisma.LeadEventWhereUniqueInput | Prisma.LeadEventWhereUniqueInput[] connect?: Prisma.LeadEventWhereUniqueInput | Prisma.LeadEventWhereUniqueInput[] update?: Prisma.LeadEventUpdateWithWhereUniqueWithoutLeadInput | Prisma.LeadEventUpdateWithWhereUniqueWithoutLeadInput[] updateMany?: Prisma.LeadEventUpdateManyWithWhereWithoutLeadInput | Prisma.LeadEventUpdateManyWithWhereWithoutLeadInput[] deleteMany?: Prisma.LeadEventScalarWhereInput | Prisma.LeadEventScalarWhereInput[] } export type LeadEventUncheckedUpdateManyWithoutLeadNestedInput = { create?: Prisma.XOR | Prisma.LeadEventCreateWithoutLeadInput[] | Prisma.LeadEventUncheckedCreateWithoutLeadInput[] connectOrCreate?: Prisma.LeadEventCreateOrConnectWithoutLeadInput | Prisma.LeadEventCreateOrConnectWithoutLeadInput[] upsert?: Prisma.LeadEventUpsertWithWhereUniqueWithoutLeadInput | Prisma.LeadEventUpsertWithWhereUniqueWithoutLeadInput[] createMany?: Prisma.LeadEventCreateManyLeadInputEnvelope set?: Prisma.LeadEventWhereUniqueInput | Prisma.LeadEventWhereUniqueInput[] disconnect?: Prisma.LeadEventWhereUniqueInput | Prisma.LeadEventWhereUniqueInput[] delete?: Prisma.LeadEventWhereUniqueInput | Prisma.LeadEventWhereUniqueInput[] connect?: Prisma.LeadEventWhereUniqueInput | Prisma.LeadEventWhereUniqueInput[] update?: Prisma.LeadEventUpdateWithWhereUniqueWithoutLeadInput | Prisma.LeadEventUpdateWithWhereUniqueWithoutLeadInput[] updateMany?: Prisma.LeadEventUpdateManyWithWhereWithoutLeadInput | Prisma.LeadEventUpdateManyWithWhereWithoutLeadInput[] deleteMany?: Prisma.LeadEventScalarWhereInput | Prisma.LeadEventScalarWhereInput[] } export type LeadEventCreateWithoutLeadInput = { id?: string type: string actorId?: string | null payload: Prisma.JsonNullValueInput | runtime.InputJsonValue createdAt?: Date | string } export type LeadEventUncheckedCreateWithoutLeadInput = { id?: string type: string actorId?: string | null payload: Prisma.JsonNullValueInput | runtime.InputJsonValue createdAt?: Date | string } export type LeadEventCreateOrConnectWithoutLeadInput = { where: Prisma.LeadEventWhereUniqueInput create: Prisma.XOR } export type LeadEventCreateManyLeadInputEnvelope = { data: Prisma.LeadEventCreateManyLeadInput | Prisma.LeadEventCreateManyLeadInput[] skipDuplicates?: boolean } export type LeadEventUpsertWithWhereUniqueWithoutLeadInput = { where: Prisma.LeadEventWhereUniqueInput update: Prisma.XOR create: Prisma.XOR } export type LeadEventUpdateWithWhereUniqueWithoutLeadInput = { where: Prisma.LeadEventWhereUniqueInput data: Prisma.XOR } export type LeadEventUpdateManyWithWhereWithoutLeadInput = { where: Prisma.LeadEventScalarWhereInput data: Prisma.XOR } export type LeadEventScalarWhereInput = { AND?: Prisma.LeadEventScalarWhereInput | Prisma.LeadEventScalarWhereInput[] OR?: Prisma.LeadEventScalarWhereInput[] NOT?: Prisma.LeadEventScalarWhereInput | Prisma.LeadEventScalarWhereInput[] id?: Prisma.StringFilter<"LeadEvent"> | string leadId?: Prisma.StringFilter<"LeadEvent"> | string type?: Prisma.StringFilter<"LeadEvent"> | string actorId?: Prisma.StringNullableFilter<"LeadEvent"> | string | null payload?: Prisma.JsonFilter<"LeadEvent"> createdAt?: Prisma.DateTimeFilter<"LeadEvent"> | Date | string } export type LeadEventCreateManyLeadInput = { id?: string type: string actorId?: string | null payload: Prisma.JsonNullValueInput | runtime.InputJsonValue createdAt?: Date | string } export type LeadEventUpdateWithoutLeadInput = { id?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string actorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type LeadEventUncheckedUpdateWithoutLeadInput = { id?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string actorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type LeadEventUncheckedUpdateManyWithoutLeadInput = { id?: Prisma.StringFieldUpdateOperationsInput | string type?: Prisma.StringFieldUpdateOperationsInput | string actorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type LeadEventSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean leadId?: boolean type?: boolean actorId?: boolean payload?: boolean createdAt?: boolean lead?: boolean | Prisma.LeadDefaultArgs }, ExtArgs["result"]["leadEvent"]> export type LeadEventSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean leadId?: boolean type?: boolean actorId?: boolean payload?: boolean createdAt?: boolean lead?: boolean | Prisma.LeadDefaultArgs }, ExtArgs["result"]["leadEvent"]> export type LeadEventSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean leadId?: boolean type?: boolean actorId?: boolean payload?: boolean createdAt?: boolean lead?: boolean | Prisma.LeadDefaultArgs }, ExtArgs["result"]["leadEvent"]> export type LeadEventSelectScalar = { id?: boolean leadId?: boolean type?: boolean actorId?: boolean payload?: boolean createdAt?: boolean } export type LeadEventOmit = runtime.Types.Extensions.GetOmit<"id" | "leadId" | "type" | "actorId" | "payload" | "createdAt", ExtArgs["result"]["leadEvent"]> export type LeadEventInclude = { lead?: boolean | Prisma.LeadDefaultArgs } export type LeadEventIncludeCreateManyAndReturn = { lead?: boolean | Prisma.LeadDefaultArgs } export type LeadEventIncludeUpdateManyAndReturn = { lead?: boolean | Prisma.LeadDefaultArgs } export type $LeadEventPayload = { name: "LeadEvent" objects: { lead: Prisma.$LeadPayload } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string leadId: string /** * "captured" | "re-captured" | "status-changed" | "assigned" | "note-added" | "score-changed" | "converted" */ type: string /** * Optional acting admin user id; null for SDK-driven events. */ actorId: string | null payload: runtime.JsonValue createdAt: Date }, ExtArgs["result"]["leadEvent"]> composites: {} } export type LeadEventGetPayload = runtime.Types.Result.GetResult export type LeadEventCountArgs = Omit & { select?: LeadEventCountAggregateInputType | true } export interface LeadEventDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['LeadEvent'], meta: { name: 'LeadEvent' } } /** * Find zero or one LeadEvent that matches the filter. * @param {LeadEventFindUniqueArgs} args - Arguments to find a LeadEvent * @example * // Get one LeadEvent * const leadEvent = await prisma.leadEvent.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__LeadEventClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one LeadEvent that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {LeadEventFindUniqueOrThrowArgs} args - Arguments to find a LeadEvent * @example * // Get one LeadEvent * const leadEvent = await prisma.leadEvent.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__LeadEventClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first LeadEvent 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 {LeadEventFindFirstArgs} args - Arguments to find a LeadEvent * @example * // Get one LeadEvent * const leadEvent = await prisma.leadEvent.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__LeadEventClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first LeadEvent 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 {LeadEventFindFirstOrThrowArgs} args - Arguments to find a LeadEvent * @example * // Get one LeadEvent * const leadEvent = await prisma.leadEvent.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__LeadEventClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more LeadEvents 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 {LeadEventFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all LeadEvents * const leadEvents = await prisma.leadEvent.findMany() * * // Get first 10 LeadEvents * const leadEvents = await prisma.leadEvent.findMany({ take: 10 }) * * // Only select the `id` * const leadEventWithIdOnly = await prisma.leadEvent.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a LeadEvent. * @param {LeadEventCreateArgs} args - Arguments to create a LeadEvent. * @example * // Create one LeadEvent * const LeadEvent = await prisma.leadEvent.create({ * data: { * // ... data to create a LeadEvent * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__LeadEventClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many LeadEvents. * @param {LeadEventCreateManyArgs} args - Arguments to create many LeadEvents. * @example * // Create many LeadEvents * const leadEvent = await prisma.leadEvent.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many LeadEvents and returns the data saved in the database. * @param {LeadEventCreateManyAndReturnArgs} args - Arguments to create many LeadEvents. * @example * // Create many LeadEvents * const leadEvent = await prisma.leadEvent.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many LeadEvents and only return the `id` * const leadEventWithIdOnly = await prisma.leadEvent.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 LeadEvent. * @param {LeadEventDeleteArgs} args - Arguments to delete one LeadEvent. * @example * // Delete one LeadEvent * const LeadEvent = await prisma.leadEvent.delete({ * where: { * // ... filter to delete one LeadEvent * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__LeadEventClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one LeadEvent. * @param {LeadEventUpdateArgs} args - Arguments to update one LeadEvent. * @example * // Update one LeadEvent * const leadEvent = await prisma.leadEvent.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__LeadEventClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more LeadEvents. * @param {LeadEventDeleteManyArgs} args - Arguments to filter LeadEvents to delete. * @example * // Delete a few LeadEvents * const { count } = await prisma.leadEvent.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more LeadEvents. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {LeadEventUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many LeadEvents * const leadEvent = await prisma.leadEvent.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more LeadEvents and returns the data updated in the database. * @param {LeadEventUpdateManyAndReturnArgs} args - Arguments to update many LeadEvents. * @example * // Update many LeadEvents * const leadEvent = await prisma.leadEvent.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more LeadEvents and only return the `id` * const leadEventWithIdOnly = await prisma.leadEvent.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 LeadEvent. * @param {LeadEventUpsertArgs} args - Arguments to update or create a LeadEvent. * @example * // Update or create a LeadEvent * const leadEvent = await prisma.leadEvent.upsert({ * create: { * // ... data to create a LeadEvent * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the LeadEvent we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__LeadEventClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of LeadEvents. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {LeadEventCountArgs} args - Arguments to filter LeadEvents to count. * @example * // Count the number of LeadEvents * const count = await prisma.leadEvent.count({ * where: { * // ... the filter for the LeadEvents 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 LeadEvent. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {LeadEventAggregateArgs} 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 LeadEvent. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {LeadEventGroupByArgs} 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 LeadEventGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: LeadEventGroupByArgs['orderBy'] } : { orderBy?: LeadEventGroupByArgs['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 ? GetLeadEventGroupByPayload : Prisma.PrismaPromise /** * Fields of the LeadEvent model */ readonly fields: LeadEventFieldRefs; } /** * The delegate class that acts as a "Promise-like" for LeadEvent. * 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__LeadEventClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" lead = {}>(args?: Prisma.Subset>): Prisma.Prisma__LeadClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise } /** * Fields of the LeadEvent model */ export interface LeadEventFieldRefs { readonly id: Prisma.FieldRef<"LeadEvent", 'String'> readonly leadId: Prisma.FieldRef<"LeadEvent", 'String'> readonly type: Prisma.FieldRef<"LeadEvent", 'String'> readonly actorId: Prisma.FieldRef<"LeadEvent", 'String'> readonly payload: Prisma.FieldRef<"LeadEvent", 'Json'> readonly createdAt: Prisma.FieldRef<"LeadEvent", 'DateTime'> } // Custom InputTypes /** * LeadEvent findUnique */ export type LeadEventFindUniqueArgs = { /** * Select specific fields to fetch from the LeadEvent */ select?: Prisma.LeadEventSelect | null /** * Omit specific fields from the LeadEvent */ omit?: Prisma.LeadEventOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.LeadEventInclude | null /** * Filter, which LeadEvent to fetch. */ where: Prisma.LeadEventWhereUniqueInput } /** * LeadEvent findUniqueOrThrow */ export type LeadEventFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the LeadEvent */ select?: Prisma.LeadEventSelect | null /** * Omit specific fields from the LeadEvent */ omit?: Prisma.LeadEventOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.LeadEventInclude | null /** * Filter, which LeadEvent to fetch. */ where: Prisma.LeadEventWhereUniqueInput } /** * LeadEvent findFirst */ export type LeadEventFindFirstArgs = { /** * Select specific fields to fetch from the LeadEvent */ select?: Prisma.LeadEventSelect | null /** * Omit specific fields from the LeadEvent */ omit?: Prisma.LeadEventOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.LeadEventInclude | null /** * Filter, which LeadEvent to fetch. */ where?: Prisma.LeadEventWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of LeadEvents to fetch. */ orderBy?: Prisma.LeadEventOrderByWithRelationInput | Prisma.LeadEventOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for LeadEvents. */ cursor?: Prisma.LeadEventWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` LeadEvents 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` LeadEvents. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of LeadEvents. */ distinct?: Prisma.LeadEventScalarFieldEnum | Prisma.LeadEventScalarFieldEnum[] } /** * LeadEvent findFirstOrThrow */ export type LeadEventFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the LeadEvent */ select?: Prisma.LeadEventSelect | null /** * Omit specific fields from the LeadEvent */ omit?: Prisma.LeadEventOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.LeadEventInclude | null /** * Filter, which LeadEvent to fetch. */ where?: Prisma.LeadEventWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of LeadEvents to fetch. */ orderBy?: Prisma.LeadEventOrderByWithRelationInput | Prisma.LeadEventOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for LeadEvents. */ cursor?: Prisma.LeadEventWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` LeadEvents 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` LeadEvents. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of LeadEvents. */ distinct?: Prisma.LeadEventScalarFieldEnum | Prisma.LeadEventScalarFieldEnum[] } /** * LeadEvent findMany */ export type LeadEventFindManyArgs = { /** * Select specific fields to fetch from the LeadEvent */ select?: Prisma.LeadEventSelect | null /** * Omit specific fields from the LeadEvent */ omit?: Prisma.LeadEventOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.LeadEventInclude | null /** * Filter, which LeadEvents to fetch. */ where?: Prisma.LeadEventWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of LeadEvents to fetch. */ orderBy?: Prisma.LeadEventOrderByWithRelationInput | Prisma.LeadEventOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing LeadEvents. */ cursor?: Prisma.LeadEventWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` LeadEvents 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` LeadEvents. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of LeadEvents. */ distinct?: Prisma.LeadEventScalarFieldEnum | Prisma.LeadEventScalarFieldEnum[] } /** * LeadEvent create */ export type LeadEventCreateArgs = { /** * Select specific fields to fetch from the LeadEvent */ select?: Prisma.LeadEventSelect | null /** * Omit specific fields from the LeadEvent */ omit?: Prisma.LeadEventOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.LeadEventInclude | null /** * The data needed to create a LeadEvent. */ data: Prisma.XOR } /** * LeadEvent createMany */ export type LeadEventCreateManyArgs = { /** * The data used to create many LeadEvents. */ data: Prisma.LeadEventCreateManyInput | Prisma.LeadEventCreateManyInput[] skipDuplicates?: boolean } /** * LeadEvent createManyAndReturn */ export type LeadEventCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the LeadEvent */ select?: Prisma.LeadEventSelectCreateManyAndReturn | null /** * Omit specific fields from the LeadEvent */ omit?: Prisma.LeadEventOmit | null /** * The data used to create many LeadEvents. */ data: Prisma.LeadEventCreateManyInput | Prisma.LeadEventCreateManyInput[] skipDuplicates?: boolean /** * Choose, which related nodes to fetch as well */ include?: Prisma.LeadEventIncludeCreateManyAndReturn | null } /** * LeadEvent update */ export type LeadEventUpdateArgs = { /** * Select specific fields to fetch from the LeadEvent */ select?: Prisma.LeadEventSelect | null /** * Omit specific fields from the LeadEvent */ omit?: Prisma.LeadEventOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.LeadEventInclude | null /** * The data needed to update a LeadEvent. */ data: Prisma.XOR /** * Choose, which LeadEvent to update. */ where: Prisma.LeadEventWhereUniqueInput } /** * LeadEvent updateMany */ export type LeadEventUpdateManyArgs = { /** * The data used to update LeadEvents. */ data: Prisma.XOR /** * Filter which LeadEvents to update */ where?: Prisma.LeadEventWhereInput /** * Limit how many LeadEvents to update. */ limit?: number } /** * LeadEvent updateManyAndReturn */ export type LeadEventUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the LeadEvent */ select?: Prisma.LeadEventSelectUpdateManyAndReturn | null /** * Omit specific fields from the LeadEvent */ omit?: Prisma.LeadEventOmit | null /** * The data used to update LeadEvents. */ data: Prisma.XOR /** * Filter which LeadEvents to update */ where?: Prisma.LeadEventWhereInput /** * Limit how many LeadEvents to update. */ limit?: number /** * Choose, which related nodes to fetch as well */ include?: Prisma.LeadEventIncludeUpdateManyAndReturn | null } /** * LeadEvent upsert */ export type LeadEventUpsertArgs = { /** * Select specific fields to fetch from the LeadEvent */ select?: Prisma.LeadEventSelect | null /** * Omit specific fields from the LeadEvent */ omit?: Prisma.LeadEventOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.LeadEventInclude | null /** * The filter to search for the LeadEvent to update in case it exists. */ where: Prisma.LeadEventWhereUniqueInput /** * In case the LeadEvent found by the `where` argument doesn't exist, create a new LeadEvent with this data. */ create: Prisma.XOR /** * In case the LeadEvent was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * LeadEvent delete */ export type LeadEventDeleteArgs = { /** * Select specific fields to fetch from the LeadEvent */ select?: Prisma.LeadEventSelect | null /** * Omit specific fields from the LeadEvent */ omit?: Prisma.LeadEventOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.LeadEventInclude | null /** * Filter which LeadEvent to delete. */ where: Prisma.LeadEventWhereUniqueInput } /** * LeadEvent deleteMany */ export type LeadEventDeleteManyArgs = { /** * Filter which LeadEvents to delete */ where?: Prisma.LeadEventWhereInput /** * Limit how many LeadEvents to delete. */ limit?: number } /** * LeadEvent without action */ export type LeadEventDefaultArgs = { /** * Select specific fields to fetch from the LeadEvent */ select?: Prisma.LeadEventSelect | null /** * Omit specific fields from the LeadEvent */ omit?: Prisma.LeadEventOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.LeadEventInclude | null }