Removed MeiliDocumentRequest

This commit is contained in:
DrMint 2024-07-28 13:58:54 +02:00
parent caa79dee9e
commit 516fc03307
1 changed files with 41 additions and 79 deletions

View File

@ -11,45 +11,7 @@ import type {
EndpointChronologyEvent, EndpointChronologyEvent,
} from "../payload/endpoint-types"; } from "../payload/endpoint-types";
export type MeiliDocumentRequest = export type MeiliDocument = {
| {
slug: string;
type: Collections.Collectibles;
}
| {
slug: string;
type: Collections.Pages;
}
| {
slug: string;
type: Collections.Folders;
}
| {
id: string;
type: Collections.Videos;
}
| {
id: string;
type: Collections.Audios;
}
| {
id: string;
type: Collections.Images;
}
| {
id: string;
type: Collections.Files;
}
| {
id: string;
type: Collections.Recorders;
}
| {
id: string;
type: Collections.ChronologyEvents;
};
export type MeiliDocument = MeiliDocumentRequest & {
docId: string; docId: string;
distinctId: string; distinctId: string;
languages: string[]; languages: string[];
@ -58,46 +20,46 @@ export type MeiliDocument = MeiliDocumentRequest & {
updatedAt?: number; updatedAt?: number;
endpointCalled: string; endpointCalled: string;
} & ( } & (
| { | {
type: Collections.Collectibles; type: Collections.Collectibles;
data: EndpointCollectible; data: EndpointCollectible;
} }
| { | {
type: Collections.Pages; type: Collections.Pages;
data: EndpointPage; data: EndpointPage;
} }
| { | {
type: Collections.Folders; type: Collections.Folders;
data: EndpointFolder; data: EndpointFolder;
} }
| { | {
type: Collections.Videos; type: Collections.Videos;
data: EndpointVideo; data: EndpointVideo;
} }
| { | {
type: Collections.Audios; type: Collections.Audios;
data: EndpointAudio; data: EndpointAudio;
} }
| { | {
type: Collections.Images; type: Collections.Images;
data: EndpointImage; data: EndpointImage;
} }
| { | {
type: Collections.Files; type: Collections.Files;
data: EndpointFile; data: EndpointFile;
} }
| { | {
type: Collections.Recorders; type: Collections.Recorders;
data: EndpointRecorder; data: EndpointRecorder;
} }
| { | {
type: Collections.ChronologyEvents; type: Collections.ChronologyEvents;
data: { data: {
date: EndpointChronologyEvent["date"]; date: EndpointChronologyEvent["date"];
event: EndpointChronologyEvent["events"][number]; event: EndpointChronologyEvent["events"][number];
}; };
} }
); );
export type SearchResponse<T> = { export type SearchResponse<T> = {
hits: T[]; hits: T[];