thread-relation.ts 601 B

123456789101112131415161718192021222324252627
  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. }
  16. export type IThreadRelationHasId = IThreadRelation & HasObjectId;
  17. export type IApiv3DeleteThreadParams = {
  18. aiAssistantId: string
  19. threadRelationId: string;
  20. }