Browse Source

WIP: add type to bulk write

Yuki Takei 1 year ago
parent
commit
a6b202997f
1 changed files with 21 additions and 0 deletions
  1. 21 0
      apps/app/src/server/service/search-delegator/bulk-write.d.ts

+ 21 - 0
apps/app/src/server/service/search-delegator/bulk-write.d.ts

@@ -0,0 +1,21 @@
+export type BulkWriteCommand = {
+  index: {
+    _index: string,
+    _type: '_doc' | undefined,
+    _id: string,
+  },
+}
+
+export type BulkWriteBody = {
+  path: string;
+  body: string;
+  username?: string;
+  comment_count: number;
+  bookmark_count: number;
+  seenUsers_count: number;
+  like_count: number;
+  created_at: Date;
+  updated_at: Date;
+  tag_names?: string[];
+  commets?: string[];
+}