UNPKG

@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.8 kB
import { IActivity } from '../activity.mjs'; import '../../models/channel-id.mjs'; import '../../models/account.mjs'; import '../../models/agentic-identity.mjs'; import '../../models/conversation-type.mjs'; import '../../models/membership-source.mjs'; import '../../models/membership-source-types.mjs'; import '../../models/membership-types.mjs'; import '../../models/role.mjs'; import '../../models/conversation/conversation-reference.mjs'; import '../../models/entity/index.mjs'; import '../../models/entity/ai-message-entity.mjs'; import '../../models/entity/message-entity.mjs'; import '../../models/entity/citation-entity.mjs'; import '../../models/entity/sensitivity-usage-info.mjs'; import '../../models/entity/client-info-entity.mjs'; import '../../models/entity/mention-entity.mjs'; import '../../models/entity/product-info-entity.mjs'; import '../../models/entity/quoted-reply-entity.mjs'; import '../../models/entity/sensitive-usage-entity.mjs'; import '../../models/entity/stream-info-entity.mjs'; import '../../models/entity/targeted-message-info-entity.mjs'; import '../../models/channel-data/index.mjs'; import '../../models/meeting/meeting-info.mjs'; import '../../models/meeting/meeting-details.mjs'; import '../../models/channel-data/app-info.mjs'; import '../../models/channel-data/channel-info.mjs'; import '../../models/channel-data/chat-info.mjs'; import '../../models/channel-data/feedback-loop.mjs'; import '../../models/channel-data/notification-info.mjs'; import '../../models/channel-data/on-behalf-of.mjs'; import '../../models/channel-data/reply-chain-info.mjs'; import '../../models/channel-data/settings.mjs'; import '../../models/channel-data/source-info.mjs'; import '../../models/channel-data/team-info.mjs'; import '../../models/channel-data/tenant-info.mjs'; 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 };