sec-edgar-api 0.3.4 → 0.4.1
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/build/services/DocumentParser/DocumentParser.d.ts +17 -1
- package/build/services/DocumentParser/DocumentParser.js +17 -2
- package/build/services/DocumentParser/DocumentXmlSplitter.d.ts +17 -0
- package/build/services/DocumentParser/DocumentXmlSplitter.js +38 -0
- package/build/services/DocumentParser/ObjectUtil.d.ts +20 -0
- package/build/services/DocumentParser/ObjectUtil.js +60 -0
- package/build/services/DocumentParser/XBRLParser/HeaderParser.d.ts +38 -0
- package/build/services/DocumentParser/XBRLParser/HeaderParser.js +138 -0
- package/build/services/DocumentParser/XBRLParser/InstanceParser.d.ts +6 -0
- package/build/services/DocumentParser/XBRLParser/InstanceParser.js +106 -0
- package/build/services/DocumentParser/XBRLParser/LinkbaseParser.d.ts +13 -0
- package/build/services/DocumentParser/XBRLParser/LinkbaseParser.js +98 -0
- package/build/services/DocumentParser/XBRLParser/SchemaParser.d.ts +11 -0
- package/build/services/DocumentParser/XBRLParser/SchemaParser.js +142 -0
- package/build/services/DocumentParser/XBRLParser/XBRLParser.d.ts +34 -0
- package/build/services/DocumentParser/XBRLParser/XBRLParser.js +68 -0
- package/build/services/DocumentParser/XBRLParser/util-xbrl.d.ts +17 -0
- package/build/services/DocumentParser/XBRLParser/util-xbrl.js +50 -0
- package/build/services/DocumentParser/XMLParser.d.ts +9 -38
- package/build/services/DocumentParser/XMLParser.js +87 -280
- package/build/services/DocumentParser/XMLParserLegacy.d.ts +43 -0
- package/build/services/DocumentParser/XMLParserLegacy.js +308 -0
- package/build/services/DocumentParser/parsers/index.d.ts +10 -0
- package/build/services/DocumentParser/parsers/index.js +10 -0
- package/build/services/DocumentParser/parsers/parse-companies.d.ts +5 -0
- package/build/services/DocumentParser/parsers/parse-companies.js +52 -0
- package/build/services/DocumentParser/parsers/parse-current-filings-xbrl.d.ts +2 -0
- package/build/services/DocumentParser/parsers/parse-current-filings-xbrl.js +104 -0
- package/build/services/DocumentParser/parsers/parse-current-filings.d.ts +2 -0
- package/build/services/DocumentParser/parsers/parse-current-filings.js +76 -0
- package/build/services/DocumentParser/parsers/parse-form-10k.d.ts +1 -1
- package/build/services/DocumentParser/parsers/parse-form-10k.js +2 -2
- package/build/services/DocumentParser/parsers/parse-form-13g.d.ts +1 -1
- package/build/services/DocumentParser/parsers/parse-form-13g.js +2 -2
- package/build/services/DocumentParser/parsers/parse-form-4.d.ts +1 -1
- package/build/services/DocumentParser/parsers/parse-form-4.js +2 -2
- package/build/services/DocumentParser/parsers/parse-form-def14a.d.ts +1 -1
- package/build/services/DocumentParser/parsers/parse-form-def14a.js +2 -2
- package/build/services/DocumentParser/parsers/parse-insider-transaction.d.ts +7 -0
- package/build/services/DocumentParser/parsers/parse-insider-transaction.js +199 -0
- package/build/services/DocumentParser/parsers/parse-xbrl.d.ts +8 -0
- package/build/services/DocumentParser/parsers/parse-xbrl.js +179 -0
- package/build/services/HtmlTableExtractor/HtmlTableExtractor.d.ts +45 -0
- package/build/services/HtmlTableExtractor/HtmlTableExtractor.js +430 -0
- package/build/services/HtmlTableExtractor/index.d.ts +2 -0
- package/build/services/HtmlTableExtractor/index.js +4 -0
- package/build/services/ReportRawBuilder/FactGrouper.js +6 -6
- package/build/services/ReportRawBuilder/FactSplitAdjuster.js +2 -1
- package/build/services/SecEdgarApi/SecEdgarApi.d.ts +82 -15
- package/build/services/SecEdgarApi/SecEdgarApi.js +170 -21
- package/build/types/company-search.type.d.ts +5 -0
- package/build/types/company-search.type.js +2 -0
- package/build/types/current-filings.type.d.ts +57 -0
- package/build/types/current-filings.type.js +2 -0
- package/build/types/index.d.ts +3 -0
- package/build/types/index.js +3 -0
- package/build/types/insider-transaction.type.d.ts +32 -0
- package/build/types/insider-transaction.type.js +2 -0
- package/build/types/parsed-filings.type.d.ts +3 -3
- package/build/types/xbrl.type.d.ts +155 -0
- package/build/types/xbrl.type.js +2 -0
- package/build/util/constants.d.ts +2 -0
- package/build/util/constants.js +5 -0
- package/package.json +1 -1
|
@@ -46,6 +46,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46
46
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
50
|
+
var t = {};
|
|
51
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
52
|
+
t[p] = s[p];
|
|
53
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
54
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
55
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
56
|
+
t[p[i]] = s[p[i]];
|
|
57
|
+
}
|
|
58
|
+
return t;
|
|
59
|
+
};
|
|
49
60
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
61
|
var cik_by_symbol_1 = require("../../util/cik-by-symbol");
|
|
51
62
|
var Client_1 = require("../Client");
|
|
@@ -343,7 +354,8 @@ var SecEdgarApi = /** @class */ (function () {
|
|
|
343
354
|
});
|
|
344
355
|
};
|
|
345
356
|
/**
|
|
346
|
-
*
|
|
357
|
+
* If url is provided, all other props are ignored. Otherwise, both accessionNumber
|
|
358
|
+
* and symbol (symbol or cik) are required. provide fileName if different from `${accessionNumber}.txt`
|
|
347
359
|
*
|
|
348
360
|
* Some form types can be parsed using the DocumentParser such as form 4 (insider transactions) and form 13g (institutional holders)
|
|
349
361
|
*
|
|
@@ -351,32 +363,50 @@ var SecEdgarApi = /** @class */ (function () {
|
|
|
351
363
|
*
|
|
352
364
|
* @see https://www.sec.gov/forms for a list of form types
|
|
353
365
|
*/
|
|
354
|
-
SecEdgarApi.prototype.
|
|
366
|
+
SecEdgarApi.prototype.getDocument = function (params) {
|
|
355
367
|
return __awaiter(this, void 0, void 0, function () {
|
|
356
|
-
var accessionNumber,
|
|
357
|
-
return __generator(this, function (
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
368
|
+
var _a, accessionNumber, fileName, _b, symbol, urlProp, url;
|
|
369
|
+
return __generator(this, function (_c) {
|
|
370
|
+
_a = params.accessionNumber, accessionNumber = _a === void 0 ? '' : _a, fileName = params.fileName, _b = params.symbol, symbol = _b === void 0 ? '' : _b, urlProp = params.url;
|
|
371
|
+
if (!urlProp && (!accessionNumber || !symbol)) {
|
|
372
|
+
throw new Error('Must provide either url or (a)ccessionNumber and symbol)');
|
|
373
|
+
}
|
|
374
|
+
url = urlProp !== null && urlProp !== void 0 ? urlProp : this.buildDocumentUrl({ symbol: symbol, accessionNumber: accessionNumber, fileName: fileName });
|
|
375
|
+
return [2 /*return*/, this.request(url, true)];
|
|
361
376
|
});
|
|
362
377
|
});
|
|
363
378
|
};
|
|
364
379
|
/**
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
* Some form types can be parsed using the DocumentParser such as form 4 (insider transactions) and form 13g (institutional holders)
|
|
368
|
-
*
|
|
369
|
-
* endpoint: `https://www.sec.gov/Archives/edgar/data/${cik}/${accessionNumber}/${primaryDocument}`
|
|
380
|
+
* Fetches SEC document and parses XBRL data. If url is provided, symbol and accessionNumber are ignored.
|
|
370
381
|
*
|
|
371
|
-
*
|
|
382
|
+
* Use "include" params to specify what to parse. If not provided, all data is parsed.
|
|
372
383
|
*/
|
|
373
|
-
SecEdgarApi.prototype.
|
|
384
|
+
SecEdgarApi.prototype.getDocumentXbrl = function (params) {
|
|
374
385
|
return __awaiter(this, void 0, void 0, function () {
|
|
386
|
+
var url, accessionNumber, symbol, options, xml;
|
|
375
387
|
return __generator(this, function (_a) {
|
|
376
|
-
|
|
388
|
+
switch (_a.label) {
|
|
389
|
+
case 0:
|
|
390
|
+
url = params.url, accessionNumber = params.accessionNumber, symbol = params.symbol, options = __rest(params, ["url", "accessionNumber", "symbol"]);
|
|
391
|
+
return [4 /*yield*/, this.getDocument({ url: url, accessionNumber: accessionNumber, symbol: symbol })];
|
|
392
|
+
case 1:
|
|
393
|
+
xml = _a.sent();
|
|
394
|
+
return [2 /*return*/, this.documentParser.parseXbrl(__assign({ xml: xml }, options))];
|
|
395
|
+
}
|
|
377
396
|
});
|
|
378
397
|
});
|
|
379
398
|
};
|
|
399
|
+
/**
|
|
400
|
+
* Builds a url for a document. If fileName is not provided, it defaults to `${accessionNumber}.txt`
|
|
401
|
+
*
|
|
402
|
+
* format: `https://www.sec.gov/Archives/edgar/data/${cik}/${accessionNumberNoHyphen)}/${fileNameAccessionFile}`
|
|
403
|
+
*/
|
|
404
|
+
SecEdgarApi.prototype.buildDocumentUrl = function (params) {
|
|
405
|
+
var symbol = params.symbol, accessionNumber = params.accessionNumber, fileNameProp = params.fileName;
|
|
406
|
+
var cik = this.getCikString(symbol);
|
|
407
|
+
var fileName = fileNameProp !== null && fileNameProp !== void 0 ? fileNameProp : "".concat(accessionNumber, ".txt");
|
|
408
|
+
return "".concat(this.baseUrlSec, "/Archives/edgar/data/").concat(cik, "/").concat(accessionNumber.replace(/-/g, ''), "/").concat(fileName);
|
|
409
|
+
};
|
|
380
410
|
/**
|
|
381
411
|
* Used for getting insider transactions. extracts insider transaction urls from submission list response, and parses the xml doc.
|
|
382
412
|
*
|
|
@@ -400,7 +430,7 @@ var SecEdgarApi = /** @class */ (function () {
|
|
|
400
430
|
case 0:
|
|
401
431
|
_b = (_a = this.documentParser).parseForm4;
|
|
402
432
|
_c = {};
|
|
403
|
-
return [4 /*yield*/, this.
|
|
433
|
+
return [4 /*yield*/, this.getDocument(params)];
|
|
404
434
|
case 1: return [2 /*return*/, _b.apply(_a, [(_c.xml = _d.sent(), _c)])];
|
|
405
435
|
}
|
|
406
436
|
});
|
|
@@ -435,7 +465,7 @@ var SecEdgarApi = /** @class */ (function () {
|
|
|
435
465
|
case 0:
|
|
436
466
|
_b = (_a = this.documentParser).parseForm13g;
|
|
437
467
|
_c = {};
|
|
438
|
-
return [4 /*yield*/, this.
|
|
468
|
+
return [4 /*yield*/, this.getDocument(params)];
|
|
439
469
|
case 1: return [2 /*return*/, _b.apply(_a, [(_c.xml = _d.sent(), _c)])];
|
|
440
470
|
}
|
|
441
471
|
});
|
|
@@ -460,7 +490,16 @@ var SecEdgarApi = /** @class */ (function () {
|
|
|
460
490
|
*/
|
|
461
491
|
SecEdgarApi.prototype.createRequestEarningsReports = function (params) {
|
|
462
492
|
var _this = this;
|
|
463
|
-
var submissions = this.getCreateRequestSubmissions(params, [
|
|
493
|
+
var submissions = this.getCreateRequestSubmissions(params, [
|
|
494
|
+
'10-Q',
|
|
495
|
+
'10-Q/A',
|
|
496
|
+
'10-K',
|
|
497
|
+
'10-K/A',
|
|
498
|
+
'20-F',
|
|
499
|
+
'20-F/A',
|
|
500
|
+
'40-F',
|
|
501
|
+
'40-F/A',
|
|
502
|
+
]);
|
|
464
503
|
var options = { maxRequests: params.maxRequests };
|
|
465
504
|
var sendRequest = function (params) { return __awaiter(_this, void 0, void 0, function () {
|
|
466
505
|
var _a, _b;
|
|
@@ -470,7 +509,7 @@ var SecEdgarApi = /** @class */ (function () {
|
|
|
470
509
|
case 0:
|
|
471
510
|
_b = (_a = this.documentParser).parseForm10k;
|
|
472
511
|
_c = {};
|
|
473
|
-
return [4 /*yield*/, this.
|
|
512
|
+
return [4 /*yield*/, this.getDocument(params)];
|
|
474
513
|
case 1: return [2 /*return*/, _b.apply(_a, [(_c.xml = _d.sent(), _c)])];
|
|
475
514
|
}
|
|
476
515
|
});
|
|
@@ -504,7 +543,7 @@ var SecEdgarApi = /** @class */ (function () {
|
|
|
504
543
|
case 0:
|
|
505
544
|
_b = (_a = this.documentParser).parseFormDef14a;
|
|
506
545
|
_c = {};
|
|
507
|
-
return [4 /*yield*/, this.
|
|
546
|
+
return [4 /*yield*/, this.getDocument(params)];
|
|
508
547
|
case 1: return [2 /*return*/, _b.apply(_a, [(_c.xml = _d.sent(), _c)])];
|
|
509
548
|
}
|
|
510
549
|
});
|
|
@@ -517,7 +556,7 @@ var SecEdgarApi = /** @class */ (function () {
|
|
|
517
556
|
});
|
|
518
557
|
};
|
|
519
558
|
/**
|
|
520
|
-
* Gets list of
|
|
559
|
+
* Gets list of filings for a day up to 5 days ago.
|
|
521
560
|
*
|
|
522
561
|
* @see https://www.sec.gov/edgar/searchedgar/currentevents
|
|
523
562
|
*/
|
|
@@ -551,6 +590,116 @@ var SecEdgarApi = /** @class */ (function () {
|
|
|
551
590
|
});
|
|
552
591
|
});
|
|
553
592
|
};
|
|
593
|
+
SecEdgarApi.prototype.getCurrentFilings = function (params) {
|
|
594
|
+
var _a;
|
|
595
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
596
|
+
var _b, _c, page, _d, itemsPerPage, formType, searchType, symbol, type, owner, offset, cik, url, xml;
|
|
597
|
+
return __generator(this, function (_e) {
|
|
598
|
+
switch (_e.label) {
|
|
599
|
+
case 0:
|
|
600
|
+
_b = params !== null && params !== void 0 ? params : {}, _c = _b.page, page = _c === void 0 ? 1 : _c, _d = _b.itemsPerPage, itemsPerPage = _d === void 0 ? 100 : _d, formType = _b.formType, searchType = _b.searchType, symbol = _b.symbol;
|
|
601
|
+
type = (_a = formType === null || formType === void 0 ? void 0 : formType.replace(/\s/, '+')) !== null && _a !== void 0 ? _a : null;
|
|
602
|
+
owner = searchType !== null && searchType !== void 0 ? searchType : ((formType === null || formType === void 0 ? void 0 : formType.includes(' ')) ? 'include' : 'only');
|
|
603
|
+
offset = (page - 1) * Math.max(1, itemsPerPage || 100);
|
|
604
|
+
cik = symbol ? Number(this.getCikString(symbol)) : null;
|
|
605
|
+
url = "".concat(this.baseUrlSec, "/cgi-bin/browse-edgar?action=getcurrent&start=").concat(offset, "&count=").concat(itemsPerPage, "&output=atom");
|
|
606
|
+
if (cik)
|
|
607
|
+
url += "&CIK=".concat(symbol);
|
|
608
|
+
if (type)
|
|
609
|
+
url += "&type=".concat(formType);
|
|
610
|
+
if (owner)
|
|
611
|
+
url += "&owner=".concat(searchType);
|
|
612
|
+
return [4 /*yield*/, this.request(url, true)];
|
|
613
|
+
case 1:
|
|
614
|
+
xml = (_e.sent());
|
|
615
|
+
return [2 /*return*/, this.documentParser.parseCurrentFilings({ xml: xml })];
|
|
616
|
+
}
|
|
617
|
+
});
|
|
618
|
+
});
|
|
619
|
+
};
|
|
620
|
+
/**
|
|
621
|
+
* @see https://www.sec.gov/structureddata/rss-feeds-submitted-filings
|
|
622
|
+
*/
|
|
623
|
+
SecEdgarApi.prototype.getCurrentFilingsXBRL = function (params) {
|
|
624
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
625
|
+
var _a, taxonomy, urlByTaxonomy, url, xml;
|
|
626
|
+
return __generator(this, function (_b) {
|
|
627
|
+
switch (_b.label) {
|
|
628
|
+
case 0:
|
|
629
|
+
_a = (params !== null && params !== void 0 ? params : {}).taxonomy, taxonomy = _a === void 0 ? 'allXbrl' : _a;
|
|
630
|
+
urlByTaxonomy = {
|
|
631
|
+
usGaap: 'https://www.sec.gov/Archives/edgar/usgaap.rss.xml',
|
|
632
|
+
mutualFund: 'https://www.sec.gov/Archives/edgar/xbrl-rr.rss.xml',
|
|
633
|
+
inlineXbrl: 'https://www.sec.gov/Archives/edgar/xbrl-inline.rss.xml',
|
|
634
|
+
allXbrl: 'https://www.sec.gov/Archives/edgar/xbrlrss.all.xml',
|
|
635
|
+
};
|
|
636
|
+
url = urlByTaxonomy[taxonomy] || urlByTaxonomy.allXbrl;
|
|
637
|
+
return [4 /*yield*/, this.request(url, true)];
|
|
638
|
+
case 1:
|
|
639
|
+
xml = _b.sent();
|
|
640
|
+
return [2 /*return*/, this.documentParser.parseCurrentFilingsXbrl({ xml: xml })];
|
|
641
|
+
}
|
|
642
|
+
});
|
|
643
|
+
});
|
|
644
|
+
};
|
|
645
|
+
/**
|
|
646
|
+
* Gets insider transactions for a provided symbol or CIK.
|
|
647
|
+
*
|
|
648
|
+
* To get transactions by a specific owner, set isOwnerCik to true and provide
|
|
649
|
+
* the owner CIK for the symbol parameter.
|
|
650
|
+
*
|
|
651
|
+
* example at https://www.sec.gov/cgi-bin/own-disp?action=getissuer&CIK=0000320193
|
|
652
|
+
*/
|
|
653
|
+
SecEdgarApi.prototype.getInsiderTransactions = function (params) {
|
|
654
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
655
|
+
var page, symbol, itemsPerPage, _a, isOwnerCik, action, offset, cik, url, xml;
|
|
656
|
+
return __generator(this, function (_b) {
|
|
657
|
+
switch (_b.label) {
|
|
658
|
+
case 0:
|
|
659
|
+
page = params.page, symbol = params.symbol, itemsPerPage = params.itemsPerPage, _a = params.isOwnerCik, isOwnerCik = _a === void 0 ? false : _a;
|
|
660
|
+
action = isOwnerCik ? 'getowner' : 'getissuer';
|
|
661
|
+
offset = (page - 1) * Math.max(1, itemsPerPage || 100);
|
|
662
|
+
cik = this.getCikString(symbol);
|
|
663
|
+
url = "".concat(this.baseUrlSec, "/cgi-bin/own-disp?action=").concat(action, "&CIK=").concat(cik, "&owner=include&start=").concat(offset, "&count=").concat(itemsPerPage);
|
|
664
|
+
return [4 /*yield*/, this.request(url, true)];
|
|
665
|
+
case 1:
|
|
666
|
+
xml = (_b.sent());
|
|
667
|
+
return [2 /*return*/, this.documentParser.parseInsiderTransactions({ xml: xml })];
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
});
|
|
671
|
+
};
|
|
672
|
+
/**
|
|
673
|
+
* Search for companies from by name, sic code, or state.
|
|
674
|
+
*/
|
|
675
|
+
SecEdgarApi.prototype.searchCompanies = function (params) {
|
|
676
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
677
|
+
var sic, page, itemsPerPageProp, state, company, companyMatch, match, itemsPerPage, offset, url, xml;
|
|
678
|
+
return __generator(this, function (_a) {
|
|
679
|
+
switch (_a.label) {
|
|
680
|
+
case 0:
|
|
681
|
+
sic = params.sic, page = params.page, itemsPerPageProp = params.itemsPerPage, state = params.state, company = params.company, companyMatch = params.companyMatch;
|
|
682
|
+
match = companyMatch === 'startsWith' ? '' : 'contains';
|
|
683
|
+
itemsPerPage = Math.max(1, Math.min(100, itemsPerPageProp || 100));
|
|
684
|
+
offset = (page - 1) * itemsPerPage;
|
|
685
|
+
url = "".concat(this.baseUrlSec, "/cgi-bin/browse-edgar?action=getcompany&owner=exclude&&start=").concat(offset, "&count=").concat(itemsPerPage, "&hidefilings=0");
|
|
686
|
+
if (sic)
|
|
687
|
+
url += "&SIC=".concat(sic);
|
|
688
|
+
if (state)
|
|
689
|
+
url += "&State=".concat(state);
|
|
690
|
+
if (company)
|
|
691
|
+
url += "&company=".concat(company, "&match=").concat(match);
|
|
692
|
+
if (!sic && !state && !company) {
|
|
693
|
+
throw new Error('You must provide sic, company, or state filters');
|
|
694
|
+
}
|
|
695
|
+
return [4 /*yield*/, this.request(url, true)];
|
|
696
|
+
case 1:
|
|
697
|
+
xml = (_a.sent());
|
|
698
|
+
return [2 /*return*/, this.documentParser.parseCompanies({ xml: xml })];
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
});
|
|
702
|
+
};
|
|
554
703
|
return SecEdgarApi;
|
|
555
704
|
}());
|
|
556
705
|
exports.default = SecEdgarApi;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export interface CurrentFilingsXBRL {
|
|
2
|
+
title: string;
|
|
3
|
+
link: string;
|
|
4
|
+
description: string;
|
|
5
|
+
language: string;
|
|
6
|
+
pubDate: string;
|
|
7
|
+
lastBuildDate: string;
|
|
8
|
+
items: FilingItemXBRL[];
|
|
9
|
+
}
|
|
10
|
+
export interface FilingItemXBRL {
|
|
11
|
+
title: string;
|
|
12
|
+
link: string;
|
|
13
|
+
guid: string;
|
|
14
|
+
enclosureUrl: string;
|
|
15
|
+
enclosureLength: number;
|
|
16
|
+
enclosureType: string;
|
|
17
|
+
pubDate: string;
|
|
18
|
+
description: string;
|
|
19
|
+
companyName: string;
|
|
20
|
+
formType: string;
|
|
21
|
+
filingDate: string;
|
|
22
|
+
cikNumber: number;
|
|
23
|
+
accessionNumber: string;
|
|
24
|
+
fileNumber: string;
|
|
25
|
+
acceptanceDatetime: string;
|
|
26
|
+
period: string;
|
|
27
|
+
assistantDirector: string;
|
|
28
|
+
assignedSic: number;
|
|
29
|
+
fiscalYearEnd: string;
|
|
30
|
+
files: FilingItemXBRLFile[];
|
|
31
|
+
}
|
|
32
|
+
export interface FilingItemXBRLFile {
|
|
33
|
+
sequence: number;
|
|
34
|
+
file: string;
|
|
35
|
+
type: string;
|
|
36
|
+
size: number;
|
|
37
|
+
description: string;
|
|
38
|
+
url: string;
|
|
39
|
+
inlineXBRL: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface CurrentFilingEntry {
|
|
42
|
+
title: string;
|
|
43
|
+
link: string;
|
|
44
|
+
filingDate: string;
|
|
45
|
+
accessionNumber: string;
|
|
46
|
+
size: string;
|
|
47
|
+
updated: string;
|
|
48
|
+
form: string;
|
|
49
|
+
url: string;
|
|
50
|
+
cik: number;
|
|
51
|
+
}
|
|
52
|
+
export interface CurrentFilingsList {
|
|
53
|
+
title: string;
|
|
54
|
+
id: string;
|
|
55
|
+
updated: string;
|
|
56
|
+
entries: CurrentFilingEntry[];
|
|
57
|
+
}
|
package/build/types/index.d.ts
CHANGED
|
@@ -4,3 +4,6 @@ export * from './report-translated.type';
|
|
|
4
4
|
export * from './submission.type';
|
|
5
5
|
export * from './parsed-filings.type';
|
|
6
6
|
export * from './common.type';
|
|
7
|
+
export * from './insider-transaction.type';
|
|
8
|
+
export * from './company-search.type';
|
|
9
|
+
export * from './current-filings.type';
|
package/build/types/index.js
CHANGED
|
@@ -20,3 +20,6 @@ __exportStar(require("./report-translated.type"), exports);
|
|
|
20
20
|
__exportStar(require("./submission.type"), exports);
|
|
21
21
|
__exportStar(require("./parsed-filings.type"), exports);
|
|
22
22
|
__exportStar(require("./common.type"), exports);
|
|
23
|
+
__exportStar(require("./insider-transaction.type"), exports);
|
|
24
|
+
__exportStar(require("./company-search.type"), exports);
|
|
25
|
+
__exportStar(require("./current-filings.type"), exports);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface Owner {
|
|
2
|
+
ownerName: string;
|
|
3
|
+
ownerCik: number;
|
|
4
|
+
ownerPosition: string | null;
|
|
5
|
+
isDirector: boolean;
|
|
6
|
+
isOfficer: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface Issuer {
|
|
9
|
+
issuerName: string;
|
|
10
|
+
issuerCik: number;
|
|
11
|
+
}
|
|
12
|
+
export interface InsiderTransaction {
|
|
13
|
+
ownerName: string;
|
|
14
|
+
ownerCik: number;
|
|
15
|
+
ownerPosition: string | null;
|
|
16
|
+
issuerCik: number;
|
|
17
|
+
issuerName: string;
|
|
18
|
+
isDirector: boolean;
|
|
19
|
+
isOfficer: boolean;
|
|
20
|
+
/** true = buy, false = sell */
|
|
21
|
+
isAcquisition: boolean;
|
|
22
|
+
isDirectOwnership: boolean;
|
|
23
|
+
securityTitle: string;
|
|
24
|
+
transactionDate: string;
|
|
25
|
+
transactionCode: string;
|
|
26
|
+
transactionShares: number;
|
|
27
|
+
sharesOwnedFollowingTransaction: number;
|
|
28
|
+
lineNumber: number;
|
|
29
|
+
deemedExecutionDate: string;
|
|
30
|
+
form: string;
|
|
31
|
+
accessionNumber: string;
|
|
32
|
+
}
|
|
@@ -22,7 +22,7 @@ interface TransactionDescriptionByCode {
|
|
|
22
22
|
export type TransactionType = 'Acquire' | 'Dispose';
|
|
23
23
|
export type TransactionCode = keyof TransactionDescriptionByCode;
|
|
24
24
|
export type TransactionDescription = TransactionDescriptionByCode[TransactionCode];
|
|
25
|
-
export interface
|
|
25
|
+
export interface InsiderTransactionExtended {
|
|
26
26
|
filerName: string;
|
|
27
27
|
filerPosition: string;
|
|
28
28
|
filerPositionTypes: string[];
|
|
@@ -42,7 +42,7 @@ export interface InsiderTransaction {
|
|
|
42
42
|
price: number | null;
|
|
43
43
|
priceExcercised: number | null;
|
|
44
44
|
ownership: string;
|
|
45
|
-
explainationByKey: Partial<Record<keyof
|
|
45
|
+
explainationByKey: Partial<Record<keyof InsiderTransactionExtended, string>>;
|
|
46
46
|
}
|
|
47
47
|
export interface InstitutionalHolder {
|
|
48
48
|
name: string;
|
|
@@ -81,7 +81,7 @@ export interface Holder {
|
|
|
81
81
|
percentOfClass: string | null;
|
|
82
82
|
}
|
|
83
83
|
export interface Form4Data {
|
|
84
|
-
transactions:
|
|
84
|
+
transactions: InsiderTransactionExtended[];
|
|
85
85
|
}
|
|
86
86
|
export interface Form10KData {
|
|
87
87
|
tables: TableData[];
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
export interface XbrlContext {
|
|
2
|
+
id: string;
|
|
3
|
+
entity: {
|
|
4
|
+
identifier: {
|
|
5
|
+
value: string;
|
|
6
|
+
scheme: string;
|
|
7
|
+
};
|
|
8
|
+
segment: {
|
|
9
|
+
value: string;
|
|
10
|
+
dimension: string;
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
13
|
+
period: {
|
|
14
|
+
startDate?: string;
|
|
15
|
+
endDate?: string;
|
|
16
|
+
instant?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface XbrlUnit {
|
|
20
|
+
id: string;
|
|
21
|
+
measure: string;
|
|
22
|
+
}
|
|
23
|
+
export interface XbrlElement {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
contextRef: string;
|
|
27
|
+
continuedAt?: string;
|
|
28
|
+
decimals?: string;
|
|
29
|
+
escape?: string;
|
|
30
|
+
format?: string;
|
|
31
|
+
order?: string;
|
|
32
|
+
precision?: string;
|
|
33
|
+
scale?: string;
|
|
34
|
+
sign?: string;
|
|
35
|
+
target?: string;
|
|
36
|
+
text?: string;
|
|
37
|
+
tupleID?: string;
|
|
38
|
+
tupleRef?: string;
|
|
39
|
+
unitRef?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface XbrlInstance {
|
|
42
|
+
contexts: XbrlContext[];
|
|
43
|
+
units: XbrlUnit[];
|
|
44
|
+
factElements: XbrlElement[];
|
|
45
|
+
}
|
|
46
|
+
export interface XbrlSchema {
|
|
47
|
+
annotation?: XbrlSchemaAnnotation;
|
|
48
|
+
import?: XbrlSchemaImport[];
|
|
49
|
+
element?: XbrlSchemaElement[];
|
|
50
|
+
targetNamespace?: string;
|
|
51
|
+
elementFormDefault?: string;
|
|
52
|
+
attributeFormDefault?: string;
|
|
53
|
+
xmlns?: string;
|
|
54
|
+
_xmlnsProps: Record<string, string>;
|
|
55
|
+
}
|
|
56
|
+
export interface XbrlLinkbaseRoleType {
|
|
57
|
+
id: string;
|
|
58
|
+
definition: string;
|
|
59
|
+
usedOn: string[];
|
|
60
|
+
roleURI: string;
|
|
61
|
+
}
|
|
62
|
+
export interface XbrlLinkbaseItemExtended {
|
|
63
|
+
type: 'extended';
|
|
64
|
+
id?: string;
|
|
65
|
+
role?: string;
|
|
66
|
+
loc?: XbrlLinkbaseItemLocator[];
|
|
67
|
+
calculationArc?: XbrlLinkbaseItemArc[];
|
|
68
|
+
definitionArc?: XbrlLinkbaseItemArc[];
|
|
69
|
+
labelArc?: XbrlLinkbaseItemArc[];
|
|
70
|
+
presentationArc?: XbrlLinkbaseItemArc[];
|
|
71
|
+
footnoteArc?: XbrlLinkbaseItemArc[];
|
|
72
|
+
label?: XbrlLinkbaseItemResource[];
|
|
73
|
+
footnote?: XbrlLinkbaseItemResource[];
|
|
74
|
+
}
|
|
75
|
+
export interface XbrlLinkbaseItemSimple {
|
|
76
|
+
type: 'simple';
|
|
77
|
+
href?: string;
|
|
78
|
+
xlink?: string;
|
|
79
|
+
arcrole?: string;
|
|
80
|
+
role?: string;
|
|
81
|
+
title?: string;
|
|
82
|
+
roleURI?: string;
|
|
83
|
+
arcroleURI?: string;
|
|
84
|
+
}
|
|
85
|
+
export interface XbrlLinkbaseItemLocator {
|
|
86
|
+
type: 'locator';
|
|
87
|
+
label: string;
|
|
88
|
+
href: string;
|
|
89
|
+
}
|
|
90
|
+
export interface XbrlLinkbaseItemArc {
|
|
91
|
+
type: 'arc';
|
|
92
|
+
from: string;
|
|
93
|
+
to: string;
|
|
94
|
+
order?: number;
|
|
95
|
+
weight?: number;
|
|
96
|
+
arcrole?: string;
|
|
97
|
+
priority?: number;
|
|
98
|
+
closed?: boolean;
|
|
99
|
+
contextElement?: string;
|
|
100
|
+
preferredLabel?: string;
|
|
101
|
+
}
|
|
102
|
+
export interface XbrlLinkbaseItemResource {
|
|
103
|
+
type: 'resource';
|
|
104
|
+
id?: string;
|
|
105
|
+
text?: string;
|
|
106
|
+
label?: string;
|
|
107
|
+
role?: string;
|
|
108
|
+
xml?: string;
|
|
109
|
+
lang?: string;
|
|
110
|
+
}
|
|
111
|
+
export interface XML {
|
|
112
|
+
version?: string;
|
|
113
|
+
encoding?: string;
|
|
114
|
+
}
|
|
115
|
+
export interface XbrlLinkbase {
|
|
116
|
+
roleRef?: XbrlLinkbaseItemSimple[];
|
|
117
|
+
arcroleRef?: XbrlLinkbaseItemSimple[];
|
|
118
|
+
referenceLink?: XbrlLinkbaseItemExtended[];
|
|
119
|
+
labelLink?: XbrlLinkbaseItemExtended[];
|
|
120
|
+
presentationLink?: XbrlLinkbaseItemExtended[];
|
|
121
|
+
calculationLink?: XbrlLinkbaseItemExtended[];
|
|
122
|
+
definitionLink?: XbrlLinkbaseItemExtended[];
|
|
123
|
+
xmlns?: string;
|
|
124
|
+
xsi?: string;
|
|
125
|
+
xlink?: string;
|
|
126
|
+
schemaLocation?: string;
|
|
127
|
+
}
|
|
128
|
+
export interface XbrlSchemaAnnotation {
|
|
129
|
+
appinfo: XbrlSchemaAppinfo;
|
|
130
|
+
documentation?: string;
|
|
131
|
+
}
|
|
132
|
+
export interface XbrlSchemaAppinfo {
|
|
133
|
+
roleType: XbrlLinkbaseRoleType[];
|
|
134
|
+
linkbaseRef: XbrlLinkbaseItemSimple[];
|
|
135
|
+
}
|
|
136
|
+
export interface XbrlSchemaElement {
|
|
137
|
+
name: string;
|
|
138
|
+
id: string;
|
|
139
|
+
type: string;
|
|
140
|
+
abstract?: boolean;
|
|
141
|
+
periodType?: 'instant' | 'duration';
|
|
142
|
+
nillable?: boolean;
|
|
143
|
+
substitutionGroup?: string;
|
|
144
|
+
balance?: string;
|
|
145
|
+
typedDomainRef?: string;
|
|
146
|
+
domain?: string;
|
|
147
|
+
headUsable?: boolean;
|
|
148
|
+
linkrole?: string;
|
|
149
|
+
complexType?: object;
|
|
150
|
+
annotation?: object;
|
|
151
|
+
}
|
|
152
|
+
export interface XbrlSchemaImport {
|
|
153
|
+
namespace: string;
|
|
154
|
+
schemaLocation: string;
|
|
155
|
+
}
|
package/package.json
CHANGED