path property

String get path

Get the URL path for this endpoint.

Implementation

String get path {
  switch (this) {
    // Authentication & Health
    case APIEndpoint.authenticate:
      return '/api/v1/auth/sdk/authenticate';
    case APIEndpoint.refreshToken:
      return '/api/v1/auth/sdk/refresh';
    case APIEndpoint.healthCheck:
      return '/v1/health';

    // Device Management - Production/Staging
    case APIEndpoint.deviceRegistration:
      return '/api/v1/devices/register';
    case APIEndpoint.analytics:
      return '/api/v1/analytics';

    // Device Management - Development (Supabase REST API format)
    case APIEndpoint.devDeviceRegistration:
      return '/rest/v1/device_registrations';
    case APIEndpoint.devAnalytics:
      return '/rest/v1/analytics_events';

    // Core endpoints
    case APIEndpoint.telemetry:
      return '/api/v1/sdk/telemetry';
    case APIEndpoint.models:
      return '/api/v1/models';
    case APIEndpoint.deviceInfo:
      return '/api/v1/device';
    case APIEndpoint.generationHistory:
      return '/api/v1/history';
    case APIEndpoint.userPreferences:
      return '/api/v1/preferences';
  }
}