Bug Description
The type definition for Account (in node_modules\@microsoft\teams.api\dist\models\account.d.ts) is either wrong or context.api.conversations.members.get has the wrong return type.
Account is defined as:
type Account<P = any> = {
readonly id: string;
readonly aadObjectId?: string;
readonly role: Role;
readonly name: string;
readonly properties?: P;
readonly membershipSources?: MembershipSource[];
};
but during runtime, context.api.conversations.members.get returns this (in an array):
email
givenName
id
name
objectId
surname
tenantId
userPrincipalName
userRole
Steps to Reproduce
app.on("install.add", async (context) => {
const members = await context.api.conversations.members(context.activity.conversation.id).get();
const user = members[0];
await context.send(new MessageActivity(`Hello ${user.givenName}, thanks for adding me! 🖐️`).addAiGenerated());
});
Expected Behavior
user.givenName is not an error
Actual Behavior
user.givenName is an error
SDK Version
2.0.4
Node.js Version
22.21.1
Additional Context
No response