Updated meilisearch types
This commit is contained in:
parent
824f7085f9
commit
806543a487
|
@ -0,0 +1,3 @@
|
||||||
|
export enum MeiliIndexes {
|
||||||
|
DOCUMENT = "DOCUMENT",
|
||||||
|
}
|
|
@ -11,13 +11,53 @@ import type {
|
||||||
EndpointChronologyEvent,
|
EndpointChronologyEvent,
|
||||||
} from "../payload/endpoint-types";
|
} from "../payload/endpoint-types";
|
||||||
|
|
||||||
export type MeiliDocument = {
|
export type MeiliDocumentRequest =
|
||||||
meilid: string;
|
| {
|
||||||
|
slug: string;
|
||||||
|
type: Collections.Collectibles;
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
slug: string;
|
||||||
|
type: Collections.Pages;
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
slug: string;
|
||||||
|
type: Collections.Folders;
|
||||||
|
}
|
||||||
|
| {
|
||||||
id: string;
|
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;
|
||||||
|
distinctId: string;
|
||||||
languages: string[];
|
languages: string[];
|
||||||
title?: string;
|
title?: string;
|
||||||
content?: string;
|
content?: string;
|
||||||
updatedAt?: number;
|
updatedAt?: number;
|
||||||
|
endpointCalled: string;
|
||||||
} & (
|
} & (
|
||||||
| {
|
| {
|
||||||
type: Collections.Collectibles;
|
type: Collections.Collectibles;
|
||||||
|
|
|
@ -51,7 +51,7 @@ export const getSDKEndpoint = {
|
||||||
getLoginEndpoint: () => `/${Collections.Recorders}/login`,
|
getLoginEndpoint: () => `/${Collections.Recorders}/login`,
|
||||||
};
|
};
|
||||||
|
|
||||||
type PayloadSDKResponse<T> = {
|
export type PayloadSDKResponse<T> = {
|
||||||
data: T;
|
data: T;
|
||||||
endpointCalled: string;
|
endpointCalled: string;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue