/* tslint:disable */
/* eslint-disable */
/* Code generated by ng-openapi-gen DO NOT EDIT. */

import { HttpClient, HttpContext } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';

import { BaseService } from '../base-service';
import { ApiConfiguration } from '../api-configuration';
import { StrictHttpResponse } from '../strict-http-response';

import { AccountResDto } from '../models/account-res-dto';
import { authControllerLinkVerification } from '../fn/auth/auth-controller-link-verification';
import { AuthControllerLinkVerification$Params } from '../fn/auth/auth-controller-link-verification';
import { authControllerLogin } from '../fn/auth/auth-controller-login';
import { AuthControllerLogin$Params } from '../fn/auth/auth-controller-login';
import { authControllerMe } from '../fn/auth/auth-controller-me';
import { AuthControllerMe$Params } from '../fn/auth/auth-controller-me';
import { authControllerRecoveryPassword } from '../fn/auth/auth-controller-recovery-password';
import { AuthControllerRecoveryPassword$Params } from '../fn/auth/auth-controller-recovery-password';
import { authControllerSetPassword } from '../fn/auth/auth-controller-set-password';
import { AuthControllerSetPassword$Params } from '../fn/auth/auth-controller-set-password';
import { GenericMessageDto } from '../models/generic-message-dto';

@Injectable({ providedIn: 'root' })
export class AuthApiClient extends BaseService {
  constructor(config: ApiConfiguration, http: HttpClient) {
    super(config, http);
  }

  /** Path part for operation `authControllerLogin()` */
  static readonly AuthControllerLoginPath = '/auth/login';

  /**
   * Account Login.
   *
   *
   *
   * This method provides access to the full `HttpResponse`, allowing access to response headers.
   * To access only the response body, use `authControllerLogin()` instead.
   *
   * This method sends `application/json` and handles request body of type `application/json`.
   */
  authControllerLogin$Response(
    params: AuthControllerLogin$Params,
    context?: HttpContext,
  ): Observable<StrictHttpResponse<AccountResDto>> {
    return authControllerLogin(this.http, this.rootUrl, params, context);
  }

  /**
   * Account Login.
   *
   *
   *
   * This method provides access only to the response body.
   * To access the full response (for headers, for example), `authControllerLogin$Response()` instead.
   *
   * This method sends `application/json` and handles request body of type `application/json`.
   */
  authControllerLogin(
    params: AuthControllerLogin$Params,
    context?: HttpContext,
  ): Observable<AccountResDto> {
    return this.authControllerLogin$Response(params, context).pipe(
      map((r: StrictHttpResponse<AccountResDto>): AccountResDto => r.body),
    );
  }

  /** Path part for operation `authControllerMe()` */
  static readonly AuthControllerMePath = '/auth/me';

  /**
   * Account Info.
   *
   *
   *
   * This method provides access to the full `HttpResponse`, allowing access to response headers.
   * To access only the response body, use `authControllerMe()` instead.
   *
   * This method doesn't expect any request body.
   */
  authControllerMe$Response(
    params?: AuthControllerMe$Params,
    context?: HttpContext,
  ): Observable<StrictHttpResponse<AccountResDto>> {
    return authControllerMe(this.http, this.rootUrl, params, context);
  }

  /**
   * Account Info.
   *
   *
   *
   * This method provides access only to the response body.
   * To access the full response (for headers, for example), `authControllerMe$Response()` instead.
   *
   * This method doesn't expect any request body.
   */
  authControllerMe(
    params?: AuthControllerMe$Params,
    context?: HttpContext,
  ): Observable<AccountResDto> {
    return this.authControllerMe$Response(params, context).pipe(
      map((r: StrictHttpResponse<AccountResDto>): AccountResDto => r.body),
    );
  }

  /** Path part for operation `authControllerRecoveryPassword()` */
  static readonly AuthControllerRecoveryPasswordPath =
    '/auth/recovery-password';

