/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `AutomationTemplate` 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 AutomationTemplate * */ export type AutomationTemplateModel = runtime.Types.Result.DefaultSelection export type AggregateAutomationTemplate = { _count: AutomationTemplateCountAggregateOutputType | null _min: AutomationTemplateMinAggregateOutputType | null _max: AutomationTemplateMaxAggregateOutputType | null } export type AutomationTemplateMinAggregateOutputType = { id: string | null createdAt: Date | null updatedAt: Date | null tenantId: string | null name: string | null description: string | null category: string | null isPublished: boolean | null createdFromRuleId: string | null createdByUserId: string | null isDemoData: boolean | null archivedAt: Date | null } export type AutomationTemplateMaxAggregateOutputType = { id: string | null createdAt: Date | null updatedAt: Date | null tenantId: string | null name: string | null description: string | null category: string | null isPublished: boolean | null createdFromRuleId: string | null createdByUserId: string | null isDemoData: boolean | null archivedAt: Date | null } export type AutomationTemplateCountAggregateOutputType = { id: number createdAt: number updatedAt: number tenantId: number name: number description: number category: number flowData: number isPublished: number createdFromRuleId: number createdByUserId: number isDemoData: number archivedAt: number _all: number } export type AutomationTemplateMinAggregateInputType = { id?: true createdAt?: true updatedAt?: true tenantId?: true name?: true description?: true category?: true isPublished?: true createdFromRuleId?: true createdByUserId?: true isDemoData?: true archivedAt?: true } export type AutomationTemplateMaxAggregateInputType = { id?: true createdAt?: true updatedAt?: true tenantId?: true name?: true description?: true category?: true isPublished?: true createdFromRuleId?: true createdByUserId?: true isDemoData?: true archivedAt?: true } export type AutomationTemplateCountAggregateInputType = { id?: true createdAt?: true updatedAt?: true tenantId?: true name?: true description?: true category?: true flowData?: true isPublished?: true createdFromRuleId?: true createdByUserId?: true isDemoData?: true archivedAt?: true _all?: true } export type AutomationTemplateAggregateArgs = { /** * Filter which AutomationTemplate to aggregate. */ where?: Prisma.AutomationTemplateWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of AutomationTemplates to fetch. */ orderBy?: Prisma.AutomationTemplateOrderByWithRelationInput | Prisma.AutomationTemplateOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.AutomationTemplateWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` AutomationTemplates 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` AutomationTemplates. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned AutomationTemplates **/ _count?: true | AutomationTemplateCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: AutomationTemplateMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: AutomationTemplateMaxAggregateInputType } export type GetAutomationTemplateAggregateType = { [P in keyof T & keyof AggregateAutomationTemplate]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type AutomationTemplateGroupByArgs = { where?: Prisma.AutomationTemplateWhereInput orderBy?: Prisma.AutomationTemplateOrderByWithAggregationInput | Prisma.AutomationTemplateOrderByWithAggregationInput[] by: Prisma.AutomationTemplateScalarFieldEnum[] | Prisma.AutomationTemplateScalarFieldEnum having?: Prisma.AutomationTemplateScalarWhereWithAggregatesInput take?: number skip?: number _count?: AutomationTemplateCountAggregateInputType | true _min?: AutomationTemplateMinAggregateInputType _max?: AutomationTemplateMaxAggregateInputType } export type AutomationTemplateGroupByOutputType = { id: string createdAt: Date updatedAt: Date tenantId: string | null name: string description: string | null category: string flowData: runtime.JsonValue isPublished: boolean createdFromRuleId: string | null createdByUserId: string | null isDemoData: boolean archivedAt: Date | null _count: AutomationTemplateCountAggregateOutputType | null _min: AutomationTemplateMinAggregateOutputType | null _max: AutomationTemplateMaxAggregateOutputType | null } export type GetAutomationTemplateGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof AutomationTemplateGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type AutomationTemplateWhereInput = { AND?: Prisma.AutomationTemplateWhereInput | Prisma.AutomationTemplateWhereInput[] OR?: Prisma.AutomationTemplateWhereInput[] NOT?: Prisma.AutomationTemplateWhereInput | Prisma.AutomationTemplateWhereInput[] id?: Prisma.StringFilter<"AutomationTemplate"> | string createdAt?: Prisma.DateTimeFilter<"AutomationTemplate"> | Date | string updatedAt?: Prisma.DateTimeFilter<"AutomationTemplate"> | Date | string tenantId?: Prisma.StringNullableFilter<"AutomationTemplate"> | string | null name?: Prisma.StringFilter<"AutomationTemplate"> | string description?: Prisma.StringNullableFilter<"AutomationTemplate"> | string | null category?: Prisma.StringFilter<"AutomationTemplate"> | string flowData?: Prisma.JsonFilter<"AutomationTemplate"> isPublished?: Prisma.BoolFilter<"AutomationTemplate"> | boolean createdFromRuleId?: Prisma.StringNullableFilter<"AutomationTemplate"> | string | null createdByUserId?: Prisma.StringNullableFilter<"AutomationTemplate"> | string | null isDemoData?: Prisma.BoolFilter<"AutomationTemplate"> | boolean archivedAt?: Prisma.DateTimeNullableFilter<"AutomationTemplate"> | Date | string | null } export type AutomationTemplateOrderByWithRelationInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrderInput | Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrderInput | Prisma.SortOrder category?: Prisma.SortOrder flowData?: Prisma.SortOrder isPublished?: Prisma.SortOrder createdFromRuleId?: Prisma.SortOrderInput | Prisma.SortOrder createdByUserId?: Prisma.SortOrderInput | Prisma.SortOrder isDemoData?: Prisma.SortOrder archivedAt?: Prisma.SortOrderInput | Prisma.SortOrder } export type AutomationTemplateWhereUniqueInput = Prisma.AtLeast<{ id?: string tenantId_name?: Prisma.AutomationTemplateTenantIdNameCompoundUniqueInput AND?: Prisma.AutomationTemplateWhereInput | Prisma.AutomationTemplateWhereInput[] OR?: Prisma.AutomationTemplateWhereInput[] NOT?: Prisma.AutomationTemplateWhereInput | Prisma.AutomationTemplateWhereInput[] createdAt?: Prisma.DateTimeFilter<"AutomationTemplate"> | Date | string updatedAt?: Prisma.DateTimeFilter<"AutomationTemplate"> | Date | string tenantId?: Prisma.StringNullableFilter<"AutomationTemplate"> | string | null name?: Prisma.StringFilter<"AutomationTemplate"> | string description?: Prisma.StringNullableFilter<"AutomationTemplate"> | string | null category?: Prisma.StringFilter<"AutomationTemplate"> | string flowData?: Prisma.JsonFilter<"AutomationTemplate"> isPublished?: Prisma.BoolFilter<"AutomationTemplate"> | boolean createdFromRuleId?: Prisma.StringNullableFilter<"AutomationTemplate"> | string | null createdByUserId?: Prisma.StringNullableFilter<"AutomationTemplate"> | string | null isDemoData?: Prisma.BoolFilter<"AutomationTemplate"> | boolean archivedAt?: Prisma.DateTimeNullableFilter<"AutomationTemplate"> | Date | string | null }, "id" | "tenantId_name"> export type AutomationTemplateOrderByWithAggregationInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrderInput | Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrderInput | Prisma.SortOrder category?: Prisma.SortOrder flowData?: Prisma.SortOrder isPublished?: Prisma.SortOrder createdFromRuleId?: Prisma.SortOrderInput | Prisma.SortOrder createdByUserId?: Prisma.SortOrderInput | Prisma.SortOrder isDemoData?: Prisma.SortOrder archivedAt?: Prisma.SortOrderInput | Prisma.SortOrder _count?: Prisma.AutomationTemplateCountOrderByAggregateInput _max?: Prisma.AutomationTemplateMaxOrderByAggregateInput _min?: Prisma.AutomationTemplateMinOrderByAggregateInput } export type AutomationTemplateScalarWhereWithAggregatesInput = { AND?: Prisma.AutomationTemplateScalarWhereWithAggregatesInput | Prisma.AutomationTemplateScalarWhereWithAggregatesInput[] OR?: Prisma.AutomationTemplateScalarWhereWithAggregatesInput[] NOT?: Prisma.AutomationTemplateScalarWhereWithAggregatesInput | Prisma.AutomationTemplateScalarWhereWithAggregatesInput[] id?: Prisma.StringWithAggregatesFilter<"AutomationTemplate"> | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"AutomationTemplate"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"AutomationTemplate"> | Date | string tenantId?: Prisma.StringNullableWithAggregatesFilter<"AutomationTemplate"> | string | null name?: Prisma.StringWithAggregatesFilter<"AutomationTemplate"> | string description?: Prisma.StringNullableWithAggregatesFilter<"AutomationTemplate"> | string | null category?: Prisma.StringWithAggregatesFilter<"AutomationTemplate"> | string flowData?: Prisma.JsonWithAggregatesFilter<"AutomationTemplate"> isPublished?: Prisma.BoolWithAggregatesFilter<"AutomationTemplate"> | boolean createdFromRuleId?: Prisma.StringNullableWithAggregatesFilter<"AutomationTemplate"> | string | null createdByUserId?: Prisma.StringNullableWithAggregatesFilter<"AutomationTemplate"> | string | null isDemoData?: Prisma.BoolWithAggregatesFilter<"AutomationTemplate"> | boolean archivedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"AutomationTemplate"> | Date | string | null } export type AutomationTemplateCreateInput = { id?: string createdAt?: Date | string updatedAt?: Date | string tenantId?: string | null name: string description?: string | null category: string flowData?: Prisma.JsonNullValueInput | runtime.InputJsonValue isPublished?: boolean createdFromRuleId?: string | null createdByUserId?: string | null isDemoData?: boolean archivedAt?: Date | string | null } export type AutomationTemplateUncheckedCreateInput = { id?: string createdAt?: Date | string updatedAt?: Date | string tenantId?: string | null name: string description?: string | null category: string flowData?: Prisma.JsonNullValueInput | runtime.InputJsonValue isPublished?: boolean createdFromRuleId?: string | null createdByUserId?: string | null isDemoData?: boolean archivedAt?: Date | string | null } export type AutomationTemplateUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null category?: Prisma.StringFieldUpdateOperationsInput | string flowData?: Prisma.JsonNullValueInput | runtime.InputJsonValue isPublished?: Prisma.BoolFieldUpdateOperationsInput | boolean createdFromRuleId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdByUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isDemoData?: Prisma.BoolFieldUpdateOperationsInput | boolean archivedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null } export type AutomationTemplateUncheckedUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null category?: Prisma.StringFieldUpdateOperationsInput | string flowData?: Prisma.JsonNullValueInput | runtime.InputJsonValue isPublished?: Prisma.BoolFieldUpdateOperationsInput | boolean createdFromRuleId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdByUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isDemoData?: Prisma.BoolFieldUpdateOperationsInput | boolean archivedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null } export type AutomationTemplateCreateManyInput = { id?: string createdAt?: Date | string updatedAt?: Date | string tenantId?: string | null name: string description?: string | null category: string flowData?: Prisma.JsonNullValueInput | runtime.InputJsonValue isPublished?: boolean createdFromRuleId?: string | null createdByUserId?: string | null isDemoData?: boolean archivedAt?: Date | string | null } export type AutomationTemplateUpdateManyMutationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null category?: Prisma.StringFieldUpdateOperationsInput | string flowData?: Prisma.JsonNullValueInput | runtime.InputJsonValue isPublished?: Prisma.BoolFieldUpdateOperationsInput | boolean createdFromRuleId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdByUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isDemoData?: Prisma.BoolFieldUpdateOperationsInput | boolean archivedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null } export type AutomationTemplateUncheckedUpdateManyInput = { id?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null name?: Prisma.StringFieldUpdateOperationsInput | string description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null category?: Prisma.StringFieldUpdateOperationsInput | string flowData?: Prisma.JsonNullValueInput | runtime.InputJsonValue isPublished?: Prisma.BoolFieldUpdateOperationsInput | boolean createdFromRuleId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdByUserId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isDemoData?: Prisma.BoolFieldUpdateOperationsInput | boolean archivedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null } export type AutomationTemplateTenantIdNameCompoundUniqueInput = { tenantId: string name: string } export type AutomationTemplateCountOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder category?: Prisma.SortOrder flowData?: Prisma.SortOrder isPublished?: Prisma.SortOrder createdFromRuleId?: Prisma.SortOrder createdByUserId?: Prisma.SortOrder isDemoData?: Prisma.SortOrder archivedAt?: Prisma.SortOrder } export type AutomationTemplateMaxOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder category?: Prisma.SortOrder isPublished?: Prisma.SortOrder createdFromRuleId?: Prisma.SortOrder createdByUserId?: Prisma.SortOrder isDemoData?: Prisma.SortOrder archivedAt?: Prisma.SortOrder } export type AutomationTemplateMinOrderByAggregateInput = { id?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder tenantId?: Prisma.SortOrder name?: Prisma.SortOrder description?: Prisma.SortOrder category?: Prisma.SortOrder isPublished?: Prisma.SortOrder createdFromRuleId?: Prisma.SortOrder createdByUserId?: Prisma.SortOrder isDemoData?: Prisma.SortOrder archivedAt?: Prisma.SortOrder } export type AutomationTemplateSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean updatedAt?: boolean tenantId?: boolean name?: boolean description?: boolean category?: boolean flowData?: boolean isPublished?: boolean createdFromRuleId?: boolean createdByUserId?: boolean isDemoData?: boolean archivedAt?: boolean }, ExtArgs["result"]["automationTemplate"]> export type AutomationTemplateSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean updatedAt?: boolean tenantId?: boolean name?: boolean description?: boolean category?: boolean flowData?: boolean isPublished?: boolean createdFromRuleId?: boolean createdByUserId?: boolean isDemoData?: boolean archivedAt?: boolean }, ExtArgs["result"]["automationTemplate"]> export type AutomationTemplateSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean createdAt?: boolean updatedAt?: boolean tenantId?: boolean name?: boolean description?: boolean category?: boolean flowData?: boolean isPublished?: boolean createdFromRuleId?: boolean createdByUserId?: boolean isDemoData?: boolean archivedAt?: boolean }, ExtArgs["result"]["automationTemplate"]> export type AutomationTemplateSelectScalar = { id?: boolean createdAt?: boolean updatedAt?: boolean tenantId?: boolean name?: boolean description?: boolean category?: boolean flowData?: boolean isPublished?: boolean createdFromRuleId?: boolean createdByUserId?: boolean isDemoData?: boolean archivedAt?: boolean } export type AutomationTemplateOmit = runtime.Types.Extensions.GetOmit<"id" | "createdAt" | "updatedAt" | "tenantId" | "name" | "description" | "category" | "flowData" | "isPublished" | "createdFromRuleId" | "createdByUserId" | "isDemoData" | "archivedAt", ExtArgs["result"]["automationTemplate"]> export type $AutomationTemplatePayload = { name: "AutomationTemplate" objects: {} scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string createdAt: Date updatedAt: Date tenantId: string | null name: string description: string | null category: string flowData: runtime.JsonValue isPublished: boolean createdFromRuleId: string | null createdByUserId: string | null isDemoData: boolean archivedAt: Date | null }, ExtArgs["result"]["automationTemplate"]> composites: {} } export type AutomationTemplateGetPayload = runtime.Types.Result.GetResult export type AutomationTemplateCountArgs = Omit & { select?: AutomationTemplateCountAggregateInputType | true } export interface AutomationTemplateDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['AutomationTemplate'], meta: { name: 'AutomationTemplate' } } /** * Find zero or one AutomationTemplate that matches the filter. * @param {AutomationTemplateFindUniqueArgs} args - Arguments to find a AutomationTemplate * @example * // Get one AutomationTemplate * const automationTemplate = await prisma.automationTemplate.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__AutomationTemplateClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one AutomationTemplate that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {AutomationTemplateFindUniqueOrThrowArgs} args - Arguments to find a AutomationTemplate * @example * // Get one AutomationTemplate * const automationTemplate = await prisma.automationTemplate.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__AutomationTemplateClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first AutomationTemplate 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 {AutomationTemplateFindFirstArgs} args - Arguments to find a AutomationTemplate * @example * // Get one AutomationTemplate * const automationTemplate = await prisma.automationTemplate.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__AutomationTemplateClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first AutomationTemplate 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 {AutomationTemplateFindFirstOrThrowArgs} args - Arguments to find a AutomationTemplate * @example * // Get one AutomationTemplate * const automationTemplate = await prisma.automationTemplate.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__AutomationTemplateClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more AutomationTemplates 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 {AutomationTemplateFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all AutomationTemplates * const automationTemplates = await prisma.automationTemplate.findMany() * * // Get first 10 AutomationTemplates * const automationTemplates = await prisma.automationTemplate.findMany({ take: 10 }) * * // Only select the `id` * const automationTemplateWithIdOnly = await prisma.automationTemplate.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a AutomationTemplate. * @param {AutomationTemplateCreateArgs} args - Arguments to create a AutomationTemplate. * @example * // Create one AutomationTemplate * const AutomationTemplate = await prisma.automationTemplate.create({ * data: { * // ... data to create a AutomationTemplate * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__AutomationTemplateClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many AutomationTemplates. * @param {AutomationTemplateCreateManyArgs} args - Arguments to create many AutomationTemplates. * @example * // Create many AutomationTemplates * const automationTemplate = await prisma.automationTemplate.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many AutomationTemplates and returns the data saved in the database. * @param {AutomationTemplateCreateManyAndReturnArgs} args - Arguments to create many AutomationTemplates. * @example * // Create many AutomationTemplates * const automationTemplate = await prisma.automationTemplate.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many AutomationTemplates and only return the `id` * const automationTemplateWithIdOnly = await prisma.automationTemplate.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 AutomationTemplate. * @param {AutomationTemplateDeleteArgs} args - Arguments to delete one AutomationTemplate. * @example * // Delete one AutomationTemplate * const AutomationTemplate = await prisma.automationTemplate.delete({ * where: { * // ... filter to delete one AutomationTemplate * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__AutomationTemplateClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one AutomationTemplate. * @param {AutomationTemplateUpdateArgs} args - Arguments to update one AutomationTemplate. * @example * // Update one AutomationTemplate * const automationTemplate = await prisma.automationTemplate.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__AutomationTemplateClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more AutomationTemplates. * @param {AutomationTemplateDeleteManyArgs} args - Arguments to filter AutomationTemplates to delete. * @example * // Delete a few AutomationTemplates * const { count } = await prisma.automationTemplate.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more AutomationTemplates. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {AutomationTemplateUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many AutomationTemplates * const automationTemplate = await prisma.automationTemplate.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more AutomationTemplates and returns the data updated in the database. * @param {AutomationTemplateUpdateManyAndReturnArgs} args - Arguments to update many AutomationTemplates. * @example * // Update many AutomationTemplates * const automationTemplate = await prisma.automationTemplate.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more AutomationTemplates and only return the `id` * const automationTemplateWithIdOnly = await prisma.automationTemplate.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 AutomationTemplate. * @param {AutomationTemplateUpsertArgs} args - Arguments to update or create a AutomationTemplate. * @example * // Update or create a AutomationTemplate * const automationTemplate = await prisma.automationTemplate.upsert({ * create: { * // ... data to create a AutomationTemplate * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the AutomationTemplate we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__AutomationTemplateClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of AutomationTemplates. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {AutomationTemplateCountArgs} args - Arguments to filter AutomationTemplates to count. * @example * // Count the number of AutomationTemplates * const count = await prisma.automationTemplate.count({ * where: { * // ... the filter for the AutomationTemplates 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 AutomationTemplate. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {AutomationTemplateAggregateArgs} 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 AutomationTemplate. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {AutomationTemplateGroupByArgs} 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 AutomationTemplateGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: AutomationTemplateGroupByArgs['orderBy'] } : { orderBy?: AutomationTemplateGroupByArgs['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 ? GetAutomationTemplateGroupByPayload : Prisma.PrismaPromise /** * Fields of the AutomationTemplate model */ readonly fields: AutomationTemplateFieldRefs; } /** * The delegate class that acts as a "Promise-like" for AutomationTemplate. * 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__AutomationTemplateClient 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 AutomationTemplate model */ export interface AutomationTemplateFieldRefs { readonly id: Prisma.FieldRef<"AutomationTemplate", 'String'> readonly createdAt: Prisma.FieldRef<"AutomationTemplate", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"AutomationTemplate", 'DateTime'> readonly tenantId: Prisma.FieldRef<"AutomationTemplate", 'String'> readonly name: Prisma.FieldRef<"AutomationTemplate", 'String'> readonly description: Prisma.FieldRef<"AutomationTemplate", 'String'> readonly category: Prisma.FieldRef<"AutomationTemplate", 'String'> readonly flowData: Prisma.FieldRef<"AutomationTemplate", 'Json'> readonly isPublished: Prisma.FieldRef<"AutomationTemplate", 'Boolean'> readonly createdFromRuleId: Prisma.FieldRef<"AutomationTemplate", 'String'> readonly createdByUserId: Prisma.FieldRef<"AutomationTemplate", 'String'> readonly isDemoData: Prisma.FieldRef<"AutomationTemplate", 'Boolean'> readonly archivedAt: Prisma.FieldRef<"AutomationTemplate", 'DateTime'> } // Custom InputTypes /** * AutomationTemplate findUnique */ export type AutomationTemplateFindUniqueArgs = { /** * Select specific fields to fetch from the AutomationTemplate */ select?: Prisma.AutomationTemplateSelect | null /** * Omit specific fields from the AutomationTemplate */ omit?: Prisma.AutomationTemplateOmit | null /** * Filter, which AutomationTemplate to fetch. */ where: Prisma.AutomationTemplateWhereUniqueInput } /** * AutomationTemplate findUniqueOrThrow */ export type AutomationTemplateFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the AutomationTemplate */ select?: Prisma.AutomationTemplateSelect | null /** * Omit specific fields from the AutomationTemplate */ omit?: Prisma.AutomationTemplateOmit | null /** * Filter, which AutomationTemplate to fetch. */ where: Prisma.AutomationTemplateWhereUniqueInput } /** * AutomationTemplate findFirst */ export type AutomationTemplateFindFirstArgs = { /** * Select specific fields to fetch from the AutomationTemplate */ select?: Prisma.AutomationTemplateSelect | null /** * Omit specific fields from the AutomationTemplate */ omit?: Prisma.AutomationTemplateOmit | null /** * Filter, which AutomationTemplate to fetch. */ where?: Prisma.AutomationTemplateWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of AutomationTemplates to fetch. */ orderBy?: Prisma.AutomationTemplateOrderByWithRelationInput | Prisma.AutomationTemplateOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for AutomationTemplates. */ cursor?: Prisma.AutomationTemplateWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` AutomationTemplates 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` AutomationTemplates. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of AutomationTemplates. */ distinct?: Prisma.AutomationTemplateScalarFieldEnum | Prisma.AutomationTemplateScalarFieldEnum[] } /** * AutomationTemplate findFirstOrThrow */ export type AutomationTemplateFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the AutomationTemplate */ select?: Prisma.AutomationTemplateSelect | null /** * Omit specific fields from the AutomationTemplate */ omit?: Prisma.AutomationTemplateOmit | null /** * Filter, which AutomationTemplate to fetch. */ where?: Prisma.AutomationTemplateWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of AutomationTemplates to fetch. */ orderBy?: Prisma.AutomationTemplateOrderByWithRelationInput | Prisma.AutomationTemplateOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for AutomationTemplates. */ cursor?: Prisma.AutomationTemplateWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` AutomationTemplates 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` AutomationTemplates. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of AutomationTemplates. */ distinct?: Prisma.AutomationTemplateScalarFieldEnum | Prisma.AutomationTemplateScalarFieldEnum[] } /** * AutomationTemplate findMany */ export type AutomationTemplateFindManyArgs = { /** * Select specific fields to fetch from the AutomationTemplate */ select?: Prisma.AutomationTemplateSelect | null /** * Omit specific fields from the AutomationTemplate */ omit?: Prisma.AutomationTemplateOmit | null /** * Filter, which AutomationTemplates to fetch. */ where?: Prisma.AutomationTemplateWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of AutomationTemplates to fetch. */ orderBy?: Prisma.AutomationTemplateOrderByWithRelationInput | Prisma.AutomationTemplateOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing AutomationTemplates. */ cursor?: Prisma.AutomationTemplateWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` AutomationTemplates 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` AutomationTemplates. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of AutomationTemplates. */ distinct?: Prisma.AutomationTemplateScalarFieldEnum | Prisma.AutomationTemplateScalarFieldEnum[] } /** * AutomationTemplate create */ export type AutomationTemplateCreateArgs = { /** * Select specific fields to fetch from the AutomationTemplate */ select?: Prisma.AutomationTemplateSelect | null /** * Omit specific fields from the AutomationTemplate */ omit?: Prisma.AutomationTemplateOmit | null /** * The data needed to create a AutomationTemplate. */ data: Prisma.XOR } /** * AutomationTemplate createMany */ export type AutomationTemplateCreateManyArgs = { /** * The data used to create many AutomationTemplates. */ data: Prisma.AutomationTemplateCreateManyInput | Prisma.AutomationTemplateCreateManyInput[] skipDuplicates?: boolean } /** * AutomationTemplate createManyAndReturn */ export type AutomationTemplateCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the AutomationTemplate */ select?: Prisma.AutomationTemplateSelectCreateManyAndReturn | null /** * Omit specific fields from the AutomationTemplate */ omit?: Prisma.AutomationTemplateOmit | null /** * The data used to create many AutomationTemplates. */ data: Prisma.AutomationTemplateCreateManyInput | Prisma.AutomationTemplateCreateManyInput[] skipDuplicates?: boolean } /** * AutomationTemplate update */ export type AutomationTemplateUpdateArgs = { /** * Select specific fields to fetch from the AutomationTemplate */ select?: Prisma.AutomationTemplateSelect | null /** * Omit specific fields from the AutomationTemplate */ omit?: Prisma.AutomationTemplateOmit | null /** * The data needed to update a AutomationTemplate. */ data: Prisma.XOR /** * Choose, which AutomationTemplate to update. */ where: Prisma.AutomationTemplateWhereUniqueInput } /** * AutomationTemplate updateMany */ export type AutomationTemplateUpdateManyArgs = { /** * The data used to update AutomationTemplates. */ data: Prisma.XOR /** * Filter which AutomationTemplates to update */ where?: Prisma.AutomationTemplateWhereInput /** * Limit how many AutomationTemplates to update. */ limit?: number } /** * AutomationTemplate updateManyAndReturn */ export type AutomationTemplateUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the AutomationTemplate */ select?: Prisma.AutomationTemplateSelectUpdateManyAndReturn | null /** * Omit specific fields from the AutomationTemplate */ omit?: Prisma.AutomationTemplateOmit | null /** * The data used to update AutomationTemplates. */ data: Prisma.XOR /** * Filter which AutomationTemplates to update */ where?: Prisma.AutomationTemplateWhereInput /** * Limit how many AutomationTemplates to update. */ limit?: number } /** * AutomationTemplate upsert */ export type AutomationTemplateUpsertArgs = { /** * Select specific fields to fetch from the AutomationTemplate */ select?: Prisma.AutomationTemplateSelect | null /** * Omit specific fields from the AutomationTemplate */ omit?: Prisma.AutomationTemplateOmit | null /** * The filter to search for the AutomationTemplate to update in case it exists. */ where: Prisma.AutomationTemplateWhereUniqueInput /** * In case the AutomationTemplate found by the `where` argument doesn't exist, create a new AutomationTemplate with this data. */ create: Prisma.XOR /** * In case the AutomationTemplate was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * AutomationTemplate delete */ export type AutomationTemplateDeleteArgs = { /** * Select specific fields to fetch from the AutomationTemplate */ select?: Prisma.AutomationTemplateSelect | null /** * Omit specific fields from the AutomationTemplate */ omit?: Prisma.AutomationTemplateOmit | null /** * Filter which AutomationTemplate to delete. */ where: Prisma.AutomationTemplateWhereUniqueInput } /** * AutomationTemplate deleteMany */ export type AutomationTemplateDeleteManyArgs = { /** * Filter which AutomationTemplates to delete */ where?: Prisma.AutomationTemplateWhereInput /** * Limit how many AutomationTemplates to delete. */ limit?: number } /** * AutomationTemplate without action */ export type AutomationTemplateDefaultArgs = { /** * Select specific fields to fetch from the AutomationTemplate */ select?: Prisma.AutomationTemplateSelect | null /** * Omit specific fields from the AutomationTemplate */ omit?: Prisma.AutomationTemplateOmit | null }