import type { ConversationAccount, ConversationReference } from '@microsoft/agents-activity'; import type { TurnContext } from '../../turnContext'; import { Conversation } from './conversation'; /** * Fluent builder for the `Conversation` class. * * @example * ```typescript * // Build from scratch * const conv = ConversationBuilder * .create('my-client-id', 'msteams') * .withUser('user-aad-id') * .withConversationId('19:channel@thread.skype') * .build() * * // Build from a live TurnContext * const conv = ConversationBuilder.fromContext(turnContext).build() * ``` */ export declare class ConversationBuilder { private readonly _agentClientId; private readonly _channelId; private readonly _serviceUrl; private _claims; private _reference; private constructor(); /** * Creates a new builder for the given agent and channel. * @param requestorId Optional: the client ID of the app making the request. * Becomes the `appid` claim, used in multi-tenant Azure Bot scenarios. */ static create(agentClientId: string, channelId: string, serviceUrl?: string, requestorId?: string): ConversationBuilder; /** * Creates a builder pre-populated from a live `TurnContext`. * Captures both the conversation reference and the JWT identity claims. */ static fromContext(context: TurnContext): ConversationBuilder; /** Sets `reference.user`. */ withUser(userId: string, userName?: string): this; /** Sets `reference.conversation.id`. */ withConversationId(id: string): this; /** Sets `reference.conversation` from a full `ConversationAccount`. */ withConversation(account: ConversationAccount): this; /** Sets `reference.activityId`. */ withActivityId(activityId: string): this; /** * Merges a partial `ConversationReference` into the current one. * Useful for overlaying externally-provided reference data without losing * fields set by earlier builder calls. */ withReference(ref: Partial): this; /** Builds the `Conversation`, auto-filling `serviceUrl` from channel defaults if needed. */ build(): Conversation; }