@@ -505,7 +505,7 @@ export type SettingsQueryResult = {
505
505
} ;
506
506
} | null ;
507
507
// Variable: getPageQuery
508
- // Query: *[_type == 'page' && slug.current == $slug][0]{ _id, _type, name, slug, heading, subheading, "pageBuilder": pageBuilder[]{ ..., _type == "callToAction" => { link { ..., _type == " link" => { "page": page->slug.current, "post": post->slug.current } } , } , _type == "infoSection" => { content[]{ ... , markDefs[]{ ..., _type == "link" => { "page": page->slug.current, "post": post->slug.current } } } }, }, }
508
+ // Query: *[_type == 'page' && slug.current == $slug][0]{ _id, _type, name, slug, heading, subheading, "pageBuilder": pageBuilder[]{ ..., _type == "callToAction" => { ..., link { ... , _type == "link" => { "page": page->slug.current, "post": post->slug.current } } , } }, }
509
509
export type GetPageQueryResult = {
510
510
_id : string ;
511
511
_type : "page" ;
@@ -556,6 +556,17 @@ export type GetPageQueryResult = {
556
556
} > | null ;
557
557
} > | null ;
558
558
} | null ;
559
+ // Variable: sitemapData
560
+ // Query: *[_type == "page" || _type == "post" && defined(slug.current)] | order(_type asc) { "slug": slug.current, _type, _updatedAt, }
561
+ export type SitemapDataResult = Array < {
562
+ slug : string ;
563
+ _type : "page" ;
564
+ _updatedAt : string ;
565
+ } | {
566
+ slug : string ;
567
+ _type : "post" ;
568
+ _updatedAt : string ;
569
+ } > ;
559
570
// Variable: allPostsQuery
560
571
// Query: *[_type == "post" && defined(slug.current)] | order(date desc, _updatedAt desc) { _id, "status": select(_originalId in path("drafts.**") => "draft", "published"), "title": coalesce(title, "Untitled"), "slug": slug.current, excerpt, coverImage, "date": coalesce(date, _updatedAt), "author": author->{firstName, lastName, picture}, }
561
572
export type AllPostsQueryResult = Array < {
@@ -708,7 +719,8 @@ import "@sanity/client";
708
719
declare module "@sanity/client" {
709
720
interface SanityQueries {
710
721
"*[_type == \"settings\"][0]" : SettingsQueryResult ;
711
- "\n *[_type == 'page' && slug.current == $slug][0]{\n _id,\n _type,\n name,\n slug,\n heading,\n subheading,\n \"pageBuilder\": pageBuilder[]{\n ...,\n _type == \"callToAction\" => {\n \n link {\n ...,\n \n _type == \"link\" => {\n \"page\": page->slug.current,\n \"post\": post->slug.current\n }\n\n }\n,\n },\n _type == \"infoSection\" => {\n content[]{\n ...,\n markDefs[]{\n ...,\n \n _type == \"link\" => {\n \"page\": page->slug.current,\n \"post\": post->slug.current\n }\n\n }\n }\n },\n },\n }\n" : GetPageQueryResult ;
722
+ "\n *[_type == 'page' && slug.current == $slug][0]{\n _id,\n _type,\n name,\n slug,\n heading,\n subheading,\n \"pageBuilder\": pageBuilder[]{\n ...,\n _type == \"callToAction\" => {\n ...,\n \n link {\n ...,\n \n _type == \"link\" => {\n \"page\": page->slug.current,\n \"post\": post->slug.current\n }\n\n }\n,\n }\n },\n }\n" : GetPageQueryResult ;
723
+ "\n *[_type == \"page\" || _type == \"post\" && defined(slug.current)] | order(_type asc) {\n \"slug\": slug.current,\n _type,\n _updatedAt,\n }\n" : SitemapDataResult ;
712
724
"\n *[_type == \"post\" && defined(slug.current)] | order(date desc, _updatedAt desc) {\n \n _id,\n \"status\": select(_originalId in path(\"drafts.**\") => \"draft\", \"published\"),\n \"title\": coalesce(title, \"Untitled\"),\n \"slug\": slug.current,\n excerpt,\n coverImage,\n \"date\": coalesce(date, _updatedAt),\n \"author\": author->{firstName, lastName, picture},\n\n }\n" : AllPostsQueryResult ;
713
725
"\n *[_type == \"post\" && _id != $skip && defined(slug.current)] | order(date desc, _updatedAt desc) [0...$limit] {\n \n _id,\n \"status\": select(_originalId in path(\"drafts.**\") => \"draft\", \"published\"),\n \"title\": coalesce(title, \"Untitled\"),\n \"slug\": slug.current,\n excerpt,\n coverImage,\n \"date\": coalesce(date, _updatedAt),\n \"author\": author->{firstName, lastName, picture},\n\n }\n" : MorePostsQueryResult ;
714
726
"\n *[_type == \"post\" && slug.current == $slug] [0] {\n content[]{\n ...,\n markDefs[]{\n ...,\n \n _type == \"link\" => {\n \"page\": page->slug.current,\n \"post\": post->slug.current\n }\n\n }\n },\n \n _id,\n \"status\": select(_originalId in path(\"drafts.**\") => \"draft\", \"published\"),\n \"title\": coalesce(title, \"Untitled\"),\n \"slug\": slug.current,\n excerpt,\n coverImage,\n \"date\": coalesce(date, _updatedAt),\n \"author\": author->{firstName, lastName, picture},\n\n }\n" : PostQueryResult ;
0 commit comments