sec-edgar-api 0.4.2 → 0.5.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/README.md +6 -2
- package/build/index.d.ts +4 -2
- package/build/index.js +5 -16
- package/build/services/DocumentParser/DocumentParser.d.ts +1 -1
- package/build/services/DocumentParser/XBRLParser/InstanceParser.d.ts +1 -1
- package/build/services/DocumentParser/XBRLParser/LinkbaseParser.d.ts +1 -1
- package/build/services/DocumentParser/XBRLParser/SchemaParser.d.ts +1 -1
- package/build/services/DocumentParser/XBRLParser/XBRLParser.d.ts +1 -1
- package/build/services/DocumentParser/parsers/parse-companies.d.ts +1 -2
- package/build/services/DocumentParser/parsers/parse-insider-transaction.d.ts +1 -2
- package/build/services/DocumentParser/parsers/parse-xbrl.d.ts +2 -2
- package/build/services/DocumentParser/parsers/parse-xbrl.js +12 -8
- package/build/services/ReportParser/ReportParser.d.ts +19 -6
- package/build/services/ReportParser/ReportParser.js +53 -22
- package/build/services/ReportParser/ReportResolvable.d.ts +52 -0
- package/build/services/ReportParser/ReportResolvable.js +135 -0
- package/build/services/ReportParser/ReportTranslatedProxy.d.ts +1 -1
- package/build/services/ReportParser/ReportWrapper.d.ts +1 -1
- package/build/services/ReportParser/resolvers/resolve-ebit.js +6 -0
- package/build/services/ReportParser/resolvers/resolve-q4-fiscal-year-matching-properties.js +0 -1
- package/build/services/ReportRawBuilder/FactFiscalCalculator.d.ts +8 -0
- package/build/services/ReportRawBuilder/FactFiscalCalculator.js +34 -1
- package/build/services/ReportRawBuilder/FactGrouper.d.ts +1 -1
- package/build/services/ReportRawBuilder/FactPeriodResolver.d.ts +1 -1
- package/build/services/ReportRawBuilder/FactRecordBuilder.d.ts +1 -1
- package/build/services/ReportRawBuilder/FactSplitAdjuster.d.ts +1 -1
- package/build/services/ReportRawBuilder/ReportRawBuilder.d.ts +2 -3
- package/build/services/SecEdgarApi/FilingMapper.d.ts +1 -1
- package/build/services/SecEdgarApi/RequestWrapper.d.ts +1 -1
- package/build/services/SecEdgarApi/SecEdgarApi.d.ts +21 -4
- package/build/services/SecEdgarApi/SecEdgarApi.js +32 -2
- package/build/types/calculation-map.type.d.ts +13 -0
- package/build/types/calculation-map.type.js +2 -0
- package/build/types/common.type.d.ts +1 -10
- package/build/types/company-facts.type.d.ts +6 -1
- package/build/types/index.d.ts +11 -9
- package/build/types/index.js +0 -23
- package/build/types/report-translated.type.d.ts +6 -3
- package/build/util/calculation-map.d.ts +2 -0
- package/build/util/calculation-map.js +292 -0
- package/build/util/key-translations.d.ts +1 -1
- package/build/util/key-translations.js +6 -6
- package/build/util/util-map.d.ts +12 -0
- package/build/util/util-map.js +50 -0
- package/package.json +1 -1
|
@@ -104,18 +104,14 @@ var keyTranslations = {
|
|
|
104
104
|
'EquityAttributableToOwnersOfParent',
|
|
105
105
|
],
|
|
106
106
|
equityRetainedEarnings: ['RetainedEarningsAccumulatedDeficit', 'RetainedEarnings'],
|
|
107
|
-
equityStockPreferred: [
|
|
108
|
-
// TODO: Add this
|
|
109
|
-
],
|
|
110
107
|
sharesOutstanding: ['WeightedAverageNumberOfSharesOutstandingBasic', 'CommonStockSharesOutstanding'],
|
|
111
108
|
sharesOutstandingDiluted: ['WeightedAverageNumberOfDilutedSharesOutstanding'],
|
|
112
109
|
eps: ['EarningsPerShareBasic', 'EarningsPerShareBasicAndDiluted'],
|
|
113
110
|
epsDiluted: ['EarningsPerShareDiluted', 'EarningsPerShareBasicAndDiluted'],
|
|
114
|
-
ebit: [
|
|
111
|
+
ebit: [],
|
|
115
112
|
ebitda: [],
|
|
116
113
|
profitGross: ['GrossProfit'],
|
|
117
114
|
revenueTotal: [
|
|
118
|
-
// 'RevenueFromContractWithCustomerExcludingAssessedTax',
|
|
119
115
|
'RevenueFromContractWithCustomerExcludingAssessedTax',
|
|
120
116
|
'Revenues',
|
|
121
117
|
'RevenueFromContractWithCustomerIncludingAssessedTax',
|
|
@@ -135,8 +131,8 @@ var keyTranslations = {
|
|
|
135
131
|
'ResearchAndDevelopmentExpenseSoftwareExcludingAcquiredInProcessCost',
|
|
136
132
|
],
|
|
137
133
|
expenseInterest: [
|
|
138
|
-
'InterestIncomeExpenseNet',
|
|
139
134
|
'InterestExpense',
|
|
135
|
+
'InterestIncomeExpenseNet',
|
|
140
136
|
'InterestIncomeExpenseNonoperatingNet',
|
|
141
137
|
'InterestRevenueExpenseNet',
|
|
142
138
|
],
|
|
@@ -152,6 +148,7 @@ var keyTranslations = {
|
|
|
152
148
|
expenseDepreciationAccumulated: ['AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment'],
|
|
153
149
|
expenseTax: ['IncomeTaxExpenseBenefit', 'IncomeTaxExpenseContinuingOperations'],
|
|
154
150
|
expenseNonCashOther: ['OtherNoncashIncomeExpense'],
|
|
151
|
+
expenseSellingGeneralAdministrative: ['SellingGeneralAndAdministrativeExpense'],
|
|
155
152
|
incomeOperating: [
|
|
156
153
|
'OperatingIncomeLoss',
|
|
157
154
|
'IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest',
|
|
@@ -170,8 +167,11 @@ var keyTranslations = {
|
|
|
170
167
|
cashFlowDividendsPaidPreferred: ['DividendsPreferredStock'],
|
|
171
168
|
cashFlowCapex: ['PaymentsToAcquirePropertyPlantAndEquipment'],
|
|
172
169
|
cashFlowOperating: ['NetCashProvidedByUsedInOperatingActivities'],
|
|
170
|
+
cashFlowInvesting: ['NetCashProvidedByUsedInInvestingActivities'],
|
|
171
|
+
cashFlowFinancing: ['NetCashProvidedByUsedInFinancingActivities'],
|
|
173
172
|
cashFlowDeferredTax: ['DeferredIncomeTaxExpenseBenefit'],
|
|
174
173
|
cashFlowWorkingCapitalNonCash: [],
|
|
175
174
|
expenseStockCompensation: ['AllocatedShareBasedCompensationExpense'],
|
|
175
|
+
incomePretax: [],
|
|
176
176
|
};
|
|
177
177
|
exports.default = keyTranslations;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CalculationMap, CalculationMapCondensed } from '../types/calculation-map.type';
|
|
2
|
+
declare function expandMap<T>(map: CalculationMapCondensed<T>): CalculationMap<T>;
|
|
3
|
+
declare function condenseMap<T>(map: CalculationMap<T>): CalculationMapCondensed<T>;
|
|
4
|
+
/**
|
|
5
|
+
* Used for expanding and condensing calculation maps. Calculation maps are used in secEdgarApi.getReports
|
|
6
|
+
* to map values from the SEC to the reports.
|
|
7
|
+
*/
|
|
8
|
+
export declare const utilMap: {
|
|
9
|
+
expandMap: typeof expandMap;
|
|
10
|
+
condenseMap: typeof condenseMap;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.utilMap = void 0;
|
|
4
|
+
function expandMap(map) {
|
|
5
|
+
var _a, _b;
|
|
6
|
+
var mapExpanded = {};
|
|
7
|
+
for (var key in map) {
|
|
8
|
+
var groups = [];
|
|
9
|
+
for (var _i = 0, _c = map[key]; _i < _c.length; _i++) {
|
|
10
|
+
var group = _c[_i];
|
|
11
|
+
var calculations = [];
|
|
12
|
+
for (var _d = 0, group_1 = group; _d < group_1.length; _d++) {
|
|
13
|
+
var calculation = group_1[_d];
|
|
14
|
+
var key_1 = calculation[0];
|
|
15
|
+
var weight = Number((_a = calculation[1]) !== null && _a !== void 0 ? _a : 1);
|
|
16
|
+
var isRequired = Boolean((_b = calculation[2]) !== null && _b !== void 0 ? _b : false);
|
|
17
|
+
calculations.push({ key: key_1, weight: weight, isRequired: isRequired });
|
|
18
|
+
}
|
|
19
|
+
groups.push({ calculation: calculations });
|
|
20
|
+
}
|
|
21
|
+
mapExpanded[key] = { groups: groups };
|
|
22
|
+
}
|
|
23
|
+
return mapExpanded;
|
|
24
|
+
}
|
|
25
|
+
function condenseMap(map) {
|
|
26
|
+
var mapCondensed = {};
|
|
27
|
+
for (var key in map) {
|
|
28
|
+
var groupsArr = [];
|
|
29
|
+
for (var _i = 0, _a = map[key].groups; _i < _a.length; _i++) {
|
|
30
|
+
var group = _a[_i];
|
|
31
|
+
var groupArr = [];
|
|
32
|
+
for (var _b = 0, _c = group.calculation; _b < _c.length; _b++) {
|
|
33
|
+
var _d = _c[_b], key_2 = _d.key, weight = _d.weight, isRequired = _d.isRequired;
|
|
34
|
+
var row = [key_2, weight, Number(isRequired)];
|
|
35
|
+
groupArr.push(row);
|
|
36
|
+
}
|
|
37
|
+
groupsArr.push(groupArr);
|
|
38
|
+
}
|
|
39
|
+
mapCondensed[key] = groupsArr;
|
|
40
|
+
}
|
|
41
|
+
return mapCondensed;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Used for expanding and condensing calculation maps. Calculation maps are used in secEdgarApi.getReports
|
|
45
|
+
* to map values from the SEC to the reports.
|
|
46
|
+
*/
|
|
47
|
+
exports.utilMap = {
|
|
48
|
+
expandMap: expandMap,
|
|
49
|
+
condenseMap: condenseMap,
|
|
50
|
+
};
|
package/package.json
CHANGED