/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `EmailSequence` 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 EmailSequence * */ export type EmailSequenceModel = runtime.Types.Result.DefaultSelection export type AggregateEmailSequence = { _count: EmailSequenceCountAggregateOutputType | null _min: EmailSequenceMinAggregateOutputType | null _max: EmailSequenceMaxAggregateOutputType | null } export type EmailSequenceMinAggregateOutputType = { id: string | null tenantId: string | null name: string | null description: string | null triggerEvent: string | null isEnabled: boolean | null createdAt: Date | null updatedAt: Date | null } export type EmailSequenceMaxAggregateOutputType = { id: string | null tenantId: string | null name: string | null description: string | null triggerEvent: string | null isEnabled: boolean | null createdAt: Date | null updatedAt: Date | null } export type EmailSequenceCountAggregateOutputType = { id: number tenantId: number name: number description: number triggerEvent: number stepsJson: number conditionsJson: number isEnabled: number createdAt: number updatedAt: number _all: number } export type EmailSequenceMinAggregateInputType = { id?: true tenantId?: true name?: true description?: true triggerEvent?: true isEnabled?: true createdAt?: true updatedAt?: true } export type EmailSequenceMaxAggregateInputType = { id?: true tenantId?: true name?: true description?: true triggerEvent?: true isEnabled?: true createdAt?: true updatedAt?: true } export type EmailSequenceCountAggregateInputType = { id?: true tenantId?: true name?: true description?: true triggerEvent?: true stepsJson?: true conditionsJson?: true isEnabled?: true createdAt?: true updatedAt?: true _all?: true } export type EmailSequenceAggregateArgs = { /** * Filter which EmailSequence to aggregate. */ where?: Prisma.EmailSequenceWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of EmailSequences to fetch. */ orderBy?: Prisma.EmailSequenceOrderByWithRelationInput | Prisma.EmailSequenceOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.EmailSequenceWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` EmailSequences 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` EmailSequences. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned EmailSequences **/ _count?: true | EmailSequenceCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: EmailSequenceMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: EmailSequenceMaxAggregateInputType } export type GetEmailSequenceAggregateType = { [P in keyof T & keyof AggregateEmailSequence]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type EmailSequenceGroupByArgs = { where?: Prisma.EmailSequenceWhereInput orderBy?: Prisma.EmailSequenceOrderByWithAggregationInput | Prisma.EmailSequenceOrderByWithAggregationInput[] by: Prisma.EmailSequenceScalarFieldEnum[] | Prisma.EmailSequenceScalarFieldEnum having?: Prisma.EmailSequenceScalarWhereWithAggregatesInput take?: number skip?: number _count?: EmailSequenceCountAggregateInputType | true _min?: EmailSequenceMinAggregateInputType _max?: EmailSequenceMaxAggregateInputType } export type EmailSequenceGroupByOutputType = { id: string tenantId: string | null name: string description: string | null triggerEvent: string stepsJson: runtime.JsonValue conditionsJson: runtime.JsonValue | null isEnabled: boolean createdAt: Date updatedAt: Date _count: EmailSequenceCountAggregateOutputType | null _min: EmailSequenceMinAggregateOutputType | null _max: EmailSequenceMaxAggregateOutputType | null } export type GetEmailSequenceGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof EmailSequenceGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type EmailSequenceWhereInput = { AND?: Prisma.EmailSequenceWhereInput | Prisma.EmailSequenceWhereInput[] OR?: Prisma.EmailSequenceWhereInput[] NOT?: Prisma.EmailSequenceWhereInput | Prisma.EmailSequenceWhereInput[] id?: Prisma.StringFilter<"EmailSequence"> | string tenantId?: Prisma.StringNullableFilter<"EmailSequence"> | string | null name?: Prisma.StringFilter<"EmailSequence"> | string description?: Prisma.StringNullableFilter<"EmailSequence"> | string | null triggerEvent?: Prisma.StringFilter<"EmailSequence"> | string stepsJson?: Prisma.JsonFilter<"EmailSequence"> conditionsJson?: Prisma.JsonNullableFilter<"EmailSequence"> isEnabled?: Prisma.BoolFilter<"EmailSequence"> | boolean createdAt?: Prisma.DateTimeFilter<"EmailSequence"> | Date | string updatedAt?: Prisma.DateTimeFilter<"EmailSequence"> | Date | string runs?: Prisma.EmailSequenceRunListRelationFilter } export type EmailSequenceOrderByWithRelationInput = { id?: Prisma.SortOrder tenantId?: Prisma.SortOrderInput | Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrderInput | Prisma.SortOrder triggerEvent?: Prisma.SortOrder stepsJson?: Prisma.SortOrder conditionsJson?: Prisma.SortOrderInput | Prisma.SortOrder isEnabled?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder runs?: Prisma.EmailSequenceRunOrderByRelationAggregateInput } export type EmailSequenceWhereUniqueInput = Prisma.AtLeast<{ id?: string AND?: Prisma.EmailSequenceWhereInput | Prisma.EmailSequenceWhereInput[] OR?: Prisma.EmailSequenceWhereInput[] NOT?: Prisma.EmailSequenceWhereInput | Prisma.EmailSequenceWhereInput[] tenantId?: Prisma.StringNullableFilter<"EmailSequence"> | string | null name?: Prisma.StringFilter<"EmailSequence"> | string description?: Prisma.StringNullableFilter<"EmailSequence"> | string | null triggerEvent?: Prisma.StringFilter<"EmailSequence"> | string stepsJson?: Prisma.JsonFilter<"EmailSequence"> conditionsJson?: Prisma.JsonNullableFilter<"EmailSequence"> isEnabled?: Prisma.BoolFilter<"EmailSequence"> | boolean createdAt?: Prisma.DateTimeFilter<"EmailSequence"> | Date | string updatedAt?: Prisma.DateTimeFilter<"EmailSequence"> | Date | string runs?: Prisma.EmailSequenceRunListRelationFilter }, "id"> export type EmailSequenceOrderByWithAggregationInput = { id?: Prisma.SortOrder tenantId?: Prisma.SortOrderInput | Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrderInput | Prisma.SortOrder triggerEvent?: Prisma.SortOrder stepsJson?: Prisma.SortOrder conditionsJson?: Prisma.SortOrderInput | Prisma.SortOrder isEnabled?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder _count?: Prisma.EmailSequenceCountOrderByAggregateInput _max?: Prisma.EmailSequenceMaxOrderByAggregateInput _min?: Prisma.EmailSequenceMinOrderByAggregateInput } export type EmailSequenceScalarWhereWithAggregatesInput = { AND?: Prisma.EmailSequenceScalarWhereWithAggregatesInput | Prisma.EmailSequenceScalarWhereWithAggregatesInput[] OR?: Prisma.EmailSequenceScalarWhereWithAggregatesInput[] NOT?: Prisma.EmailSequenceScalarWhereWithAggregatesInput | Prisma.EmailSequenceScalarWhereWithAggregatesInput[] id?: Prisma.StringWithAggregatesFilter<"EmailSequence"> | string tenantId?: Prisma.StringNullableWithAggregatesFilter<"EmailSequence"> | string | null name?: Prisma.StringWithAggregatesFilter<"EmailSequence"> | string description?: Prisma.StringNullableWithAggregatesFilter<"EmailSequence"> | string | null triggerEvent?: Prisma.StringWithAggregatesFilter<"EmailSequence"> | string stepsJson?: Prisma.JsonWithAggregatesFilter<"EmailSequence"> conditionsJson?: Prisma.JsonNullableWithAggregatesFilter<"EmailSequence"> isEnabled?: Prisma.BoolWithAggregatesFilter<"EmailSequence"> | boolean createdAt?: Prisma.DateTimeWithAggregatesFilter<"EmailSequence"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"EmailSequence"> | Date | string } export type EmailSequenceCreateInput = { id?: string tenantId?: string | null name: string description?: string | null triggerEvent: string stepsJson: Prisma.JsonNullValueInput | runtime.InputJsonValue conditionsJson?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue isEnabled?: boolean createdAt?: Date | string updatedAt?: Date | string runs?: Prisma.EmailSequenceRunCreateNestedManyWithoutSequenceInput } export type EmailSequenceUncheckedCreateInput = { id?: string tenantId?: string | null name: string description?: string | null triggerEvent: string stepsJson: Prisma.JsonNullValueInput | runtime.InputJsonValue conditionsJson?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue isEnabled?: boolean createdAt?: Date | string updatedAt?: Date | string runs?: Prisma.EmailSequenceRunUncheckedCreateNestedManyWithoutSequenceInput } export type EmailSequenceUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null triggerEvent?: Prisma.StringFieldUpdateOperationsInput | string stepsJson?: Prisma.JsonNullValueInput | runtime.InputJsonValue conditionsJson?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue isEnabled?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string runs?: Prisma.EmailSequenceRunUpdateManyWithoutSequenceNestedInput } export type EmailSequenceUncheckedUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null triggerEvent?: Prisma.StringFieldUpdateOperationsInput | string stepsJson?: Prisma.JsonNullValueInput | runtime.InputJsonValue conditionsJson?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue isEnabled?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string runs?: Prisma.EmailSequenceRunUncheckedUpdateManyWithoutSequenceNestedInput } export type EmailSequenceCreateManyInput = { id?: string tenantId?: string | null name: string description?: string | null triggerEvent: string stepsJson: Prisma.JsonNullValueInput | runtime.InputJsonValue conditionsJson?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue isEnabled?: boolean createdAt?: Date | string updatedAt?: Date | string } export type EmailSequenceUpdateManyMutationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null triggerEvent?: Prisma.StringFieldUpdateOperationsInput | string stepsJson?: Prisma.JsonNullValueInput | runtime.InputJsonValue conditionsJson?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue isEnabled?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type EmailSequenceUncheckedUpdateManyInput = { id?: Prisma.StringFieldUpdateOperationsInput | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null triggerEvent?: Prisma.StringFieldUpdateOperationsInput | string stepsJson?: Prisma.JsonNullValueInput | runtime.InputJsonValue conditionsJson?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue isEnabled?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type EmailSequenceCountOrderByAggregateInput = { id?: Prisma.SortOrder tenantId?: Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder triggerEvent?: Prisma.SortOrder stepsJson?: Prisma.SortOrder conditionsJson?: Prisma.SortOrder isEnabled?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } export type EmailSequenceMaxOrderByAggregateInput = { id?: Prisma.SortOrder tenantId?: Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder triggerEvent?: Prisma.SortOrder isEnabled?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } export type EmailSequenceMinOrderByAggregateInput = { id?: Prisma.SortOrder tenantId?: Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder triggerEvent?: Prisma.SortOrder isEnabled?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } export type EmailSequenceScalarRelationFilter = { is?: Prisma.EmailSequenceWhereInput isNot?: Prisma.EmailSequenceWhereInput } export type EmailSequenceCreateNestedOneWithoutRunsInput = { create?: Prisma.XOR connectOrCreate?: Prisma.EmailSequenceCreateOrConnectWithoutRunsInput connect?: Prisma.EmailSequenceWhereUniqueInput } export type EmailSequenceUpdateOneRequiredWithoutRunsNestedInput = { create?: Prisma.XOR connectOrCreate?: Prisma.EmailSequenceCreateOrConnectWithoutRunsInput upsert?: Prisma.EmailSequenceUpsertWithoutRunsInput connect?: Prisma.EmailSequenceWhereUniqueInput update?: Prisma.XOR, Prisma.EmailSequenceUncheckedUpdateWithoutRunsInput> } export type EmailSequenceCreateWithoutRunsInput = { id?: string tenantId?: string | null name: string description?: string | null triggerEvent: string stepsJson: Prisma.JsonNullValueInput | runtime.InputJsonValue conditionsJson?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue isEnabled?: boolean createdAt?: Date | string updatedAt?: Date | string } export type EmailSequenceUncheckedCreateWithoutRunsInput = { id?: string tenantId?: string | null name: string description?: string | null triggerEvent: string stepsJson: Prisma.JsonNullValueInput | runtime.InputJsonValue conditionsJson?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue isEnabled?: boolean createdAt?: Date | string updatedAt?: Date | string } export type EmailSequenceCreateOrConnectWithoutRunsInput = { where: Prisma.EmailSequenceWhereUniqueInput create: Prisma.XOR } export type EmailSequenceUpsertWithoutRunsInput = { update: Prisma.XOR create: Prisma.XOR where?: Prisma.EmailSequenceWhereInput } export type EmailSequenceUpdateToOneWithWhereWithoutRunsInput = { where?: Prisma.EmailSequenceWhereInput data: Prisma.XOR } export type EmailSequenceUpdateWithoutRunsInput = { id?: Prisma.StringFieldUpdateOperationsInput | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null triggerEvent?: Prisma.StringFieldUpdateOperationsInput | string stepsJson?: Prisma.JsonNullValueInput | runtime.InputJsonValue conditionsJson?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue isEnabled?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type EmailSequenceUncheckedUpdateWithoutRunsInput = { id?: Prisma.StringFieldUpdateOperationsInput | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null triggerEvent?: Prisma.StringFieldUpdateOperationsInput | string stepsJson?: Prisma.JsonNullValueInput | runtime.InputJsonValue conditionsJson?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue isEnabled?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } /** * Count Type EmailSequenceCountOutputType */ export type EmailSequenceCountOutputType = { runs: number } export type EmailSequenceCountOutputTypeSelect = { runs?: boolean | EmailSequenceCountOutputTypeCountRunsArgs } /** * EmailSequenceCountOutputType without action */ export type EmailSequenceCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the EmailSequenceCountOutputType */ select?: Prisma.EmailSequenceCountOutputTypeSelect | null } /** * EmailSequenceCountOutputType without action */ export type EmailSequenceCountOutputTypeCountRunsArgs = { where?: Prisma.EmailSequenceRunWhereInput } export type EmailSequenceSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean tenantId?: boolean name?: boolean description?: boolean triggerEvent?: boolean stepsJson?: boolean conditionsJson?: boolean isEnabled?: boolean createdAt?: boolean updatedAt?: boolean runs?: boolean | Prisma.EmailSequence$runsArgs _count?: boolean | Prisma.EmailSequenceCountOutputTypeDefaultArgs }, ExtArgs["result"]["emailSequence"]> export type EmailSequenceSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean tenantId?: boolean name?: boolean description?: boolean triggerEvent?: boolean stepsJson?: boolean conditionsJson?: boolean isEnabled?: boolean createdAt?: boolean updatedAt?: boolean }, ExtArgs["result"]["emailSequence"]> export type EmailSequenceSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean tenantId?: boolean name?: boolean description?: boolean triggerEvent?: boolean stepsJson?: boolean conditionsJson?: boolean isEnabled?: boolean createdAt?: boolean updatedAt?: boolean }, ExtArgs["result"]["emailSequence"]> export type EmailSequenceSelectScalar = { id?: boolean tenantId?: boolean name?: boolean description?: boolean triggerEvent?: boolean stepsJson?: boolean conditionsJson?: boolean isEnabled?: boolean createdAt?: boolean updatedAt?: boolean } export type EmailSequenceOmit = runtime.Types.Extensions.GetOmit<"id" | "tenantId" | "name" | "description" | "triggerEvent" | "stepsJson" | "conditionsJson" | "isEnabled" | "createdAt" | "updatedAt", ExtArgs["result"]["emailSequence"]> export type EmailSequenceInclude = { runs?: boolean | Prisma.EmailSequence$runsArgs _count?: boolean | Prisma.EmailSequenceCountOutputTypeDefaultArgs } export type EmailSequenceIncludeCreateManyAndReturn = {} export type EmailSequenceIncludeUpdateManyAndReturn = {} export type $EmailSequencePayload = { name: "EmailSequence" objects: { runs: Prisma.$EmailSequenceRunPayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string /** * NULL for system-wide sequences; set for tenant-scoped ones. */ tenantId: string | null name: string description: string | null /** * `lead.captured` | `lead.qualified` | `lead.stale_60d` | * `lead.converted_to_trial` | `lead.converted_to_customer` | * `tenant.signup` | `tenant.trial_expiring` | `tenant.cancelled` | * `custom`. Matched against outbox eventType (dotted-snake suffix). */ triggerEvent: string /** * JSON array of `EmailSequenceStep` objects. Shape: * `{ stepIndex, delayHours, template, subject, conditions?, variables? }`. * See packages/email-sequences/src/types.ts for the runtime type. */ stepsJson: runtime.JsonValue /** * Optional sequence-level conditions (e.g. "only customers with plan=pro"). * JSON object — same DSL as per-step conditions. */ conditionsJson: runtime.JsonValue | null /** * Operator kill-switch. When false, trigger handler skips this sequence * even if the event matches. */ isEnabled: boolean createdAt: Date updatedAt: Date }, ExtArgs["result"]["emailSequence"]> composites: {} } export type EmailSequenceGetPayload = runtime.Types.Result.GetResult export type EmailSequenceCountArgs = Omit & { select?: EmailSequenceCountAggregateInputType | true } export interface EmailSequenceDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['EmailSequence'], meta: { name: 'EmailSequence' } } /** * Find zero or one EmailSequence that matches the filter. * @param {EmailSequenceFindUniqueArgs} args - Arguments to find a EmailSequence * @example * // Get one EmailSequence * const emailSequence = await prisma.emailSequence.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__EmailSequenceClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one EmailSequence that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {EmailSequenceFindUniqueOrThrowArgs} args - Arguments to find a EmailSequence * @example * // Get one EmailSequence * const emailSequence = await prisma.emailSequence.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__EmailSequenceClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first EmailSequence 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 {EmailSequenceFindFirstArgs} args - Arguments to find a EmailSequence * @example * // Get one EmailSequence * const emailSequence = await prisma.emailSequence.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__EmailSequenceClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first EmailSequence 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 {EmailSequenceFindFirstOrThrowArgs} args - Arguments to find a EmailSequence * @example * // Get one EmailSequence * const emailSequence = await prisma.emailSequence.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__EmailSequenceClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more EmailSequences 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 {EmailSequenceFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all EmailSequences * const emailSequences = await prisma.emailSequence.findMany() * * // Get first 10 EmailSequences * const emailSequences = await prisma.emailSequence.findMany({ take: 10 }) * * // Only select the `id` * const emailSequenceWithIdOnly = await prisma.emailSequence.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a EmailSequence. * @param {EmailSequenceCreateArgs} args - Arguments to create a EmailSequence. * @example * // Create one EmailSequence * const EmailSequence = await prisma.emailSequence.create({ * data: { * // ... data to create a EmailSequence * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__EmailSequenceClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many EmailSequences. * @param {EmailSequenceCreateManyArgs} args - Arguments to create many EmailSequences. * @example * // Create many EmailSequences * const emailSequence = await prisma.emailSequence.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many EmailSequences and returns the data saved in the database. * @param {EmailSequenceCreateManyAndReturnArgs} args - Arguments to create many EmailSequences. * @example * // Create many EmailSequences * const emailSequence = await prisma.emailSequence.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many EmailSequences and only return the `id` * const emailSequenceWithIdOnly = await prisma.emailSequence.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 EmailSequence. * @param {EmailSequenceDeleteArgs} args - Arguments to delete one EmailSequence. * @example * // Delete one EmailSequence * const EmailSequence = await prisma.emailSequence.delete({ * where: { * // ... filter to delete one EmailSequence * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__EmailSequenceClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one EmailSequence. * @param {EmailSequenceUpdateArgs} args - Arguments to update one EmailSequence. * @example * // Update one EmailSequence * const emailSequence = await prisma.emailSequence.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__EmailSequenceClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more EmailSequences. * @param {EmailSequenceDeleteManyArgs} args - Arguments to filter EmailSequences to delete. * @example * // Delete a few EmailSequences * const { count } = await prisma.emailSequence.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more EmailSequences. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {EmailSequenceUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many EmailSequences * const emailSequence = await prisma.emailSequence.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more EmailSequences and returns the data updated in the database. * @param {EmailSequenceUpdateManyAndReturnArgs} args - Arguments to update many EmailSequences. * @example * // Update many EmailSequences * const emailSequence = await prisma.emailSequence.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more EmailSequences and only return the `id` * const emailSequenceWithIdOnly = await prisma.emailSequence.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 EmailSequence. * @param {EmailSequenceUpsertArgs} args - Arguments to update or create a EmailSequence. * @example * // Update or create a EmailSequence * const emailSequence = await prisma.emailSequence.upsert({ * create: { * // ... data to create a EmailSequence * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the EmailSequence we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__EmailSequenceClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of EmailSequences. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {EmailSequenceCountArgs} args - Arguments to filter EmailSequences to count. * @example * // Count the number of EmailSequences * const count = await prisma.emailSequence.count({ * where: { * // ... the filter for the EmailSequences 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 EmailSequence. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {EmailSequenceAggregateArgs} 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 EmailSequence. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {EmailSequenceGroupByArgs} 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 EmailSequenceGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: EmailSequenceGroupByArgs['orderBy'] } : { orderBy?: EmailSequenceGroupByArgs['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 ? GetEmailSequenceGroupByPayload : Prisma.PrismaPromise /** * Fields of the EmailSequence model */ readonly fields: EmailSequenceFieldRefs; } /** * The delegate class that acts as a "Promise-like" for EmailSequence. * 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__EmailSequenceClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" runs = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(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 EmailSequence model */ export interface EmailSequenceFieldRefs { readonly id: Prisma.FieldRef<"EmailSequence", 'String'> readonly tenantId: Prisma.FieldRef<"EmailSequence", 'String'> readonly name: Prisma.FieldRef<"EmailSequence", 'String'> readonly description: Prisma.FieldRef<"EmailSequence", 'String'> readonly triggerEvent: Prisma.FieldRef<"EmailSequence", 'String'> readonly stepsJson: Prisma.FieldRef<"EmailSequence", 'Json'> readonly conditionsJson: Prisma.FieldRef<"EmailSequence", 'Json'> readonly isEnabled: Prisma.FieldRef<"EmailSequence", 'Boolean'> readonly createdAt: Prisma.FieldRef<"EmailSequence", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"EmailSequence", 'DateTime'> } // Custom InputTypes /** * EmailSequence findUnique */ export type EmailSequenceFindUniqueArgs = { /** * Select specific fields to fetch from the EmailSequence */ select?: Prisma.EmailSequenceSelect | null /** * Omit specific fields from the EmailSequence */ omit?: Prisma.EmailSequenceOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.EmailSequenceInclude | null /** * Filter, which EmailSequence to fetch. */ where: Prisma.EmailSequenceWhereUniqueInput } /** * EmailSequence findUniqueOrThrow */ export type EmailSequenceFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the EmailSequence */ select?: Prisma.EmailSequenceSelect | null /** * Omit specific fields from the EmailSequence */ omit?: Prisma.EmailSequenceOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.EmailSequenceInclude | null /** * Filter, which EmailSequence to fetch. */ where: Prisma.EmailSequenceWhereUniqueInput } /** * EmailSequence findFirst */ export type EmailSequenceFindFirstArgs = { /** * Select specific fields to fetch from the EmailSequence */ select?: Prisma.EmailSequenceSelect | null /** * Omit specific fields from the EmailSequence */ omit?: Prisma.EmailSequenceOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.EmailSequenceInclude | null /** * Filter, which EmailSequence to fetch. */ where?: Prisma.EmailSequenceWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of EmailSequences to fetch. */ orderBy?: Prisma.EmailSequenceOrderByWithRelationInput | Prisma.EmailSequenceOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for EmailSequences. */ cursor?: Prisma.EmailSequenceWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` EmailSequences 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` EmailSequences. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of EmailSequences. */ distinct?: Prisma.EmailSequenceScalarFieldEnum | Prisma.EmailSequenceScalarFieldEnum[] } /** * EmailSequence findFirstOrThrow */ export type EmailSequenceFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the EmailSequence */ select?: Prisma.EmailSequenceSelect | null /** * Omit specific fields from the EmailSequence */ omit?: Prisma.EmailSequenceOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.EmailSequenceInclude | null /** * Filter, which EmailSequence to fetch. */ where?: Prisma.EmailSequenceWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of EmailSequences to fetch. */ orderBy?: Prisma.EmailSequenceOrderByWithRelationInput | Prisma.EmailSequenceOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for EmailSequences. */ cursor?: Prisma.EmailSequenceWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` EmailSequences 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` EmailSequences. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of EmailSequences. */ distinct?: Prisma.EmailSequenceScalarFieldEnum | Prisma.EmailSequenceScalarFieldEnum[] } /** * EmailSequence findMany */ export type EmailSequenceFindManyArgs = { /** * Select specific fields to fetch from the EmailSequence */ select?: Prisma.EmailSequenceSelect | null /** * Omit specific fields from the EmailSequence */ omit?: Prisma.EmailSequenceOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.EmailSequenceInclude | null /** * Filter, which EmailSequences to fetch. */ where?: Prisma.EmailSequenceWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of EmailSequences to fetch. */ orderBy?: Prisma.EmailSequenceOrderByWithRelationInput | Prisma.EmailSequenceOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing EmailSequences. */ cursor?: Prisma.EmailSequenceWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` EmailSequences 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` EmailSequences. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of EmailSequences. */ distinct?: Prisma.EmailSequenceScalarFieldEnum | Prisma.EmailSequenceScalarFieldEnum[] } /** * EmailSequence create */ export type EmailSequenceCreateArgs = { /** * Select specific fields to fetch from the EmailSequence */ select?: Prisma.EmailSequenceSelect | null /** * Omit specific fields from the EmailSequence */ omit?: Prisma.EmailSequenceOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.EmailSequenceInclude | null /** * The data needed to create a EmailSequence. */ data: Prisma.XOR } /** * EmailSequence createMany */ export type EmailSequenceCreateManyArgs = { /** * The data used to create many EmailSequences. */ data: Prisma.EmailSequenceCreateManyInput | Prisma.EmailSequenceCreateManyInput[] skipDuplicates?: boolean } /** * EmailSequence createManyAndReturn */ export type EmailSequenceCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the EmailSequence */ select?: Prisma.EmailSequenceSelectCreateManyAndReturn | null /** * Omit specific fields from the EmailSequence */ omit?: Prisma.EmailSequenceOmit | null /** * The data used to create many EmailSequences. */ data: Prisma.EmailSequenceCreateManyInput | Prisma.EmailSequenceCreateManyInput[] skipDuplicates?: boolean } /** * EmailSequence update */ export type EmailSequenceUpdateArgs = { /** * Select specific fields to fetch from the EmailSequence */ select?: Prisma.EmailSequenceSelect | null /** * Omit specific fields from the EmailSequence */ omit?: Prisma.EmailSequenceOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.EmailSequenceInclude | null /** * The data needed to update a EmailSequence. */ data: Prisma.XOR /** * Choose, which EmailSequence to update. */ where: Prisma.EmailSequenceWhereUniqueInput } /** * EmailSequence updateMany */ export type EmailSequenceUpdateManyArgs = { /** * The data used to update EmailSequences. */ data: Prisma.XOR /** * Filter which EmailSequences to update */ where?: Prisma.EmailSequenceWhereInput /** * Limit how many EmailSequences to update. */ limit?: number } /** * EmailSequence updateManyAndReturn */ export type EmailSequenceUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the EmailSequence */ select?: Prisma.EmailSequenceSelectUpdateManyAndReturn | null /** * Omit specific fields from the EmailSequence */ omit?: Prisma.EmailSequenceOmit | null /** * The data used to update EmailSequences. */ data: Prisma.XOR /** * Filter which EmailSequences to update */ where?: Prisma.EmailSequenceWhereInput /** * Limit how many EmailSequences to update. */ limit?: number } /** * EmailSequence upsert */ export type EmailSequenceUpsertArgs = { /** * Select specific fields to fetch from the EmailSequence */ select?: Prisma.EmailSequenceSelect | null /** * Omit specific fields from the EmailSequence */ omit?: Prisma.EmailSequenceOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.EmailSequenceInclude | null /** * The filter to search for the EmailSequence to update in case it exists. */ where: Prisma.EmailSequenceWhereUniqueInput /** * In case the EmailSequence found by the `where` argument doesn't exist, create a new EmailSequence with this data. */ create: Prisma.XOR /** * In case the EmailSequence was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * EmailSequence delete */ export type EmailSequenceDeleteArgs = { /** * Select specific fields to fetch from the EmailSequence */ select?: Prisma.EmailSequenceSelect | null /** * Omit specific fields from the EmailSequence */ omit?: Prisma.EmailSequenceOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.EmailSequenceInclude | null /** * Filter which EmailSequence to delete. */ where: Prisma.EmailSequenceWhereUniqueInput } /** * EmailSequence deleteMany */ export type EmailSequenceDeleteManyArgs = { /** * Filter which EmailSequences to delete */ where?: Prisma.EmailSequenceWhereInput /** * Limit how many EmailSequences to delete. */ limit?: number } /** * EmailSequence.runs */ export type EmailSequence$runsArgs = { /** * Select specific fields to fetch from the EmailSequenceRun */ select?: Prisma.EmailSequenceRunSelect | null /** * Omit specific fields from the EmailSequenceRun */ omit?: Prisma.EmailSequenceRunOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.EmailSequenceRunInclude | null where?: Prisma.EmailSequenceRunWhereInput orderBy?: Prisma.EmailSequenceRunOrderByWithRelationInput | Prisma.EmailSequenceRunOrderByWithRelationInput[] cursor?: Prisma.EmailSequenceRunWhereUniqueInput take?: number skip?: number distinct?: Prisma.EmailSequenceRunScalarFieldEnum | Prisma.EmailSequenceRunScalarFieldEnum[] } /** * EmailSequence without action */ export type EmailSequenceDefaultArgs = { /** * Select specific fields to fetch from the EmailSequence */ select?: Prisma.EmailSequenceSelect | null /** * Omit specific fields from the EmailSequence */ omit?: Prisma.EmailSequenceOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.EmailSequenceInclude | null }