chore: 添加TypeScript类型标注
This commit is contained in:
28
src/types/meilisearch.ts
Normal file
28
src/types/meilisearch.ts
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/**
|
||||||
|
* MeiliSearch配置类型定义
|
||||||
|
*/
|
||||||
|
export interface MeiliSearchConfig {
|
||||||
|
host: string;
|
||||||
|
apiKey: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MeiliSearch索引配置类型定义
|
||||||
|
*/
|
||||||
|
export interface MeiliIndexConfig {
|
||||||
|
collection_name: string;
|
||||||
|
index_name: string;
|
||||||
|
fields: Record<string, string>;
|
||||||
|
enabled: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MeiliSearch文档类型定义
|
||||||
|
*/
|
||||||
|
export interface MeiliDocs {
|
||||||
|
/** Directus集合id */
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
/** 由用户指定的fields */
|
||||||
|
[key: string]: unknown;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user