@@ -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,58 +561,69 @@ 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 ?: {
548
- _ref : string ;
549
- _type : "reference" ;
550
- _weak ?: boolean ;
551
- [ internalGroqTypeReferenceTo ] ?: "page" ;
552
- } ;
553
- post ?: {
554
- _ref : string ;
555
- _type : "reference" ;
556
- _weak ?: boolean ;
557
- [ internalGroqTypeReferenceTo ] ?: "post" ;
558
- } ;
559
- openInNewTab ?: boolean ;
560
- _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
+ | {
561
581
_key : string ;
562
- } > ;
563
- level ?: number ;
564
- _type : "block" ;
565
- _key : string ;
566
- } > ;
567
- } > | 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 ?: {
606
+ _ref : string ;
607
+ _type : "reference" ;
608
+ _weak ?: boolean ;
609
+ [ internalGroqTypeReferenceTo ] ?: "page" ;
610
+ } ;
611
+ post ?: {
612
+ _ref : string ;
613
+ _type : "reference" ;
614
+ _weak ?: boolean ;
615
+ [ internalGroqTypeReferenceTo ] ?: "post" ;
616
+ } ;
617
+ openInNewTab ?: boolean ;
618
+ _type : "link" ;
619
+ _key : string ;
620
+ } > ;
621
+ level ?: number ;
622
+ _type : "block" ;
623
+ _key : string ;
624
+ } > ;
625
+ }
626
+ > | null ;
568
627
} | null ;
569
628
// Variable: allPostsQuery
570
629
// 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}, }
@@ -728,12 +787,12 @@ export type PagesSlugsResult = Array<{
728
787
import "@sanity/client" ;
729
788
declare module "@sanity/client" {
730
789
interface SanityQueries {
731
- " *[_type == \ "settings\ "][0]" : SettingsQueryResult ;
732
- " \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 _type == \ "link\ " => {\n \ "page\ ": page->slug.current,\n \ "post\ ": post->slug.current\n }\n }\n,\n }\n },\n }\n" : GetPageQueryResult ;
733
- " \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 ;
734
- " \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 ;
735
- " \n *[_type == \ "post\ " && slug.current == $slug] [0] {\n content[]{\n ...,\n markDefs[]{\n ...,\n \n link {\n ...,\n _type == \ "link\ " => {\n \ "page\ ": page->slug.current,\n \ "post\ ": post->slug.current\n }\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 ;
736
- " \n *[_type == \ "post\ " && defined(slug.current)]\n {\ "slug\ ": slug.current}\n" : PostPagesSlugsResult ;
737
- " \n *[_type == \ "page\ " && defined(slug.current)]\n {\ "slug\ ": slug.current}\n" : PagesSlugsResult ;
790
+ ' *[_type == "settings"][0]' : SettingsQueryResult ;
791
+ ' \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 _type == "link" => {\n "page": page->slug.current,\n "post": post->slug.current\n }\n }\n,\n }\n },\n }\n' : GetPageQueryResult ;
792
+ ' \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 ;
793
+ ' \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 ;
794
+ ' \n *[_type == "post" && slug.current == $slug] [0] {\n content[]{\n ...,\n markDefs[]{\n ...,\n \n link {\n ...,\n _type == "link" => {\n "page": page->slug.current,\n "post": post->slug.current\n }\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 ;
795
+ ' \n *[_type == "post" && defined(slug.current)]\n {"slug": slug.current}\n' : PostPagesSlugsResult ;
796
+ ' \n *[_type == "page" && defined(slug.current)]\n {"slug": slug.current}\n' : PagesSlugsResult ;
738
797
}
739
798
}
0 commit comments