Browse Source

Refactor Elasticsearch client types and add interfaces for better type management

Shun Miyazawa 9 months ago
parent
commit
35f5bcd467

+ 1 - 1
apps/app/src/server/service/search-delegator/elasticsearch-client-delegator/get-client.ts

@@ -6,7 +6,7 @@ import { ES7ClientDelegator } from './es7-client-delegator';
 import { ES8ClientDelegator } from './es8-client-delegator';
 import { ES9ClientDelegator } from './es9-client-delegator';
 
-export type ElasticSEarchClientDeletegator = ES7ClientDelegator | ES8ClientDelegator | ES9ClientDelegator;
+import type { ElasticSEarchClientDeletegator } from './interfaces';
 
 type GetDelegatorOptions = {
   version: 7;

+ 2 - 0
apps/app/src/server/service/search-delegator/elasticsearch-client-delegator/index.ts

@@ -0,0 +1,2 @@
+export * from './get-client';
+export * from './interfaces';

+ 6 - 0
apps/app/src/server/service/search-delegator/elasticsearch-client-delegator/interfaces.ts

@@ -0,0 +1,6 @@
+
+import type { ES7ClientDelegator } from './es7-client-delegator';
+import type { ES8ClientDelegator } from './es8-client-delegator';
+import type { ES9ClientDelegator } from './es9-client-delegator';
+
+export type ElasticSEarchClientDeletegator = ES7ClientDelegator | ES8ClientDelegator | ES9ClientDelegator;