Skip to content

meetingStart event: Type definitions don't match runtime property names (camelCase vs PascalCase) #406

@uzimaru0000

Description

@uzimaru0000

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

  1. Create a Teams bot using @microsoft/teams.api
  2. Listen to the meetingStart event:
    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
    });
  3. Trigger a meeting start event
  4. Observe that meetingId and meetingUrl are undefined

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: Works

Expected Behavior

Either:

  1. The type definitions should match the runtime payload (use PascalCase), OR
  2. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions