## Summary Implement the MSG91 SMS provider inside `src/SmsBridge/Providers/Msg91/`. MSG91 is one of the leading enterprise SMS and OTP providers in India. ## Files to create - `src/SmsBridge/Providers/Msg91/Msg91SmsProvider.cs` - `src/SmsBridge/Providers/Msg91/Msg91SmsRequestMapper.cs` - `src/SmsBridge/Providers/Msg91/Msg91SmsResponseMapper.cs` - `src/SmsBridge/Options/Msg91Options.cs` - Register `UseMsg91()` in `src/SmsBridge/DependencyInjection/SmsBridgeProviderBuilder.cs` - Add `HttpClientNames.Msg91` in `src/SmsBridge/Internal/Http/HttpClientNames.cs` - Add `SmsProviderType.Msg91` to the enum ## MSG91 API Details - Endpoint: `https://control.msg91.com/api/v5/flow/` - Auth: `authkey` header - Request (JSON): ```json { "flow_id": "...", "sender": "...", "mobiles": "...", "VAR1": "..." } ``` - Simple SMS (non-template): `https://api.msg91.com/api/v5/otp` or transactional endpoint - Response: `{ "type": "success", "message": "..." }` > **Note:** MSG91 uses template-based flows for most messages in India (due to DLT regulations). Document this limitation clearly in the options. ## Options ```csharp public sealed class Msg91Options { public required string AuthKey { get; init; } public required string From { get; init; } public string? TemplateFlowId { get; init; } } ``` ## Tests to add - `tests/SmsBridge.ProviderTests/Msg91ResponseMapperTests.cs` - `tests/SmsBridge.ProviderTests/Msg91ProviderTests.cs` ## Acceptance Criteria - [ ] Provider sends via MSG91 REST API using `IHttpClientFactory` - [ ] Response mapper checks `type == "success"` - [ ] Transient failures set `IsTransientFailure = true` - [ ] DLT/template limitation is documented in `Msg91Options` XML comments - [ ] `UseMsg91()` registers the provider in DI - [ ] All tests pass — `dotnet test` - [ ] `dotnet build` has 0 warnings
Activity