@@ -176,11 +176,14 @@ export type Page = {
176
176
slug : Slug ;
177
177
heading : string ;
178
178
subheading ?: string ;
179
- pageBuilder ?: Array < {
180
- _key : string ;
181
- } & CallToAction | {
182
- _key : string ;
183
- } & InfoSection > ;
179
+ pageBuilder ?: Array <
180
+ | ( {
181
+ _key : string ;
182
+ } & CallToAction )
183
+ | ( {
184
+ _key : string ;
185
+ } & InfoSection )
186
+ > ;
184
187
} ;
185
188
186
189
export type Post = {
@@ -350,17 +353,21 @@ export type SanityAssistInstructionTask = {
350
353
351
354
export type SanityAssistTaskStatus = {
352
355
_type : "sanity.assist.task.status" ;
353
- tasks ?: Array < {
354
- _key : string ;
355
- } & SanityAssistInstructionTask > ;
356
+ tasks ?: Array <
357
+ {
358
+ _key : string ;
359
+ } & SanityAssistInstructionTask
360
+ > ;
356
361
} ;
357
362
358
363
export type SanityAssistSchemaTypeAnnotations = {
359
364
_type : "sanity.assist.schemaType.annotations" ;
360
365
title ?: string ;
361
- fields ?: Array < {
362
- _key : string ;
363
- } & SanityAssistSchemaTypeField > ;
366
+ fields ?: Array <
367
+ {
368
+ _key : string ;
369
+ } & SanityAssistSchemaTypeField
370
+ > ;
364
371
} ;
365
372
366
373
export type SanityAssistOutputType = {
@@ -413,18 +420,23 @@ export type SanityAssistInstructionUserInput = {
413
420
} ;
414
421
415
422
export type SanityAssistInstructionPrompt = Array < {
416
- children ?: Array < {
417
- marks ?: Array < string > ;
418
- text ?: string ;
419
- _type : "span" ;
420
- _key : string ;
421
- } | {
422
- _key : string ;
423
- } & SanityAssistInstructionFieldRef | {
424
- _key : string ;
425
- } & SanityAssistInstructionContext | {
426
- _key : string ;
427
- } & SanityAssistInstructionUserInput > ;
423
+ children ?: Array <
424
+ | {
425
+ marks ?: Array < string > ;
426
+ text ?: string ;
427
+ _type : "span" ;
428
+ _key : string ;
429
+ }
430
+ | ( {
431
+ _key : string ;
432
+ } & SanityAssistInstructionFieldRef )
433
+ | ( {
434
+ _key : string ;
435
+ } & SanityAssistInstructionContext )
436
+ | ( {
437
+ _key : string ;
438
+ } & SanityAssistInstructionUserInput )
439
+ > ;
428
440
style ?: "normal" ;
429
441
listItem ?: never ;
430
442
markDefs ?: null ;
@@ -445,22 +457,58 @@ export type SanityAssistInstruction = {
445
457
title ?: string ;
446
458
userId ?: string ;
447
459
createdById ?: string ;
448
- output ?: Array < {
449
- _key : string ;
450
- } & SanityAssistOutputField | {
451
- _key : string ;
452
- } & SanityAssistOutputType > ;
460
+ output ?: Array <
461
+ | ( {
462
+ _key : string ;
463
+ } & SanityAssistOutputField )
464
+ | ( {
465
+ _key : string ;
466
+ } & SanityAssistOutputType )
467
+ > ;
453
468
} ;
454
469
455
470
export type SanityAssistSchemaTypeField = {
456
471
_type : "sanity.assist.schemaType.field" ;
457
472
path ?: string ;
458
- instructions ?: Array < {
459
- _key : string ;
460
- } & SanityAssistInstruction > ;
473
+ instructions ?: Array <
474
+ {
475
+ _key : string ;
476
+ } & SanityAssistInstruction
477
+ > ;
461
478
} ;
462
479
463
- export type AllSanitySchemaTypes = SanityImagePaletteSwatch | SanityImagePalette | SanityImageDimensions | SanityFileAsset | Geopoint | CallToAction | Link | InfoSection | BlockContent | Page | Post | Person | Slug | Settings | SanityImageCrop | SanityImageHotspot | SanityImageAsset | SanityAssetSourceData | SanityImageMetadata | SanityAssistInstructionTask | SanityAssistTaskStatus | SanityAssistSchemaTypeAnnotations | SanityAssistOutputType | SanityAssistOutputField | SanityAssistInstructionContext | AssistInstructionContext | SanityAssistInstructionUserInput | SanityAssistInstructionPrompt | SanityAssistInstructionFieldRef | SanityAssistInstruction | SanityAssistSchemaTypeField ;
480
+ export type AllSanitySchemaTypes =
481
+ | SanityImagePaletteSwatch
482
+ | SanityImagePalette
483
+ | SanityImageDimensions
484
+ | SanityFileAsset
485
+ | Geopoint
486
+ | CallToAction
487
+ | Link
488
+ | InfoSection
489
+ | BlockContent
490
+ | Page
491
+ | Post
492
+ | Person
493
+ | Slug
494
+ | Settings
495
+ | SanityImageCrop
496
+ | SanityImageHotspot
497
+ | SanityImageAsset
498
+ | SanityAssetSourceData
499
+ | SanityImageMetadata
500
+ | SanityAssistInstructionTask
501
+ | SanityAssistTaskStatus
502
+ | SanityAssistSchemaTypeAnnotations
503
+ | SanityAssistOutputType
504
+ | SanityAssistOutputField
505
+ | SanityAssistInstructionContext
506
+ | AssistInstructionContext
507
+ | SanityAssistInstructionUserInput
508
+ | SanityAssistInstructionPrompt
509
+ | SanityAssistInstructionFieldRef
510
+ | SanityAssistInstruction
511
+ | SanityAssistSchemaTypeField ;
464
512
export declare const internalGroqTypeReferenceTo : unique symbol ;
465
513
// Source: ./sanity/lib/queries.ts
466
514
// Variable: settingsQuery
@@ -513,60 +561,74 @@ export type GetPageQueryResult = {
513
561
slug : Slug ;
514
562
heading : string ;
515
563
subheading : string | null ;
516
- pageBuilder : Array < {
517
- _key : string ;
518
- _type : "callToAction" ;
519
- heading : string ;
520
- text ?: string ;
521
- buttonText ?: string ;
522
- link : {
523
- _type : "link" ;
524
- linkType ?: "href" | "page" | "post" ;
525
- href ?: string ;
526
- page : string | null ;
527
- post : string | null ;
528
- openInNewTab ?: boolean ;
529
- } | null ;
530
- } | {
531
- _key : string ;
532
- _type : "infoSection" ;
533
- heading ?: string ;
534
- subheading ?: string ;
535
- content : Array < {
536
- children ?: Array < {
537
- marks ?: Array < string > ;
538
- text ?: string ;
539
- _type : "span" ;
564
+ pageBuilder : Array <
565
+ | {
540
566
_key : string ;
541
- } > ;
542
- style ?: "blockquote" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "normal" ;
543
- listItem ?: "bullet" | "number" ;
544
- markDefs : Array < {
545
- linkType ?: "href" | "page" | "post" ;
546
- href ?: string ;
547
- page : string | null ;
548
- post : string | null ;
549
- openInNewTab ?: boolean ;
550
- _type : "link" ;
567
+ _type : "callToAction" ;
568
+ heading : string ;
569
+ text ?: string ;
570
+ buttonText ?: string ;
571
+ link : {
572
+ _type : "link" ;
573
+ linkType ?: "href" | "page" | "post" ;
574
+ href ?: string ;
575
+ page : string | null ;
576
+ post : string | null ;
577
+ openInNewTab ?: boolean ;
578
+ } | null ;
579
+ }
580
+ | {
551
581
_key : string ;
552
- } > | null ;
553
- level ?: number ;
554
- _type : "block" ;
555
- _key : string ;
556
- } > | null ;
557
- } > | null ;
582
+ _type : "infoSection" ;
583
+ heading ?: string ;
584
+ subheading ?: string ;
585
+ content : Array < {
586
+ children ?: Array < {
587
+ marks ?: Array < string > ;
588
+ text ?: string ;
589
+ _type : "span" ;
590
+ _key : string ;
591
+ } > ;
592
+ style ?:
593
+ | "blockquote"
594
+ | "h1"
595
+ | "h2"
596
+ | "h3"
597
+ | "h4"
598
+ | "h5"
599
+ | "h6"
600
+ | "normal" ;
601
+ listItem ?: "bullet" | "number" ;
602
+ markDefs : Array < {
603
+ linkType ?: "href" | "page" | "post" ;
604
+ href ?: string ;
605
+ page : string | null ;
606
+ post : string | null ;
607
+ openInNewTab ?: boolean ;
608
+ _type : "link" ;
609
+ _key : string ;
610
+ } > | null ;
611
+ level ?: number ;
612
+ _type : "block" ;
613
+ _key : string ;
614
+ } > | null ;
615
+ }
616
+ > | null ;
558
617
} | null ;
559
618
// Variable: sitemapData
560
619
// 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
- } > ;
620
+ export type SitemapDataResult = Array <
621
+ | {
622
+ slug : string ;
623
+ _type : "page" ;
624
+ _updatedAt : string ;
625
+ }
626
+ | {
627
+ slug : string ;
628
+ _type : "post" ;
629
+ _updatedAt : string ;
630
+ }
631
+ > ;
570
632
// Variable: allPostsQuery
571
633
// 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}, }
572
634
export type AllPostsQueryResult = Array < {
@@ -718,13 +780,13 @@ export type PagesSlugsResult = Array<{
718
780
import "@sanity/client" ;
719
781
declare module "@sanity/client" {
720
782
interface SanityQueries {
721
- " *[_type == \ "settings\ "][0]" : SettingsQueryResult ;
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 ;
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 ;
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 ;
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 ;
727
- " \n *[_type == \ "post\ " && defined(slug.current)]\n {\ "slug\ ": slug.current}\n" : PostPagesSlugsResult ;
728
- " \n *[_type == \ "page\ " && defined(slug.current)]\n {\ "slug\ ": slug.current}\n" : PagesSlugsResult ;
783
+ ' *[_type == "settings"][0]' : SettingsQueryResult ;
784
+ ' \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 ;
785
+ ' \n *[_type == "page" || _type == "post" && defined(slug.current)] | order(_type asc) {\n "slug": slug.current,\n _type,\n _updatedAt,\n }\n' : SitemapDataResult ;
786
+ ' \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 ;
787
+ ' \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 ;
788
+ ' \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 ;
789
+ ' \n *[_type == "post" && defined(slug.current)]\n {"slug": slug.current}\n' : PostPagesSlugsResult ;
790
+ ' \n *[_type == "page" && defined(slug.current)]\n {"slug": slug.current}\n' : PagesSlugsResult ;
729
791
}
730
792
}
0 commit comments