import { applyDecorators } from '@nestjs/common';
import { ApiHeader, ApiQuery } from '@nestjs/swagger';

/** Document how mobile clients pass the sessionToken from POST /mobile/auth/verify. */
export function MobileSessionApi() {
  return applyDecorators(
    ApiHeader({
      name: 'Authorization',
      description:
        'Bearer <sessionToken> returned by POST /mobile/auth/verify after OTP',
      required: true,
    }),
    ApiQuery({
      name: 'sessionToken',
      required: false,
      type: String,
      description:
        'Optional alternative to Authorization header (same value as OTP verify response)',
    }),
  );
}
