/**
 * @fileoverview AUTOMATICALLY GENERATED service for API.Client.FullTextSearchApi.
 * Do not edit this file by hand or your changes will be lost next time it is
 * generated.
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 * Version: v1
* Generator version: 7.13.0
 * Generated by: org.openapitools.codegen.languages.JavascriptClosureAngularClientCodegen
 */
/**
 * @license MIT License
 * https://github.com/api-bricks/api-bricks-sdk/blob/master/LICENSE
 */

goog.provide('API.Client.FullTextSearchApi');

goog.require('API.Client.DTO.SecFilingResultDto');
goog.require('API.Client.Mvc.ProblemDetails');
goog.require('API.Client.Mvc.ValidationProblemDetails');

/**
 * @constructor
 * @param {!angular.$http} $http
 * @param {!Object} $httpParamSerializer
 * @param {!angular.$injector} $injector
 * @struct
 */
API.Client.FullTextSearchApi = function($http, $httpParamSerializer, $injector) {
  /** @private {!string} */
  this.basePath_ = $injector.has('FullTextSearchApiBasePath') ?
                   /** @type {!string} */ ($injector.get('FullTextSearchApiBasePath')) :
                   'https://api.sec.finfeedapi.com';

  /** @private {!Object<string, string>} */
  this.defaultHeaders_ = $injector.has('FullTextSearchApiDefaultHeaders') ?
                   /** @type {!Object<string, string>} */ (
                       $injector.get('FullTextSearchApiDefaultHeaders')) :
                   {};

  /** @private {!angular.$http} */
  this.http_ = $http;

  /** @package {!Object} */
  this.httpParamSerializer = $injector.get('$httpParamSerializer');
}
API.Client.FullTextSearchApi.$inject = ['$http', '$httpParamSerializer', '$injector'];

/**
 * Full-text search of SEC filing documents
 * Search across SEC filing documents with advanced filtering and sorting capabilities.  ### Available Sort Fields  Field Name | Description -----------|------------- AccessionNumber | SEC filing accession number FormType | Type of the filing document FilingDate | Date when filing was submitted CompanyName | Name of the company CIK | Central Index Key DocumentFilename | Name of the filing document DocumentDescription | Description of the document  ### Search Options  Option | Description --------|------------- text_contains | Keywords that must appear in the document text_not_contain | Keywords that must not appear in the document  ### Date Format All dates must be provided in YYYY-MM-DD format  :::tip Use text_contains and text_not_contain with multiple keywords separated by commas for more precise searches :::  :::note The search is case-insensitive and supports partial word matches :::
 * @param {!string=} opt_formType Filter by form type (e.g., \&quot;10-K\&quot;, \&quot;8-K\&quot;). Multiple values can be comma-separated
 * @param {!string=} opt_fillingDateStart Filter by filling date start (inclusive), format YYYY-MM-DD
 * @param {!string=} opt_fillingDateEnd Filter by filling date end (inclusive), format YYYY-MM-DD
 * @param {!string=} opt_textContains Keywords that the text must contain. Multiple values can be comma-separated
 * @param {!string=} opt_textNotContain Keywords that the text must not contain. Multiple values can be comma-separated
 * @param {!number=} opt_pageSize Number of results per page (default: 100)
 * @param {!number=} opt_pageNumber Page number to retrieve (default: 1)
 * @param {!string=} opt_sortBy Field to sort by (default: AccessionNumber)
 * @param {!string=} opt_sortOrder Sort order (asc or desc). Defaults to asc
 * @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
 * @return {!angular.$q.Promise<!Array<!API.Client.DTO.SecFilingResultDto>>}
 */
API.Client.FullTextSearchApi.prototype.v1FullTextGet = function(opt_formType, opt_fillingDateStart, opt_fillingDateEnd, opt_textContains, opt_textNotContain, opt_pageSize, opt_pageNumber, opt_sortBy, opt_sortOrder, opt_extraHttpRequestParams) {
  /** @const {string} */
  var path = this.basePath_ + '/v1/full-text';

  /** @type {!Object} */
  var queryParameters = {};

  /** @type {!Object} */
  var headerParams = angular.extend({}, this.defaultHeaders_);
  if (opt_formType !== undefined) {
    queryParameters['form_type'] = opt_formType;
  }

  if (opt_fillingDateStart !== undefined) {
    queryParameters['filling_date_start'] = opt_fillingDateStart;
  }

  if (opt_fillingDateEnd !== undefined) {
    queryParameters['filling_date_end'] = opt_fillingDateEnd;
  }

  if (opt_textContains !== undefined) {
    queryParameters['text_contains'] = opt_textContains;
  }

  if (opt_textNotContain !== undefined) {
    queryParameters['text_not_contain'] = opt_textNotContain;
  }

  if (opt_pageSize !== undefined) {
    queryParameters['page_size'] = opt_pageSize;
  }

  if (opt_pageNumber !== undefined) {
    queryParameters['page_number'] = opt_pageNumber;
  }

  if (opt_sortBy !== undefined) {
    queryParameters['sort_by'] = opt_sortBy;
  }

  if (opt_sortOrder !== undefined) {
    queryParameters['sort_order'] = opt_sortOrder;
  }

  /** @type {!Object} */
  var httpRequestParams = {
    method: 'GET',
    url: path,
    json: true,
            params: queryParameters,
    headers: headerParams
  };

  if (opt_extraHttpRequestParams) {
    httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
  }

  return (/** @type {?} */ (this.http_))(httpRequestParams);
}
