sec-edgar-api 0.3.3 → 0.4.0
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/Client/Client.d.ts +1 -0
- package/build/services/DocumentParser/DocumentParser.d.ts +18 -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 +107 -0
- package/build/services/DocumentParser/XBRLParser/LinkbaseParser.d.ts +13 -0
- package/build/services/DocumentParser/XBRLParser/LinkbaseParser.js +99 -0
- package/build/services/DocumentParser/XBRLParser/SchemaParser.d.ts +11 -0
- package/build/services/DocumentParser/XBRLParser/SchemaParser.js +144 -0
- package/build/services/DocumentParser/XBRLParser/XBRLParser.d.ts +34 -0
- package/build/services/DocumentParser/XBRLParser/XBRLParser.js +64 -0
- package/build/services/DocumentParser/XBRLParser/util-type.d.ts +15 -0
- package/build/services/DocumentParser/XBRLParser/util-type.js +34 -0
- package/build/services/DocumentParser/XMLNode/XMLNode.js +2 -2
- package/build/services/DocumentParser/XMLParser.d.ts +9 -38
- package/build/services/DocumentParser/XMLParser.js +88 -283
- 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-daily.js +8 -8
- 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 +6 -4
- 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 +171 -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/ReportParser/ReportParser.d.ts +1 -1
- package/build/services/ReportParser/ReportWrapper.js +1 -1
- package/build/services/ReportRawBuilder/FactFiscalCalculator.d.ts +0 -1
- package/build/services/ReportRawBuilder/FactFiscalCalculator.js +1 -1
- package/build/services/ReportRawBuilder/FactGrouper.d.ts +1 -0
- package/build/services/ReportRawBuilder/FactGrouper.js +21 -13
- package/build/services/ReportRawBuilder/FactSplitAdjuster.js +17 -7
- package/build/services/ReportRawBuilder/ReportRawBuilder.d.ts +1 -0
- package/build/services/ReportRawBuilder/ReportRawBuilder.js +20 -15
- package/build/services/SecEdgarApi/FilingMapper.d.ts +4 -0
- package/build/services/SecEdgarApi/FilingMapper.js +37 -0
- package/build/services/SecEdgarApi/RequestWrapper.d.ts +2 -0
- package/build/services/SecEdgarApi/RequestWrapper.js +6 -4
- package/build/services/SecEdgarApi/SecEdgarApi.d.ts +66 -2
- package/build/services/SecEdgarApi/SecEdgarApi.js +236 -71
- package/build/services/SecEdgarApi/Throttler.d.ts +9 -8
- package/build/types/common.type.d.ts +9 -9
- 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/package.json +8 -3
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sec-edgar-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
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)",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"test": "jest test",
|
|
15
15
|
"build": "tsc",
|
|
16
|
-
"publish": "npm run build && npm publish"
|
|
16
|
+
"publish": "npm run build && npm publish",
|
|
17
|
+
"lint": "npx eslint src"
|
|
17
18
|
},
|
|
18
19
|
"keywords": [
|
|
19
20
|
"sec",
|
|
@@ -26,11 +27,15 @@
|
|
|
26
27
|
"reports"
|
|
27
28
|
],
|
|
28
29
|
"devDependencies": {
|
|
30
|
+
"@eslint/js": "^9.11.1",
|
|
31
|
+
"@types/eslint__js": "^8.42.3",
|
|
29
32
|
"@types/jest": "^29.5.2",
|
|
33
|
+
"eslint": "^9.11.1",
|
|
30
34
|
"jest": "^29.5.0",
|
|
31
35
|
"prettier": "^2.8.8",
|
|
32
36
|
"ts-jest": "^29.1.0",
|
|
33
|
-
"typescript": "
|
|
37
|
+
"typescript": "5.1.3",
|
|
38
|
+
"typescript-eslint": "^8.8.0"
|
|
34
39
|
},
|
|
35
40
|
"files": [
|
|
36
41
|
"build/**/*"
|