  /**
   * Recovery Password.
   *
   *
   *
   * This method provides access to the full `HttpResponse`, allowing access to response headers.
   * To access only the response body, use `authControllerRecoveryPassword()` instead.
   *
   * This method sends `application/json` and handles request body of type `application/json`.
   */
  authControllerRecoveryPassword$Response(
    params: AuthControllerRecoveryPassword$Params,
    context?: HttpContext,
  ): Observable<StrictHttpResponse<GenericMessageDto>> {
    return authControllerRecoveryPassword(
      this.http,
      this.rootUrl,
      params,
      context,
    );
  }

  /**
   * Recovery Password.
   *
   *
   *
   * This method provides access only to the response body.
   * To access the full response (for headers, for example), `authControllerRecoveryPassword$Response()` instead.
   *
   * This method sends `application/json` and handles request body of type `application/json`.
   */
  authControllerRecoveryPassword(
    params: AuthControllerRecoveryPassword$Params,
    context?: HttpContext,
  ): Observable<GenericMessageDto> {
    return this.authControllerRecoveryPassword$Response(params, context).pipe(
      map(
        (r: StrictHttpResponse<GenericMessageDto>): GenericMessageDto => r.body,
      ),
    );
  }

  /** Path part for operation `authControllerLinkVerification()` */
  static readonly AuthControllerLinkVerificationPath =
    '/auth/link-verification';

  /**
   * Check if recovery string is valid.
   *
   *
   *
   * This method provides access to the full `HttpResponse`, allowing access to response headers.
   * To access only the response body, use `authControllerLinkVerification()` instead.
   *
   * This method sends `application/json` and handles request body of type `application/json`.
   */
  authControllerLinkVerification$Response(
    params: AuthControllerLinkVerification$Params,
    context?: HttpContext,
  ): Observable<StrictHttpResponse<GenericMessageDto>> {
    return authControllerLinkVerification(
      this.http,
      this.rootUrl,
      params,
      context,
    );
  }

  /**
   * Check if recovery string is valid.
   *
   *
   *
   * This method provides access only to the response body.
   * To access the full response (for headers, for example), `authControllerLinkVerification$Response()` instead.
   *
   * This method sends `application/json` and handles request body of type `application/json`.
   */
  authControllerLinkVerification(
    params: AuthControllerLinkVerification$Params,
    context?: HttpContext,
  ): Observable<GenericMessageDto> {
    return this.authControllerLinkVerification$Response(params, context).pipe(
      map(
        (r: StrictHttpResponse<GenericMessageDto>): GenericMessageDto => r.body,
      ),
    );
  }

  /** Path part for operation `authControllerSetPassword()` */
  static readonly AuthControllerSetPasswordPath = '/auth/set-password';

  /**
   * Set new password.
   *
   *
   *
   * This method provides access to the full `HttpResponse`, allowing access to response headers.
   * To access only the response body, use `authControllerSetPassword()` instead.
   *
   * This method sends `application/json` and handles request body of type `application/json`.
   */
  authControllerSetPassword$Response(
    params: AuthControllerSetPassword$Params,
    context?: HttpContext,
  ): Observable<StrictHttpResponse<GenericMessageDto>> {
    return authControllerSetPassword(this.http, this.rootUrl, params, context);
  }

  /**
   * Set new password.
   *
   *
   *
   * This method provides access only to the response body.
   * To access the full response (for headers, for example), `authControllerSetPassword$Response()` instead.
   *
   * This method sends `application/json` and handles request body of type `application/json`.
   */
  authControllerSetPassword(
    params: AuthControllerSetPassword$Params,
    context?: HttpContext,
  ): Observable<GenericMessageDto> {
    return this.authControllerSetPassword$Response(params, context).pipe(
      map(
        (r: StrictHttpResponse<GenericMessageDto>): GenericMessageDto => r.body,
      ),
    );
  }
}
