Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[1.0.20] - 2026-07-04

Fixed

  • SSO Login URL hardcoded to dead domain: V3::HttpClient used a hardcoded LOGIN_URL = 'https://console.swiftfederation.com/' constant, ignoring configuration. After the domain migration to flashcone.com, SSO login failed with Connection refused, producing Missing SESSION for CDN and empty usages responses.
    • Removed the LOGIN_URL constant; added private #login_url resolving from configuration.portal_endpoint (ENV-driven: PRIVATE_PORTAL_ENDPOINT / PORTAL_ROOT_HOSTNAME), normalized with a single trailing slash
    • Login page URL is now fully config/ENV-driven — no base domain hardcoded

Changed

  • Default portal/SSO hostnames in Configuration updated from the retired *.swiftfederation.com to console.flashcone.com / sso2.flashcone.com (only used when ENV is unset)
  • Updated RBS in sig/conversant/v3.rbs: removed LOGIN_URL constant, added login_url method signature

[1.0.19] - 2026-02-06

Fixed

  • LMS Job RBS Type Signatures: Updated RBS signatures in sig/conversant/v3/services/lms.rbs to match actual implementation
    • Fixed where return type from Array[Hash[String, untyped]] to Array[Hash[Symbol, untyped]]? (nilable, symbol keys)
    • Fixed parse_status parameter type from Integer | String | nil to Integer (value is always .to_i)
    • Fixed build_manifest_url signature to (String? play_domain, Hash item, String? output_type) matching actual parameters
    • Removed non-existent build_profile_url method signature

[1.0.18] - 2025-10-08

