Skip to main content

shernova_core 2.1.0 copy "shernova_core: ^2.1.0" to clipboard
shernova_core: ^2.1.0 copied to clipboard

Shernova Phone Verification API — core Flutter SDK (headless). Required package for Shernova integration.

2.1.0 #

  • Fair-queue visibility: ShernovaSession now parses queue_position (1-based rank in the pool's FIFO queue), queue_total (pool size at large), queue_deadline (when the queue slot itself times out) and gateway_expires_at (the fresh dial window the server arms on promotion). All four are nullable — a session from an older server (or a non-queued session) simply carries null, so the parse path is byte-identical for every published response.
  • sdkVersion reports 2.1.0 via X-Shernova-SDK-Version.
  • New copy keys queue_position_line ({position} / {total} template) and cancel_button_label, mirrored 1:1 in the server's sdk-ui-strings.ts (EN + AR) — the parity test keeps both sides locked.
  • shernova_ui 2.8.0 consumes the queue position line and the cancel_button_enabled behavior flag (fallback on).

2.0.9 #

  • Server-driven runtime contract: the token response now carries poll_config (polling intervals, confirmation-window ticks, request timeout) and maintenance. The SDK applies them with clamped parsing and falls back to the previous hardcoded values when the field is absent, so behaviour is byte-identical against older servers.
  • Maintenance mode: createVerification refuses to book a new session while the server announces maintenance, throwing a typed maintenance_mode error with bilingual user_message_ar / user_message_en copy. In-flight sessions (poll / cancel / receipt) keep working so users already verifying are never stranded. Absent or inactive maintenance is a no-op.
  • Request timeout is now server-tunable (5–60 s, default 15 s) via poll_config.request_timeout_ms; the failure still normalizes to network_unavailable.
  • Version negotiation groundwork: every request sends X-Shernova-SDK-Version; the server may later reshape responses per version. Old servers ignore the header.
  • behavior_flags (boolean record) is parsed and exposed via ShernovaPollConfig.flag() for future remote behavior switches; unknown keys are ignored.
  • Old-SDK compatibility locked by test/old_sdk_compat_test.dart, which replays published-2.0.8 parse paths against a NEW server response; 55 tests total.

2.0.8 #

  • Network failures become a typed code: _send maps request timeouts and transport failures (socket closure, connection abort mid-/receipt) to network_unavailable instead of leaking raw ClientException/SocketException text into host-app dialogs.
  • Bilingual server copy: ShernovaError reads user_message_ar / user_message_en from API error details, so localizedMessage(arabic:) returns the server's Arabic text for rate-limit, concurrent-quota, and in-progress-conflict errors without client-side string tables.
  • ui_strings.dart gains network_error_body and the EN/AR key sets now stay in lock-step with the server's sdk-ui-strings.ts; a new parity test (test/ui_strings_test.dart) fails the build if either side adds a key the other lacks.

2.0.7 #

  • watch() now stops on terminal failure states (failed / rejected) like shernova_ui already did, so a headless consumer polling a rejected or phone-mismatch session no longer loops forever.

2.0.6 #

  • Queued sessions: gateway_phone_number is now nullable (String?) and parses safely when every verification line is busy. Previously the hard cast crashed host apps with type 'Null' is not a subtype of type 'String' in type cast as soon as the server answered a create/poll with no assigned line.
  • Add queue_reason (none_online / country_unavailable / all_busy) and isQueued; isWaiting now covers both waiting and queued so the SDK keeps polling until promotion lands a line. mapShernovaStatus maps queued to the waiting status.
  • Add queued_body / queued_status / queued_card_label UI strings (English defaults; the API serves localized values) for the queue state on the waiting screen (shernova_ui 2.6.1+).

2.0.5 #

  • Add optional unconfirmed_title / unconfirmed_body UI strings for the gentle post-call "not confirmed yet" state on the waiting screen (shernova_ui 2.6.0+).

2.0.4 #

  • Add ShernovaError.isGatewayUnavailable and localizedMessage for gateway-down UX.
  • Add gatewayUnavailableBody (and related) to ShernovaUiStrings for shernova_ui 2.4.6+.

2.0.3 #

  • isVerified is false when failure_reason is phone_mismatch, including after webhook completed.

2.0.2 #

  • Add busy_retry_status and busy_retry_hint UI strings (API + defaults) for automatic retry when the verification line is busy.

2.0.1 #

  • Parse ui_theme from /v1/sdk/token (logo_url, logo/footer sizes) for server-driven SDK branding without app rebuilds.

2.0.0 #

  • Breaking: Package renamed from shernova to shernova_core.
  • Import: package:shernova_core/shernova_core.dart
  • Test keys now use real gateways (API-side); no mock gateway or Simulate Ring.

1.0.8 #

Previous releases published as shernova on pub.dev.

0
likes
140
points
366
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Shernova Phone Verification API — core Flutter SDK (headless). Required package for Shernova integration.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, http

More

Packages that depend on shernova_core