thread-relation.ts 622 B

12345678910111213141516171819202122232425262728
  1. import type { IUser, Ref, HasObjectId } from '@growi/core';
  2. import type { AiAssistant } from './ai-assistant';
  3. export const ThreadType = {
  4. KNOWLEDGE: 'knowledge',
  5. EDITOR: 'editor',
  6. } as const;
  7. export type ThreadType = typeof ThreadType[keyof typeof ThreadType];
  8. export interface IThreadRelation {
  9. userId: Ref<IUser>
  10. aiAssistant: Ref<AiAssistant>
  11. threadId: string;
  12. title?: string;
  13. type: ThreadType;
  14. expiredAt: Date;
  15. isActive: boolean;
  16. }
  17. export type IThreadRelationHasId = IThreadRelation & HasObjectId;
  18. export type IApiv3DeleteThreadParams = {
  19. aiAssistantId: string
  20. threadRelationId: string;
  21. }