/**
 * This file is generated by the RequestConfigGenerator.
 * Do not edit.
 */
import { Request, RequestParams } from '@gopowerteam/http-request'
import type { Observable } from 'rxjs'
import { {{controllerClass}} } from '{{controllerDir}}/{{controller}}.controller'
{{#if schemas}}
import { {{#each schemas}}{{this}}{{#unless @last}}, {{/unless}}{{/each}} } from '{{modelDir}}{{#if service}}/{{service}}.model{{/if}}'
{{/if}}

export class {{serviceClass}} {
{{#each actions}}
  /**
   * {{comment}}
   */
  @Request({
    server: {{../controllerClass}}.{{action}},
    {{#if schema}}
    model: {{#replace schema '[]' ''}}{{/replace}}
    {{/if}}
  })
  public {{action}}(
    params?: RequestParams | { [key: string]: any }
  {{#if schema}}
  ): Observable<{{schema}}> {
  {{else}}
  ): Observable<any> {
  {{/if}}
    return RequestParams.create(params).request();
  }
  {{/each}}
}
