sec-edgar-api 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,6 +35,10 @@ export default class ReportParser {
35
35
  * @see https://www.sec.gov/edgar/sec-api-documentation
36
36
  */
37
37
  parseReportsRaw(companyFactListData: Pick<CompanyFactListData, 'facts'>, options?: ParseReportsOptions): ReportRaw[];
38
+ /**
39
+ * parseReportsRaw but removes meta data from the report
40
+ */
41
+ parseReportsRawNoMeta(companyFactListData: Pick<CompanyFactListData, 'facts'>, options?: ParseReportsOptions): Record<string, number>[];
38
42
  /**
39
43
  * Avoids deep nesting logic while iteratating through company facts
40
44
  *
@@ -53,6 +53,25 @@ var ReportParser = /** @class */ (function () {
53
53
  ReportParser.prototype.parseReportsRaw = function (companyFactListData, options) {
54
54
  return this.reportRawParser.parseReports(companyFactListData, options);
55
55
  };
56
+ /**
57
+ * parseReportsRaw but removes meta data from the report
58
+ */
59
+ ReportParser.prototype.parseReportsRawNoMeta = function (companyFactListData, options) {
60
+ var reportsRaw = this.parseReportsRaw(companyFactListData, options);
61
+ reportsRaw.forEach(function (reportRaw) {
62
+ var report = reportRaw;
63
+ delete report.dateFiled;
64
+ delete report.dateReport;
65
+ delete report.fiscalPeriod;
66
+ delete report.fiscalYear;
67
+ delete report.form;
68
+ delete report.frame;
69
+ delete report.isTTM;
70
+ delete report.reportType;
71
+ delete report.taxonomy;
72
+ });
73
+ return reportsRaw;
74
+ };
56
75
  /**
57
76
  * Avoids deep nesting logic while iteratating through company facts
58
77
  *
@@ -65,7 +65,6 @@ var FactsDownloader = /** @class */ (function () {
65
65
  var _this = this;
66
66
  return __generator(this, function (_b) {
67
67
  outputDirname = params.outputDirname, onChunk = params.onChunk, onDownloadComplete = params.onDownloadComplete, onError = params.onError, onComplete = params.onComplete, _a = params.unzip, unzip = _a === void 0 ? true : _a;
68
- // writes download and unzip progress with percentage in terminal if useWriteProgressBar is true
69
68
  return [2 /*return*/, new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
70
69
  var filename, e_1;
71
70
  return __generator(this, function (_a) {
@@ -70,11 +70,14 @@ export default class SecEdgarApi {
70
70
  */
71
71
  getFactFrame(params: GetFactFrameParams): Promise<MultiCompanyFactFrame>;
72
72
  /**
73
+ * Note: Properties that are not provied from report are calculated an may not be accurate,
74
+ * verify results finance.yahoo.com (ex: https://finance.yahoo.com/quote/AAPL/financials)
75
+ *
76
+ * Please contribute to improve resolving report properties: https://github.com/andyevers/sec-edgar-api
77
+ *
73
78
  * Parses reports from company facts. Calculates missing properties and uses a single interface
74
79
  * for all reports. This includes only 10-K and 10-Q annual and quarterly reports. To include
75
- * all reports, use getReportsRaw
76
- *
77
- * Note that calculated properties are estimated if they are not available in the company facts.
80
+ * all reports, use getReportsRaw.
78
81
  */
79
82
  getReports(params: GetSymbolParams): Promise<ReportWrapper[]>;
80
83
  /**
@@ -86,6 +89,8 @@ export default class SecEdgarApi {
86
89
  * Downloads the companyfacts.zip file and extracts the directory containing all company
87
90
  * reports available from sec.gov. After downloading, you can use factFileReader and reportParser
88
91
  * to get and read reports.
92
+ *
93
+ * Note: Over 15GB of data is downloaded and extracted.
89
94
  */
90
95
  downloadCompanyFactsDirectory(params: DownloadCompanyFactsDirectoryParams): Promise<boolean>;
91
96
  }
@@ -131,11 +131,14 @@ var SecEdgarApi = /** @class */ (function () {
131
131
  });
132
132
  };
133
133
  /**
134
+ * Note: Properties that are not provied from report are calculated an may not be accurate,
135
+ * verify results finance.yahoo.com (ex: https://finance.yahoo.com/quote/AAPL/financials)
136
+ *
137
+ * Please contribute to improve resolving report properties: https://github.com/andyevers/sec-edgar-api
138
+ *
134
139
  * Parses reports from company facts. Calculates missing properties and uses a single interface
135
140
  * for all reports. This includes only 10-K and 10-Q annual and quarterly reports. To include
136
- * all reports, use getReportsRaw
137
- *
138
- * Note that calculated properties are estimated if they are not available in the company facts.
141
+ * all reports, use getReportsRaw.
139
142
  */
140
143
  SecEdgarApi.prototype.getReports = function (params) {
141
144
  return __awaiter(this, void 0, void 0, function () {
@@ -171,6 +174,8 @@ var SecEdgarApi = /** @class */ (function () {
171
174
  * Downloads the companyfacts.zip file and extracts the directory containing all company
172
175
  * reports available from sec.gov. After downloading, you can use factFileReader and reportParser
173
176
  * to get and read reports.
177
+ *
178
+ * Note: Over 15GB of data is downloaded and extracted.
174
179
  */
175
180
  SecEdgarApi.prototype.downloadCompanyFactsDirectory = function (params) {
176
181
  return __awaiter(this, void 0, void 0, function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sec-edgar-api",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Fetch and parse SEC earnings reports and other filings. Useful for financial analysis.",
5
5
  "main": "build/index.js",
6
6
  "author": "Andrew Evers (https://github.com/andyevers)",
@@ -15,7 +15,8 @@
15
15
  },
16
16
  "scripts": {
17
17
  "test": "jest test",
18
- "build": "tsc"
18
+ "build": "tsc",
19
+ "publish": "npm run build && npm publish"
19
20
  },
20
21
  "keywords": [
21
22
  "sec",