@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
156 lines (153 loc) • 7.77 kB
TypeScript
import { IActivity } from '../activity.js';
import '../../models/channel-id.js';
import '../../models/account.js';
import '../../models/agentic-identity.js';
import '../../models/conversation-type.js';
import '../../models/membership-source.js';
import '../../models/membership-source-types.js';
import '../../models/membership-types.js';
import '../../models/role.js';
import '../../models/conversation/conversation-reference.js';
import '../../models/entity/index.js';
import '../../models/entity/ai-message-entity.js';
import '../../models/entity/message-entity.js';
import '../../models/entity/citation-entity.js';
import '../../models/entity/sensitivity-usage-info.js';
import '../../models/entity/client-info-entity.js';
import '../../models/entity/mention-entity.js';
import '../../models/entity/product-info-entity.js';
import '../../models/entity/quoted-reply-entity.js';
import '../../models/entity/sensitive-usage-entity.js';
import '../../models/entity/stream-info-entity.js';
import '../../models/entity/targeted-message-info-entity.js';
import '../../models/channel-data/index.js';
import '../../models/meeting/meeting-info.js';
import '../../models/meeting/meeting-details.js';
import '../../models/channel-data/app-info.js';
import '../../models/channel-data/channel-info.js';
import '../../models/channel-data/chat-info.js';
import '../../models/channel-data/feedback-loop.js';
import '../../models/channel-data/notification-info.js';
import '../../models/channel-data/on-behalf-of.js';
import '../../models/channel-data/reply-chain-info.js';
import '../../models/channel-data/settings.js';
import '../../models/channel-data/source-info.js';
import '../../models/channel-data/team-info.js';
import '../../models/channel-data/tenant-info.js';
type AgentLifecycleValueType = 'AgenticUserIdentityCreated' | 'AgenticUserIdentityUpdated' | 'AgenticUserManagerUpdated' | 'AgenticUserEnabled' | 'AgenticUserDisabled' | 'AgenticUserDeleted' | 'AgenticUserUndeleted' | 'AgenticUserWorkloadOnboardingUpdated';
type AgentLifecycleEventType = 'agenticUserIdentityCreated' | 'agenticUserIdentityUpdated' | 'agenticUserManagerUpdated' | 'agenticUserEnabled' | 'agenticUserDisabled' | 'agenticUserDeleted' | 'agenticUserUndeleted' | 'agenticUserWorkloadOnboardingUpdated';
type AgentLifecycleManager = {
/**
* The Entra object ID of the manager.
*/
userId?: string;
/**
* The manager's email address.
*/
email?: string;
/**
* The manager's display name.
*/
displayName?: string;
};
type AgentLifecycleManagerRef = {
/**
* The Entra object ID of the manager.
*/
managerId?: string;
};
type AgentLifecycleUpdatedProperty = {
/**
* The name of the property that changed (for example, "Mail", "Alias", or "UserPrincipalName").
*/
propertyName: string;
/**
* The new value of the property.
*/
propertyValue?: string;
};
type AgentLifecycleValueBase = {
/**
* The tenant the Agentic User belongs to.
*/
tenantId?: string;
/**
* The Agentic User object ID.
*
* This and the fields below are activity wire fields, so they keep the
* service-owned JSON keys.
*/
agenticUserId?: string;
/**
* Service-owned agentic app instance ID.
*/
agenticAppInstanceId?: string;
/**
* Service-owned Agentic App Blueprint ID.
*/
agentIdentityBlueprintId?: string;
/**
* Monotonic version of the Agentic User state, when provided by the service.
*/
version?: number;
};
type AgenticUserIdentityCreatedValue = AgentLifecycleValueBase & {
eventType: 'agenticUserIdentityCreated';
manager?: AgentLifecycleManager;
expirationDateTime?: Date;
};
type AgenticUserIdentityUpdatedValue = AgentLifecycleValueBase & {
eventType: 'agenticUserIdentityUpdated';
updatedProperty: AgentLifecycleUpdatedProperty;
};
type AgenticUserManagerUpdatedValue = AgentLifecycleValueBase & {
eventType: 'agenticUserManagerUpdated';
manager?: AgentLifecycleManagerRef;
};
type AgenticUserEnabledValue = AgentLifecycleValueBase & {
eventType: 'agenticUserEnabled';
};
type AgenticUserDisabledValue = AgentLifecycleValueBase & {
eventType: 'agenticUserDisabled';
};
type AgenticUserDeletedValue = AgentLifecycleValueBase & {
eventType: 'agenticUserDeleted';
deletionReason?: string;
};
type AgenticUserUndeletedValue = AgentLifecycleValueBase & {
eventType: 'agenticUserUndeleted';
};
type AgenticUserWorkloadOnboardingUpdatedValue = AgentLifecycleValueBase & {
eventType: 'agenticUserWorkloadOnboardingUpdated';
workloadName?: string;
workloadOnboardingState?: string;
};
type UnknownAgentLifecycleValue = AgentLifecycleValueBase & {
eventType?: string;
[key: string]: unknown;
};
interface IAgentLifecycleEventActivityBase<TValueType extends string = string, TValue extends AgentLifecycleValueBase = AgentLifecycleValueBase> extends IActivity<'event'> {
/**
* Agentic User lifecycle activities arrive as event activities named "agentLifecycle".
*/
name: 'agentLifecycle';
/**
* The concrete lifecycle variant carried by the activity.
*/
valueType: TValueType;
/**
* The lifecycle payload.
*/
value: TValue;
}
type IAgenticUserIdentityCreatedEventActivity = IAgentLifecycleEventActivityBase<'AgenticUserIdentityCreated', AgenticUserIdentityCreatedValue>;
type IAgenticUserIdentityUpdatedEventActivity = IAgentLifecycleEventActivityBase<'AgenticUserIdentityUpdated', AgenticUserIdentityUpdatedValue>;
type IAgenticUserManagerUpdatedEventActivity = IAgentLifecycleEventActivityBase<'AgenticUserManagerUpdated', AgenticUserManagerUpdatedValue>;
type IAgenticUserEnabledEventActivity = IAgentLifecycleEventActivityBase<'AgenticUserEnabled', AgenticUserEnabledValue>;
type IAgenticUserDisabledEventActivity = IAgentLifecycleEventActivityBase<'AgenticUserDisabled', AgenticUserDisabledValue>;
type IAgenticUserDeletedEventActivity = IAgentLifecycleEventActivityBase<'AgenticUserDeleted', AgenticUserDeletedValue>;
type IAgenticUserUndeletedEventActivity = IAgentLifecycleEventActivityBase<'AgenticUserUndeleted', AgenticUserUndeletedValue>;
type IAgenticUserWorkloadOnboardingUpdatedEventActivity = IAgentLifecycleEventActivityBase<'AgenticUserWorkloadOnboardingUpdated', AgenticUserWorkloadOnboardingUpdatedValue>;
type IUnknownAgentLifecycleEventActivity = IAgentLifecycleEventActivityBase<string & {}, UnknownAgentLifecycleValue>;
type AgentLifecycleEventActivity = IAgenticUserIdentityCreatedEventActivity | IAgenticUserIdentityUpdatedEventActivity | IAgenticUserManagerUpdatedEventActivity | IAgenticUserEnabledEventActivity | IAgenticUserDisabledEventActivity | IAgenticUserDeletedEventActivity | IAgenticUserUndeletedEventActivity | IAgenticUserWorkloadOnboardingUpdatedEventActivity | IUnknownAgentLifecycleEventActivity;
export type { AgentLifecycleEventActivity, AgentLifecycleEventType, AgentLifecycleManager, AgentLifecycleManagerRef, AgentLifecycleUpdatedProperty, AgentLifecycleValueBase, AgentLifecycleValueType, AgenticUserDeletedValue, AgenticUserDisabledValue, AgenticUserEnabledValue, AgenticUserIdentityCreatedValue, AgenticUserIdentityUpdatedValue, AgenticUserManagerUpdatedValue, AgenticUserUndeletedValue, AgenticUserWorkloadOnboardingUpdatedValue, IAgentLifecycleEventActivityBase, IAgenticUserDeletedEventActivity, IAgenticUserDisabledEventActivity, IAgenticUserEnabledEventActivity, IAgenticUserIdentityCreatedEventActivity, IAgenticUserIdentityUpdatedEventActivity, IAgenticUserManagerUpdatedEventActivity, IAgenticUserUndeletedEventActivity, IAgenticUserWorkloadOnboardingUpdatedEventActivity, IUnknownAgentLifecycleEventActivity, UnknownAgentLifecycleValue };