import type { DateAttributeGranularity, FilterContextItem, GenAIChatEffort, GenAIChatInteractionUserFeedback, GenAIChatInteractionUserVisualisation, GenAIObjectType, IAllowedRelationshipType, IAttribute, IAutomationAlert, IAutomationRecipient, IAutomationSchedule, IDashboard, IFilter, IGenAIChangeAnalysisParams, IGenAIChatInteraction, IGenAIChatReasoning, IGenAIChatRouting, IGenAICreatedVisualizations, IGenAIFoundObjects, IGenAIUserContext, IInsight, IMeasure, IMemoryItemDefinition, IMemoryItemMetadataObject, ISemanticQualityIssuesCalculation, ISemanticQualityReport, ISemanticSearchRelationship, ISemanticSearchResult, ISemanticSearchResultItem, IUser, Identifier, MemoryItemStrategy, ObjRef, ObjectOrigin, ObjectType } from "@gooddata/sdk-model"; import type { IFilterBaseOptions } from "../../common/filtering.js"; import type { IPagedResource } from "../../common/paging.js"; /** * GenAI-powered features. * @beta */ export interface IGenAIService { /** * Get a knowledge documents service for listing and managing knowledge documents. * @internal */ getKnowledgeDocuments(): IKnowledgeDocumentsService; /** * Get a semantic search query builder. */ getSemanticSearchQuery(): ISemanticSearchQuery; /** * Get a chatbot thread builder. */ getChatThread(): IChatThread; /** * Get a chatbot conversations builder. * * @param options - Optional scoping for the returned service. * When `isPreview` is `true`, list and create operations target the * caller's preview agent for the current workspace (backend agent id: * `{userId}-{workspaceId}-preview`). The preview agent must already * exist and be enabled — otherwise `create()` will fail. * @internal */ getChatConversations(options?: { isPreview?: boolean; }): IChatConversations; /** * Get a memory service for listing and managing memory items. * @internal */ getMemoryItems(): IMemoryItemsService; /** * Get Analytics Catalog related APIs. * @internal */ getAnalyticsCatalog(): IAnalyticsCatalogService; /** * Get semantic quality related APIs. * @internal */ getSemanticQuality(): ISemanticQualityService; /** * Get check if LLM is configured. */ getLlmConfigured(): Promise; /** * Generate an AI summary of a dashboard for the given visualizations and filter context. * @beta */ summarizeDashboard(request: IDashboardSummaryRequest, options?: { signal?: AbortSignal; }): Promise; } /** * Request payload for AI dashboard summarization. * @beta */ export interface IDashboardSummaryRequest { dashboardId: string; /** * Visualizations to include in the summary. `null` means include all visualizations on the dashboard. * Omit to let the backend decide. */ visualizations?: string[] | null; /** * Filter context to apply when generating the summary. `null` means use all dashboard filters. * Omit to let the backend decide. */ filterContext?: FilterContextItem[] | null; /** * Identifier of the dashboard tab to summarize. Omit to summarize the whole dashboard. */ tabId?: string | null; /** * Hint describing the desired output format of the generated summary. * Use it as an additional prompt. */ formatHint?: string | null; } /** * A visualization included in the AI dashboard summary. * @beta */ export interface IDashboardSummaryIncludedVisualization { visualizationId: string; title?: string | null; } /** * A visualization excluded from the AI dashboard summary, along with the reason. * @beta */ export interface IDashboardSummaryExcludedVisualization { visualizationId: string; reason: string; title?: string | null; } /** * Response payload for AI dashboard summarization. * @beta */ export interface IDashboardSummary { summary: string; filterContext: FilterContextItem[]; visualizationsIncluded: IDashboardSummaryIncludedVisualization[]; visualizationsExcluded: IDashboardSummaryExcludedVisualization[]; generatedAt: string; /** * Identifier of the dashboard tab the summary was generated for, when a tab was requested. */ tabId?: string; } /** * Semantic search query. * @beta */ export interface ISemanticSearchQuery { /** * Define a search term for the search. */ withQuestion(question: string): ISemanticSearchQuery; /** * Define a limit for the number of results returned by the search. */ withLimit(limit: number): ISemanticSearchQuery; /** * Define a list of object types to search for. */ withObjectTypes(types: GenAIObjectType[]): ISemanticSearchQuery; /** * Define whether the search should be deep or not. */ withDeepSearch(deepSearch: boolean): ISemanticSearchQuery; /** * Filter relationships and results based on allowed relationship type combinations. * When specified, only relationships matching the allowed types are returned. */ withAllowedRelationshipTypes(types: IAllowedRelationshipType[]): ISemanticSearchQuery; /** * The list of tags the returned objects must have. */ withIncludeTags(tags: string[]): ISemanticSearchQuery; /** * The list of tags the returned objects must not have. */ withExcludeTags(tags: string[]): ISemanticSearchQuery; /** * Execute the search. */ query(options?: { signal?: AbortSignal; }): Promise; } /** * Semantic search result payload. * @beta * @deprecated Use `ISemanticSearchResult` from \@gooddata/sdk-model instead. */ export type { ISemanticSearchResult }; /** * Chatbot thread. * @beta */ export interface IChatThread { /** * Load chat history for the chat thread. */ loadHistory(fromInteractionId?: string, options?: { signal?: AbortSignal; }): Promise; /** * Reset the chat thread history. */ reset(): Promise; /** * Save user feedback for the interaction. */ saveUserFeedback(interactionId: string, feedback: GenAIChatInteractionUserFeedback, userTextFeedback?: string): Promise; /** * Save user feedback for the interaction. */ saveUserVisualisation(interactionId: string, visualization: GenAIChatInteractionUserVisualisation): Promise; /** * Save render visualisation status for the interaction. */ saveRenderVisualisationStatus(interactionId: string, status: "SUCCESSFUL" | "UNEXPECTED_ERROR" | "TOO_MANY_DATA_POINTS" | "NO_DATA" | "NO_RESULTS"): Promise; /** * Add a user message to the chat thread. */ query(userMessage: string): IChatThreadQuery; } /** * Chatbot thread history. * @beta */ export interface IChatThreadHistory { interactions: IGenAIChatInteraction[]; threadId: string; } /** * Chatbot thread query builder. * @beta */ export interface IChatThreadQuery { /** * Define the limit for the number of search results returned by the chat thread. */ withSearchLimit(searchLimit: number): IChatThreadQuery; /** * Define the limit for the number of created visualization returned by the chat thread. */ withCreateLimit(createLimit: number): IChatThreadQuery; /** * Define the user context for the chat thread. * For example, what dashboard the user is currently looking at. */ withUserContext(userContext: IGenAIUserContext): IChatThreadQuery; /** * Define the object types for the chat thread. */ withObjectTypes(objectTypes?: GenAIObjectType[]): IChatThreadQuery; /** * Define allowed relationships for search queries in search */ withAllowedRelationshipTypes(relationshipTypes?: IAllowedRelationshipType[]): IChatThreadQuery; /** * Execute the chat thread. */ query(options?: { signal?: AbortSignal; }): Promise; /** * Execute the chat thread and stream the results. */ stream(): ReadableStream; } /** * Memory service. * @internal */ export interface IMemoryItemsService { /** * Get a memory items query builder. */ getMemoryItemsQuery(): IMemoryItemsQuery; /** * Create a new memory item. */ create(item: IMemoryItemDefinition): Promise; /** * Update an existing memory item. */ update(id: string, item: IMemoryItemDefinition): Promise; /** * Patch an existing memory item. */ patch(id: string, item: Partial): Promise; /** * Delete a memory item. */ delete(id: string): Promise; /** * Get memory created by users. */ getCreatedByUsers(): Promise; } /** * GenAI chat evaluation result. * @beta */ export interface IGenAIChatEvaluation { routing?: IGenAIChatRouting; reasoning?: IGenAIChatReasoning; textResponse?: string; /** @deprecated Use `semanticSearch` property instead. */ foundObjects?: IGenAIFoundObjects; semanticSearch?: ISemanticSearchResult; createdVisualizations?: IGenAICreatedVisualizations; changeAnalysisParams?: IGenAIChangeAnalysisParams; errorResponse?: string; chatHistoryThreadId?: string; chatHistoryInteractionId?: string; } /** * GenAI Analytics Catalog service. * @internal */ export interface IAnalyticsCatalogService { /** * Generates AI description for an Analytics Catalog object. */ generateDescription(request: IAnalyticsCatalogGenerateDescriptionRequest): Promise; /** * Generates AI title for an Analytics Catalog object. */ generateTitle(request: IAnalyticsCatalogGenerateTitleRequest): Promise; /** * Returns list of available tags in the workspace Analytics Catalog. */ getTags(): Promise; /** * Returns information about users who created objects in the workspace Analytics Catalog. */ getCreatedBy(): Promise; /** * Returns trending objects in the workspace Analytics Catalog. */ getTrendingObjects(): Promise; } /** * Supported object types for AI-generated Analytics Catalog description. * @internal */ export type AnalyticsCatalogGenerateDescriptionObjectType = Extract; /** * Supported object types for AI-generated Analytics Catalog title. * @internal */ export type AnalyticsCatalogGenerateTitleObjectType = AnalyticsCatalogGenerateDescriptionObjectType; /** * Request payload for AI-generated Analytics Catalog description. * @internal */ export interface IAnalyticsCatalogGenerateDescriptionRequest { objectType: AnalyticsCatalogGenerateDescriptionObjectType; objectId: string; } /** * Response payload for AI-generated Analytics Catalog description. * @internal */ export interface IAnalyticsCatalogGenerateDescriptionResponse { description?: string; note?: string; } /** * Request payload for AI-generated Analytics Catalog title. * @internal */ export interface IAnalyticsCatalogGenerateTitleRequest { objectType: AnalyticsCatalogGenerateTitleObjectType; objectId: string; } /** * Response payload for AI-generated Analytics Catalog title. * @internal */ export interface IAnalyticsCatalogGenerateTitleResponse { title?: string; note?: string; } /** * Analytics Catalog tags response. * @internal */ export interface IAnalyticsCatalogTags { tags: string[]; } /** * Analytics Catalog creators response. * @internal */ export interface IAnalyticsCatalogCreatedBy { reasoning: string; users: IUser[]; } /** * Analytics Catalog trending object. * @internal */ export interface IAnalyticsCatalogTrendingObject { id: string; type: string; title: string; tags: string[]; createdAt?: string; modifiedAt?: string; createdBy?: string; modifiedBy?: string; isHidden?: boolean; isHiddenFromKda?: boolean; visualizationUrl?: string; } /** * Analytics Catalog trending objects response. * @internal */ export interface IAnalyticsCatalogTrendingObjects { objects: IAnalyticsCatalogTrendingObject[]; } /** * Semantic quality service. * @internal */ export interface ISemanticQualityService { /** * Returns a report of quality issues detected in the workspace metadata. */ getQualityReport(options?: { signal?: AbortSignal; }): Promise; /** * Triggers asynchronous calculation of metadata quality issues. */ triggerQualityIssuesCalculation(): Promise; } /** * Memory items filter options. * @public */ export interface IMemoryItemsFilterOptions extends IFilterBaseOptions { strategy?: MemoryItemStrategy[]; excludeStrategy?: MemoryItemStrategy[]; isDisabled?: boolean; } /** * Memory created by users response. * @internal */ export interface IMemoryCreatedByUsers { reasoning: string; users: IUser[]; } /** * Service to query memory items. * * @public */ export interface IMemoryItemsQuery { /** * Sets number of memory items to return per page. * Default size: 50 * * @param size - desired max number of memory items per page must be a positive number * @returns memory items query */ withSize(size: number): IMemoryItemsQuery; /** * Sets starting page for the query. Backend WILL return no data if the page is greater than * total number of pages. * Default page: 0 * * @param page - zero indexed, must be non-negative * @returns memory items query */ withPage(page: number): IMemoryItemsQuery; /** * Sets filter for the query. * * @param filter - filter to apply * @returns memory items query */ withFilter(filter: IMemoryItemsFilterOptions): IMemoryItemsQuery; /** * Sets sorting for the query. * * @param sort - Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. * @returns memory items query */ withSorting(sort: string[]): IMemoryItemsQuery; /** * Sets include for the query. * * @param include - include to apply * @returns memory items query */ withInclude(include: string[]): IMemoryItemsQuery; /** * Sets origin for the query. * * @param origin - origin to apply. This is an open string union to allow platform-specific origin values in addition to the built-in literals. * @returns memory items query */ withOrigin(origin: ObjectOrigin | (string & {})): IMemoryItemsQuery; /** * Starts the query. * * @returns promise of first page of the results */ query(): Promise; } /** * Memory items query result. * @internal */ export type IMemoryItemsQueryResult = IPagedResource; /** * Metadata for a single knowledge document stored in the knowledge base. * @internal */ export interface IKnowledgeDocumentMetadata { id: string; filename: string; workspaceId?: string | null; title?: string | null; numChunks?: number; createdAt?: string; updatedAt?: string; createdBy?: string; updatedBy?: string; scopes: string[]; isDisabled?: boolean | null; } /** * Request payload for creating a knowledge document. * * Note: Uses the browser `File` API. This interface is only intended * for browser-based consumers. * * @internal */ export interface ICreateKnowledgeDocumentRequest { file: File; } /** * Request payload for upserting a knowledge document. * Creates the document if it does not exist, updates it otherwise. * * Note: Uses the browser `File` API. This interface is only intended * for browser-based consumers. * * @internal */ export interface IUpsertKnowledgeDocumentRequest { file: File; } /** * Response returned when a knowledge document is deleted. * @internal */ export interface IDeleteKnowledgeDocumentResponse { success: boolean; message: string; } /** * Request payload for patching a knowledge document. * Only provided fields will be updated. * @internal */ export interface IPatchKnowledgeDocumentRequest { isDisabled?: boolean; title?: string; scopes?: string[]; } /** * A single result chunk returned from a knowledge base semantic search. * @internal */ export interface IKnowledgeSearchResult { id: string; filename: string; content: string; score: number; chunkIndex: number; totalChunks: number; pageNumbers: number[]; workspaceId?: string | null; title?: string | null; scopes: string[]; } /** * Statistics about a knowledge base search operation. * @internal */ export interface IKnowledgeSearchStatistics { totalResults: number; averageSimilarityScore: number; } /** * Response from a knowledge base semantic search. * @internal */ export interface ISearchKnowledgeResponse { results: IKnowledgeSearchResult[]; statistics: IKnowledgeSearchStatistics; } /** * Options for a knowledge base semantic search. * @internal */ export interface ISearchKnowledgeOptions { limit?: number; minScore?: number; scopes?: string[]; } /** * Options for listing knowledge documents with cursor-based pagination. * @internal */ export interface IListKnowledgeDocumentsOptions { pageSize?: number; pageToken?: string; scopes?: string[]; /** * Filter documents by title/filename substring match. */ query?: string; /** * Filter documents by their enabled/disabled state. */ state?: "enabled" | "disabled"; } /** * A single page of knowledge documents returned by the list operation. * @internal */ export interface IKnowledgeDocumentsPage { documents: IKnowledgeDocumentMetadata[]; nextPageToken?: string | null; totalCount?: number | null; } /** * Service for listing and managing knowledge documents in the workspace knowledge base. * @internal */ export interface IKnowledgeDocumentsService { /** * List knowledge documents with optional cursor-based pagination. */ list(options?: IListKnowledgeDocumentsOptions): Promise; /** * Get metadata for a single knowledge document by its ID. */ get(documentId: string): Promise; /** * Upload a new knowledge document via multipart/form-data. * Throws on failure (e.g. HTTP 409 if a document with the same filename already exists). */ create(request: ICreateKnowledgeDocumentRequest): Promise; /** * Upload or replace a knowledge document via multipart/form-data. * Creates the document if it does not exist, updates it otherwise. */ upsert(request: IUpsertKnowledgeDocumentRequest): Promise; /** * Delete a knowledge document and all its chunks. */ delete(documentId: string): Promise; /** * Patch metadata of an existing knowledge document. * Only provided fields will be updated. */ patch(documentId: string, request: IPatchKnowledgeDocumentRequest): Promise; /** * Search the knowledge base using semantic similarity. */ search(query: string, options?: ISearchKnowledgeOptions): Promise; } /** * GenAI Chat Conversations. * @internal */ export interface IChatConversations { /** * Get conversations items query. */ getConversationItemsQuery(): IChatConversationItemsQuery; /** * Create a new conversation. */ create(options?: IChatConversationCreateOptions): Promise; /** * Updates the specified chat conversation with the provided updates. */ update(conversationId: string, update: Partial>): Promise; /** * Switches the agent used by the specified chat conversation. */ switchAgent(conversationId: string, agentId: string): Promise; /** * Delete a conversation. */ delete(conversationId: string): Promise; /** * Generate title for a conversation. */ generateTitle(conversationId: string): Promise; /** * Get conversation by id. */ getConversation(conversationId: string): Promise; /** * Get conversation thread by id. */ getConversationThread(conversationId: string): IChatConversationThread; } /** * Options for creating a chat conversation. * * @internal */ export type IChatConversationCreateOptions = { /** * Agent id to use for the conversation. */ agentId?: string; }; /** * Service to query conversations items. * * @public */ export interface IChatConversationItemsQuery { /** * Sets number of memory items to return per page. * Default size: 50 * * @param size - desired max number of memory items per page must be a positive number * @returns memory items query */ withSize(size: number): IChatConversationItemsQuery; /** * Sets starting page for the query. Backend WILL return no data if the page is greater than * total number of pages. * Default page: 0 * * @param page - zero indexed, must be non-negative * @returns memory items query */ withPage(page: number): IChatConversationItemsQuery; /** * Starts the query. * * @returns promise of first page of the results */ query(): Promise; } /** * Conversations items query result. * @internal */ export type IChatConversationItemsQueryResult = IPagedResource; /** * GenAI Chat Conversation. * @internal */ export type IChatConversation = { /** * Conversation id */ id: string; /** * Conversation creation date */ createdAt: string; /** * Conversation last update date */ updatedAt: string; /** * Conversation title */ title?: string; /** * Conversation pinned status */ pinned?: boolean; /** * Agent id used by this conversation. */ agentId?: string; }; /** * GenAI Chat Conversation error. * @internal */ export type IChatConversationError = { type: "error"; code: number; message: string; traceId?: string; reason?: (string & {}) | "METADATA_SYNC_IN_PROGRESS" | "METADATA_SYNC_REQUEST_ERROR" | "MODEL_NOT_COMPATIBLE"; }; /** * Is chat conversation error * @internal */ export declare function isChatConversationError(item: Partial): item is IChatConversationError; /** * GenAI Chat Conversation item * @internal */ export type IChatConversationItem = { id: string; type: "item"; responseId: string; replyTo?: string; createdAt: number; role: "user" | "assistant" | "tool" | "system"; content: IChatConversationContent; feedback?: IChatConversationFeedback; /** * Id of the interaction step this item belongs to. */ stepId?: string; /** * Details of the item's action. */ detail?: IChatConversationItemDetail; /** * Id of the agent the conversation was switched to. Only set on system items * that represent an agent-switch event. */ agentId?: string; /** * Id of the agent the conversation was switched from, when known. */ oldAgentId?: string; /** * Effort the message was sent with. Only set on user items that carried one. */ reasoningEffort?: GenAIChatEffort; }; /** * Is chat conversation item * @internal */ export declare function isChatConversationItem(item: unknown): item is IChatConversationItem; /** * Category of an interaction step. * @internal */ export type GenAIInteractionStepCategory = "applyMemory" | "skillRouting" | "knowledgeSearch" | "catalogSearch" | "metricQuery" | "composeAnswer"; /** * Token usage of an interaction step. * @internal */ export type IChatConversationInteractionStepTokens = { input?: number; output?: number; total?: number; }; /** * A single interaction step of a conversation turn. Conversation items link to it via `stepId`. * @internal */ export type IChatConversationInteractionStep = { /** Discriminator for the message stream. */ type: "interaction_step"; stepId: string; conversationId: string; responseId: string; /** Zero-based step order within the turn. */ stepIndex: number; /** Duration of the step. */ durationMs: number; tokens: IChatConversationInteractionStepTokens; /** Step start timestamp. */ createdAt: number; /** Backend trace id of the response this step belongs to, for support/debugging. */ traceId?: string; }; /** * Is chat conversation interaction step * @internal */ export declare function isChatConversationInteractionStep(item: unknown): item is IChatConversationInteractionStep; /** * Best-matching catalog object of a single object type. * @internal */ export type IChatConversationCatalogSearchMatch = { objectType: string; title: string; score: number; }; /** * Catalog search results of a single object type. * @internal */ export type IChatConversationSearchedGroup = { objectType: string; titles: string[]; }; /** * Details of a `catalogSearch` action. * @internal */ export type IChatConversationCatalogSearchDetail = { category: "catalogSearch"; /** Keywords the search looked for. */ query: string[]; /** Catalog types the search asked for. */ requestedTypes: string[]; /** Titles the search returned, grouped by object type. */ found: IChatConversationSearchedGroup[]; /** Best-matching object per type. Empty when the search does not rank results. */ used: IChatConversationCatalogSearchMatch[]; }; /** * Type of the output the turn produced. * @internal */ export type GenAIAnswerOutput = "text" | "visualization" | "dashboard" | "keyDriverAnalysis" | "whatIf" | "searchResults" | "alertProposal"; /** * Details of a `composeAnswer` action. * @internal */ export type IChatConversationComposeAnswerDetail = { category: "composeAnswer"; /** Model that generated the answer. */ modelId?: string; /** Number of follow-up actions the answer offered. */ suggestedActions?: number; /** Type of the output the turn produced. */ output?: GenAIAnswerOutput; }; /** * A knowledge document reached by an action. * @internal */ export type IChatConversationKnowledgeSearchDocument = { /** Document title, or its filename when it has none. */ title: string; /** Relevance score of the document. */ score?: number; }; /** * Details of a `knowledgeSearch` action. * @internal */ export type IChatConversationKnowledgeSearchDetail = { category: "knowledgeSearch"; /** What the action searched for. */ query?: string; /** Documents the action reached, best-scoring first. */ documents: IChatConversationKnowledgeSearchDocument[]; /** Title of the highest-scoring document. */ bestMatch?: string; }; /** * Details of a `skillRouting` action. * @internal */ export type IChatConversationSkillRoutingDetail = { category: "skillRouting"; /** Titles of the skills the model could choose from. */ available: string[]; /** Titles of the skills the action activated. */ activated: string[]; }; /** * How a memory item got into the turn's prompt: `always` is injected unconditionally, `auto` by * relevance. * @internal */ export type GenAIAppliedMemoryStrategy = "always" | "auto"; /** * One memory item the turn injected. * @internal */ export type IChatConversationAppliedMemoryItem = { title: string; strategy: GenAIAppliedMemoryStrategy; /** Relevance of the item, when it was selected by relevance. Absent for `always` items. */ score?: number; }; /** * Details of an `applyMemory` action. * @internal */ export type IChatConversationApplyMemoryDetail = { category: "applyMemory"; /** Memory items injected into the turn's prompt, in retrieval order. */ items: IChatConversationAppliedMemoryItem[]; /** Duration of the memory retrieval. */ durationMs?: number; }; /** * Details of a `metricQuery` action: what the query asked the data for, or how much came back. * * A single query surfaces as two of these — one for the request, one for the execution that ran * it — paired by `ref`, so the fields of either half are absent on the other. * @internal */ export type IChatConversationMetricQueryDetail = { category: "metricQuery"; /** * Internal handle pairing the query that built a visualization with the execution that ran * it. Never displayed. Absent on a query that was rejected, which has no partner. */ ref?: string; /** References of the metrics the query measured, as the query wrote them. */ metrics: string[]; /** References of the attributes and date dimensions the query grouped by. */ groupedBy: string[]; /** References of what the query filtered on. The conditions themselves are not carried. */ filteredBy: string[]; /** Title the query gave its visualization. */ visualization?: string; /** Rows the execution returned. */ resultRows?: number; /** Columns the execution returned. */ resultColumns?: number; }; /** * Details of a conversation item's action, discriminated by `category`. * @internal */ export type IChatConversationItemDetail = IChatConversationApplyMemoryDetail | IChatConversationCatalogSearchDetail | IChatConversationComposeAnswerDetail | IChatConversationKnowledgeSearchDetail | IChatConversationMetricQueryDetail | IChatConversationSkillRoutingDetail; /** * Is chat conversation catalog search detail * @internal */ export declare function isChatConversationCatalogSearchDetail(detail: unknown): detail is IChatConversationCatalogSearchDetail; /** * GenAI Chat Conversation content * @internal */ export type IChatConversationContent = IChatConversationTextContent | IChatConversationReasoningContent | IChatConversationMultipartContent | IChatConversationToolCallContent | IChatConversationToolResultContent; /** * GenAI Chat Conversation multipart content * @internal */ export type IChatConversationMultipartPart = IChatConversationTextContent | IChatConversationVisualisationContent | IChatConversationAlertProposalContent | IChatConversationKeyDriverAnalysisContent | IChatConversationWhatIfContent | IChatConversationSearchContent | IChatConversationDashboardContent; /** * GenAI Chat Conversation text content * @internal */ export type IChatConversationTextContent = { type: "text"; text: string; }; /** * Is chat conversation text content * @internal */ export declare function isChatConversationTextContent(content: IChatConversationContent): content is IChatConversationTextContent; /** * GenAI Chat Conversation reasoning content * @internal */ export type IChatConversationReasoningContent = { type: "reasoning"; summary: string; }; /** * Is chat conversation reasoning content * @internal */ export declare function isChatConversationReasoningContent(content: IChatConversationContent): content is IChatConversationReasoningContent; /** * GenAI Chat Conversation multipart content * @internal */ export type IChatConversationMultipartContent = { type: "multipart"; parts: IChatConversationMultipartPart[]; suggestions?: IChatSuggestions; }; /** * Is chat conversation multipart content * @internal */ export declare function isChatConversationMultipartContent(content: IChatConversationContent): content is IChatConversationMultipartContent; /** * GenAI Chat Conversation tool call content * @internal */ export type IChatConversationToolCallContent = { type: "toolCall"; id: string; callId: string; name: string; arguments: object; }; /** * Is chat conversation tool call content * @internal */ export declare function isChatConversationToolCallContent(content: IChatConversationContent): content is IChatConversationToolCallContent; /** * GenAI Chat Conversation tool result content * @internal */ export type IChatConversationToolResultContent = { type: "toolResult"; callId: string; result: string | object; }; /** * Is chat conversation tool result content * @internal */ export declare function isChatConversationToolResultContent(content: IChatConversationContent): content is IChatConversationToolResultContent; /** * GenAI Chat Conversation tool result content * @internal */ export type IChatConversationVisualisationContent = { type: "visualization"; visualization: IInsight | null; }; /** * Is chat conversation visualization content * @internal */ export declare function isChatConversationVisualisationContent(content: IChatConversationMultipartPart): content is IChatConversationVisualisationContent; /** * Represents a proposal for an alert * @internal */ export interface IAlertProposal { /** * Automation id. */ id?: string; /** * Title of the alert. */ title: string; /** * Description of the alert. */ description: string; /** * Alerting configuration of the automation. */ alert?: IAutomationAlert; /** * Schedule of the automation. */ schedule?: IAutomationSchedule; /** * Target notificationChannel that automation will trigger. * String with webhook (notificationChannel) id. */ notificationChannel?: string; /** * Title of the notification channel. */ notificationChannelTitle?: string; /** * Dashboard that automation is related to. */ dashboard?: { /** * Dashboard id. */ id?: Identifier; /** * Dashboard title. */ title?: string; }; /** * Recipients of the automation. */ recipients?: IAutomationRecipient[]; /** * For mode of the automation. */ forMode?: string; /** * For label of the automation. */ forLabel?: string; /** * Call to action of the automation. */ cta?: string; } /** * GenAI Chat Conversation proposal content * @internal */ export type IChatConversationAlertProposalContent = { type: "alertProposal"; alertProposal?: IAlertProposal; }; /** * Is chat conversation alert proposal content * @internal */ export declare function isChatConversationAlertProposalContent(content: IChatConversationMultipartPart): content is IChatConversationAlertProposalContent; /** * GenAI Chat Conversation key driver analysis definition * @internal */ export interface IChatKdaDefinition { measure: IMeasure; analyzedPeriod: string; referencePeriod: string; dateAttribute: IAttribute; dateGranularity: DateAttributeGranularity; filters: Array; } /** * GenAI Chat Conversation key driver content * @internal */ export type IChatConversationKeyDriverAnalysisContent = { type: "kda"; kda: IChatKdaDefinition; }; /** * Is chat conversation key driver analysis content * @internal */ export declare function isChatConversationKeyDriverAnalysisContent(content: IChatConversationMultipartPart): content is IChatConversationKeyDriverAnalysisContent; /** * GenAI Chat Conversation what if definition * @internal */ export interface IChatWhatIfDefinition { /** * List of what-if scenarios. */ scenarios: IChatWhatIfScenario[]; /** * Whether to include the baseline (unmodified) visualization. */ includeBaseline?: boolean; } /** * A single what-if scenario. * @internal */ export interface IChatWhatIfScenario { /** * Display label for the scenario. */ label: string; /** * Metric adjustments for this scenario. */ adjustments: IChatWhatIfAdjustment[]; } /** * A metric adjustment within a what-if scenario. * @internal */ export interface IChatWhatIfAdjustment { /** * Reference to the metric updated object. */ ref: ObjRef; /** * MAQL expression to use as the scenario override. */ scenarioMaql: string; } /** * GenAI Chat Conversation what if content * @internal */ export type IChatConversationWhatIfContent = { type: "whatIf"; whatIf: IChatWhatIfDefinition; }; /** * Is chat conversation key driver analysis content * @internal */ export declare function isChatConversationWhatIfContent(content: IChatConversationMultipartPart): content is IChatConversationWhatIfContent; /** * GenAI Chat Conversation search content * @internal */ export type IChatConversationSearchContent = { type: "searchResults"; searchResults: ISemanticSearchResultItem[]; relationships: ISemanticSearchRelationship[]; keywords: string[]; }; /** * Is chat conversation search content * @internal */ export declare function isChatConversationSearchContent(content: IChatConversationMultipartPart): content is IChatConversationSearchContent; /** * GenAI Chat Conversation dashboard content * @internal */ export type IChatConversationDashboardContent = { type: "dashboard"; dashboard: IDashboard | null; insights: IInsight[] | null; saved: boolean; }; /** * Is chat conversation dashboard content * @internal */ export declare function isChatConversationDashboardContent(content: IChatConversationMultipartPart): content is IChatConversationDashboardContent; /** * Feedback for a chat conversation item. * @internal */ export type IChatConversationFeedback = { type: "feedback"; feedback: GenAIChatInteractionUserFeedback; text?: string; createdAt: number; updatedAt: number; error?: string; }; /** * Chat conversation user feedback. * @internal */ export type IChatSuggestion = { label: string; query: string; }; /** * Represents AI-generated suggestions, which may include a follow-up question * and a list of actions with associated labels and queries. * @internal * */ export type IChatSuggestions = { followUpQuestion?: string; actions?: IChatSuggestion[]; }; /** * Chatbot conversations thread. * @internal */ export interface IChatConversationThread { /** * Load chat conversation history */ loadHistory(options?: { signal?: AbortSignal; }): Promise; /** * Reset the chat thread history. */ reset(): Promise; /** * Save user feedback for the interaction. */ saveFeedback(responseId: string, feedback: GenAIChatInteractionUserFeedback, userTextFeedback?: string): Promise; /** * Save user visualization for the interaction. */ resaveVisualisation(oldVisualizationId: string, newVisualizationId: string): Promise; /** * Add a user message to the chat thread. */ query(userMessage: string): IChatConversationThreadQuery; } /** * Chatbot conversation thread query builder. * @internal */ export interface IChatConversationThreadQuery { /** * Define the limit for the number of search results returned by the chat thread. */ withSearchLimit(searchLimit: number): IChatConversationThreadQuery; /** * Define the limit for the number of created visualization returned by the chat thread. */ withCreateLimit(createLimit: number): IChatConversationThreadQuery; /** * Define the user context for the chat thread. * For example, what dashboard the user is currently looking at. */ withUserContext(userContext: IGenAIUserContext): IChatConversationThreadQuery; /** * Define the object types for the chat thread. */ withObjectTypes(objectTypes?: GenAIObjectType[]): IChatConversationThreadQuery; /** * Define allowed relationships for search queries in search */ withAllowedRelationshipTypes(relationshipTypes?: IAllowedRelationshipType[]): IChatConversationThreadQuery; /** * Sets the include tags */ withIncludeTags(includeTags?: string[]): IChatConversationThreadQuery; /** * Sets the exclude tags */ withExcludeTags(excludeTags?: string[]): IChatConversationThreadQuery; /** * Define how much effort the LLM should spend reasoning about this message. */ withEffort(effort?: GenAIChatEffort): IChatConversationThreadQuery; /** * Execute the chat thread and stream the results. */ stream(): ReadableStream; } //# sourceMappingURL=index.d.ts.map