thomaswilson-sveltekit/generated/prisma/models/BlogPost.ts
2026-06-26 13:39:55 +01:00

1155 lines
39 KiB
TypeScript

/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck
/*
* This file exports the `BlogPost` 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 BlogPost
*
*/
export type BlogPostModel = runtime.Types.Result.DefaultSelection<Prisma.$BlogPostPayload>
export type AggregateBlogPost = {
_count: BlogPostCountAggregateOutputType | null
_min: BlogPostMinAggregateOutputType | null
_max: BlogPostMaxAggregateOutputType | null
}
export type BlogPostMinAggregateOutputType = {
id: string | null
slug: string | null
title: string | null
publishedAt: Date | null
preview: string | null
}
export type BlogPostMaxAggregateOutputType = {
id: string | null
slug: string | null
title: string | null
publishedAt: Date | null
preview: string | null
}
export type BlogPostCountAggregateOutputType = {
id: number
slug: number
title: number
publishedAt: number
preview: number
_all: number
}
export type BlogPostMinAggregateInputType = {
id?: true
slug?: true
title?: true
publishedAt?: true
preview?: true
}
export type BlogPostMaxAggregateInputType = {
id?: true
slug?: true
title?: true
publishedAt?: true
preview?: true
}
export type BlogPostCountAggregateInputType = {
id?: true
slug?: true
title?: true
publishedAt?: true
preview?: true
_all?: true
}
export type BlogPostAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which BlogPost to aggregate.
*/
where?: Prisma.BlogPostWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of BlogPosts to fetch.
*/
orderBy?: Prisma.BlogPostOrderByWithRelationInput | Prisma.BlogPostOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the start position
*/
cursor?: Prisma.BlogPostWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` BlogPosts 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` BlogPosts.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Count returned BlogPosts
**/
_count?: true | BlogPostCountAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the minimum value
**/
_min?: BlogPostMinAggregateInputType
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
*
* Select which fields to find the maximum value
**/
_max?: BlogPostMaxAggregateInputType
}
export type GetBlogPostAggregateType<T extends BlogPostAggregateArgs> = {
[P in keyof T & keyof AggregateBlogPost]: P extends '_count' | 'count'
? T[P] extends true
? number
: Prisma.GetScalarType<T[P], AggregateBlogPost[P]>
: Prisma.GetScalarType<T[P], AggregateBlogPost[P]>
}
export type BlogPostGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.BlogPostWhereInput
orderBy?: Prisma.BlogPostOrderByWithAggregationInput | Prisma.BlogPostOrderByWithAggregationInput[]
by: Prisma.BlogPostScalarFieldEnum[] | Prisma.BlogPostScalarFieldEnum
having?: Prisma.BlogPostScalarWhereWithAggregatesInput
take?: number
skip?: number
_count?: BlogPostCountAggregateInputType | true
_min?: BlogPostMinAggregateInputType
_max?: BlogPostMaxAggregateInputType
}
export type BlogPostGroupByOutputType = {
id: string
slug: string
title: string
publishedAt: Date
preview: string
_count: BlogPostCountAggregateOutputType | null
_min: BlogPostMinAggregateOutputType | null
_max: BlogPostMaxAggregateOutputType | null
}
export type GetBlogPostGroupByPayload<T extends BlogPostGroupByArgs> = Prisma.PrismaPromise<
Array<
Prisma.PickEnumerable<BlogPostGroupByOutputType, T['by']> &
{
[P in ((keyof T) & (keyof BlogPostGroupByOutputType))]: P extends '_count'
? T[P] extends boolean
? number
: Prisma.GetScalarType<T[P], BlogPostGroupByOutputType[P]>
: Prisma.GetScalarType<T[P], BlogPostGroupByOutputType[P]>
}
>
>
export type BlogPostWhereInput = {
AND?: Prisma.BlogPostWhereInput | Prisma.BlogPostWhereInput[]
OR?: Prisma.BlogPostWhereInput[]
NOT?: Prisma.BlogPostWhereInput | Prisma.BlogPostWhereInput[]
id?: Prisma.StringFilter<"BlogPost"> | string
slug?: Prisma.StringFilter<"BlogPost"> | string
title?: Prisma.StringFilter<"BlogPost"> | string
publishedAt?: Prisma.DateTimeFilter<"BlogPost"> | Date | string
preview?: Prisma.StringFilter<"BlogPost"> | string
}
export type BlogPostOrderByWithRelationInput = {
id?: Prisma.SortOrder
slug?: Prisma.SortOrder
title?: Prisma.SortOrder
publishedAt?: Prisma.SortOrder
preview?: Prisma.SortOrder
}
export type BlogPostWhereUniqueInput = Prisma.AtLeast<{
id?: string
AND?: Prisma.BlogPostWhereInput | Prisma.BlogPostWhereInput[]
OR?: Prisma.BlogPostWhereInput[]
NOT?: Prisma.BlogPostWhereInput | Prisma.BlogPostWhereInput[]
slug?: Prisma.StringFilter<"BlogPost"> | string
title?: Prisma.StringFilter<"BlogPost"> | string
publishedAt?: Prisma.DateTimeFilter<"BlogPost"> | Date | string
preview?: Prisma.StringFilter<"BlogPost"> | string
}, "id">
export type BlogPostOrderByWithAggregationInput = {
id?: Prisma.SortOrder
slug?: Prisma.SortOrder
title?: Prisma.SortOrder
publishedAt?: Prisma.SortOrder
preview?: Prisma.SortOrder
_count?: Prisma.BlogPostCountOrderByAggregateInput
_max?: Prisma.BlogPostMaxOrderByAggregateInput
_min?: Prisma.BlogPostMinOrderByAggregateInput
}
export type BlogPostScalarWhereWithAggregatesInput = {
AND?: Prisma.BlogPostScalarWhereWithAggregatesInput | Prisma.BlogPostScalarWhereWithAggregatesInput[]
OR?: Prisma.BlogPostScalarWhereWithAggregatesInput[]
NOT?: Prisma.BlogPostScalarWhereWithAggregatesInput | Prisma.BlogPostScalarWhereWithAggregatesInput[]
id?: Prisma.StringWithAggregatesFilter<"BlogPost"> | string
slug?: Prisma.StringWithAggregatesFilter<"BlogPost"> | string
title?: Prisma.StringWithAggregatesFilter<"BlogPost"> | string
publishedAt?: Prisma.DateTimeWithAggregatesFilter<"BlogPost"> | Date | string
preview?: Prisma.StringWithAggregatesFilter<"BlogPost"> | string
}
export type BlogPostCreateInput = {
id?: string
slug: string
title: string
publishedAt: Date | string
preview: string
}
export type BlogPostUncheckedCreateInput = {
id?: string
slug: string
title: string
publishedAt: Date | string
preview: string
}
export type BlogPostUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
slug?: Prisma.StringFieldUpdateOperationsInput | string
title?: Prisma.StringFieldUpdateOperationsInput | string
publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
preview?: Prisma.StringFieldUpdateOperationsInput | string
}
export type BlogPostUncheckedUpdateInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
slug?: Prisma.StringFieldUpdateOperationsInput | string
title?: Prisma.StringFieldUpdateOperationsInput | string
publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
preview?: Prisma.StringFieldUpdateOperationsInput | string
}
export type BlogPostCreateManyInput = {
id?: string
slug: string
title: string
publishedAt: Date | string
preview: string
}
export type BlogPostUpdateManyMutationInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
slug?: Prisma.StringFieldUpdateOperationsInput | string
title?: Prisma.StringFieldUpdateOperationsInput | string
publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
preview?: Prisma.StringFieldUpdateOperationsInput | string
}
export type BlogPostUncheckedUpdateManyInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
slug?: Prisma.StringFieldUpdateOperationsInput | string
title?: Prisma.StringFieldUpdateOperationsInput | string
publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
preview?: Prisma.StringFieldUpdateOperationsInput | string
}
export type BlogPostCountOrderByAggregateInput = {
id?: Prisma.SortOrder
slug?: Prisma.SortOrder
title?: Prisma.SortOrder
publishedAt?: Prisma.SortOrder
preview?: Prisma.SortOrder
}
export type BlogPostMaxOrderByAggregateInput = {
id?: Prisma.SortOrder
slug?: Prisma.SortOrder
title?: Prisma.SortOrder
publishedAt?: Prisma.SortOrder
preview?: Prisma.SortOrder
}
export type BlogPostMinOrderByAggregateInput = {
id?: Prisma.SortOrder
slug?: Prisma.SortOrder
title?: Prisma.SortOrder
publishedAt?: Prisma.SortOrder
preview?: Prisma.SortOrder
}
export type StringFieldUpdateOperationsInput = {
set?: string
}
export type DateTimeFieldUpdateOperationsInput = {
set?: Date | string
}
export type BlogPostSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
slug?: boolean
title?: boolean
publishedAt?: boolean
preview?: boolean
}, ExtArgs["result"]["blogPost"]>
export type BlogPostSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
slug?: boolean
title?: boolean
publishedAt?: boolean
preview?: boolean
}, ExtArgs["result"]["blogPost"]>
export type BlogPostSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
slug?: boolean
title?: boolean
publishedAt?: boolean
preview?: boolean
}, ExtArgs["result"]["blogPost"]>
export type BlogPostSelectScalar = {
id?: boolean
slug?: boolean
title?: boolean
publishedAt?: boolean
preview?: boolean
}
export type BlogPostOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "slug" | "title" | "publishedAt" | "preview", ExtArgs["result"]["blogPost"]>
export type $BlogPostPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "BlogPost"
objects: {}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: string
slug: string
title: string
publishedAt: Date
preview: string
}, ExtArgs["result"]["blogPost"]>
composites: {}
}
export type BlogPostGetPayload<S extends boolean | null | undefined | BlogPostDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$BlogPostPayload, S>
export type BlogPostCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
Omit<BlogPostFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
select?: BlogPostCountAggregateInputType | true
}
export interface BlogPostDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['BlogPost'], meta: { name: 'BlogPost' } }
/**
* Find zero or one BlogPost that matches the filter.
* @param {BlogPostFindUniqueArgs} args - Arguments to find a BlogPost
* @example
* // Get one BlogPost
* const blogPost = await prisma.blogPost.findUnique({
* where: {
* // ... provide filter here
* }
* })
*/
findUnique<T extends BlogPostFindUniqueArgs>(args: Prisma.SelectSubset<T, BlogPostFindUniqueArgs<ExtArgs>>): Prisma.Prisma__BlogPostClient<runtime.Types.Result.GetResult<Prisma.$BlogPostPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find one BlogPost that matches the filter or throw an error with `error.code='P2025'`
* if no matches were found.
* @param {BlogPostFindUniqueOrThrowArgs} args - Arguments to find a BlogPost
* @example
* // Get one BlogPost
* const blogPost = await prisma.blogPost.findUniqueOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findUniqueOrThrow<T extends BlogPostFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, BlogPostFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__BlogPostClient<runtime.Types.Result.GetResult<Prisma.$BlogPostPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find the first BlogPost 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 {BlogPostFindFirstArgs} args - Arguments to find a BlogPost
* @example
* // Get one BlogPost
* const blogPost = await prisma.blogPost.findFirst({
* where: {
* // ... provide filter here
* }
* })
*/
findFirst<T extends BlogPostFindFirstArgs>(args?: Prisma.SelectSubset<T, BlogPostFindFirstArgs<ExtArgs>>): Prisma.Prisma__BlogPostClient<runtime.Types.Result.GetResult<Prisma.$BlogPostPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Find the first BlogPost 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 {BlogPostFindFirstOrThrowArgs} args - Arguments to find a BlogPost
* @example
* // Get one BlogPost
* const blogPost = await prisma.blogPost.findFirstOrThrow({
* where: {
* // ... provide filter here
* }
* })
*/
findFirstOrThrow<T extends BlogPostFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, BlogPostFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__BlogPostClient<runtime.Types.Result.GetResult<Prisma.$BlogPostPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Find zero or more BlogPosts 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 {BlogPostFindManyArgs} args - Arguments to filter and select certain fields only.
* @example
* // Get all BlogPosts
* const blogPosts = await prisma.blogPost.findMany()
*
* // Get first 10 BlogPosts
* const blogPosts = await prisma.blogPost.findMany({ take: 10 })
*
* // Only select the `id`
* const blogPostWithIdOnly = await prisma.blogPost.findMany({ select: { id: true } })
*
*/
findMany<T extends BlogPostFindManyArgs>(args?: Prisma.SelectSubset<T, BlogPostFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$BlogPostPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
/**
* Create a BlogPost.
* @param {BlogPostCreateArgs} args - Arguments to create a BlogPost.
* @example
* // Create one BlogPost
* const BlogPost = await prisma.blogPost.create({
* data: {
* // ... data to create a BlogPost
* }
* })
*
*/
create<T extends BlogPostCreateArgs>(args: Prisma.SelectSubset<T, BlogPostCreateArgs<ExtArgs>>): Prisma.Prisma__BlogPostClient<runtime.Types.Result.GetResult<Prisma.$BlogPostPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Create many BlogPosts.
* @param {BlogPostCreateManyArgs} args - Arguments to create many BlogPosts.
* @example
* // Create many BlogPosts
* const blogPost = await prisma.blogPost.createMany({
* data: [
* // ... provide data here
* ]
* })
*
*/
createMany<T extends BlogPostCreateManyArgs>(args?: Prisma.SelectSubset<T, BlogPostCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Create many BlogPosts and returns the data saved in the database.
* @param {BlogPostCreateManyAndReturnArgs} args - Arguments to create many BlogPosts.
* @example
* // Create many BlogPosts
* const blogPost = await prisma.blogPost.createManyAndReturn({
* data: [
* // ... provide data here
* ]
* })
*
* // Create many BlogPosts and only return the `id`
* const blogPostWithIdOnly = await prisma.blogPost.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<T extends BlogPostCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, BlogPostCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$BlogPostPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
/**
* Delete a BlogPost.
* @param {BlogPostDeleteArgs} args - Arguments to delete one BlogPost.
* @example
* // Delete one BlogPost
* const BlogPost = await prisma.blogPost.delete({
* where: {
* // ... filter to delete one BlogPost
* }
* })
*
*/
delete<T extends BlogPostDeleteArgs>(args: Prisma.SelectSubset<T, BlogPostDeleteArgs<ExtArgs>>): Prisma.Prisma__BlogPostClient<runtime.Types.Result.GetResult<Prisma.$BlogPostPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Update one BlogPost.
* @param {BlogPostUpdateArgs} args - Arguments to update one BlogPost.
* @example
* // Update one BlogPost
* const blogPost = await prisma.blogPost.update({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
update<T extends BlogPostUpdateArgs>(args: Prisma.SelectSubset<T, BlogPostUpdateArgs<ExtArgs>>): Prisma.Prisma__BlogPostClient<runtime.Types.Result.GetResult<Prisma.$BlogPostPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Delete zero or more BlogPosts.
* @param {BlogPostDeleteManyArgs} args - Arguments to filter BlogPosts to delete.
* @example
* // Delete a few BlogPosts
* const { count } = await prisma.blogPost.deleteMany({
* where: {
* // ... provide filter here
* }
* })
*
*/
deleteMany<T extends BlogPostDeleteManyArgs>(args?: Prisma.SelectSubset<T, BlogPostDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more BlogPosts.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {BlogPostUpdateManyArgs} args - Arguments to update one or more rows.
* @example
* // Update many BlogPosts
* const blogPost = await prisma.blogPost.updateMany({
* where: {
* // ... provide filter here
* },
* data: {
* // ... provide data here
* }
* })
*
*/
updateMany<T extends BlogPostUpdateManyArgs>(args: Prisma.SelectSubset<T, BlogPostUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
/**
* Update zero or more BlogPosts and returns the data updated in the database.
* @param {BlogPostUpdateManyAndReturnArgs} args - Arguments to update many BlogPosts.
* @example
* // Update many BlogPosts
* const blogPost = await prisma.blogPost.updateManyAndReturn({
* where: {
* // ... provide filter here
* },
* data: [
* // ... provide data here
* ]
* })
*
* // Update zero or more BlogPosts and only return the `id`
* const blogPostWithIdOnly = await prisma.blogPost.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<T extends BlogPostUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, BlogPostUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$BlogPostPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
/**
* Create or update one BlogPost.
* @param {BlogPostUpsertArgs} args - Arguments to update or create a BlogPost.
* @example
* // Update or create a BlogPost
* const blogPost = await prisma.blogPost.upsert({
* create: {
* // ... data to create a BlogPost
* },
* update: {
* // ... in case it already exists, update
* },
* where: {
* // ... the filter for the BlogPost we want to update
* }
* })
*/
upsert<T extends BlogPostUpsertArgs>(args: Prisma.SelectSubset<T, BlogPostUpsertArgs<ExtArgs>>): Prisma.Prisma__BlogPostClient<runtime.Types.Result.GetResult<Prisma.$BlogPostPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
/**
* Count the number of BlogPosts.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {BlogPostCountArgs} args - Arguments to filter BlogPosts to count.
* @example
* // Count the number of BlogPosts
* const count = await prisma.blogPost.count({
* where: {
* // ... the filter for the BlogPosts we want to count
* }
* })
**/
count<T extends BlogPostCountArgs>(
args?: Prisma.Subset<T, BlogPostCountArgs>,
): Prisma.PrismaPromise<
T extends runtime.Types.Utils.Record<'select', any>
? T['select'] extends true
? number
: Prisma.GetScalarType<T['select'], BlogPostCountAggregateOutputType>
: number
>
/**
* Allows you to perform aggregations operations on a BlogPost.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {BlogPostAggregateArgs} 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<T extends BlogPostAggregateArgs>(args: Prisma.Subset<T, BlogPostAggregateArgs>): Prisma.PrismaPromise<GetBlogPostAggregateType<T>>
/**
* Group by BlogPost.
* Note, that providing `undefined` is treated as the value not being there.
* Read more here: https://pris.ly/d/null-undefined
* @param {BlogPostGroupByArgs} 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 BlogPostGroupByArgs,
HasSelectOrTake extends Prisma.Or<
Prisma.Extends<'skip', Prisma.Keys<T>>,
Prisma.Extends<'take', Prisma.Keys<T>>
>,
OrderByArg extends Prisma.True extends HasSelectOrTake
? { orderBy: BlogPostGroupByArgs['orderBy'] }
: { orderBy?: BlogPostGroupByArgs['orderBy'] },
OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
ByValid extends Prisma.Has<ByFields, OrderFields>,
HavingFields extends Prisma.GetHavingFields<T['having']>,
HavingValid extends Prisma.Has<ByFields, HavingFields>,
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<T>
? 'orderBy' extends Prisma.Keys<T>
? 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<T>
? 'orderBy' extends Prisma.Keys<T>
? 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<T, BlogPostGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetBlogPostGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
* Fields of the BlogPost model
*/
readonly fields: BlogPostFieldRefs;
}
/**
* The delegate class that acts as a "Promise-like" for BlogPost.
* 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__BlogPostClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
/**
* 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<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
/**
* 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<T>
}
/**
* Fields of the BlogPost model
*/
export interface BlogPostFieldRefs {
readonly id: Prisma.FieldRef<"BlogPost", 'String'>
readonly slug: Prisma.FieldRef<"BlogPost", 'String'>
readonly title: Prisma.FieldRef<"BlogPost", 'String'>
readonly publishedAt: Prisma.FieldRef<"BlogPost", 'DateTime'>
readonly preview: Prisma.FieldRef<"BlogPost", 'String'>
}
// Custom InputTypes
/**
* BlogPost findUnique
*/
export type BlogPostFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the BlogPost
*/
select?: Prisma.BlogPostSelect<ExtArgs> | null
/**
* Omit specific fields from the BlogPost
*/
omit?: Prisma.BlogPostOmit<ExtArgs> | null
/**
* Filter, which BlogPost to fetch.
*/
where: Prisma.BlogPostWhereUniqueInput
}
/**
* BlogPost findUniqueOrThrow
*/
export type BlogPostFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the BlogPost
*/
select?: Prisma.BlogPostSelect<ExtArgs> | null
/**
* Omit specific fields from the BlogPost
*/
omit?: Prisma.BlogPostOmit<ExtArgs> | null
/**
* Filter, which BlogPost to fetch.
*/
where: Prisma.BlogPostWhereUniqueInput
}
/**
* BlogPost findFirst
*/
export type BlogPostFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the BlogPost
*/
select?: Prisma.BlogPostSelect<ExtArgs> | null
/**
* Omit specific fields from the BlogPost
*/
omit?: Prisma.BlogPostOmit<ExtArgs> | null
/**
* Filter, which BlogPost to fetch.
*/
where?: Prisma.BlogPostWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of BlogPosts to fetch.
*/
orderBy?: Prisma.BlogPostOrderByWithRelationInput | Prisma.BlogPostOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for BlogPosts.
*/
cursor?: Prisma.BlogPostWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` BlogPosts 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` BlogPosts.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of BlogPosts.
*/
distinct?: Prisma.BlogPostScalarFieldEnum | Prisma.BlogPostScalarFieldEnum[]
}
/**
* BlogPost findFirstOrThrow
*/
export type BlogPostFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the BlogPost
*/
select?: Prisma.BlogPostSelect<ExtArgs> | null
/**
* Omit specific fields from the BlogPost
*/
omit?: Prisma.BlogPostOmit<ExtArgs> | null
/**
* Filter, which BlogPost to fetch.
*/
where?: Prisma.BlogPostWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of BlogPosts to fetch.
*/
orderBy?: Prisma.BlogPostOrderByWithRelationInput | Prisma.BlogPostOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for searching for BlogPosts.
*/
cursor?: Prisma.BlogPostWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` BlogPosts 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` BlogPosts.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of BlogPosts.
*/
distinct?: Prisma.BlogPostScalarFieldEnum | Prisma.BlogPostScalarFieldEnum[]
}
/**
* BlogPost findMany
*/
export type BlogPostFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the BlogPost
*/
select?: Prisma.BlogPostSelect<ExtArgs> | null
/**
* Omit specific fields from the BlogPost
*/
omit?: Prisma.BlogPostOmit<ExtArgs> | null
/**
* Filter, which BlogPosts to fetch.
*/
where?: Prisma.BlogPostWhereInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
*
* Determine the order of BlogPosts to fetch.
*/
orderBy?: Prisma.BlogPostOrderByWithRelationInput | Prisma.BlogPostOrderByWithRelationInput[]
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
*
* Sets the position for listing BlogPosts.
*/
cursor?: Prisma.BlogPostWhereUniqueInput
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
*
* Take `±n` BlogPosts 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` BlogPosts.
*/
skip?: number
/**
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
*
* Filter by unique combinations of BlogPosts.
*/
distinct?: Prisma.BlogPostScalarFieldEnum | Prisma.BlogPostScalarFieldEnum[]
}
/**
* BlogPost create
*/
export type BlogPostCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the BlogPost
*/
select?: Prisma.BlogPostSelect<ExtArgs> | null
/**
* Omit specific fields from the BlogPost
*/
omit?: Prisma.BlogPostOmit<ExtArgs> | null
/**
* The data needed to create a BlogPost.
*/
data: Prisma.XOR<Prisma.BlogPostCreateInput, Prisma.BlogPostUncheckedCreateInput>
}
/**
* BlogPost createMany
*/
export type BlogPostCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to create many BlogPosts.
*/
data: Prisma.BlogPostCreateManyInput | Prisma.BlogPostCreateManyInput[]
}
/**
* BlogPost createManyAndReturn
*/
export type BlogPostCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the BlogPost
*/
select?: Prisma.BlogPostSelectCreateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the BlogPost
*/
omit?: Prisma.BlogPostOmit<ExtArgs> | null
/**
* The data used to create many BlogPosts.
*/
data: Prisma.BlogPostCreateManyInput | Prisma.BlogPostCreateManyInput[]
}
/**
* BlogPost update
*/
export type BlogPostUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the BlogPost
*/
select?: Prisma.BlogPostSelect<ExtArgs> | null
/**
* Omit specific fields from the BlogPost
*/
omit?: Prisma.BlogPostOmit<ExtArgs> | null
/**
* The data needed to update a BlogPost.
*/
data: Prisma.XOR<Prisma.BlogPostUpdateInput, Prisma.BlogPostUncheckedUpdateInput>
/**
* Choose, which BlogPost to update.
*/
where: Prisma.BlogPostWhereUniqueInput
}
/**
* BlogPost updateMany
*/
export type BlogPostUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* The data used to update BlogPosts.
*/
data: Prisma.XOR<Prisma.BlogPostUpdateManyMutationInput, Prisma.BlogPostUncheckedUpdateManyInput>
/**
* Filter which BlogPosts to update
*/
where?: Prisma.BlogPostWhereInput
/**
* Limit how many BlogPosts to update.
*/
limit?: number
}
/**
* BlogPost updateManyAndReturn
*/
export type BlogPostUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the BlogPost
*/
select?: Prisma.BlogPostSelectUpdateManyAndReturn<ExtArgs> | null
/**
* Omit specific fields from the BlogPost
*/
omit?: Prisma.BlogPostOmit<ExtArgs> | null
/**
* The data used to update BlogPosts.
*/
data: Prisma.XOR<Prisma.BlogPostUpdateManyMutationInput, Prisma.BlogPostUncheckedUpdateManyInput>
/**
* Filter which BlogPosts to update
*/
where?: Prisma.BlogPostWhereInput
/**
* Limit how many BlogPosts to update.
*/
limit?: number
}
/**
* BlogPost upsert
*/
export type BlogPostUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the BlogPost
*/
select?: Prisma.BlogPostSelect<ExtArgs> | null
/**
* Omit specific fields from the BlogPost
*/
omit?: Prisma.BlogPostOmit<ExtArgs> | null
/**
* The filter to search for the BlogPost to update in case it exists.
*/
where: Prisma.BlogPostWhereUniqueInput
/**
* In case the BlogPost found by the `where` argument doesn't exist, create a new BlogPost with this data.
*/
create: Prisma.XOR<Prisma.BlogPostCreateInput, Prisma.BlogPostUncheckedCreateInput>
/**
* In case the BlogPost was found with the provided `where` argument, update it with this data.
*/
update: Prisma.XOR<Prisma.BlogPostUpdateInput, Prisma.BlogPostUncheckedUpdateInput>
}
/**
* BlogPost delete
*/
export type BlogPostDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the BlogPost
*/
select?: Prisma.BlogPostSelect<ExtArgs> | null
/**
* Omit specific fields from the BlogPost
*/
omit?: Prisma.BlogPostOmit<ExtArgs> | null
/**
* Filter which BlogPost to delete.
*/
where: Prisma.BlogPostWhereUniqueInput
}
/**
* BlogPost deleteMany
*/
export type BlogPostDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Filter which BlogPosts to delete
*/
where?: Prisma.BlogPostWhereInput
/**
* Limit how many BlogPosts to delete.
*/
limit?: number
}
/**
* BlogPost without action
*/
export type BlogPostDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the BlogPost
*/
select?: Prisma.BlogPostSelect<ExtArgs> | null
/**
* Omit specific fields from the BlogPost
*/
omit?: Prisma.BlogPostOmit<ExtArgs> | null
}