import { MembershipSource } from './membership-source.mjs'; import { Role } from './role.mjs'; import './membership-source-types.mjs'; import './membership-types.mjs'; type Account

= { readonly id: string; readonly aadObjectId?: string; readonly role: Role; /** * The type of the account. Possible values: 'person', 'bot', 'channel', 'team', 'tag'. * Primarily present on mention entities for non-person accounts. Absent for regular person accounts. */ readonly type?: string; readonly name?: string; readonly properties?: P; readonly membershipSources?: MembershipSource[]; /** * Indicates if this account is the target of a targeted message. * * @experimental This API is in preview and may change in the future. * Diagnostic: ExperimentalTeamsTargeted */ isTargeted?: boolean; }; /** * Represents a Teams channel account, extending the basic channel account with Teams-specific properties. * This is used to represent a user or bot in Microsoft Teams conversations. * @see https://learn.microsoft.com/en-us/dotnet/api/microsoft.bot.schema.teams.teamschannelaccount */ type TeamsChannelAccount

= { /** * @member {string} [id] Unique identifier for the user or bot in the channel. */ readonly id: string; /** * @member {string} [name] Display-friendly name of the user or bot. */ readonly name: string; /** * @member {string} [aadObjectId] The user's Object ID in Azure Active Directory (AAD). */ readonly aadObjectId?: string; /** * @member {string} [userRole] Role of the user in the conversation. */ readonly userRole?: string; /** * @member {string} [givenName] Given name (first name) of the user. */ readonly givenName?: string; /** * @member {string} [surname] Surname (last name) of the user. */ readonly surname?: string; /** * @member {string} [email] Email address of the user. */ readonly email?: string; /** * @member {string} [userPrincipalName] Unique User Principal Name (UPN) for the user in AAD. */ readonly userPrincipalName?: string; /** * @member {string} [tenantId] Unique identifier for the user's Azure AD tenant. */ readonly tenantId?: string; /** * @member {P} [properties] Custom properties associated with the account. */ readonly properties?: P; }; /** * The backend inconsistently populates either `objectId` or `aadObjectId` depending on the endpoint: * - `GET /v3/conversations/{id}/members` (non-paginated) → `objectId` * - `GET /v3/conversations/{id}/members/{memberId}` → `aadObjectId` * - `GET /v3/conversations/{id}/pagedMembers` → `aadObjectId` * - `GET /v3/conversations/{id}/activities/{id}/members` → `objectId` * * This function normalizes both into `aadObjectId`. */ declare function resolveAadObjectId(data: any): TeamsChannelAccount; type ConversationAccount = { readonly id: string; readonly tenantId?: string; readonly conversationType: 'personal' | 'groupChat' | Omit; readonly name?: string; readonly isGroup?: boolean; }; export { type Account, type ConversationAccount, type TeamsChannelAccount, resolveAadObjectId };