/* 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 { accountsControllerCreateAccount } from '../fn/accounts/accounts-controller-create-account';
import { AccountsControllerCreateAccount$Params } from '../fn/accounts/accounts-controller-create-account';
import { accountsControllerDeleteAccount } from '../fn/accounts/accounts-controller-delete-account';
import { AccountsControllerDeleteAccount$Params } from '../fn/accounts/accounts-controller-delete-account';
import { accountsControllerEditAccount } from '../fn/accounts/accounts-controller-edit-account';
import { AccountsControllerEditAccount$Params } from '../fn/accounts/accounts-controller-edit-account';
import { accountsControllerEditAccountStipulatori } from '../fn/accounts/accounts-controller-edit-account-stipulatori';
import { AccountsControllerEditAccountStipulatori$Params } from '../fn/accounts/accounts-controller-edit-account-stipulatori';
import { accountsControllerEditAnagraficaPersonale } from '../fn/accounts/accounts-controller-edit-anagrafica-personale';
import { AccountsControllerEditAnagraficaPersonale$Params } from '../fn/accounts/accounts-controller-edit-anagrafica-personale';
import { accountsControllerEditPasswordPersonale } from '../fn/accounts/accounts-controller-edit-password-personale';
import { AccountsControllerEditPasswordPersonale$Params } from '../fn/accounts/accounts-controller-edit-password-personale';
import { accountsControllerFetchAccount } from '../fn/accounts/accounts-controller-fetch-account';
import { AccountsControllerFetchAccount$Params } from '../fn/accounts/accounts-controller-fetch-account';
import { accountsControllerFetchAccounts } from '../fn/accounts/accounts-controller-fetch-accounts';
import { AccountsControllerFetchAccounts$Params } from '../fn/accounts/accounts-controller-fetch-accounts';
import { accountsControllerFetchAccountStatus } from '../fn/accounts/accounts-controller-fetch-account-status';
import { AccountsControllerFetchAccountStatus$Params } from '../fn/accounts/accounts-controller-fetch-account-status';
import { accountsControllerGetAccountStipulatori } from '../fn/accounts/accounts-controller-get-account-stipulatori';
import { AccountsControllerGetAccountStipulatori$Params } from '../fn/accounts/accounts-controller-get-account-stipulatori';
import { accountsControllerSendActivationLink } from '../fn/accounts/accounts-controller-send-activation-link';
import { AccountsControllerSendActivationLink$Params } from '../fn/accounts/accounts-controller-send-activation-link';
import { FindAccountResDto } from '../models/find-account-res-dto';
import { FindAccountsResDto } from '../models/find-accounts-res-dto';
import { FindAccountStatusResDto } from '../models/find-account-status-res-dto';
import { FindAccountStipulatoriResDto } from '../models/find-account-stipulatori-res-dto';
import { GenericMessageDto } from '../models/generic-message-dto';
import { Stipulatore } from '../models/stipulatore';

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

  /** Path part for operation `accountsControllerFetchAccounts()` */
  static readonly AccountsControllerFetchAccountsPath = '/admin/accounts/list';

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

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

  /** Path part for operation `accountsControllerFetchAccountStatus()` */
  static readonly AccountsControllerFetchAccountStatusPath =
    '/admin/accounts/status';

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

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

  /** Path part for operation `accountsControllerFetchAccount()` */
  static readonly AccountsControllerFetchAccountPath =
    '/admin/accounts/id/{id}';

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

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

  /** Path part for operation `accountsControllerDeleteAccount()` */
  static readonly AccountsControllerDeleteAccountPath =
    '/admin/accounts/id/{id}';

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

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

  /** Path part for operation `accountsControllerEditAccount()` */
  static readonly AccountsControllerEditAccountPath = '/admin/accounts/id/{id}';

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

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

  /** Path part for operation `accountsControllerCreateAccount()` */
  static readonly AccountsControllerCreateAccountPath = '/admin/accounts';

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

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

  /** Path part for operation `accountsControllerSendActivationLink()` */
  static readonly AccountsControllerSendActivationLinkPath =
    '/admin/accounts/send-activation-mail/{id}';

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

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

  /** Path part for operation `accountsControllerGetAccountStipulatori()` */
  static readonly AccountsControllerGetAccountStipulatoriPath =
    '/admin/accounts/id/{id}/stipulatori';

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

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

  /** Path part for operation `accountsControllerEditAccountStipulatori()` */
  static readonly AccountsControllerEditAccountStipulatoriPath =
    '/admin/accounts/id/{id}/stipulatori';

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

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

  /** Path part for operation `accountsControllerEditPasswordPersonale()` */
  static readonly AccountsControllerEditPasswordPersonalePath =
    '/admin/accounts/edit-password';

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

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

  /** Path part for operation `accountsControllerEditAnagraficaPersonale()` */
  static readonly AccountsControllerEditAnagraficaPersonalePath =
    '/admin/accounts/edit-anagrafica';

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

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