sec-edgar-api 0.0.5 → 0.0.7
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.
- package/README.md +9 -45
- package/build/index.d.ts +2 -7
- package/build/index.js +16 -8
- package/build/services/DocumentParser/DocumentParser.d.ts +16 -0
- package/build/services/DocumentParser/DocumentParser.js +22 -0
- package/build/services/DocumentParser/XMLNode/ColNode.d.ts +18 -0
- package/build/services/DocumentParser/XMLNode/ColNode.js +74 -0
- package/build/services/DocumentParser/XMLNode/DocumentNode.d.ts +3 -0
- package/build/services/DocumentParser/XMLNode/DocumentNode.js +27 -0
- package/build/services/DocumentParser/XMLNode/HRNode.d.ts +3 -0
- package/build/services/DocumentParser/XMLNode/HRNode.js +27 -0
- package/build/services/DocumentParser/XMLNode/NonTableNode.d.ts +3 -0
- package/build/services/DocumentParser/XMLNode/NonTableNode.js +27 -0
- package/build/services/DocumentParser/XMLNode/RowNode.d.ts +30 -0
- package/build/services/DocumentParser/XMLNode/RowNode.js +177 -0
- package/build/services/DocumentParser/XMLNode/TableNode.d.ts +20 -0
- package/build/services/DocumentParser/XMLNode/TableNode.js +132 -0
- package/build/services/DocumentParser/XMLNode/XMLNode.d.ts +37 -0
- package/build/services/DocumentParser/XMLNode/XMLNode.js +154 -0
- package/build/services/DocumentParser/XMLParser.d.ts +40 -0
- package/build/services/DocumentParser/XMLParser.js +306 -0
- package/build/services/DocumentParser/index.d.ts +2 -0
- package/build/services/DocumentParser/index.js +4 -0
- package/build/services/DocumentParser/parsers/index.d.ts +9 -0
- package/build/services/DocumentParser/parsers/index.js +11 -0
- package/build/services/DocumentParser/parsers/parse-form-10k.d.ts +3 -0
- package/build/services/DocumentParser/parsers/parse-form-10k.js +78 -0
- package/build/services/DocumentParser/parsers/parse-form-13g.d.ts +8 -0
- package/build/services/DocumentParser/parsers/parse-form-13g.js +88 -0
- package/build/services/DocumentParser/parsers/parse-form-4.d.ts +8 -0
- package/build/services/DocumentParser/parsers/parse-form-4.js +220 -0
- package/build/services/ReportParser/ReportParser.d.ts +2 -2
- package/build/services/ReportParser/ReportParser.js +8 -4
- package/build/services/SecEdgarApi/RequestWrapper.d.ts +37 -0
- package/build/services/SecEdgarApi/RequestWrapper.js +147 -0
- package/build/services/SecEdgarApi/SecEdgarApi.d.ts +156 -22
- package/build/services/SecEdgarApi/SecEdgarApi.js +314 -32
- package/build/types/common.type.d.ts +12 -0
- package/build/types/common.type.js +2 -0
- package/build/types/index.d.ts +2 -0
- package/build/types/index.js +2 -0
- package/build/types/parsed-filings.type.d.ts +66 -0
- package/build/types/parsed-filings.type.js +2 -0
- package/build/types/submission.type.d.ts +19 -1
- package/package.json +1 -5
- package/build/.DS_Store +0 -0
- package/build/downloader.d.ts +0 -6
- package/build/downloader.js +0 -9
- package/build/services/FactFileReader/FactFileReader.d.ts +0 -30
- package/build/services/FactFileReader/FactFileReader.js +0 -36
- package/build/services/FactFileReader/index.d.ts +0 -2
- package/build/services/FactFileReader/index.js +0 -4
- package/build/services/FactsDownloader/Downloader.d.ts +0 -26
- package/build/services/FactsDownloader/Downloader.js +0 -102
- package/build/services/FactsDownloader/FactsDownloader.d.ts +0 -37
- package/build/services/FactsDownloader/FactsDownloader.js +0 -131
- package/build/services/FactsDownloader/Unzipper.d.ts +0 -40
- package/build/services/FactsDownloader/Unzipper.js +0 -40
- package/build/services/FactsDownloader/index.d.ts +0 -2
- package/build/services/FactsDownloader/index.js +0 -4
- package/build/services/SecEdgarApi/Client.d.ts +0 -44
- package/build/services/SecEdgarApi/Client.js +0 -104
- package/build/services/SecEdgarApi/Downloader.d.ts +0 -26
- package/build/services/SecEdgarApi/Downloader.js +0 -102
- package/build/services/SecEdgarApi/FactsDownloader.d.ts +0 -30
- package/build/services/SecEdgarApi/FactsDownloader.js +0 -124
- package/build/services/SecEdgarApi/SecConnector.d.ts +0 -47
- package/build/services/SecEdgarApi/SecConnector.js +0 -143
- package/build/services/SecEdgarApi/Unzipper.d.ts +0 -40
- package/build/services/SecEdgarApi/Unzipper.js +0 -40
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var fs = require("fs");
|
|
4
|
-
var _unzipper = require("unzipper");
|
|
5
|
-
var Unzipper = /** @class */ (function () {
|
|
6
|
-
function Unzipper(args) {
|
|
7
|
-
if (args === void 0) { args = { fileManager: fs, unzipper: _unzipper }; }
|
|
8
|
-
var fileManager = args.fileManager, unzipper = args.unzipper;
|
|
9
|
-
this.fileManager = fileManager;
|
|
10
|
-
this.unzipper = unzipper;
|
|
11
|
-
}
|
|
12
|
-
Unzipper.prototype.unzip = function (params) {
|
|
13
|
-
var _this = this;
|
|
14
|
-
var inputFilename = params.inputFilename, outputDirname = params.outputDirname, onChunk = params.onChunk, onError = params.onError, _a = params.deleteOriginal, deleteOriginal = _a === void 0 ? false : _a;
|
|
15
|
-
return new Promise(function (resolve, reject) {
|
|
16
|
-
var file = _this.fileManager.createReadStream(inputFilename);
|
|
17
|
-
var filesize = _this.fileManager.statSync(inputFilename).size;
|
|
18
|
-
var unzipped = _this.unzipper.Extract({ path: outputDirname });
|
|
19
|
-
var lengthCurrent = 0;
|
|
20
|
-
file.on('data', function (chunk) {
|
|
21
|
-
lengthCurrent += chunk.length;
|
|
22
|
-
var percentComplete = lengthCurrent / filesize;
|
|
23
|
-
onChunk === null || onChunk === void 0 ? void 0 : onChunk({ percentComplete: percentComplete, chunk: chunk });
|
|
24
|
-
});
|
|
25
|
-
file.pipe(unzipped);
|
|
26
|
-
file.on('end', function () {
|
|
27
|
-
if (deleteOriginal) {
|
|
28
|
-
_this.fileManager.unlinkSync(inputFilename);
|
|
29
|
-
}
|
|
30
|
-
resolve(true);
|
|
31
|
-
});
|
|
32
|
-
file.on('error', function (err) {
|
|
33
|
-
onError === null || onError === void 0 ? void 0 : onError(err);
|
|
34
|
-
reject(false);
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
return Unzipper;
|
|
39
|
-
}());
|
|
40
|
-
exports.default = Unzipper;
|