/** * --------------------------------------------------------------------------------- * This file has been generated by Sanity TypeGen. * Command: `sanity typegen generate` * * Any modifications made directly to this file will be overwritten the next time * the TypeScript definitions are generated. Please make changes to the Sanity * schema definitions and/or GROQ queries if you need to update these types. * * For more information on how to use Sanity TypeGen, visit the official documentation: * https://www.sanity.io/docs/sanity-typegen * --------------------------------------------------------------------------------- */ export declare const internalGroqTypeReferenceTo: unique symbol // Source: schema.json export type SanityImageAssetReference = { _ref: string _type: 'reference' _weak?: boolean [internalGroqTypeReferenceTo]?: 'sanity.imageAsset' } export type BlockContent = Array< | { children?: Array<{ marks?: Array text?: string _type: 'span' _key: string }> style?: 'normal' | 'h1' | 'h2' | 'h3' | 'h4' | 'blockquote' listItem?: 'bullet' markDefs?: Array<{ href?: string _type: 'link' _key: string }> level?: number _type: 'block' _key: string } | { asset?: SanityImageAssetReference media?: unknown hotspot?: SanityImageHotspot crop?: SanityImageCrop _type: 'image' _key: string } > export type Category = { _id: string _type: 'category' _createdAt: string _updatedAt: string _rev: string title?: string description?: string } export type AuthorReference = { _ref: string _type: 'reference' _weak?: boolean [internalGroqTypeReferenceTo]?: 'author' } export type CategoryReference = { _ref: string _type: 'reference' _weak?: boolean [internalGroqTypeReferenceTo]?: 'category' } export type Post = { _id: string _type: 'post' _createdAt: string _updatedAt: string _rev: string title?: string slug?: Slug author?: AuthorReference mainImage?: { asset?: SanityImageAssetReference media?: unknown hotspot?: SanityImageHotspot crop?: SanityImageCrop _type: 'image' } categories?: Array< { _key: string } & CategoryReference > publishedAt?: string body?: BlockContent } export type SanityImageCrop = { _type: 'sanity.imageCrop' top?: number bottom?: number left?: number right?: number } export type SanityImageHotspot = { _type: 'sanity.imageHotspot' x?: number y?: number height?: number width?: number } export type Author = { _id: string _type: 'author' _createdAt: string _updatedAt: string _rev: string name?: string slug?: Slug image?: { asset?: SanityImageAssetReference media?: unknown hotspot?: SanityImageHotspot crop?: SanityImageCrop _type: 'image' } bio?: Array<{ children?: Array<{ marks?: Array text?: string _type: 'span' _key: string }> style?: 'normal' listItem?: never markDefs?: Array<{ href?: string _type: 'link' _key: string }> level?: number _type: 'block' _key: string }> } export type Slug = { _type: 'slug' current?: string source?: string } export type SanityImagePaletteSwatch = { _type: 'sanity.imagePaletteSwatch' background?: string foreground?: string population?: number title?: string } export type SanityImagePalette = { _type: 'sanity.imagePalette' darkMuted?: SanityImagePaletteSwatch lightVibrant?: SanityImagePaletteSwatch darkVibrant?: SanityImagePaletteSwatch vibrant?: SanityImagePaletteSwatch dominant?: SanityImagePaletteSwatch lightMuted?: SanityImagePaletteSwatch muted?: SanityImagePaletteSwatch } export type SanityImageDimensions = { _type: 'sanity.imageDimensions' height?: number width?: number aspectRatio?: number } export type SanityImageMetadata = { _type: 'sanity.imageMetadata' location?: Geopoint dimensions?: SanityImageDimensions palette?: SanityImagePalette lqip?: string blurHash?: string hasAlpha?: boolean isOpaque?: boolean } export type SanityFileAsset = { _id: string _type: 'sanity.fileAsset' _createdAt: string _updatedAt: string _rev: string originalFilename?: string label?: string title?: string description?: string altText?: string sha1hash?: string extension?: string mimeType?: string size?: number assetId?: string uploadId?: string path?: string url?: string source?: SanityAssetSourceData } export type SanityAssetSourceData = { _type: 'sanity.assetSourceData' name?: string id?: string url?: string } export type SanityImageAsset = { _id: string _type: 'sanity.imageAsset' _createdAt: string _updatedAt: string _rev: string originalFilename?: string label?: string title?: string description?: string altText?: string sha1hash?: string extension?: string mimeType?: string size?: number assetId?: string uploadId?: string path?: string url?: string metadata?: SanityImageMetadata source?: SanityAssetSourceData } export type Geopoint = { _type: 'geopoint' lat?: number lng?: number alt?: number } export type AllSanitySchemaTypes = | SanityImageAssetReference | BlockContent | Category | AuthorReference | CategoryReference | Post | SanityImageCrop | SanityImageHotspot | Author | Slug | SanityImagePaletteSwatch | SanityImagePalette | SanityImageDimensions | SanityImageMetadata | SanityFileAsset | SanityAssetSourceData | SanityImageAsset | Geopoint // Source: src/queries/authorQueries.ts // Variable: allAuthorsQuery // Query: *[_type == "author"]{ _id, name, slug} export type AllAuthorsQueryResult = Array<{ _id: string name: string | null slug: Slug | null }> // Source: src/queries/authorQueries.ts // Variable: authorByIdQuery // Query: *[_type == "author" && _id == $id][0]{ _id, _type, name, slug, image, bio} export type AuthorByIdQueryResult = { _id: string _type: 'author' name: string | null slug: Slug | null image: { asset?: SanityImageAssetReference media?: unknown hotspot?: SanityImageHotspot crop?: SanityImageCrop _type: 'image' } | null bio: Array<{ children?: Array<{ marks?: Array text?: string _type: 'span' _key: string }> style?: 'normal' listItem?: never markDefs?: Array<{ href?: string _type: 'link' _key: string }> level?: number _type: 'block' _key: string }> | null } | null // Source: src/queries/authorQueries.ts // Variable: authorBySlugQuery // Query: *[_type == "author" && slug.current == $slug][0]{ _id, _type, name, slug, image, bio } export type AuthorBySlugQueryResult = { _id: string _type: 'author' name: string | null slug: Slug | null image: { asset?: SanityImageAssetReference media?: unknown hotspot?: SanityImageHotspot crop?: SanityImageCrop _type: 'image' } | null bio: Array<{ children?: Array<{ marks?: Array text?: string _type: 'span' _key: string }> style?: 'normal' listItem?: never markDefs?: Array<{ href?: string _type: 'link' _key: string }> level?: number _type: 'block' _key: string }> | null } | null // Source: src/queries/authorQueries.ts // Variable: authorWithImageQuery // Query: *[_type == "author"][0]{ _id, name, slug, image{ asset->{ _id, url, originalFilename, metadata{ dimensions{ width, height, aspectRatio }, palette{ dominant{ background, foreground } }, lqip } }, crop, hotspot } } export type AuthorWithImageQueryResult = { _id: string name: string | null slug: Slug | null image: { asset: { _id: string url: string | null originalFilename: string | null metadata: { dimensions: { width: number | null height: number | null aspectRatio: number | null } | null palette: { dominant: { background: string | null foreground: string | null } | null } | null lqip: string | null } | null } | null crop: SanityImageCrop | null hotspot: SanityImageHotspot | null } | null } | null // Source: src/queries/authorQueries.ts // Variable: authorWithBioQuery // Query: *[_type == "author" && slug.current == $slug][0]{ _id, _type, name, slug, bio[]{ ..., _type == "block" => { ..., children[]{ ... } } } } export type AuthorWithBioQueryResult = { _id: string _type: 'author' name: string | null slug: Slug | null bio: Array<{ children: Array<{ marks?: Array text?: string _type: 'span' _key: string }> | null style?: 'normal' listItem?: never markDefs?: Array<{ href?: string _type: 'link' _key: string }> level?: number _type: 'block' _key: string }> | null } | null // Source: src/queries/authorQueries.ts // Variable: authorsWithPostCountQuery // Query: *[_type == "author"]{ _id, name, slug, "postCount": count(*[_type == "post" && author._ref == ^._id]) } | order(postCount desc) export type AuthorsWithPostCountQueryResult = Array<{ _id: string name: string | null slug: Slug | null postCount: number }> // Source: src/queries/authorQueries.ts // Variable: authorWithRecentPostsQuery // Query: *[_type == "author" && _id == $authorId][0]{ _id, name, slug, image, "recentPosts": *[_type == "post" && author._ref == ^._id] | order(publishedAt desc)[0..4]{ _id, title, slug, publishedAt, "excerpt": array::join(string::split(pt::text(body), "")[0..150], "") + "..." } } export type AuthorWithRecentPostsQueryResult = { _id: string name: string | null slug: Slug | null image: { asset?: SanityImageAssetReference media?: unknown hotspot?: SanityImageHotspot crop?: SanityImageCrop _type: 'image' } | null recentPosts: Array<{ _id: string title: string | null slug: Slug | null publishedAt: string | null excerpt: string }> } | null // Source: src/queries/authorQueries.ts // Variable: authorDetailQuery // Query: *[_type == "author" && slug.current == $slug][0]{ _id, _type, name, slug, bio, image{ asset->{ _id, url, metadata{ dimensions, lqip, palette } } }, "postCount": count(*[_type == "post" && author._ref == ^._id]), "posts": *[_type == "post" && author._ref == ^._id] | order(publishedAt desc){ _id, title, slug, publishedAt } } export type AuthorDetailQueryResult = { _id: string _type: 'author' name: string | null slug: Slug | null bio: Array<{ children?: Array<{ marks?: Array text?: string _type: 'span' _key: string }> style?: 'normal' listItem?: never markDefs?: Array<{ href?: string _type: 'link' _key: string }> level?: number _type: 'block' _key: string }> | null image: { asset: { _id: string url: string | null metadata: { dimensions: SanityImageDimensions | null lqip: string | null palette: SanityImagePalette | null } | null } | null } | null postCount: number posts: Array<{ _id: string title: string | null slug: Slug | null publishedAt: string | null }> } | null // Source: src/queries/categoryQueries.ts // Variable: allCategoriesQuery // Query: *[_type == "category"]{ _id, title, description} export type AllCategoriesQueryResult = Array<{ _id: string title: string | null description: string | null }> // Source: src/queries/categoryQueries.ts // Variable: categoryByIdQuery // Query: *[_type == "category" && _id == $id][0]{ _id, _type, title, description} export type CategoryByIdQueryResult = { _id: string _type: 'category' title: string | null description: string | null } | null // Source: src/queries/categoryQueries.ts // Variable: categoryWithPostCountQuery // Query: *[_type == "category" && _id == $categoryId][0]{ _id, _type, title, description, "postCount": count(*[_type == "post" && $categoryId in categories[]._ref]) } export type CategoryWithPostCountQueryResult = { _id: string _type: 'category' title: string | null description: string | null postCount: number } | null // Source: src/queries/categoryQueries.ts // Variable: categoryWithPostsQuery // Query: *[_type == "category" && _id == $categoryId][0]{ _id, _type, title, description, "posts": *[_type == "post" && $categoryId in categories[]._ref] | order(publishedAt desc){ _id, title, slug, publishedAt, author->{ name, slug } } } export type CategoryWithPostsQueryResult = { _id: string _type: 'category' title: string | null description: string | null posts: Array<{ _id: string title: string | null slug: Slug | null publishedAt: string | null author: { name: string | null slug: Slug | null } | null }> } | null // Source: src/queries/categoryQueries.ts // Variable: categoryWithRecentPostsQuery // Query: *[_type == "category" && _id == $categoryId][0]{ _id, title, description, "recentPosts": *[_type == "post" && ^._id in categories[]._ref] | order(publishedAt desc)[0...$limit]{ _id, _type, title, slug, publishedAt, "excerpt": array::join(string::split(pt::text(body), "")[0..255], "") + "...", author->{ name, slug } } } export type CategoryWithRecentPostsQueryResult = { _id: string title: string | null description: string | null recentPosts: Array<{ _id: string _type: 'post' title: string | null slug: Slug | null publishedAt: string | null excerpt: string author: { name: string | null slug: Slug | null } | null }> } | null // Source: src/queries/categoryQueries.ts // Variable: popularCategoriesQuery // Query: *[_type == "category"]{ _id, title, description, "postCount": count(*[_type == "post" && ^._id in categories[]._ref]) } | order(postCount desc) export type PopularCategoriesQueryResult = Array<{ _id: string title: string | null description: string | null postCount: number }> // Source: src/queries/categoryQueries.ts // Variable: categoriesWithDescriptionQuery // Query: *[_type == "category" && defined(description)]{ _id, title, description, "postCount": count(*[_type == "post" && ^._id in categories[]._ref]) } export type CategoriesWithDescriptionQueryResult = Array<{ _id: string title: string | null description: string postCount: number }> // Source: src/queries/categoryQueries.ts // Variable: categoriesWithStatsQuery // Query: *[_type == "category"]{ _id, _type, title, description, "postCount": count(*[_type == "post" && ^._id in categories[]._ref]), "latestPost": *[_type == "post" && ^._id in categories[]._ref] | order(publishedAt desc)[0]{ title, slug, publishedAt } } | order(postCount desc) export type CategoriesWithStatsQueryResult = Array<{ _id: string _type: 'category' title: string | null description: string | null postCount: number latestPost: { title: string | null slug: Slug | null publishedAt: string | null } | null }> // Source: src/queries/postQueries.ts // Variable: allPostsQuery // Query: *[_type == "post"]{ _id, title, slug, publishedAt} export type AllPostsQueryResult = Array<{ _id: string title: string | null slug: Slug | null publishedAt: string | null }> // Source: src/queries/postQueries.ts // Variable: postByIdQuery // Query: *[_type == "post" && _id == $id][0]{ _id, _type, title, slug, body, publishedAt, mainImage} export type PostByIdQueryResult = { _id: string _type: 'post' title: string | null slug: Slug | null body: BlockContent | null publishedAt: string | null mainImage: { asset?: SanityImageAssetReference media?: unknown hotspot?: SanityImageHotspot crop?: SanityImageCrop _type: 'image' } | null } | null // Source: src/queries/postQueries.ts // Variable: postBySlugQuery // Query: *[_type == "post" && slug.current == $slug][0]{ _id, _type, title, slug, body, publishedAt, mainImage } export type PostBySlugQueryResult = { _id: string _type: 'post' title: string | null slug: Slug | null body: BlockContent | null publishedAt: string | null mainImage: { asset?: SanityImageAssetReference media?: unknown hotspot?: SanityImageHotspot crop?: SanityImageCrop _type: 'image' } | null } | null // Source: src/queries/postQueries.ts // Variable: recentPostsQuery // Query: *[_type == "post" && defined(publishedAt)] | order(publishedAt desc)[0...$limit]{ _id, title, slug, publishedAt, "excerpt": array::join(string::split(pt::text(body), "")[0..200], "") + "..." } export type RecentPostsQueryResult = Array<{ _id: string title: string | null slug: Slug | null publishedAt: string excerpt: string }> // Source: src/queries/postQueries.ts // Variable: postWithAuthorQuery // Query: *[_type == "post" && slug.current == $slug][0]{ _id, title, slug, publishedAt, author->{ _id, _type, name, slug, image{ asset->{ url } } } } export type PostWithAuthorQueryResult = { _id: string title: string | null slug: Slug | null publishedAt: string | null author: { _id: string _type: 'author' name: string | null slug: Slug | null image: { asset: { url: string | null } | null } | null } | null } | null // Source: src/queries/postQueries.ts // Variable: postWithCategoriesQuery // Query: *[_type == "post" && _id == $postId][0]{ _id, title, slug, categories[]->{ _id, _type, title, description } } export type PostWithCategoriesQueryResult = { _id: string title: string | null slug: Slug | null categories: Array<{ _id: string _type: 'category' title: string | null description: string | null }> | null } | null // Source: src/queries/postQueries.ts // Variable: postsByAuthorQuery // Query: *[_type == "post" && author._ref == $authorId] | order(publishedAt desc){ _id, title, slug, publishedAt, "excerpt": array::join(string::split(pt::text(body), "")[0..150], "") + "..." } export type PostsByAuthorQueryResult = Array<{ _id: string title: string | null slug: Slug | null publishedAt: string | null excerpt: string }> // Source: src/queries/postQueries.ts // Variable: postsByCategoryQuery // Query: *[_type == "post" && $categoryId in categories[]._ref] | order(publishedAt desc){ _id, title, slug, publishedAt } export type PostsByCategoryQueryResult = Array<{ _id: string title: string | null slug: Slug | null publishedAt: string | null }> // Source: src/queries/postQueries.ts // Variable: postDetailQuery // Query: *[_type == "post" && slug.current == $slug][0]{ _id, _type, _createdAt, _updatedAt, title, slug, body, publishedAt, mainImage{ asset->{ _id, url, metadata{ dimensions, palette, lqip } }, crop, hotspot }, author->{ _id, name, slug, image{ asset->{ url } } }, categories[]->{ _id, _type, title, description }, mainImage{ asset->{ _id, url, originalFilename, extension, size, metadata{ dimensions{ width, height, aspectRatio }, palette{ dominant{ background, foreground }, darkMuted{ background, foreground }, vibrant{ background, foreground } }, lqip, hasAlpha, isOpaque } }, crop, hotspot } } export type PostDetailQueryResult = { _id: string _type: 'post' _createdAt: string _updatedAt: string title: string | null slug: Slug | null body: BlockContent | null publishedAt: string | null mainImage: { asset: { _id: string url: string | null originalFilename: string | null extension: string | null size: number | null metadata: { dimensions: { width: number | null height: number | null aspectRatio: number | null } | null palette: { dominant: { background: string | null foreground: string | null } | null darkMuted: { background: string | null foreground: string | null } | null vibrant: { background: string | null foreground: string | null } | null } | null lqip: string | null hasAlpha: boolean | null isOpaque: boolean | null } | null } | null crop: SanityImageCrop | null hotspot: SanityImageHotspot | null } | null author: { _id: string name: string | null slug: Slug | null image: { asset: { url: string | null } | null } | null } | null categories: Array<{ _id: string _type: 'category' title: string | null description: string | null }> | null } | null // Source: src/queries/postQueries.ts // Variable: paginatedPostsQuery // Query: *[_type == "post" && defined(publishedAt)] | order(publishedAt desc)[$from...$to]{ _id, _type, title, slug, publishedAt, "excerpt": array::join(string::split(pt::text(body), "")[0..255], "") + "...", author->{ name, slug } } export type PaginatedPostsQueryResult = Array<{ _id: string _type: 'post' title: string | null slug: Slug | null publishedAt: string excerpt: string author: { name: string | null slug: Slug | null } | null }> // Source: src/queries/postQueries.ts // Variable: postsWithExcerptQuery // Query: *[_type == "post" && defined(body)] | order(publishedAt desc)[0..9]{ _id, title, slug, publishedAt, "excerpt": array::join(string::split(pt::text(body), "")[0..200], "") + "...", "fullText": pt::text(body), "wordCount": length(string::split(pt::text(body), " ")) } export type PostsWithExcerptQueryResult = Array<{ _id: string title: string | null slug: Slug | null publishedAt: string | null excerpt: string fullText: string wordCount: number }> // Source: src/queries/postQueries.ts // Variable: searchPostsQuery // Query: *[_type == "post" && title match $searchTerm]{ _id, title, slug, publishedAt, "excerpt": array::join(string::split(pt::text(body), "")[0..150], "") + "..." } export type SearchPostsQueryResult = Array<{ _id: string title: string | null slug: Slug | null publishedAt: string | null excerpt: string }> // Source: src/queries/postQueries.ts // Variable: postsByDateRangeQuery // Query: *[_type == "post" && publishedAt >= $startDate && publishedAt <= $endDate] | order(publishedAt desc){ _id, title, slug, publishedAt } export type PostsByDateRangeQueryResult = Array<{ _id: string title: string | null slug: Slug | null publishedAt: string | null }> // Source: src/queries/postQueries.ts // Variable: postWithRelatedQuery // Query: *[_type == "post" && _id == $postId][0]{ _id, title, slug, categories[]->{ _id, title }, "relatedPosts": *[ _type == "post" && _id != $postId && count((categories[]._ref)[@ in ^.^.categories[]._ref]) > 0 ][0..5]{ _id, title, slug, publishedAt, "sharedCategories": categories[_ref in ^.^.categories[]._ref]->{ title } } } export type PostWithRelatedQueryResult = { _id: string title: string | null slug: Slug | null categories: Array<{ _id: string title: string | null }> | null relatedPosts: Array<{ _id: string title: string | null slug: Slug | null publishedAt: string | null sharedCategories: Array<{ title: string | null }> | null }> } | null // Source: src/queries/postQueries.ts // Variable: featuredPostsQuery // Query: *[ _type == "post" && defined(mainImage.asset) && defined(publishedAt) && publishedAt > (now() - 60*60*24*30) ] | order(publishedAt desc)[0..5]{ _id, title, slug, publishedAt, mainImage{ asset->{ url, metadata{ dimensions, lqip } } }, author->{ name, slug }, "categoryTitles": categories[]->title } export type FeaturedPostsQueryResult = Array // Query TypeMap declare global { interface SanityQueries { '*[_type == "author"]{\n _id,\n name,\n slug\n}': AllAuthorsQueryResult '*[_type == "author" && _id == $id][0]{\n _id,\n _type,\n name,\n slug,\n image,\n bio\n}': AuthorByIdQueryResult '\n *[_type == "author" && slug.current == $slug][0]{\n _id,\n _type,\n name,\n slug,\n image,\n bio\n }\n': AuthorBySlugQueryResult '\n *[_type == "author"][0]{\n _id,\n name,\n slug,\n image{\n asset->{\n _id,\n url,\n originalFilename,\n metadata{\n dimensions{\n width,\n height,\n aspectRatio\n },\n palette{\n dominant{\n background,\n foreground\n }\n },\n lqip\n }\n },\n crop,\n hotspot\n }\n }\n': AuthorWithImageQueryResult '\n *[_type == "author" && slug.current == $slug][0]{\n _id,\n _type,\n name,\n slug,\n bio[]{\n ...,\n _type == "block" => {\n ...,\n children[]{\n ...\n }\n }\n }\n }\n': AuthorWithBioQueryResult '\n *[_type == "author"]{\n _id,\n name,\n slug,\n "postCount": count(*[_type == "post" && author._ref == ^._id])\n } | order(postCount desc)\n': AuthorsWithPostCountQueryResult '\n *[_type == "author" && _id == $authorId][0]{\n _id,\n name,\n slug,\n image,\n "recentPosts": *[_type == "post" && author._ref == ^._id] | order(publishedAt desc)[0..4]{\n _id,\n title,\n slug,\n publishedAt,\n "excerpt": array::join(string::split(pt::text(body), "")[0..150], "") + "..."\n }\n }\n': AuthorWithRecentPostsQueryResult '\n *[_type == "author" && slug.current == $slug][0]{\n \n _id,\n _type,\n name,\n slug,\n bio,\n image{\n asset->{\n _id,\n url,\n metadata{\n dimensions,\n lqip,\n palette\n }\n }\n }\n,\n "postCount": count(*[_type == "post" && author._ref == ^._id]),\n "posts": *[_type == "post" && author._ref == ^._id] | order(publishedAt desc){\n _id,\n title,\n slug,\n publishedAt\n }\n }\n': AuthorDetailQueryResult '*[_type == "category"]{\n _id,\n title,\n description\n}': AllCategoriesQueryResult '*[_type == "category" && _id == $id][0]{\n _id,\n _type,\n title,\n description\n}': CategoryByIdQueryResult '\n *[_type == "category" && _id == $categoryId][0]{\n \n _id,\n _type,\n title,\n description\n,\n "postCount": count(*[_type == "post" && $categoryId in categories[]._ref])\n }\n': CategoryWithPostCountQueryResult '\n *[_type == "category" && _id == $categoryId][0]{\n \n _id,\n _type,\n title,\n description\n,\n "posts": *[_type == "post" && $categoryId in categories[]._ref] | order(publishedAt desc){\n _id,\n title,\n slug,\n publishedAt,\n author->{\n name,\n slug\n }\n }\n }\n': CategoryWithPostsQueryResult '\n *[_type == "category" && _id == $categoryId][0]{\n _id,\n title,\n description,\n "recentPosts": *[_type == "post" && ^._id in categories[]._ref] | order(publishedAt desc)[0...$limit]{\n \n _id,\n _type,\n title,\n slug,\n publishedAt,\n "excerpt": array::join(string::split(pt::text(body), "")[0..255], "") + "..."\n,\n author->{\n name,\n slug\n }\n }\n }\n': CategoryWithRecentPostsQueryResult '\n *[_type == "category"]{\n _id,\n title,\n description,\n "postCount": count(*[_type == "post" && ^._id in categories[]._ref])\n } | order(postCount desc)\n': PopularCategoriesQueryResult '\n *[_type == "category" && defined(description)]{\n _id,\n title,\n description,\n "postCount": count(*[_type == "post" && ^._id in categories[]._ref])\n }\n': CategoriesWithDescriptionQueryResult '\n *[_type == "category"]{\n \n _id,\n _type,\n title,\n description\n,\n "postCount": count(*[_type == "post" && ^._id in categories[]._ref]),\n "latestPost": *[_type == "post" && ^._id in categories[]._ref] | order(publishedAt desc)[0]{\n title,\n slug,\n publishedAt\n }\n } | order(postCount desc)\n': CategoriesWithStatsQueryResult '*[_type == "post"]{\n _id,\n title,\n slug,\n publishedAt\n}': AllPostsQueryResult '*[_type == "post" && _id == $id][0]{\n _id,\n _type,\n title,\n slug,\n body,\n publishedAt,\n mainImage\n}': PostByIdQueryResult '\n *[_type == "post" && slug.current == $slug][0]{\n _id,\n _type,\n title,\n slug,\n body,\n publishedAt,\n mainImage\n }\n': PostBySlugQueryResult '\n *[_type == "post" && defined(publishedAt)] | order(publishedAt desc)[0...$limit]{\n _id,\n title,\n slug,\n publishedAt,\n "excerpt": array::join(string::split(pt::text(body), "")[0..200], "") + "..."\n }\n': RecentPostsQueryResult '\n *[_type == "post" && slug.current == $slug][0]{\n _id,\n title,\n slug,\n publishedAt,\n author->{\n \n _id,\n _type,\n name,\n slug\n,\n image{\n asset->{\n url\n }\n }\n }\n }\n': PostWithAuthorQueryResult '\n *[_type == "post" && _id == $postId][0]{\n _id,\n title,\n slug,\n categories[]->{\n \n _id,\n _type,\n title,\n description\n\n }\n }\n': PostWithCategoriesQueryResult '\n *[_type == "post" && author._ref == $authorId] | order(publishedAt desc){\n _id,\n title,\n slug,\n publishedAt,\n "excerpt": array::join(string::split(pt::text(body), "")[0..150], "") + "..."\n }\n': PostsByAuthorQueryResult '\n *[_type == "post" && $categoryId in categories[]._ref] | order(publishedAt desc){\n _id,\n title,\n slug,\n publishedAt\n }\n': PostsByCategoryQueryResult '\n *[_type == "post" && slug.current == $slug][0]{\n \n _id,\n _type,\n _createdAt,\n _updatedAt,\n title,\n slug,\n body,\n publishedAt,\n mainImage{\n asset->{\n _id,\n url,\n metadata{\n dimensions,\n palette,\n lqip\n }\n },\n crop,\n hotspot\n }\n,\n author->{\n _id,\n name,\n slug,\n image{\n asset->{\n url\n }\n }\n },\n categories[]->{\n \n _id,\n _type,\n title,\n description\n\n },\n mainImage{\n \n asset->{\n _id,\n url,\n originalFilename,\n extension,\n size,\n metadata{\n dimensions{\n width,\n height,\n aspectRatio\n },\n palette{\n dominant{\n background,\n foreground\n },\n darkMuted{\n background,\n foreground\n },\n vibrant{\n background,\n foreground\n }\n },\n lqip,\n hasAlpha,\n isOpaque\n }\n },\n crop,\n hotspot\n\n }\n }\n': PostDetailQueryResult '\n *[_type == "post" && defined(publishedAt)] | order(publishedAt desc)[$from...$to]{\n \n _id,\n _type,\n title,\n slug,\n publishedAt,\n "excerpt": array::join(string::split(pt::text(body), "")[0..255], "") + "..."\n,\n author->{\n name,\n slug\n }\n }\n': PaginatedPostsQueryResult '\n *[_type == "post" && defined(body)] | order(publishedAt desc)[0..9]{\n _id,\n title,\n slug,\n publishedAt,\n "excerpt": array::join(string::split(pt::text(body), "")[0..200], "") + "...",\n "fullText": pt::text(body),\n "wordCount": length(string::split(pt::text(body), " "))\n }\n': PostsWithExcerptQueryResult '\n *[_type == "post" && title match $searchTerm]{\n _id,\n title,\n slug,\n publishedAt,\n "excerpt": array::join(string::split(pt::text(body), "")[0..150], "") + "..."\n }\n': SearchPostsQueryResult '\n *[_type == "post" && publishedAt >= $startDate && publishedAt <= $endDate] | order(publishedAt desc){\n _id,\n title,\n slug,\n publishedAt\n }\n': PostsByDateRangeQueryResult '\n *[_type == "post" && _id == $postId][0]{\n _id,\n title,\n slug,\n categories[]->{\n _id,\n title\n },\n "relatedPosts": *[\n _type == "post" &&\n _id != $postId &&\n count((categories[]._ref)[@ in ^.^.categories[]._ref]) > 0\n ][0..5]{\n _id,\n title,\n slug,\n publishedAt,\n "sharedCategories": categories[_ref in ^.^.categories[]._ref]->{\n title\n }\n }\n }\n': PostWithRelatedQueryResult '\n *[\n _type == "post" &&\n defined(mainImage.asset) &&\n defined(publishedAt) &&\n publishedAt > (now() - 60*60*24*30)\n ] | order(publishedAt desc)[0..5]{\n _id,\n title,\n slug,\n publishedAt,\n mainImage{\n asset->{\n url,\n metadata{\n dimensions,\n lqip\n }\n }\n },\n author->{\n name,\n slug\n },\n "categoryTitles": categories[]->title\n }\n': FeaturedPostsQueryResult } } // Lets @sanity/client releases that predate the global registry read it too declare module '@sanity/client' { interface SanityQueries extends globalThis.SanityQueries {} }