Replace parentPage with EndpointRelation
This commit is contained in:
parent
a50cee7636
commit
7d6f5ffb70
|
@ -66,7 +66,7 @@ export type EndpointFolder = Omit<EndpointFolderPreview, "translations"> & {
|
||||||
value: EndpointFilePreview;
|
value: EndpointFilePreview;
|
||||||
}
|
}
|
||||||
)[];
|
)[];
|
||||||
parentPages: EndpointSource[];
|
backlinks: EndpointRelation[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EndpointWebsiteConfig = {
|
export type EndpointWebsiteConfig = {
|
||||||
|
@ -191,7 +191,7 @@ export type EndpointPage = Omit<EndpointPagePreview, "translations"> & {
|
||||||
})[];
|
})[];
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedBy?: EndpointRecorderPreview;
|
updatedBy?: EndpointRecorderPreview;
|
||||||
parentPages: EndpointSource[];
|
backlinks: EndpointRelation[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EndpointCollectiblePreview = {
|
export type EndpointCollectiblePreview = {
|
||||||
|
@ -213,10 +213,7 @@ export type EndpointCollectiblePreview = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EndpointCollectible = Omit<
|
export type EndpointCollectible = Omit<EndpointCollectiblePreview, "translations"> & {
|
||||||
EndpointCollectiblePreview,
|
|
||||||
"translations"
|
|
||||||
> & {
|
|
||||||
translations: (EndpointCollectiblePreview["translations"][number] & {
|
translations: (EndpointCollectiblePreview["translations"][number] & {
|
||||||
description?: RichTextContent;
|
description?: RichTextContent;
|
||||||
})[];
|
})[];
|
||||||
|
@ -284,7 +281,7 @@ export type EndpointCollectible = Omit<
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
updatedBy?: EndpointRecorderPreview;
|
updatedBy?: EndpointRecorderPreview;
|
||||||
parentPages: EndpointSource[];
|
backlinks: EndpointRelation[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EndpointCollectibleScans = {
|
export type EndpointCollectibleScans = {
|
||||||
|
@ -334,7 +331,7 @@ export type EndpointCollectibleScans = {
|
||||||
insideFlapBack?: EndpointScanImage;
|
insideFlapBack?: EndpointScanImage;
|
||||||
};
|
};
|
||||||
pages: EndpointScanImage[];
|
pages: EndpointScanImage[];
|
||||||
parentPages: EndpointSource[];
|
backlinks: EndpointRelation[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EndpointCollectibleGallery = {
|
export type EndpointCollectibleGallery = {
|
||||||
|
@ -348,7 +345,7 @@ export type EndpointCollectibleGallery = {
|
||||||
description?: RichTextContent;
|
description?: RichTextContent;
|
||||||
}[];
|
}[];
|
||||||
images: EndpointPayloadImage[];
|
images: EndpointPayloadImage[];
|
||||||
parentPages: EndpointSource[];
|
backlinks: EndpointRelation[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EndpointCollectibleGalleryImage = {
|
export type EndpointCollectibleGalleryImage = {
|
||||||
|
@ -363,7 +360,7 @@ export type EndpointCollectibleGalleryImage = {
|
||||||
image: EndpointImage;
|
image: EndpointImage;
|
||||||
previousIndex?: string;
|
previousIndex?: string;
|
||||||
nextIndex?: string;
|
nextIndex?: string;
|
||||||
parentPages: EndpointSource[];
|
backlinks: EndpointRelation[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EndpointCollectibleScanPage = {
|
export type EndpointCollectibleScanPage = {
|
||||||
|
@ -378,7 +375,7 @@ export type EndpointCollectibleScanPage = {
|
||||||
image: EndpointScanImage;
|
image: EndpointScanImage;
|
||||||
previousIndex?: string;
|
previousIndex?: string;
|
||||||
nextIndex?: string;
|
nextIndex?: string;
|
||||||
parentPages: EndpointSource[];
|
backlinks: EndpointRelation[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EndpointScanImage = PayloadImage & {
|
export type EndpointScanImage = PayloadImage & {
|
||||||
|
@ -402,7 +399,7 @@ export type EndpointChronologyEvent = {
|
||||||
day?: number;
|
day?: number;
|
||||||
};
|
};
|
||||||
events: {
|
events: {
|
||||||
sources: EndpointSource[];
|
sources: EndpointRelation[];
|
||||||
translations: {
|
translations: {
|
||||||
language: string;
|
language: string;
|
||||||
sourceLanguage: string;
|
sourceLanguage: string;
|
||||||
|
@ -414,34 +411,30 @@ export type EndpointChronologyEvent = {
|
||||||
}[];
|
}[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EndpointSourcePreview = {
|
export type EndpointCollectibleRelationRange =
|
||||||
id: string;
|
|
||||||
slug: string;
|
|
||||||
translations: {
|
|
||||||
language: string;
|
|
||||||
pretitle?: string;
|
|
||||||
title: string;
|
|
||||||
subtitle?: string;
|
|
||||||
}[];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type EndpointSource =
|
|
||||||
| { type: "url"; url: string; label: string }
|
|
||||||
| {
|
|
||||||
type: "collectible";
|
|
||||||
collectible: EndpointSourcePreview;
|
|
||||||
range?:
|
|
||||||
| { type: "page"; page: number }
|
| { type: "page"; page: number }
|
||||||
| { type: "timestamp"; timestamp: string }
|
| { type: "timestamp"; timestamp: string }
|
||||||
| {
|
| {
|
||||||
type: "custom";
|
type: "custom";
|
||||||
translations: { language: string; note: string }[];
|
translations: { language: string; note: string }[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type EndpointRelation =
|
||||||
|
| {
|
||||||
|
type: Collections.Collectibles;
|
||||||
|
value: EndpointCollectiblePreview;
|
||||||
|
range?: EndpointCollectibleRelationRange;
|
||||||
}
|
}
|
||||||
| { type: "page"; page: EndpointSourcePreview }
|
| { type: Collections.Pages; value: EndpointPagePreview }
|
||||||
| { type: "folder"; folder: EndpointSourcePreview }
|
| { type: Collections.Folders; value: EndpointFolderPreview }
|
||||||
| { type: "scans"; collectible: EndpointSourcePreview }
|
| { type: Collections.Images; value: EndpointImagePreview }
|
||||||
| { type: "gallery"; collectible: EndpointSourcePreview };
|
| { type: Collections.Audios; value: EndpointAudioPreview }
|
||||||
|
| { type: Collections.Videos; value: EndpointVideoPreview }
|
||||||
|
| { type: Collections.ChronologyEvents; value: EndpointChronologyEvent }
|
||||||
|
| { type: Collections.Files; value: EndpointFilePreview }
|
||||||
|
| { type: Collections.Tags; value: EndpointTag }
|
||||||
|
| { type: Collections.Recorders; value: EndpointRecorderPreview }
|
||||||
|
| { type: "url"; url: string; label: string };
|
||||||
|
|
||||||
export type EndpointMediaPreview = {
|
export type EndpointMediaPreview = {
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -465,6 +458,7 @@ export type EndpointMedia = Omit<EndpointMediaPreview, "translations"> & {
|
||||||
description?: RichTextContent;
|
description?: RichTextContent;
|
||||||
})[];
|
})[];
|
||||||
credits: EndpointCredit[];
|
credits: EndpointCredit[];
|
||||||
|
backlinks: EndpointRelation[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EndpointImagePreview = EndpointMediaPreview & {
|
export type EndpointImagePreview = EndpointMediaPreview & {
|
||||||
|
|
Loading…
Reference in New Issue