// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../resource'; import * as Core from '../core'; import * as FilingsDocumentsAPI from './filings-documents'; export class FilingsDocuments extends APIResource { /** * Returns the count of filings documents along with other response fields. */ count(query: FilingsDocumentCountParams, options?: Core.RequestOptions): Core.APIPromise { return this._client.get('/count', { query, ...options }); } /** * Returns the filings documents within FactSet coverage along with other response * fields. */ search( query: FilingsDocumentSearchParams, options?: Core.RequestOptions, ): Core.APIPromise { return this._client.get('/search', { query, ...options }); } } /** * Filings Response Object */ export interface InvestmentResearch { /** * Data Array Object */ data?: Array; /** * Meta Object */ meta?: InvestmentResearch.Meta; } export namespace InvestmentResearch { export interface Data { /** * A unique identifier given to each EDGAR filings document. */ accession?: string; /** * Refers to all companies mentioned in the document. This could also include the * primary company id as well. * * **Note:** For the "allIds" and "primaryIds" fields: * * - These identifiers can be either SEDOLs or CUSIPs, depending on the search * criteria and the type of identifiers specified in your request. * - The API will return the corresponding identifiers based on the search * parameters provided. */ allIds?: Array; /** * - Comma-separated list of country, industry, and subject codes. * - Sourced from "/reference/categories" with two-letter codes (SB for subjects, * IN for industries, LN for languages, CN for countries, RN for regions, DT for * document types). */ categories?: Array; /** * Unique identifier for a document. */ documentId?: string; /** * Publish date and time of the latest version (in ISO 8601 format, UTC). */ filingsDateTime?: string; /** * Filings specific metadata providing info around the size of the document. */ filingSize?: string; /** * A secure HTTPS link for downloading the associated document. */ filingsLink?: string; /** * Filings specific metadata providing info around the form type (e.g. 8K, 10K, * etc.) */ formType?: string; /** * Headline of the story, actual time and date of the event. */ headline?: string; /** * Refers to the main company a particular document refers to. */ primaryIds?: Array; /** * Returns IDs used in the id's parameter. The identifier type is based on what was * used in the parameter. */ searchIds?: string; /** * Provides the source of the document, and the source value is one among those * provided by the "/reference/sources" endpoint. */ source?: string; } /** * Meta Object */ export interface Meta { /** * Pagination Object */ pagination?: Meta.Pagination; } export namespace Meta { /** * Pagination Object */ export interface Pagination { /** * This field acts as a flag for the exact count of results and is defaulted to * false as the API should always return the exact count of results. */ isEstimatedTotal?: boolean; /** * Total number of files the API returns for a particular query. */ total?: number; } } } /** * Filings Response Object */ export interface ResponseCount { /** * Data Array Object */ data?: Array; } export namespace ResponseCount { export interface Data { /** * id */ id?: string; /** * source value */ count?: string; /** * source */ source?: string; } } export interface FilingsDocumentCountParams { /** * Code for document source to include.This is a comma-separated list. Use the * `/reference/sources` endpoint to get the list of available sources. */ sources: Array; /** * End Date. Format is YYYYMMDD or relative +/- days (0,-1,etc). */ endDate?: string; /** * Requested symbols or securities. This is a comma-separated list with a maximum * limit of 1000. Each symbol can be a FactSet exchange symbol, CUSIP, or SEDOL. */ ids?: Array; /** * Start Date. Format is YYYYMMDD or relative +/- days (0,-1,etc). * * **Note:** **The API supports data from 1995 onwards. Ensure that the provided * Date falls within this range for accurate results.** */ startDate?: string; } export interface FilingsDocumentSearchParams { /** * Code for document source to include. This is a comma-separated list. Use the * `/reference/sources` endpoint to get the list of available sources. */ sources: Array; /** * Number of results to return per page. */ _paginationLimit?: number; /** * Page number of the results to return. */ _paginationOffset?: number; /** * Code for categories to include. This is a comma-separated list. Use the * `/reference/categories` endpoint to get the list of available categories. * * Default = All categories. */ categories?: Array; /** * A unique identifier given to each EDGAR filings document. e.g. * accession=0001013237-21-000069&sources=EDG. * * **Note: When used in conjunction with the 'source' parameter set to 'EDGAR', the * API considers this accession for data retrieval. For non-EDGAR sources, this * parameter is ignored.** */ edgarAccession?: string; /** * Restricts the search to include any form types of EDGAR. * * **Note:This parameter applies exclusively to EDGAR searches; it is ignored when * used with non-EDGAR sources.** */ edgarFormType?: string; /** * End Date. Format is YYYYMMDD or relative +/- days (0,-1,etc). */ endDate?: string; /** * Requested symbols or securities. This is a comma-separated list with a maximum * limit of 1000. Each symbol can be a FactSet exchange symbol, CUSIP, or SEDOL. */ ids?: Array; /** * Type of identifier search * * - true - Returns headlines of stories that have the searched identifier(s) as * the primary identifier. * - false - Returns headlines of stories that mentioned or referred to the * identifier. */ primaryId?: true | false; /** * Restricts the search to include only document stories which include the text * searched. */ searchText?: string; /** * Sorting the results in chronological (oldest to newest) or reverse chronological * (newest to oldest) order. * * - desc - sorting results in reverse chronological (descending) order. This is * the default value if the sort parameter isn't used in the query. * * - asc - sorting results in chronological (ascending) order. If a start date is * not specified, the API has a 10-year searching limitation. */ sort?: 'asc' | 'desc'; /** * Start Date. Format is YYYYMMDD or relative +/- days (0,-1,etc). * * **Note:** **The API supports data from 1995 onwards. Ensure that the provided * Date falls within this range for accurate results.** */ startDate?: string; /** * timeZone to return story dates and times.Time zones, represented in POSIX * format, are automatically adjusted for daylight savings. timeZone names are * sourced from the IANA timezone registry. */ timeZone?: string; } export namespace FilingsDocuments { export import InvestmentResearch = FilingsDocumentsAPI.InvestmentResearch; export import ResponseCount = FilingsDocumentsAPI.ResponseCount; export import FilingsDocumentCountParams = FilingsDocumentsAPI.FilingsDocumentCountParams; export import FilingsDocumentSearchParams = FilingsDocumentsAPI.FilingsDocumentSearchParams; }