import * as z from "zod/v3"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { AgentConfig, AgentConfig$Outbound } from "./agentconfig.js"; import { ChatMessageCitation, ChatMessageCitation$Outbound } from "./chatmessagecitation.js"; import { ChatMessageFragment, ChatMessageFragment$Outbound } from "./chatmessagefragment.js"; export declare const Author: { readonly User: "USER"; readonly GleanAi: "GLEAN_AI"; }; export type Author = OpenEnum; /** * Semantically groups content of a certain type. It can be used for purposes such as differential UI treatment. USER authored messages should be of type CONTENT and do not need `messageType` specified. */ export declare const MessageType: { /** * An intermediate state message for progress updates. */ readonly Update: "UPDATE"; /** * A user query or response message. */ readonly Content: "CONTENT"; /** * A message providing context in addition to the user query. */ readonly Context: "CONTEXT"; /** * Control signal for message streaming. */ readonly Control: "CONTROL"; /** * Control signal indicating the start of a message stream. */ readonly ControlStart: "CONTROL_START"; /** * Control signal indicating the end of a message stream. */ readonly ControlFinish: "CONTROL_FINISH"; /** * Control signal indicating the message stream was cancelled. */ readonly ControlCancel: "CONTROL_CANCEL"; /** * Indicates the message streaming needed to be retried. */ readonly ControlRetry: "CONTROL_RETRY"; /** * Fallback control signal for unrecognized control types. */ readonly ControlUnknown: "CONTROL_UNKNOWN"; /** * A debug message. Strictly used internally. */ readonly Debug: "DEBUG"; /** * A debug message to be used while debugging Action creation. */ readonly DebugExternal: "DEBUG_EXTERNAL"; /** * A message that describes an error while processing the request. */ readonly Error: "ERROR"; /** * A heading message used to distinguish different sections of the holistic response. */ readonly Heading: "HEADING"; /** * A warning message to be shown to the user. */ readonly Warning: "WARNING"; /** * A message used to for server-side tool auth/use, for request and response. */ readonly ServerTool: "SERVER_TOOL"; }; /** * Semantically groups content of a certain type. It can be used for purposes such as differential UI treatment. USER authored messages should be of type CONTENT and do not need `messageType` specified. */ export type MessageType = OpenEnum; /** * A message that is rendered as one coherent unit with one given sender. */ export type ChatMessage = { /** * Describes the agent that executes the request. */ agentConfig?: AgentConfig | undefined; author?: Author | undefined; /** * Deprecated: Use inline citations via ChatMessageFragment.citation instead. For detailed reference information, use ChatMessageCitation.referenceRanges. This field is still populated for backward compatibility. * * @deprecated field: Deprecated on 2026-02-06, removal scheduled for 2026-10-15: Use inline citations via ChatMessageFragment.citation and ChatMessageCitation.referenceRanges instead. This field is still populated for backward compatibility.. */ citations?: Array | undefined; /** * IDs of files uploaded in the message that are referenced to generate the answer. */ uploadedFileIds?: Array | undefined; /** * A list of rich data used to represent the response or formulate a request. These are linearly stitched together to support richer data formats beyond simple text. */ fragments?: Array | undefined; /** * Response timestamp of the message. */ ts?: string | undefined; /** * A unique server-side generated ID used to identify a message, automatically populated for any USER authored messages. */ messageId?: string | undefined; /** * Opaque tracking token generated server-side. */ messageTrackingToken?: string | undefined; /** * Semantically groups content of a certain type. It can be used for purposes such as differential UI treatment. USER authored messages should be of type CONTENT and do not need `messageType` specified. */ messageType?: MessageType | undefined; /** * Signals there are additional response fragments incoming. * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ hasMoreFragments?: boolean | undefined; }; /** @internal */ export declare const Author$inboundSchema: z.ZodType; /** @internal */ export declare const Author$outboundSchema: z.ZodType; /** @internal */ export declare const MessageType$inboundSchema: z.ZodType; /** @internal */ export declare const MessageType$outboundSchema: z.ZodType; /** @internal */ export declare const ChatMessage$inboundSchema: z.ZodType; /** @internal */ export type ChatMessage$Outbound = { agentConfig?: AgentConfig$Outbound | undefined; author: string; citations?: Array | undefined; uploadedFileIds?: Array | undefined; fragments?: Array | undefined; ts?: string | undefined; messageId?: string | undefined; messageTrackingToken?: string | undefined; messageType: string; hasMoreFragments?: boolean | undefined; }; /** @internal */ export declare const ChatMessage$outboundSchema: z.ZodType; export declare function chatMessageToJSON(chatMessage: ChatMessage): string; export declare function chatMessageFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=chatmessage.d.ts.map