refactor(core): Update AI-Assistant backend code to use DTOs and injectable config (no-changelog) (#12373)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-12-26 15:31:19 +01:00
committed by GitHub
parent f754b22a3f
commit 1d5e891a0d
16 changed files with 679 additions and 40 deletions

View File

@@ -1,5 +1,4 @@
import type { Scope } from '@n8n/permissions';
import type { AiAssistantSDK } from '@n8n_io/ai-assistant-sdk';
import type express from 'express';
import type {
BannerName,
@@ -574,15 +573,3 @@ export declare namespace NpsSurveyRequest {
// once some schema validation is added
type NpsSurveyUpdate = AuthenticatedRequest<{}, {}, unknown>;
}
// ----------------------------------
// /ai-assistant
// ----------------------------------
export declare namespace AiAssistantRequest {
type Chat = AuthenticatedRequest<{}, {}, AiAssistantSDK.ChatRequestPayload>;
type SuggestionPayload = { sessionId: string; suggestionId: string };
type ApplySuggestionPayload = AuthenticatedRequest<{}, {}, SuggestionPayload>;
type AskAiPayload = AuthenticatedRequest<{}, {}, AiAssistantSDK.AskAiRequestPayload>;
}