Fixed

  • Portal Service Authentication: Fixed SESSION cookie handling to use root sessions directly
    • Portal service now uses root SESSION + SSO_GW_SESSION2 cookies directly instead of attempting to exchange them
    • Removed incorrect cookie extraction from response (Portal doesn't return a new SESSION cookie)
    • Changed from extracting response.cookies['SESSION'] to using sessions[:session] from SSO login
    • Resolves "NO_SESSION_IN_RESPONSE" error when calling portal.appliances
    • Matches original implementation behavior where root sessions are used for all Portal API calls

Changed

  • Updated Portal#fetch_new_session method to return root SESSION cookie directly after verification
  • Test call to #{portal_endpoint}/?cId=#{customer_id} now only validates session instead of extracting cookies
  • Log message changed from "REQUESTING_SESSION" to "USING_ROOT_SESSIONS" for clarity

Impact

  • Portal service now works correctly without "Missing SESSION for Portal" errors
  • portal.appliances and other Portal API methods now authenticate properly
  • Consistent with other services (CDN, LMS, VMS) that also exchange sessions but Portal uses root sessions directly

[1.0.17] - 2025-10-01

Fixed

  • Redis Dependency Compatibility: Changed redis dependency from ~> 5.0 to >= 4.5.0 for compatibility with sidekiq 6.x
    • Resolves version conflict where sidekiq ~> 6.5.8 requires redis < 5
    • Now compatible with both redis 4.x and 5.x versions
  • Logger Consistency: Fixed inconsistent identifier access patterns across all service classes
    • Changed direct @parent.identifier calls to @parent.send(:identifier) for consistency
    • Updated files: vms/analytics.rb, vms/business.rb, vms/transcoding.rb, lms/domain.rb, lms/dashboard.rb

Improved

  • Documentation Enhancement: Enhanced RubyDoc documentation for all LMS and VMS partner classes
    • Added detailed method descriptions with parameter formats and return value structures
    • Added practical usage examples for all methods
    • Improved documentation for: LMS::Partner::Business, LMS::Partner::Report, VMS::Partner::Business

[1.0.16] - 2025-10-01

Added

  • VMS Partner Analytics Enhancement: Added missing business logic to match original implementation
    • Added VMS::Partner::Business class with aggregation methods:
      • transcoding(**args) - Aggregates VOD transcoding with codec breakdown (H264/H265, SD/HD/UHD)
      • Returns hash with :vms_transcoding, :vms_transmuxing, :vms_transcoding_sd, :vms_transcoding_hd, :vms_transcoding_uhd
    • Added queries(**args) private helper method for auto-generating parameters:
      • Auto-generates month (YYYYMM format, defaults to current month)
      • Auto-generates customerType (defaults to parent's type or 2)
      • Auto-generates timestamp (milliseconds since epoch)

Changed

  • VMS Partner Analytics API: Improved method signatures and return values for consistency
    • Changed duration_of_vod(params) to duration_of_vod(**args) with auto-parameter generation
    • Changed return values from nil to [] (empty array) on errors
    • Added &.map(&:with_indifferent_access) to match original implementation behavior
    • Added nil response checks before JSON parsing
    • Methods updated: duration_of_vod, duration

Impact

  • VMS partner analytics now fully matches original @services implementation
  • More convenient API with auto-parameter generation (defaults to current month)
  • Business aggregation methods provide codec breakdowns for billing and capacity planning
  • Both duration_of_vod and duration methods available in main Analytics class
  • Backward compatible - existing code continues to work

Usage Examples

vms = Conversant::V3.vms(12345)

# Auto-parameter generation (uses current month)
vms.partner.analytics.duration_of_vod
vms.partner.analytics.duration_of_vod(startTime: Time.parse('2025-01-01'))

# Duration by year
vms.partner.analytics.duration(year: '2025')

# Business aggregation
business = vms.partner.analytics.business
metrics = business.transcoding(startTime: Time.now.beginning_of_month)
# => { vms_transcoding: 1000, vms_transcoding_sd: 300, vms_transcoding_hd: 500, ... }

[1.0.15] - 2025-10-01

Added

  • LMS Partner Analytics Enhancement: Added missing business logic and reporting methods to match original implementation
    • Added LMS::Partner::Report class with detailed reporting methods:
      • transcodings(payload) - Transcoding analytics data
      • recordings(payload) - Recording analytics data
      • jobs(payload) - Job count analytics
      • duration_v2_transcoding(payload) - V2 transcoding endpoint
      • bussiness_live_usage(payload) - Business live usage data
    • Added LMS::Partner::Business class with aggregation methods:
      • transcoding(**args) - Aggregates transcoding with codec breakdown (H264/H265, SD/HD/UHD)
      • recording(**args) - Aggregates recording with codec breakdown and totals
      • stream_jobs(**args) - Alias for number of live jobs
    • Added queries(**args) private helper method for auto-generating parameters:
      • Auto-generates month (YYYYMM format, defaults to current month)
      • Auto-generates customerType (defaults to parent's type or 2)
      • Auto-generates timestamp (milliseconds since epoch)

Changed

  • LMS Partner Analytics API: Improved method signatures and return values for consistency
    • Changed method signatures from method(params) to method(**args) for keyword arguments
    • Changed return values from nil to [] (empty array) on errors
    • Added &.map(&:with_indifferent_access) to match original implementation behavior
    • Added nil response checks before JSON parsing
    • Methods updated: duration_of_live, duration_of_live_recording, no_of_live_jobs, durations

Impact

  • LMS partner analytics now fully matches original @services implementation
  • More convenient API with auto-parameter generation (e.g., defaults to current month)
  • Business aggregation methods provide codec breakdowns for billing and capacity planning
  • Report methods provide detailed analytics for transcoding, recording, and jobs
  • Backward compatible - existing code continues to work

Usage Examples

lms = Conversant::V3.lms(12345)

# Auto-parameter generation (uses current month)
lms.partner.analytics.duration_of_live
lms.partner.analytics.duration_of_live(startTime: Time.parse('2025-01-01'))

# Report methods
report = lms.partner.analytics.report
report.transcodings(startTime: '2025-01-01', endTime: '2025-01-31')

# Business aggregation
business = lms.partner.analytics.business
metrics = business.transcoding(startTime: Time.now.beginning_of_month)
# => { lms_transcoding: 1000, lms_transcoding_sd: 300, ... }

[1.0.14] - 2025-10-01

Fixed

  • Portal Service: Fixed SESSION cookie authorization issue
    • Changed from manual 'Cookie' header string to :cookies hash option
    • Fixed header names to use lowercase symbols (:authority, :referer, :user_agent)
    • Added proper error handling with RestClient::Unauthorized and RestClient::Forbidden rescue blocks
    • Portal now correctly obtains SESSION cookie when calling portal.appliances

Changed

  • Logger Pattern: Refactored all nested service classes to use #{__method__} for dynamic method name reflection
    • Updated 40+ methods across 14 files to use dynamic method names in error logs
    • Pattern changed from hardcoded method names (e.g., METHOD:bandwidth.EXCEPTION) to dynamic METHOD:#{__method__}.EXCEPTION
    • Improved maintainability and reduced risk of copy-paste errors in logging
    • Affected files: CDN (analytics, domain, certificate, business, monitoring, audit, partner/analytics), LMS (domain, dashboard, partner/analytics), VMS (transcoding, analytics, business, partner/analytics), OSS (partner/analytics), Portal (dashboard)

Impact

  • Portal service now works correctly with proper cookie handling
  • Eliminated "warning: overriding 'Cookie' header with :cookies option" message
  • Logger output now dynamically reflects actual method names for better debugging
  • Consistent logging pattern across all nested service classes

[1.0.13] - 2025-09-30

Fixed

  • OSS Service: Corrected OSS endpoint configuration and authentication flow
    • Added PRIVATE_OSS_ENDPOINT configuration variable
    • Fixed OSS to use its own endpoint instead of CDN endpoint for API calls
    • Corrected authorization URL: https://oss.swiftfederation.com/?customerId={id}&isHideMenu=f&t={timestamp}
    • OSS now properly authenticates via its own endpoint before making API calls

Added

  • OSS Partner Analytics: Enhanced analytics methods for better usability
    • Added current_month_usage(payload) method to get current month's disk usage
    • Improved usages(year, params) to return array of monthly data
    • Better alignment with existing business logic patterns

Changed

  • Configuration: Added private_oss_endpoint accessor for OSS API endpoint
  • OSS Authentication: Now uses OSS-specific authorization URL with timestamp parameter
  • Service Endpoint: OSS service_endpoint now correctly returns OSS endpoint (not CDN)

Impact

  • OSS service now works correctly with proper endpoint separation
  • API calls go to PRIVATE_OSS_ENDPOINT, authentication uses same endpoint
  • Current month usage method provides convenient access to billing data
  • Matches original implementation behavior

[1.0.12] - 2025-09-30

Added

  • OSS Service: Separated OSS as a standalone service at the same level as CDN, LMS, and VMS
    • New factory method: Conversant::V3.oss(customer_id)
    • Created lib/conversant/v3/services/oss.rb main service class
    • Created lib/conversant/v3/services/oss/partner.rb partner wrapper
    • OSS now has its own independent service hierarchy

Changed

  • Partner Analytics Refactoring: Major restructuring of partner analytics architecture

    • Moved partner analytics from Partner::Analytics::* to Service::Partner::Analytics
    • CDN: Partner::Analytics::CDNCDN::Partner::Analytics
    • LMS: Partner::Analytics::LMSLMS::Partner::Analytics
    • VMS: Partner::Analytics::VMSVMS::Partner::Analytics
    • OSS: Partner::Analytics::OSSOSS::Partner::Analytics
    • Each service now owns its partner analytics implementation
    • Removed old lib/conversant/v3/services/partner/analytics/ directory
    • Analytics classes properly nested under their parent services
  • Service Structure: Cleaner and more consistent service hierarchy

    • Partner wrapper classes for all services (CDN, LMS, VMS, OSS)
    • Consistent service.partner.analytics pattern across all services

Deprecated

  • cdn.partner_oss - Use oss = Conversant::V3.oss(customer_id); oss.partner.analytics instead
  • cdn.partner.oss - Use standalone OSS service instead
  • All deprecated methods maintained for backward compatibility

Breaking Changes

  • None - All changes are backward compatible
  • Old methods still work but are marked as deprecated
  • Partner::Analytics::* module structure removed (implementation moved to service-specific classes)

Impact

  • Cleaner service architecture with proper class nesting
  • OSS is now a first-class service alongside CDN, LMS, and VMS
  • Partner analytics better organized under their respective services
  • Improved maintainability and code organization
  • All existing code continues to work with deprecation warnings

Migration Guide

Old Usage (deprecated but still works):

cdn = Conversant::V3.cdn(12345)
cdn.partner_analytics.bandwidth(payload)
cdn.partner_oss.usages("2025")

New Usage:

cdn = Conversant::V3.cdn(12345)
cdn.partner.analytics.bandwidth(payload)

oss = Conversant::V3.oss(12345)
oss.partner.analytics.usages("2025")

[1.0.11] - 2025-09-30

Fixed

  • Documentation: Fixed incorrect usage examples across all service classes
    • Corrected 11 YARD documentation examples showing keyword argument syntax service(customer_id: 12345) to use correct positional argument syntax service(12345)
    • Fixed main service classes: VMS, LMS, Portal (CDN was already correct)
    • Fixed nested service classes: VMS::Business, VMS::Analytics, VMS::Transcoding, LMS::Job, LMS::Preset, CDN::Analytics, CDN::Dashboard, CDN::Monitoring, CDN::Audit
    • All examples now match the actual method signatures in lib/conversant/v3.rb

Impact

  • Documentation accuracy improved - examples now show correct API usage
  • No code changes - this is a documentation-only release
  • Fixes confusion where documentation showed Conversant::V3.vms(customer_id: 12345) but actual usage requires Conversant::V3.vms(12345)

[1.0.10] - 2025-09-30

Documentation

  • Added "Version Notes" section to README.md highlighting critical authentication fixes in v1.0.9
  • Improved visibility of recent bug fixes for LMS/VMS services
  • Enhanced user awareness of recommended upgrades

Note

This is a documentation-only release. No code changes from v1.0.9.

[1.0.9] - 2025-09-30

Fixed

  • Critical Authentication Bug: Fixed service-specific session cookie authentication for LMS and VMS services
    • Changed fetch_new_session from using RestClient::Request.execute with 'Cookie' header to RestClient.get with :cookies option
    • Fixed respond_to?(:session_cookie_name) to check protected methods by adding true parameter
    • Corrected method visibility for session_cookie_name, service_endpoint, and requires_session? in LMS service (moved to protected section)
    • Fixed Redis cache key generation for JSESSIONID - was incorrectly using SESSION instead of JSESSIONID for LMS/VMS
    • LMS and VMS services now correctly obtain and cache JSESSIONID cookies from service endpoints
    • Fixed cookie header format to use proper RestClient :cookies hash instead of manual 'Cookie' string header

Changed

  • Simplified fetch_sso_session to always retrieve from authenticate() method instead of checking per-customer Redis cache
  • All service fetch_new_session methods now use consistent RestClient.get with :cookies option format
  • Improved error handling in all service fetch_new_session methods with specific RestClient::Unauthorized and RestClient::Forbidden rescue blocks

Impact

  • LMS API calls (e.g., lms.job.where()) now work correctly with proper JSESSIONID authentication
  • VMS API calls now work correctly with proper JSESSIONID authentication
  • CDN API calls continue to work with SESSION cookie (no changes to behavior)
  • Fixes "Missing JSESSIONID for LMS" error that prevented all LMS operations

[1.0.8] - 2025-09-30

Added

  • CDN Analytics: 13 new analytics methods for comprehensive reporting
    • request_hit_rate - Request hit rate metrics
    • byte_hit_rate - Byte hit rate metrics
    • origin_bandwidth - Origin bandwidth usage
    • number_of_concurrent_viewers - Concurrent viewer metrics
    • origin_http_codes - Origin HTTP status code distribution
    • referrer_total_by_domain - Total referrer statistics by domain
    • referrer_csv_by_domain - Referrer data CSV export
    • popular_content_url_total_by_domain - Total popular content statistics
    • popular_content_url_csv_by_domain - Popular content CSV export
    • request_visit_number - Request and visit number metrics
    • isp - ISP distribution analytics
    • user_agent - User agent analytics
    • user_agent_csv - User agent CSV export
  • CDN Dashboard: New dashboard service for quick daily metrics
    • bandwidth - Daily bandwidth aggregates
    • volume - Daily volume aggregates
  • LMS LiveTranscoding::Preset: Transcoding preset management
    • all - List all available transcoding presets
  • Portal Dashboard: Customer metadata and reporting service (4 endpoints)
    • products - Product usage reports
    • countries - Geographic distribution data
    • industries - Industry classification data
    • tree_view - Organizational hierarchy view
  • Partner Analytics CDN: Partner-level CDN reporting (10 endpoints)
    • bandwidth, volume, request_per_second, viewers - Partner-level metrics
    • domain_traffic_usage - Traffic usage for billing
    • usages, storage - Storage usage metrics
    • domain_volume, domain_http_codes, domain_rps - Domain-specific analytics
  • Partner Analytics LMS: Partner-level LMS reporting (8 endpoints)
    • duration_of_live, duration_of_live_recording, no_of_live_jobs - Business metrics
    • durations, transcodings, recordings, jobs - Detailed reporting
    • duration_v2_transcoding - Enhanced transcoding metrics
  • Partner Analytics VMS: Partner-level VMS reporting (2 endpoints)
    • duration_of_vod - VOD duration metrics
    • duration - Transcoding duration analytics
  • Partner Analytics OSS: Partner-level OSS storage reporting (1 endpoint)
    • usages - Storage usage by year

Improved

  • API coverage increased from 36% (29/80 endpoints) to 100% (80/80 endpoints)
  • All endpoints from CONVERSANT_API_USAGE_REPORT.md now implemented
  • Comprehensive YARD documentation for all new classes and methods
  • Consistent error handling across all partner analytics services
  • Partner-level reporting now available across all service types (CDN, LMS, VMS, OSS)

Documentation

  • Added detailed usage examples for all new analytics methods
  • Documented partner analytics architecture and access patterns
  • Complete @param, @return, @example tags for all new methods
  • Added cross-references between customer and partner analytics

[1.0.7] - 2025-09-30

Added

  • Comprehensive YARD documentation for HttpClient module with method descriptions and examples
  • Complete YARD documentation for Portal service with detailed API examples
  • YARD documentation for Authorization module explaining the shared authorization pattern
  • Type annotations for Authentication mixin instance variables (@customer_id, @type)

Changed

  • BREAKING IMPROVEMENT: Refactored Authentication mixin to delegate to service classes instead of duplicating authorization logic
  • All services (Portal, CDN, VMS, LMS) now consistently implement Authorization module pattern
  • Portal service authentication updated to exchange root sessions (consistent with other services)
  • Authentication mixin now properly reuses Authorization module through service delegation
  • Updated README authentication architecture section to reflect consistent Authorization module usage

Improved

  • Eliminated 170+ lines of duplicate authorization code from Authentication mixin
  • Code maintainability through service delegation pattern
  • All services now validate session cookies before making API calls
  • Consistent session caching behavior across all services
  • Better type safety with complete RBS signatures for Authentication mixin

Fixed

  • Portal service now correctly exchanges root sessions for customer-specific SESSION cookie
  • LMS service authorization implementation now matches CDN/VMS consistency
  • Missing timeout settings added to Portal and CDN session fetching
  • Session validation bugs in LMS service call method
  • Cookie jar thread-safety documentation and type signatures in HttpClient

Documentation

  • Added module-level documentation for HttpClient with usage examples
  • Documented all private methods in HttpClient (http_get, http_post, cookie handling)
  • Complete API documentation for Portal.appliances method with examples
  • Updated README to reflect Authorization module as foundation of all services
  • Added session validation documentation explaining automatic cookie checks

1.0.6 - 2025-09-30

Added

  • Shared Authorization module for DRY authorization logic across all services
  • Comprehensive YARD documentation for LMS and VMS services (80.27% coverage, up from 59.18%)
  • Portal service now uses shared Authorization module
  • Complete RBS type signatures for Authorization module
  • Documentation for all service accessor methods

Changed

  • Refactored authorization logic into shared Authorization module
  • All services (CDN, LMS, VMS, Portal) now use consistent authorization pattern
  • Improved authorize method with cleaner separation of concerns
  • Standardized logging format across all service nested classes
  • Updated all RBS type signatures to match refactored code structure

Improved

  • Code maintainability through centralized authorization logic
  • Reduced code duplication across services (~60% reduction)
  • Consistent error handling and session management
  • Better separation between caching and session fetching logic
  • Documentation coverage increased from 59.18% to 80.27%

Fixed

  • RuboCop style issues in Authorization module
  • Missing RBS type signatures for new methods
  • Logging format consistency in nested service classes

1.0.5 - 2025-09-30

Fixed

  • Fixed HTTP 500 errors when calling CDN, LMS, and VMS APIs
  • Corrected cookie header format for RestClient compatibility
  • Fixed authentication headers to use proper HTTP header format with Cookie string
  • Resolved issue where cookies were passed as hash instead of formatted header string

Changed

  • All service authorized_headers methods now return plain HTTP headers hash with Cookie header
  • Updated request method to handle string keys in headers hash
  • Improved error handling in HTTP client to return status code with errors

Added

  • Complete RBS type signatures for private methods in LMS::Job class
  • Added missing method signatures for VMS::VodTranscoding, Analytics, and Business classes
  • Added extract_month private method signature to VMS::Business

Removed

  • Removed unimplemented method signatures (hits, status_codes, top_urls) from CDN::Analytics RBS files

1.0.4 - 2025-09-30

Fixed

  • Fixed "uninitialized constant" error for nested service classes (Certificate, Domain, Business, etc.)
  • Resolved loading order issue by requiring nested classes after parent class definition
  • Fixed superclass mismatch error in Rails applications with Zeitwerk

Changed

  • Moved require statements for nested service classes to end of parent class files (after class definition)
  • All service classes now use absolute namespace inheritance (::Conversant::V3::Base)
  • This allows keeping the original directory structure (cdn/, lms/) while avoiding Zeitwerk conflicts

1.0.3 - 2025-09-30

Fixed

  • Fixed superclass mismatch error when loading in Rails applications
  • Use absolute namespace paths (::Conversant::V3::Base) to prevent conflicts with existing code
  • Resolved namespace collision with Utils::Conversant classes in legacy codebases
  • Fixed Zeitwerk autoloading conflict by renaming service subdirectories (cdn/ → cdn_services/, lms/ → lms_services/)

Changed

  • All service classes now explicitly inherit from ::Conversant::V3::Base to avoid constant resolution issues
  • Renamed service subdirectories to avoid file/directory naming conflicts in Rails with Zeitwerk

1.0.2 - 2025-09-30

Added

  • Complete CDN domain management functionality (create, find, find_by, all, total_current_disk_usage)
  • CDN certificate management for SSL/TLS certificates and Let's Encrypt auto-certificates
  • CDN business metrics service for billing and 95th percentile bandwidth calculations
  • VMS (Video Management System) service with VOD transcoding, analytics, and business modules
  • OSS (Object Storage Service) placeholder for S3-compatible storage operations
  • LMS domain and dashboard management modules
  • Comprehensive YARD documentation for all CDN service classes
  • RBS type signatures for complete type coverage of CDN services
  • Enhanced authentication mixin with VMS support
  • Support for PRIVATE_VMS_ENDPOINT configuration

Enhanced

  • CDN service now includes six sub-services: Analytics, Monitoring, Audit, Domain, Business, Certificate
  • Improved README with comprehensive usage examples and API documentation
  • Added troubleshooting section with common issues and solutions
  • Expanded authentication architecture documentation
  • Added performance optimization tips

Documentation

  • Complete YARD documentation with @example tags for all CDN classes
  • RBS type signatures in sig/ directory for better IDE support
  • Detailed API reference for all services (Portal, CDN, LMS, VMS, OSS)
  • Real-world usage examples for domain management, analytics, certificates, and monitoring
  • Migration guide from existing ConversantHttpClientV3 implementations

1.0.1 - 2025-09-29

Changed

  • Removed all emoji icons from README.md for better compatibility
  • Improved documentation formatting

1.0.0 - 2025-09-29

Added

  • Initial release of Conversant Ruby gem
  • V3 SSO authentication with session management
  • Portal service for appliance management
  • CDN service with analytics, monitoring, and audit capabilities
  • LMS service for streaming job management
  • Zero-configuration support using existing CONVERSANT ENV variables
  • Redis-based session caching with configurable TTL
  • Thread-safe cookie jar implementation
  • Support for inheritance patterns to extend services
  • Authentication mixin for existing code integration
  • Comprehensive error handling with custom exception classes
  • Auto-configuration from environment variables
  • Support for both direct usage and inheritance patterns
  • Drop-in replacement for ConversantHttpClientV3
  • Full documentation and examples

Features

  • Automatic detection of CONVERSANT environment variables
  • Multi-tier authentication system (Portal, CDN, LMS)
  • Service-specific session management
  • HTML entity decoding for proper form URL handling
  • Configurable debug mode and logging
  • Rails integration support