import { LinkField , RichTextField , TimestampField , PrismicDocument , GroupField , RelationField , } from '@prismicio/types' ; import { SeriesPrismicDocument } from './series' ; import { articleFormatsFetchLinks , contributorFetchLinks , CommonPrismicFields , commonPrismicFieldsFetchLinks , FetchLinks , InferDataInterface , WithArticleFormat , WithExhibitionParents , WithSeasons , } from '.' ; import { EventPrismicDocument } from './events' ; export type WithSeries = { series : GroupField < { series : RelationField < 'series' , 'en-gb' , InferDataInterface < SeriesPrismicDocument > > ; } > ; } ; export const seriesFetchLink = [ 'series.title' , 'series.promo' , ] ; export const eventsFetchLinks = [ 'events.audiences' , 'events.schedule' , 'events.interpretations' , 'events.series' , 'events.times' , 'events.place' , ] ; export type ArticlePrismicDocument = PrismicDocument < { publishDate : TimestampField ; outroResearchItem : LinkField ; outroResearchLinkText : RichTextField ; outroReadItem : LinkField ; outroReadLinkText : RichTextField ; outroVisitItem : LinkField ; outroVisitLinkText : RichTextField ; } & WithSeries & WithSeasons & WithArticleFormat & WithExhibitionParents & CommonPrismicFields , 'articles' | 'webcomics' > ; export const articlesFetchLinks = [ ... commonPrismicFieldsFetchLinks , ... articleFormatsFetchLinks , ... contributorFetchLinks , ... seriesFetchLink , ... eventsFetchLinks , ] ;