/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `Post` 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.js" import type * as Prisma from "../internal/prismaNamespace.js" /** * Model Post * */ export type PostModel = runtime.Types.Result.DefaultSelection export type AggregatePost = { _count: PostCountAggregateOutputType | null _avg: PostAvgAggregateOutputType | null _sum: PostSumAggregateOutputType | null _min: PostMinAggregateOutputType | null _max: PostMaxAggregateOutputType | null } export type PostAvgAggregateOutputType = { id: number | null isFbPostState: number | null isTwitterPostState: number | null isTiktokPostState: number | null tokensUsed: number | null } export type PostSumAggregateOutputType = { id: number | null isFbPostState: number | null isTwitterPostState: number | null isTiktokPostState: number | null tokensUsed: number | null } export type PostMinAggregateOutputType = { id: number | null title: string | null prompt: string | null content: string | null imageUrl: string | null style: string | null tone: string | null isFbPostState: number | null isTwitterPostState: number | null isTiktokPostState: number | null draft: string | null tokensUsed: number | null model: string | null reviewNotes: string | null status: string | null createdAt: Date | null updatedAt: Date | null } export type PostMaxAggregateOutputType = { id: number | null title: string | null prompt: string | null content: string | null imageUrl: string | null style: string | null tone: string | null isFbPostState: number | null isTwitterPostState: number | null isTiktokPostState: number | null draft: string | null tokensUsed: number | null model: string | null reviewNotes: string | null status: string | null createdAt: Date | null updatedAt: Date | null } export type PostCountAggregateOutputType = { id: number title: number prompt: number content: number imageUrl: number style: number tone: number isFbPostState: number isTwitterPostState: number isTiktokPostState: number draft: number tokensUsed: number model: number reviewNotes: number status: number createdAt: number updatedAt: number _all: number } export type PostAvgAggregateInputType = { id?: true isFbPostState?: true isTwitterPostState?: true isTiktokPostState?: true tokensUsed?: true } export type PostSumAggregateInputType = { id?: true isFbPostState?: true isTwitterPostState?: true isTiktokPostState?: true tokensUsed?: true } export type PostMinAggregateInputType = { id?: true title?: true prompt?: true content?: true imageUrl?: true style?: true tone?: true isFbPostState?: true isTwitterPostState?: true isTiktokPostState?: true draft?: true tokensUsed?: true model?: true reviewNotes?: true status?: true createdAt?: true updatedAt?: true } export type PostMaxAggregateInputType = { id?: true title?: true prompt?: true content?: true imageUrl?: true style?: true tone?: true isFbPostState?: true isTwitterPostState?: true isTiktokPostState?: true draft?: true tokensUsed?: true model?: true reviewNotes?: true status?: true createdAt?: true updatedAt?: true } export type PostCountAggregateInputType = { id?: true title?: true prompt?: true content?: true imageUrl?: true style?: true tone?: true isFbPostState?: true isTwitterPostState?: true isTiktokPostState?: true draft?: true tokensUsed?: true model?: true reviewNotes?: true status?: true createdAt?: true updatedAt?: true _all?: true } export type PostAggregateArgs = { /** * Filter which Post to aggregate. */ where?: Prisma.PostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Posts to fetch. */ orderBy?: Prisma.PostOrderByWithRelationInput | Prisma.PostOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.PostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Posts 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` Posts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Posts **/ _count?: true | PostCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: PostAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: PostSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: PostMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: PostMaxAggregateInputType } export type GetPostAggregateType = { [P in keyof T & keyof AggregatePost]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type PostGroupByArgs = { where?: Prisma.PostWhereInput orderBy?: Prisma.PostOrderByWithAggregationInput | Prisma.PostOrderByWithAggregationInput[] by: Prisma.PostScalarFieldEnum[] | Prisma.PostScalarFieldEnum having?: Prisma.PostScalarWhereWithAggregatesInput take?: number skip?: number _count?: PostCountAggregateInputType | true _avg?: PostAvgAggregateInputType _sum?: PostSumAggregateInputType _min?: PostMinAggregateInputType _max?: PostMaxAggregateInputType } export type PostGroupByOutputType = { id: number title: string prompt: string content: string imageUrl: string | null style: string tone: string | null isFbPostState: number isTwitterPostState: number isTiktokPostState: number draft: string | null tokensUsed: number model: string | null reviewNotes: string | null status: string createdAt: Date updatedAt: Date _count: PostCountAggregateOutputType | null _avg: PostAvgAggregateOutputType | null _sum: PostSumAggregateOutputType | null _min: PostMinAggregateOutputType | null _max: PostMaxAggregateOutputType | null } export type GetPostGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof PostGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type PostWhereInput = { AND?: Prisma.PostWhereInput | Prisma.PostWhereInput[] OR?: Prisma.PostWhereInput[] NOT?: Prisma.PostWhereInput | Prisma.PostWhereInput[] id?: Prisma.IntFilter<"Post"> | number title?: Prisma.StringFilter<"Post"> | string prompt?: Prisma.StringFilter<"Post"> | string content?: Prisma.StringFilter<"Post"> | string imageUrl?: Prisma.StringNullableFilter<"Post"> | string | null style?: Prisma.StringFilter<"Post"> | string tone?: Prisma.StringNullableFilter<"Post"> | string | null isFbPostState?: Prisma.IntFilter<"Post"> | number isTwitterPostState?: Prisma.IntFilter<"Post"> | number isTiktokPostState?: Prisma.IntFilter<"Post"> | number draft?: Prisma.StringNullableFilter<"Post"> | string | null tokensUsed?: Prisma.IntFilter<"Post"> | number model?: Prisma.StringNullableFilter<"Post"> | string | null reviewNotes?: Prisma.StringNullableFilter<"Post"> | string | null status?: Prisma.StringFilter<"Post"> | string createdAt?: Prisma.DateTimeFilter<"Post"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Post"> | Date | string } export type PostOrderByWithRelationInput = { id?: Prisma.SortOrder title?: Prisma.SortOrder prompt?: Prisma.SortOrder content?: Prisma.SortOrder imageUrl?: Prisma.SortOrderInput | Prisma.SortOrder style?: Prisma.SortOrder tone?: Prisma.SortOrderInput | Prisma.SortOrder isFbPostState?: Prisma.SortOrder isTwitterPostState?: Prisma.SortOrder isTiktokPostState?: Prisma.SortOrder draft?: Prisma.SortOrderInput | Prisma.SortOrder tokensUsed?: Prisma.SortOrder model?: Prisma.SortOrderInput | Prisma.SortOrder reviewNotes?: Prisma.SortOrderInput | Prisma.SortOrder status?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } export type PostWhereUniqueInput = Prisma.AtLeast<{ id?: number AND?: Prisma.PostWhereInput | Prisma.PostWhereInput[] OR?: Prisma.PostWhereInput[] NOT?: Prisma.PostWhereInput | Prisma.PostWhereInput[] title?: Prisma.StringFilter<"Post"> | string prompt?: Prisma.StringFilter<"Post"> | string content?: Prisma.StringFilter<"Post"> | string imageUrl?: Prisma.StringNullableFilter<"Post"> | string | null style?: Prisma.StringFilter<"Post"> | string tone?: Prisma.StringNullableFilter<"Post"> | string | null isFbPostState?: Prisma.IntFilter<"Post"> | number isTwitterPostState?: Prisma.IntFilter<"Post"> | number isTiktokPostState?: Prisma.IntFilter<"Post"> | number draft?: Prisma.StringNullableFilter<"Post"> | string | null tokensUsed?: Prisma.IntFilter<"Post"> | number model?: Prisma.StringNullableFilter<"Post"> | string | null reviewNotes?: Prisma.StringNullableFilter<"Post"> | string | null status?: Prisma.StringFilter<"Post"> | string createdAt?: Prisma.DateTimeFilter<"Post"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Post"> | Date | string }, "id"> export type PostOrderByWithAggregationInput = { id?: Prisma.SortOrder title?: Prisma.SortOrder prompt?: Prisma.SortOrder content?: Prisma.SortOrder imageUrl?: Prisma.SortOrderInput | Prisma.SortOrder style?: Prisma.SortOrder tone?: Prisma.SortOrderInput | Prisma.SortOrder isFbPostState?: Prisma.SortOrder isTwitterPostState?: Prisma.SortOrder isTiktokPostState?: Prisma.SortOrder draft?: Prisma.SortOrderInput | Prisma.SortOrder tokensUsed?: Prisma.SortOrder model?: Prisma.SortOrderInput | Prisma.SortOrder reviewNotes?: Prisma.SortOrderInput | Prisma.SortOrder status?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder _count?: Prisma.PostCountOrderByAggregateInput _avg?: Prisma.PostAvgOrderByAggregateInput _max?: Prisma.PostMaxOrderByAggregateInput _min?: Prisma.PostMinOrderByAggregateInput _sum?: Prisma.PostSumOrderByAggregateInput } export type PostScalarWhereWithAggregatesInput = { AND?: Prisma.PostScalarWhereWithAggregatesInput | Prisma.PostScalarWhereWithAggregatesInput[] OR?: Prisma.PostScalarWhereWithAggregatesInput[] NOT?: Prisma.PostScalarWhereWithAggregatesInput | Prisma.PostScalarWhereWithAggregatesInput[] id?: Prisma.IntWithAggregatesFilter<"Post"> | number title?: Prisma.StringWithAggregatesFilter<"Post"> | string prompt?: Prisma.StringWithAggregatesFilter<"Post"> | string content?: Prisma.StringWithAggregatesFilter<"Post"> | string imageUrl?: Prisma.StringNullableWithAggregatesFilter<"Post"> | string | null style?: Prisma.StringWithAggregatesFilter<"Post"> | string tone?: Prisma.StringNullableWithAggregatesFilter<"Post"> | string | null isFbPostState?: Prisma.IntWithAggregatesFilter<"Post"> | number isTwitterPostState?: Prisma.IntWithAggregatesFilter<"Post"> | number isTiktokPostState?: Prisma.IntWithAggregatesFilter<"Post"> | number draft?: Prisma.StringNullableWithAggregatesFilter<"Post"> | string | null tokensUsed?: Prisma.IntWithAggregatesFilter<"Post"> | number model?: Prisma.StringNullableWithAggregatesFilter<"Post"> | string | null reviewNotes?: Prisma.StringNullableWithAggregatesFilter<"Post"> | string | null status?: Prisma.StringWithAggregatesFilter<"Post"> | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"Post"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Post"> | Date | string } export type PostCreateInput = { title: string prompt: string content: string imageUrl?: string | null style?: string tone?: string | null isFbPostState?: number isTwitterPostState?: number isTiktokPostState?: number draft?: string | null tokensUsed?: number model?: string | null reviewNotes?: string | null status?: string createdAt?: Date | string updatedAt?: Date | string } export type PostUncheckedCreateInput = { id?: number title: string prompt: string content: string imageUrl?: string | null style?: string tone?: string | null isFbPostState?: number isTwitterPostState?: number isTiktokPostState?: number draft?: string | null tokensUsed?: number model?: string | null reviewNotes?: string | null status?: string createdAt?: Date | string updatedAt?: Date | string } export type PostUpdateInput = { title?: Prisma.StringFieldUpdateOperationsInput | string prompt?: Prisma.StringFieldUpdateOperationsInput | string content?: Prisma.StringFieldUpdateOperationsInput | string imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null style?: Prisma.StringFieldUpdateOperationsInput | string tone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isFbPostState?: Prisma.IntFieldUpdateOperationsInput | number isTwitterPostState?: Prisma.IntFieldUpdateOperationsInput | number isTiktokPostState?: Prisma.IntFieldUpdateOperationsInput | number draft?: Prisma.NullableStringFieldUpdateOperationsInput | string | null tokensUsed?: Prisma.IntFieldUpdateOperationsInput | number model?: Prisma.NullableStringFieldUpdateOperationsInput | string | null reviewNotes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null status?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type PostUncheckedUpdateInput = { id?: Prisma.IntFieldUpdateOperationsInput | number title?: Prisma.StringFieldUpdateOperationsInput | string prompt?: Prisma.StringFieldUpdateOperationsInput | string content?: Prisma.StringFieldUpdateOperationsInput | string imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null style?: Prisma.StringFieldUpdateOperationsInput | string tone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isFbPostState?: Prisma.IntFieldUpdateOperationsInput | number isTwitterPostState?: Prisma.IntFieldUpdateOperationsInput | number isTiktokPostState?: Prisma.IntFieldUpdateOperationsInput | number draft?: Prisma.NullableStringFieldUpdateOperationsInput | string | null tokensUsed?: Prisma.IntFieldUpdateOperationsInput | number model?: Prisma.NullableStringFieldUpdateOperationsInput | string | null reviewNotes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null status?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type PostCreateManyInput = { id?: number title: string prompt: string content: string imageUrl?: string | null style?: string tone?: string | null isFbPostState?: number isTwitterPostState?: number isTiktokPostState?: number draft?: string | null tokensUsed?: number model?: string | null reviewNotes?: string | null status?: string createdAt?: Date | string updatedAt?: Date | string } export type PostUpdateManyMutationInput = { title?: Prisma.StringFieldUpdateOperationsInput | string prompt?: Prisma.StringFieldUpdateOperationsInput | string content?: Prisma.StringFieldUpdateOperationsInput | string imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null style?: Prisma.StringFieldUpdateOperationsInput | string tone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isFbPostState?: Prisma.IntFieldUpdateOperationsInput | number isTwitterPostState?: Prisma.IntFieldUpdateOperationsInput | number isTiktokPostState?: Prisma.IntFieldUpdateOperationsInput | number draft?: Prisma.NullableStringFieldUpdateOperationsInput | string | null tokensUsed?: Prisma.IntFieldUpdateOperationsInput | number model?: Prisma.NullableStringFieldUpdateOperationsInput | string | null reviewNotes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null status?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type PostUncheckedUpdateManyInput = { id?: Prisma.IntFieldUpdateOperationsInput | number title?: Prisma.StringFieldUpdateOperationsInput | string prompt?: Prisma.StringFieldUpdateOperationsInput | string content?: Prisma.StringFieldUpdateOperationsInput | string imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null style?: Prisma.StringFieldUpdateOperationsInput | string tone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isFbPostState?: Prisma.IntFieldUpdateOperationsInput | number isTwitterPostState?: Prisma.IntFieldUpdateOperationsInput | number isTiktokPostState?: Prisma.IntFieldUpdateOperationsInput | number draft?: Prisma.NullableStringFieldUpdateOperationsInput | string | null tokensUsed?: Prisma.IntFieldUpdateOperationsInput | number model?: Prisma.NullableStringFieldUpdateOperationsInput | string | null reviewNotes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null status?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type PostCountOrderByAggregateInput = { id?: Prisma.SortOrder title?: Prisma.SortOrder prompt?: Prisma.SortOrder content?: Prisma.SortOrder imageUrl?: Prisma.SortOrder style?: Prisma.SortOrder tone?: Prisma.SortOrder isFbPostState?: Prisma.SortOrder isTwitterPostState?: Prisma.SortOrder isTiktokPostState?: Prisma.SortOrder draft?: Prisma.SortOrder tokensUsed?: Prisma.SortOrder model?: Prisma.SortOrder reviewNotes?: Prisma.SortOrder status?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } export type PostAvgOrderByAggregateInput = { id?: Prisma.SortOrder isFbPostState?: Prisma.SortOrder isTwitterPostState?: Prisma.SortOrder isTiktokPostState?: Prisma.SortOrder tokensUsed?: Prisma.SortOrder } export type PostMaxOrderByAggregateInput = { id?: Prisma.SortOrder title?: Prisma.SortOrder prompt?: Prisma.SortOrder content?: Prisma.SortOrder imageUrl?: Prisma.SortOrder style?: Prisma.SortOrder tone?: Prisma.SortOrder isFbPostState?: Prisma.SortOrder isTwitterPostState?: Prisma.SortOrder isTiktokPostState?: Prisma.SortOrder draft?: Prisma.SortOrder tokensUsed?: Prisma.SortOrder model?: Prisma.SortOrder reviewNotes?: Prisma.SortOrder status?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } export type PostMinOrderByAggregateInput = { id?: Prisma.SortOrder title?: Prisma.SortOrder prompt?: Prisma.SortOrder content?: Prisma.SortOrder imageUrl?: Prisma.SortOrder style?: Prisma.SortOrder tone?: Prisma.SortOrder isFbPostState?: Prisma.SortOrder isTwitterPostState?: Prisma.SortOrder isTiktokPostState?: Prisma.SortOrder draft?: Prisma.SortOrder tokensUsed?: Prisma.SortOrder model?: Prisma.SortOrder reviewNotes?: Prisma.SortOrder status?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } export type PostSumOrderByAggregateInput = { id?: Prisma.SortOrder isFbPostState?: Prisma.SortOrder isTwitterPostState?: Prisma.SortOrder isTiktokPostState?: Prisma.SortOrder tokensUsed?: Prisma.SortOrder } export type DateTimeFieldUpdateOperationsInput = { set?: Date | string } export type PostSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean title?: boolean prompt?: boolean content?: boolean imageUrl?: boolean style?: boolean tone?: boolean isFbPostState?: boolean isTwitterPostState?: boolean isTiktokPostState?: boolean draft?: boolean tokensUsed?: boolean model?: boolean reviewNotes?: boolean status?: boolean createdAt?: boolean updatedAt?: boolean }, ExtArgs["result"]["post"]> export type PostSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean title?: boolean prompt?: boolean content?: boolean imageUrl?: boolean style?: boolean tone?: boolean isFbPostState?: boolean isTwitterPostState?: boolean isTiktokPostState?: boolean draft?: boolean tokensUsed?: boolean model?: boolean reviewNotes?: boolean status?: boolean createdAt?: boolean updatedAt?: boolean }, ExtArgs["result"]["post"]> export type PostSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean title?: boolean prompt?: boolean content?: boolean imageUrl?: boolean style?: boolean tone?: boolean isFbPostState?: boolean isTwitterPostState?: boolean isTiktokPostState?: boolean draft?: boolean tokensUsed?: boolean model?: boolean reviewNotes?: boolean status?: boolean createdAt?: boolean updatedAt?: boolean }, ExtArgs["result"]["post"]> export type PostSelectScalar = { id?: boolean title?: boolean prompt?: boolean content?: boolean imageUrl?: boolean style?: boolean tone?: boolean isFbPostState?: boolean isTwitterPostState?: boolean isTiktokPostState?: boolean draft?: boolean tokensUsed?: boolean model?: boolean reviewNotes?: boolean status?: boolean createdAt?: boolean updatedAt?: boolean } export type PostOmit = runtime.Types.Extensions.GetOmit<"id" | "title" | "prompt" | "content" | "imageUrl" | "style" | "tone" | "isFbPostState" | "isTwitterPostState" | "isTiktokPostState" | "draft" | "tokensUsed" | "model" | "reviewNotes" | "status" | "createdAt" | "updatedAt", ExtArgs["result"]["post"]> export type $PostPayload = { name: "Post" objects: {} scalars: runtime.Types.Extensions.GetPayloadResult<{ id: number title: string prompt: string content: string imageUrl: string | null style: string tone: string | null isFbPostState: number isTwitterPostState: number isTiktokPostState: number draft: string | null tokensUsed: number model: string | null reviewNotes: string | null status: string createdAt: Date updatedAt: Date }, ExtArgs["result"]["post"]> composites: {} } export type PostGetPayload = runtime.Types.Result.GetResult export type PostCountArgs = Omit & { select?: PostCountAggregateInputType | true } export interface PostDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['Post'], meta: { name: 'Post' } } /** * Find zero or one Post that matches the filter. * @param {PostFindUniqueArgs} args - Arguments to find a Post * @example * // Get one Post * const post = await prisma.post.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one Post that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {PostFindUniqueOrThrowArgs} args - Arguments to find a Post * @example * // Get one Post * const post = await prisma.post.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first Post 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 {PostFindFirstArgs} args - Arguments to find a Post * @example * // Get one Post * const post = await prisma.post.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first Post 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 {PostFindFirstOrThrowArgs} args - Arguments to find a Post * @example * // Get one Post * const post = await prisma.post.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more Posts 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 {PostFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Posts * const posts = await prisma.post.findMany() * * // Get first 10 Posts * const posts = await prisma.post.findMany({ take: 10 }) * * // Only select the `id` * const postWithIdOnly = await prisma.post.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a Post. * @param {PostCreateArgs} args - Arguments to create a Post. * @example * // Create one Post * const Post = await prisma.post.create({ * data: { * // ... data to create a Post * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many Posts. * @param {PostCreateManyArgs} args - Arguments to create many Posts. * @example * // Create many Posts * const post = await prisma.post.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many Posts and returns the data saved in the database. * @param {PostCreateManyAndReturnArgs} args - Arguments to create many Posts. * @example * // Create many Posts * const post = await prisma.post.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Posts and only return the `id` * const postWithIdOnly = await prisma.post.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 Post. * @param {PostDeleteArgs} args - Arguments to delete one Post. * @example * // Delete one Post * const Post = await prisma.post.delete({ * where: { * // ... filter to delete one Post * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one Post. * @param {PostUpdateArgs} args - Arguments to update one Post. * @example * // Update one Post * const post = await prisma.post.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more Posts. * @param {PostDeleteManyArgs} args - Arguments to filter Posts to delete. * @example * // Delete a few Posts * const { count } = await prisma.post.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Posts. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PostUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Posts * const post = await prisma.post.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Posts and returns the data updated in the database. * @param {PostUpdateManyAndReturnArgs} args - Arguments to update many Posts. * @example * // Update many Posts * const post = await prisma.post.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more Posts and only return the `id` * const postWithIdOnly = await prisma.post.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 Post. * @param {PostUpsertArgs} args - Arguments to update or create a Post. * @example * // Update or create a Post * const post = await prisma.post.upsert({ * create: { * // ... data to create a Post * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Post we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of Posts. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PostCountArgs} args - Arguments to filter Posts to count. * @example * // Count the number of Posts * const count = await prisma.post.count({ * where: { * // ... the filter for the Posts 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 Post. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PostAggregateArgs} 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 Post. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PostGroupByArgs} 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 PostGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: PostGroupByArgs['orderBy'] } : { orderBy?: PostGroupByArgs['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 ? GetPostGroupByPayload : Prisma.PrismaPromise /** * Fields of the Post model */ readonly fields: PostFieldRefs; } /** * The delegate class that acts as a "Promise-like" for Post. * 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__PostClient 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 Post model */ export interface PostFieldRefs { readonly id: Prisma.FieldRef<"Post", 'Int'> readonly title: Prisma.FieldRef<"Post", 'String'> readonly prompt: Prisma.FieldRef<"Post", 'String'> readonly content: Prisma.FieldRef<"Post", 'String'> readonly imageUrl: Prisma.FieldRef<"Post", 'String'> readonly style: Prisma.FieldRef<"Post", 'String'> readonly tone: Prisma.FieldRef<"Post", 'String'> readonly isFbPostState: Prisma.FieldRef<"Post", 'Int'> readonly isTwitterPostState: Prisma.FieldRef<"Post", 'Int'> readonly isTiktokPostState: Prisma.FieldRef<"Post", 'Int'> readonly draft: Prisma.FieldRef<"Post", 'String'> readonly tokensUsed: Prisma.FieldRef<"Post", 'Int'> readonly model: Prisma.FieldRef<"Post", 'String'> readonly reviewNotes: Prisma.FieldRef<"Post", 'String'> readonly status: Prisma.FieldRef<"Post", 'String'> readonly createdAt: Prisma.FieldRef<"Post", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"Post", 'DateTime'> } // Custom InputTypes /** * Post findUnique */ export type PostFindUniqueArgs = { /** * Select specific fields to fetch from the Post */ select?: Prisma.PostSelect | null /** * Omit specific fields from the Post */ omit?: Prisma.PostOmit | null /** * Filter, which Post to fetch. */ where: Prisma.PostWhereUniqueInput } /** * Post findUniqueOrThrow */ export type PostFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Post */ select?: Prisma.PostSelect | null /** * Omit specific fields from the Post */ omit?: Prisma.PostOmit | null /** * Filter, which Post to fetch. */ where: Prisma.PostWhereUniqueInput } /** * Post findFirst */ export type PostFindFirstArgs = { /** * Select specific fields to fetch from the Post */ select?: Prisma.PostSelect | null /** * Omit specific fields from the Post */ omit?: Prisma.PostOmit | null /** * Filter, which Post to fetch. */ where?: Prisma.PostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Posts to fetch. */ orderBy?: Prisma.PostOrderByWithRelationInput | Prisma.PostOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Posts. */ cursor?: Prisma.PostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Posts 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` Posts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Posts. */ distinct?: Prisma.PostScalarFieldEnum | Prisma.PostScalarFieldEnum[] } /** * Post findFirstOrThrow */ export type PostFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Post */ select?: Prisma.PostSelect | null /** * Omit specific fields from the Post */ omit?: Prisma.PostOmit | null /** * Filter, which Post to fetch. */ where?: Prisma.PostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Posts to fetch. */ orderBy?: Prisma.PostOrderByWithRelationInput | Prisma.PostOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Posts. */ cursor?: Prisma.PostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Posts 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` Posts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Posts. */ distinct?: Prisma.PostScalarFieldEnum | Prisma.PostScalarFieldEnum[] } /** * Post findMany */ export type PostFindManyArgs = { /** * Select specific fields to fetch from the Post */ select?: Prisma.PostSelect | null /** * Omit specific fields from the Post */ omit?: Prisma.PostOmit | null /** * Filter, which Posts to fetch. */ where?: Prisma.PostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Posts to fetch. */ orderBy?: Prisma.PostOrderByWithRelationInput | Prisma.PostOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Posts. */ cursor?: Prisma.PostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Posts 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` Posts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Posts. */ distinct?: Prisma.PostScalarFieldEnum | Prisma.PostScalarFieldEnum[] } /** * Post create */ export type PostCreateArgs = { /** * Select specific fields to fetch from the Post */ select?: Prisma.PostSelect | null /** * Omit specific fields from the Post */ omit?: Prisma.PostOmit | null /** * The data needed to create a Post. */ data: Prisma.XOR } /** * Post createMany */ export type PostCreateManyArgs = { /** * The data used to create many Posts. */ data: Prisma.PostCreateManyInput | Prisma.PostCreateManyInput[] skipDuplicates?: boolean } /** * Post createManyAndReturn */ export type PostCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the Post */ select?: Prisma.PostSelectCreateManyAndReturn | null /** * Omit specific fields from the Post */ omit?: Prisma.PostOmit | null /** * The data used to create many Posts. */ data: Prisma.PostCreateManyInput | Prisma.PostCreateManyInput[] skipDuplicates?: boolean } /** * Post update */ export type PostUpdateArgs = { /** * Select specific fields to fetch from the Post */ select?: Prisma.PostSelect | null /** * Omit specific fields from the Post */ omit?: Prisma.PostOmit | null /** * The data needed to update a Post. */ data: Prisma.XOR /** * Choose, which Post to update. */ where: Prisma.PostWhereUniqueInput } /** * Post updateMany */ export type PostUpdateManyArgs = { /** * The data used to update Posts. */ data: Prisma.XOR /** * Filter which Posts to update */ where?: Prisma.PostWhereInput /** * Limit how many Posts to update. */ limit?: number } /** * Post updateManyAndReturn */ export type PostUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the Post */ select?: Prisma.PostSelectUpdateManyAndReturn | null /** * Omit specific fields from the Post */ omit?: Prisma.PostOmit | null /** * The data used to update Posts. */ data: Prisma.XOR /** * Filter which Posts to update */ where?: Prisma.PostWhereInput /** * Limit how many Posts to update. */ limit?: number } /** * Post upsert */ export type PostUpsertArgs = { /** * Select specific fields to fetch from the Post */ select?: Prisma.PostSelect | null /** * Omit specific fields from the Post */ omit?: Prisma.PostOmit | null /** * The filter to search for the Post to update in case it exists. */ where: Prisma.PostWhereUniqueInput /** * In case the Post found by the `where` argument doesn't exist, create a new Post with this data. */ create: Prisma.XOR /** * In case the Post was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * Post delete */ export type PostDeleteArgs = { /** * Select specific fields to fetch from the Post */ select?: Prisma.PostSelect | null /** * Omit specific fields from the Post */ omit?: Prisma.PostOmit | null /** * Filter which Post to delete. */ where: Prisma.PostWhereUniqueInput } /** * Post deleteMany */ export type PostDeleteManyArgs = { /** * Filter which Posts to delete */ where?: Prisma.PostWhereInput /** * Limit how many Posts to delete. */ limit?: number } /** * Post without action */ export type PostDefaultArgs = { /** * Select specific fields to fetch from the Post */ select?: Prisma.PostSelect | null /** * Omit specific fields from the Post */ omit?: Prisma.PostOmit | null }