@@ -176,14 +176,11 @@ export type Page = {
176
176
slug : Slug ;
177
177
heading : string ;
178
178
subheading ?: string ;
179
- pageBuilder ?: Array <
180
- | ( {
181
- _key : string ;
182
- } & CallToAction )
183
- | ( {
184
- _key : string ;
185
- } & InfoSection )
186
- > ;
179
+ pageBuilder ?: Array < {
180
+ _key : string ;
181
+ } & CallToAction | {
182
+ _key : string ;
183
+ } & InfoSection > ;
187
184
} ;
188
185
189
186
export type Post = {
@@ -353,21 +350,17 @@ export type SanityAssistInstructionTask = {
353
350
354
351
export type SanityAssistTaskStatus = {
355
352
_type : "sanity.assist.task.status" ;
356
- tasks ?: Array <
357
- {
358
- _key : string ;
359
- } & SanityAssistInstructionTask
360
- > ;
353
+ tasks ?: Array < {
354
+ _key : string ;
355
+ } & SanityAssistInstructionTask > ;
361
356
} ;
362
357
363
358
export type SanityAssistSchemaTypeAnnotations = {
364
359
_type : "sanity.assist.schemaType.annotations" ;
365
360
title ?: string ;
366
- fields ?: Array <
367
- {
368
- _key : string ;
369
- } & SanityAssistSchemaTypeField
370
- > ;
361
+ fields ?: Array < {
362
+ _key : string ;
363
+ } & SanityAssistSchemaTypeField > ;
371
364
} ;
372
365
373
366
export type SanityAssistOutputType = {
@@ -420,23 +413,18 @@ export type SanityAssistInstructionUserInput = {
420
413
} ;
421
414
422
415
export type SanityAssistInstructionPrompt = Array < {
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
- > ;
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 > ;
440
428
style ?: "normal" ;
441
429
listItem ?: never ;
442
430
markDefs ?: null ;
@@ -457,58 +445,22 @@ export type SanityAssistInstruction = {
457
445
title ?: string ;
458
446
userId ?: string ;
459
447
createdById ?: string ;
460
- output ?: Array <
461
- | ( {
462
- _key : string ;
463
- } & SanityAssistOutputField )
464
- | ( {
465
- _key : string ;
466
- } & SanityAssistOutputType )
467
- > ;
448
+ output ?: Array < {
449
+ _key : string ;
450
+ } & SanityAssistOutputField | {
451
+ _key : string ;
452
+ } & SanityAssistOutputType > ;
468
453
} ;
469
454
470
455
export type SanityAssistSchemaTypeField = {
471
456
_type : "sanity.assist.schemaType.field" ;
472
457
path ?: string ;
473
- instructions ?: Array <
474
- {
475
- _key : string ;
476
- } & SanityAssistInstruction
477
- > ;
458
+ instructions ?: Array < {
459
+ _key : string ;
460
+ } & SanityAssistInstruction > ;
478
461
} ;
479
462
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 ;
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 ;
512
464
export declare const internalGroqTypeReferenceTo : unique symbol ;
513
465
// Source: ./sanity/lib/queries.ts
514
466
// Variable: settingsQuery
@@ -561,69 +513,58 @@ export type GetPageQueryResult = {
561
513
slug : Slug ;
562
514
heading : string ;
563
515
subheading : string | null ;
564
- pageBuilder : Array <
565
- | {
566
- _key : string ;
567
- _type : "callToAction" ;
568
- heading : string ;
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 > ;
569
538
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
- | {
539
+ _type : "span" ;
540
+ _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" ;
581
561
_key : string ;
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 ;
562
+ } > ;
563
+ level ?: number ;
564
+ _type : "block" ;
565
+ _key : string ;
566
+ } > ;
567
+ } > | null ;
627
568
} | null ;
628
569
// Variable: allPostsQuery
629
570
// 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}, }
@@ -787,12 +728,12 @@ export type PagesSlugsResult = Array<{
787
728
import "@sanity/client" ;
788
729
declare module "@sanity/client" {
789
730
interface SanityQueries {
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 ;
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 ;
797
738
}
798
739
}
0 commit comments