-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
The type definitions for the meetingStart event use camelCase property names (id, joinUrl), but the actual runtime payload uses PascalCase property names (Id, JoinUrl). This causes TypeScript code to have type errors when accessing the correct runtime properties.
Environment
- Package:
@microsoft/teams.api(v2.0.4) - Runtime: Node.js with Teams AI SDK
- TypeScript: 5.4.5
Type Definition
The type definition at meeting-start.ts suggests properties should be camelCase:
interface MeetingStartValue {
id: string;
joinUrl: string;
// ... other properties
}Actual Runtime Payload
However, the actual payload received at runtime uses PascalCase:
{
"value": {
"Id": "...",
"JoinUrl": "https://teams.microsoft.com/l/meetup-join/...",
"MeetingType": "Scheduled",
"Title": "meeting",
"StartTime": "2025-11-19T10:01:14.9163598Z"
}
}Steps to Reproduce
- Create a Teams bot using
@microsoft/teams.api - Listen to the
meetingStartevent:app.on("meetingStart", async (ctx) => { const meetingId = ctx.activity.value.id; // TypeScript: OK, Runtime: undefined const meetingUrl = ctx.activity.value.joinUrl; // TypeScript: OK, Runtime: undefined });
- Trigger a meeting start event
- Observe that
meetingIdandmeetingUrlareundefined
Workaround
Access properties using PascalCase (causes TypeScript errors):
const meetingId = ctx.activity.value.Id; // TypeScript: Error, Runtime: Works
const meetingUrl = ctx.activity.value.JoinUrl; // TypeScript: Error, Runtime: WorksExpected Behavior
Either:
- The type definitions should match the runtime payload (use PascalCase), OR
- The runtime payload should match the type definitions (use camelCase)
Actual Behavior
There is a mismatch between type definitions and runtime, making it impossible to write type-safe code without errors.
Metadata
Metadata
Assignees
Labels
No labels