/**
 * FinFeedAPI SEC REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 * Contact: support@apibricks.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */


import ApiClient from "../ApiClient";
import DTOSecFilingResultDto from '../model/DTOSecFilingResultDto';
import MvcProblemDetails from '../model/MvcProblemDetails';
import MvcValidationProblemDetails from '../model/MvcValidationProblemDetails';

/**
* FullTextSearch service.
* @module api/FullTextSearchApi
* @version v1
*/
export default class FullTextSearchApi {

    /**
    * Constructs a new FullTextSearchApi. 
    * @alias module:api/FullTextSearchApi
    * @class
    * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
    * default to {@link module:ApiClient#instance} if unspecified.
    */
    constructor(apiClient) {
        this.apiClient = apiClient || ApiClient.instance;
    }


    /**
     * Callback function to receive the result of the v1FullTextGet operation.
     * @callback module:api/FullTextSearchApi~v1FullTextGetCallback
     * @param {String} error Error message, if any.
     * @param {Array.<module:model/DTOSecFilingResultDto>} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * 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 {Object} opts Optional parameters
     * @param {String} [formType] Filter by form type (e.g., \"10-K\", \"8-K\"). Multiple values can be comma-separated
     * @param {String} [fillingDateStart] Filter by filling date start (inclusive), format YYYY-MM-DD
     * @param {String} [fillingDateEnd] Filter by filling date end (inclusive), format YYYY-MM-DD
     * @param {String} [textContains] Keywords that the text must contain. Multiple values can be comma-separated
     * @param {String} [textNotContain] Keywords that the text must not contain. Multiple values can be comma-separated
     * @param {Number} [pageSize] Number of results per page (default: 100)
     * @param {Number} [pageNumber] Page number to retrieve (default: 1)
     * @param {String} [sortBy = 'AccessionNumber')] Field to sort by (default: AccessionNumber)
     * @param {String} [sortOrder = 'asc')] Sort order (asc or desc). Defaults to asc
     * @param {module:api/FullTextSearchApi~v1FullTextGetCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link Array.<module:model/DTOSecFilingResultDto>}
     */
    v1FullTextGet(opts, callback) {
      opts = opts || {};
      let postBody = null;

      let pathParams = {
      };
      let queryParams = {
        'form_type': opts['formType'],
        'filling_date_start': opts['fillingDateStart'],
        'filling_date_end': opts['fillingDateEnd'],
        'text_contains': opts['textContains'],
        'text_not_contain': opts['textNotContain'],
        'page_size': opts['pageSize'],
        'page_number': opts['pageNumber'],
        'sort_by': opts['sortBy'],
        'sort_order': opts['sortOrder']
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['APIKey', 'JWT'];
      let contentTypes = [];
      let accepts = ['application/json'];
      let returnType = [DTOSecFilingResultDto];
      return this.apiClient.callApi(
        '/v1/full-text', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null, callback
      );
    }


}
