@microsoft/teams.api
Version:
<p> <a href="https://www.npmjs.com/package/@microsoft/teams.api" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.api/latest" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.api?activeTab=code" t
100 lines (96 loc) • 4.13 kB
text/typescript
import { AIMessageEntity } from './ai-message-entity.mjs';
import { CitationIconName, CitationEntity } from './citation-entity.mjs';
export { CitationAppearance, CitationUsageInfo, Claim } from './citation-entity.mjs';
import { ClientInfoEntity } from './client-info-entity.mjs';
import { MentionEntity } from './mention-entity.mjs';
import { MessageEntity } from './message-entity.mjs';
import { ProductInfoEntity } from './product-info-entity.mjs';
import { QuotedReplyEntity } from './quoted-reply-entity.mjs';
export { QuotedReplyData } from './quoted-reply-entity.mjs';
import { SensitiveUsageEntity } from './sensitive-usage-entity.mjs';
export { SensitiveUsage } from './sensitive-usage-entity.mjs';
import { StreamInfoEntity } from './stream-info-entity.mjs';
import { TargetedMessageInfoEntity } from './targeted-message-info-entity.mjs';
export { SensitivityUsageInfo } from './sensitivity-usage-info.mjs';
import '../account.mjs';
import '../agentic-identity.mjs';
import '../conversation-type.mjs';
import '../membership-source.mjs';
import '../membership-source-types.mjs';
import '../membership-types.mjs';
import '../role.mjs';
/**
* Plan lifecycle operation.
*
* @experimental This API is in preview and may change in the future.
* Diagnostic: ExperimentalTeamsPlan
*/
type PlanType = 'start' | 'continue' | 'complete' | 'stop' | 'error';
/**
* Progress state of a Plan step.
*
* @experimental This API is in preview and may change in the future.
* Diagnostic: ExperimentalTeamsPlan
*/
type StepStatus = 'active' | 'proposed' | 'completed' | 'blocked' | 'error';
/**
* A source displayed alongside a step.
*
* @experimental This API is in preview and may change in the future.
* Diagnostic: ExperimentalTeamsPlan
*/
type StepSource = {
/** Display title of the source. */
title: string;
/** URL of the source. */
url: string;
/** Optional icon from the shared citation icon names. */
icon?: CitationIconName;
};
/**
* A versioned progress update; the application owns ordering and execution.
* Keep the same ID and increment the version whenever any step field changes.
*
* @experimental This API is in preview and may change in the future.
* Diagnostic: ExperimentalTeamsPlan
*/
type Step = {
/** Stable identifier for this step within the Plan. */
id: string;
/** Revision number; increment for every status, title, description, or source change. */
version: number;
/** Display title of the step. */
title: string;
/** Current progress state. */
status: StepStatus;
/** Optional details about the work or current state. */
description?: string;
/** Optional reference sources associated with this step. */
sources?: StepSource[];
};
/**
* Prompt-bound Plan metadata carried in an activity's entities.
* Start begins a Plan, continue adds or updates steps, and the remaining operations end it.
*
* @experimental This API is in preview and may change in the future.
* Diagnostic: ExperimentalTeamsPlan
*/
type PlanInfoEntity = {
/** Wire discriminator for Plan metadata. */
readonly type: 'planInfo';
/** Lifecycle operation to send. */
planType: PlanType;
/** Optional step updates; increment the version of every changed step. */
steps?: Step[];
};
/**
* Read the first Plan entity from an activity, if present.
*
* @experimental This API is in preview and may change in the future.
* Diagnostic: ExperimentalTeamsPlan
*/
declare function getPlanInfo(activity: {
entities?: readonly Entity[];
}): PlanInfoEntity | undefined;
type Entity = ClientInfoEntity | MentionEntity | MessageEntity | AIMessageEntity | StreamInfoEntity | PlanInfoEntity | CitationEntity | SensitiveUsageEntity | ProductInfoEntity | QuotedReplyEntity | TargetedMessageInfoEntity;
export { AIMessageEntity, CitationEntity, CitationIconName, ClientInfoEntity, type Entity, MentionEntity, MessageEntity, type PlanInfoEntity, type PlanType, ProductInfoEntity, QuotedReplyEntity, SensitiveUsageEntity, type Step, type StepSource, type StepStatus, StreamInfoEntity, TargetedMessageInfoEntity, getPlanInfo };