Skip to content

feat: implement FireText SMS provider (UK) #52

Open

Description

@teesofttech

Summary

Implement the FireText SMS provider inside src/SmsBridge/Providers/FireText/.

FireText is a UK SMS provider with public API documentation for sending SMS, receiving messages, checking credit, scheduled messages, and delivery reports. This adds another UK-local provider alongside Esendex and Textmagic.

Official docs:

Files to create

  • src/SmsBridge/Providers/FireText/FireTextSmsProvider.cs
  • src/SmsBridge/Providers/FireText/FireTextSmsRequestMapper.cs
  • src/SmsBridge/Providers/FireText/FireTextSmsResponseMapper.cs
  • src/SmsBridge/Options/FireTextOptions.cs
  • Register UseFireText() in src/SmsBridge/DependencyInjection/SmsBridgeProviderBuilder.cs
  • Add HttpClientNames.FireText in src/SmsBridge/Internal/Http/HttpClientNames.cs
  • Add SmsProviderType.FireText to the enum

FireText API Details

  • Base URL: https://www.firetext.co.uk
  • Send endpoint: /api/sendsms
  • Auth: either apiKey or username/password; prefer apiKey
  • Supports GET or POST parameters
  • JSON response can be requested by appending /json to API URLs
  • Request parameters include apiKey, to, from, and message
  • Example endpoint: https://www.firetext.co.uk/api/sendsms/json

Options

public sealed class FireTextOptions
{
    public required string ApiKey { get; init; }
    public required string From { get; init; }
}

Implementation Notes

  • Prefer POST with form URL encoded parameters to avoid putting message content in query strings.
  • Use /api/sendsms/json so response mapping can avoid parsing plain status strings.
  • Keep username/password auth out of first implementation unless needed for compatibility.
  • Map FireText status numbers and descriptions to success/failure results.

Tests to add

  • tests/SmsBridge.ProviderTests/FireTextResponseMapperTests.cs
  • tests/SmsBridge.ProviderTests/FireTextProviderTests.cs

Acceptance Criteria

  • Provider sends via /api/sendsms/json using IHttpClientFactory
  • Request mapper emits apiKey, to, from, and message
  • Response mapper handles successful and failed FireText status responses
  • Transient HTTP failures set IsTransientFailure = true
  • UseFireText() registers the provider in DI
  • All tests pass - dotnet test
  • dotnet build has 0 warnings

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions