Skip to content

Restart porting ApiClient from 2.0#432

Merged
rido-min merged 11 commits intonext/corefrom
next/core-restartApiClients
Apr 22, 2026
Merged

Restart porting ApiClient from 2.0#432
rido-min merged 11 commits intonext/corefrom
next/core-restartApiClients

Conversation

@rido-min
Copy link
Copy Markdown
Member

This pull request makes significant improvements to the documentation and API mapping for the Teams Bot compatibility layer, focusing on clarifying the design and usage of the new ApiClient abstraction and updating the mapping for Teams and batch APIs. The changes include a comprehensive design document for ApiClient, a major rewrite of the CompatTeamsInfo API mapping, and updates to deprecated warnings and method routing. These updates provide clearer guidance for migrating to the new architecture and highlight areas needing further work.

ApiClient Design and Usage Documentation:

  • Added a detailed ApiClient-Design.md document describing the architecture, sub-client structure, DI patterns, scoping via ForServiceUrl, and delegation to core SDK clients. Includes diagrams, method mapping tables, and integration details for handler and compat layers.

CompatTeamsInfo API Mapping Updates:

  • Rewrote CompatTeamsInfo-API-Mapping.md to:
    • Clarify which methods are implemented, deprecated, or pending.
    • Update method routing to reflect usage of ApiClient sub-clients for meetings and teams, and identify methods still requiring a new BatchClient.
    • Add a migration checklist, summarize type conversion strategies, and clarify authentication/service URL handling.

Deprecation and Method Routing:

  • Updated documentation to remove deprecated warning icons and instead use explanatory notes for deprecated member/team methods, and clarified the preferred paged alternatives.

Testing and References:

  • Expanded testing documentation to specify test locations and required environment variables, and improved references to supporting documents and API sources.

Project File Maintenance:

  • Minor update to the core.slnx solution file to remove the Id attribute from the Microsoft.Teams.Bot.Compat.csproj entry, likely for consistency or tooling compatibility.

@rido-min rido-min added the CORE label Apr 17, 2026
});
```

**Do NOT use `ctx.TeamsBotApplication.Api.Conversations`** — that is the unscoped base client and will throw `NullReferenceException`.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MehakBindra we should talk about this, let's chat next week

@rido-min rido-min marked this pull request as ready for review April 22, 2026 15:58
rido-min and others added 3 commits April 22, 2026 11:58
Resolves conflicts by keeping Compat decoupled from TeamsBotApplication/Apps
(per PR #391). Removes duplicate CompatChannelAccount.cs (methods now in
CompatActivity.cs). Updates CompatAdapterTests to use BotApplication.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GetTeamChannelsAsync returns ConversationList, not IList<ChannelInfo>.
Update tests to use the correct type and access .Conversations property.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@rajan-chari rajan-chari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approaching the 2.1 FrontEnd from a compat pov. Thanks Rido.

@rido-min rido-min merged commit e03f301 into next/core Apr 22, 2026
6 checks passed
@rido-min rido-min deleted the next/core-restartApiClients branch April 22, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants