sec-edgar-api 0.4.1 → 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 +22 -5
- package/build/services/SecEdgarApi/SecEdgarApi.js +35 -5
- 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
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculationMapCondensed = void 0;
|
|
4
|
+
exports.calculationMapCondensed = {
|
|
5
|
+
cik: [],
|
|
6
|
+
url: [],
|
|
7
|
+
dateReport: [],
|
|
8
|
+
dateFiled: [],
|
|
9
|
+
fiscalPeriod: [],
|
|
10
|
+
fiscalYear: [],
|
|
11
|
+
splitDate: [],
|
|
12
|
+
splitRatio: [],
|
|
13
|
+
assetCurrent: [[['us-gaap:AssetsCurrent', 1, 0]]],
|
|
14
|
+
assetCurrentAccountsReceivable: [
|
|
15
|
+
[['us-gaap:AccountsReceivableNetCurrent', 1, 0]],
|
|
16
|
+
[['ReceivablesNetCurrent', 1, 0]],
|
|
17
|
+
[['AccountsReceivableNet', 1, 0]],
|
|
18
|
+
[['AccountsNotesAndLoansReceivableNetCurrent', 1, 0]],
|
|
19
|
+
[['AccountsAndOtherReceivablesNetCurrent', 1, 0]],
|
|
20
|
+
],
|
|
21
|
+
assetCurrentCashEquivalents: [
|
|
22
|
+
[['us-gaap:CashAndCashEquivalentsAtCarryingValue', 1, 0]],
|
|
23
|
+
[['us-gaap:CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents', 1, 0]],
|
|
24
|
+
[['us-gaap:CashAndDueFromBanks', 1, 0]],
|
|
25
|
+
],
|
|
26
|
+
assetCurrentInventory: [[['us-gaap:InventoryNet', 1, 0]]],
|
|
27
|
+
assetCurrentInvestments: [[['us-gaap:MarketableSecuritiesCurrent', 1, 0]]],
|
|
28
|
+
assetNonCurrent: [
|
|
29
|
+
[
|
|
30
|
+
['us-gaap:AssetsCurrent', -1, 0],
|
|
31
|
+
['us-gaap:Assets', 1, 0],
|
|
32
|
+
],
|
|
33
|
+
],
|
|
34
|
+
assetNonCurrentGoodwill: [[['us-gaap:Goodwill', 1, 0]]],
|
|
35
|
+
assetNonCurrentIntangibleLessGoodwill: [
|
|
36
|
+
[['us-gaap:IntangibleAssetsNetExcludingGoodwill', 1, 0]],
|
|
37
|
+
[
|
|
38
|
+
['us-gaap:FiniteLivedIntangibleAssetsNet', 1, 0],
|
|
39
|
+
['us-gaap:IndefiniteLivedIntangibleAssetsExcludingGoodwill', 1, 0],
|
|
40
|
+
],
|
|
41
|
+
],
|
|
42
|
+
assetNonCurrentInvestments: [
|
|
43
|
+
[['us-gaap:LongTermInvestments', 1, 0]],
|
|
44
|
+
[['us-gaap:InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVentures', 1, 0]],
|
|
45
|
+
[['us-gaap:EquityMethodInvestments', 1, 0]],
|
|
46
|
+
],
|
|
47
|
+
assetNonCurrentPPEGross: [
|
|
48
|
+
[
|
|
49
|
+
['expenseDepreciationAccumulated', 1, 0],
|
|
50
|
+
['assetNonCurrentPPENet', 1, 0],
|
|
51
|
+
],
|
|
52
|
+
],
|
|
53
|
+
assetNonCurrentPPENet: [
|
|
54
|
+
[['us-gaap:PropertyPlantAndEquipmentNet', 1, 0]],
|
|
55
|
+
[
|
|
56
|
+
['us-gaap:OperatingLeaseRightOfUseAsset', 1, 0],
|
|
57
|
+
[
|
|
58
|
+
'us-gaap:PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization',
|
|
59
|
+
1,
|
|
60
|
+
0,
|
|
61
|
+
],
|
|
62
|
+
],
|
|
63
|
+
[
|
|
64
|
+
['us-gaap:CapitalizedContractCostNetNoncurrent', 1, 0],
|
|
65
|
+
['us-gaap:OperatingLeaseRightOfUseAsset', 1, 0],
|
|
66
|
+
['us-gaap:PropertyPlantAndEquipmentNet', 1, 0],
|
|
67
|
+
],
|
|
68
|
+
],
|
|
69
|
+
assetTotal: [[['us-gaap:LiabilitiesAndStockholdersEquity', 1, 0]], [['us-gaap:Assets', 1, 0]]],
|
|
70
|
+
cashFlowCapex: [[['us-gaap:PaymentsToAcquirePropertyPlantAndEquipment', 1, 0]]],
|
|
71
|
+
cashFlowDeferredTax: [
|
|
72
|
+
[
|
|
73
|
+
['us-gaap:DeferredIncomeTaxExpenseBenefit', 1, 0],
|
|
74
|
+
['us-gaap:ProfitLoss', 1, 0],
|
|
75
|
+
],
|
|
76
|
+
],
|
|
77
|
+
cashFlowDividendsPaid: [
|
|
78
|
+
[['us-gaap:PaymentsOfDividends', 1, 0]],
|
|
79
|
+
[['us-gaap:PaymentsOfDividendsCommonStock', 1, 0]],
|
|
80
|
+
],
|
|
81
|
+
cashFlowDividendsPaidPreferred: [[['us-gaap:DividendsPreferredStock', 1, 0]]],
|
|
82
|
+
cashFlowFinancing: [[['us-gaap:NetCashProvidedByUsedInFinancingActivities', 1, 0]]],
|
|
83
|
+
cashFlowFree: [
|
|
84
|
+
[
|
|
85
|
+
['cashFlowCapex', -1, 1],
|
|
86
|
+
['cashFlowOperating', 1, 1],
|
|
87
|
+
],
|
|
88
|
+
],
|
|
89
|
+
cashFlowInvesting: [[['us-gaap:NetCashProvidedByUsedInInvestingActivities', 1, 0]]],
|
|
90
|
+
cashFlowOperating: [[['us-gaap:NetCashProvidedByUsedInOperatingActivities', 1, 0]]],
|
|
91
|
+
cashFlowWorkingCapitalNonCash: [
|
|
92
|
+
[
|
|
93
|
+
['assetCurrent', 1, 1],
|
|
94
|
+
['assetCurrentCashEquivalents', -1, 1],
|
|
95
|
+
['liabilityCurrent', -1, 1],
|
|
96
|
+
['liabilityCurrentDebt', 1, 0],
|
|
97
|
+
],
|
|
98
|
+
],
|
|
99
|
+
ebit: [
|
|
100
|
+
[
|
|
101
|
+
['expenseInterest', 1, 0],
|
|
102
|
+
['incomeNet', 1, 0],
|
|
103
|
+
['expenseTax', 1, 0],
|
|
104
|
+
],
|
|
105
|
+
],
|
|
106
|
+
ebitda: [
|
|
107
|
+
[
|
|
108
|
+
['expenseDepreciation', 1, 0],
|
|
109
|
+
['expenseTax', 1, 0],
|
|
110
|
+
['expenseInterest', 1, 0],
|
|
111
|
+
['incomeNet', 1, 1],
|
|
112
|
+
],
|
|
113
|
+
],
|
|
114
|
+
eps: [[['us-gaap:EarningsPerShareBasic', 1, 0]]],
|
|
115
|
+
epsDiluted: [[['us-gaap:EarningsPerShareDiluted', 1, 0]]],
|
|
116
|
+
equityRetainedEarnings: [[['us-gaap:RetainedEarningsAccumulatedDeficit', 1, 0]]],
|
|
117
|
+
equityTotal: [
|
|
118
|
+
[['us-gaap:StockholdersEquity', 1, 0]],
|
|
119
|
+
[['us-gaap:StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest', 1, 0]],
|
|
120
|
+
],
|
|
121
|
+
expenseDepreciation: [
|
|
122
|
+
[['us-gaap:DepreciationDepletionAndAmortization', 1, 0]],
|
|
123
|
+
[['us-gaap:DepreciationAndAmortization', 1, 0]],
|
|
124
|
+
[
|
|
125
|
+
['us-gaap:Depreciation', 1, 0],
|
|
126
|
+
['us-gaap:AmortizationOfIntangibleAssets', 1, 0],
|
|
127
|
+
],
|
|
128
|
+
[
|
|
129
|
+
['us-gaap:DepreciationAmortizationAndAccretionNet', 1, 0],
|
|
130
|
+
['us-gaap:OtherAmortizationOfDeferredCharges', 1, 0],
|
|
131
|
+
],
|
|
132
|
+
[
|
|
133
|
+
['us-gaap:AssetRetirementObligationAccretionExpense', 1, 0],
|
|
134
|
+
['us-gaap:DepreciationDepletionAndAmortization', 1, 0],
|
|
135
|
+
['us-gaap:GainLossOnSaleOfPropertyPlantEquipment', -1, 0],
|
|
136
|
+
],
|
|
137
|
+
],
|
|
138
|
+
expenseDepreciationAccumulated: [
|
|
139
|
+
[['us-gaap:AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment', 1, 0]],
|
|
140
|
+
[
|
|
141
|
+
[
|
|
142
|
+
'us-gaap:PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAccumulatedDepreciationAndAmortization',
|
|
143
|
+
1,
|
|
144
|
+
0,
|
|
145
|
+
],
|
|
146
|
+
],
|
|
147
|
+
[
|
|
148
|
+
[
|
|
149
|
+
'us-gaap:PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization',
|
|
150
|
+
1,
|
|
151
|
+
0,
|
|
152
|
+
],
|
|
153
|
+
[
|
|
154
|
+
'us-gaap:PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetBeforeAccumulatedDepreciationAndAmortization',
|
|
155
|
+
-1,
|
|
156
|
+
0,
|
|
157
|
+
],
|
|
158
|
+
],
|
|
159
|
+
[
|
|
160
|
+
['assetNonCurrentPPEGross', 1, 1],
|
|
161
|
+
['assetNonCurrentPPENet', -1, 1],
|
|
162
|
+
],
|
|
163
|
+
],
|
|
164
|
+
expenseInterest: [[['us-gaap:InterestExpense', 1, 0]]],
|
|
165
|
+
expenseNonCashOther: [
|
|
166
|
+
[
|
|
167
|
+
['us-gaap:AmortizationOfFinancingCosts', -1, 0],
|
|
168
|
+
['us-gaap:OperatingLeaseRightOfUseAssetAmortizationExpense', -1, 0],
|
|
169
|
+
['us-gaap:OtherNoncashIncomeExpense', 1, 1],
|
|
170
|
+
],
|
|
171
|
+
[
|
|
172
|
+
['us-gaap:RepaymentsOfLongTermDebt', 1, 1],
|
|
173
|
+
['us-gaap:ProceedsFromRepaymentsOfShortTermDebtMaturingInThreeMonthsOrLess', -1, 0],
|
|
174
|
+
['us-gaap:ProceedsFromShortTermDebtMaturingInMoreThanThreeMonths', -1, 0],
|
|
175
|
+
],
|
|
176
|
+
],
|
|
177
|
+
expenseOperating: [
|
|
178
|
+
[['us-gaap:OperatingExpenses', 1, 1]],
|
|
179
|
+
[
|
|
180
|
+
['expenseSellingGeneralAdministrative', 1, 1],
|
|
181
|
+
['expenseResearchDevelopment', 1, 0],
|
|
182
|
+
['expenseDepreciation', 1, 0],
|
|
183
|
+
['us-gaap:ProvisionForDoubtfulAccounts', 1, 0],
|
|
184
|
+
],
|
|
185
|
+
],
|
|
186
|
+
expenseResearchDevelopment: [[['us-gaap:ResearchAndDevelopmentExpense', 1, 0]]],
|
|
187
|
+
expenseSellingGeneralAdministrative: [
|
|
188
|
+
[['us-gaap:SellingGeneralAndAdministrativeExpense', 1, 0]],
|
|
189
|
+
[
|
|
190
|
+
['us-gaap:GeneralAndAdministrativeExpense', 1, 0],
|
|
191
|
+
['us-gaap:SellingAndMarketingExpense', 1, 0],
|
|
192
|
+
],
|
|
193
|
+
],
|
|
194
|
+
expenseStockCompensation: [[['us-gaap:ShareBasedCompensation', 1, 0]]],
|
|
195
|
+
expenseTax: [[['us-gaap:IncomeTaxExpenseBenefit', 1, 0]]],
|
|
196
|
+
expenseTotal: [
|
|
197
|
+
[
|
|
198
|
+
['incomeNet', -1, 1],
|
|
199
|
+
['revenueTotal', 1, 1],
|
|
200
|
+
],
|
|
201
|
+
[['us-gaap:CostsAndExpenses', 1, 1]],
|
|
202
|
+
],
|
|
203
|
+
incomeNet: [
|
|
204
|
+
[['us-gaap:NetIncomeLoss', 1, 1]],
|
|
205
|
+
[
|
|
206
|
+
['incomePretax', 1, 1],
|
|
207
|
+
['expenseTax', -1, 1],
|
|
208
|
+
],
|
|
209
|
+
],
|
|
210
|
+
incomeOperating: [[['us-gaap:OperatingIncomeLoss', 1, 1]]],
|
|
211
|
+
incomePretax: [
|
|
212
|
+
[
|
|
213
|
+
['us-gaap:OperatingIncomeLoss', 1, 0],
|
|
214
|
+
['us-gaap:NonoperatingIncomeExpense', 1, 0],
|
|
215
|
+
],
|
|
216
|
+
[['us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest', 1, 0]],
|
|
217
|
+
],
|
|
218
|
+
liabilityCurrent: [[['us-gaap:LiabilitiesCurrent', 1, 0]]],
|
|
219
|
+
liabilityCurrentAccountsPayable: [[['us-gaap:AccountsPayableCurrent', 1, 0]]],
|
|
220
|
+
liabilityCurrentDebt: [
|
|
221
|
+
[['us-gaap:DebtCurrent', 1, 1]],
|
|
222
|
+
[
|
|
223
|
+
['us-gaap:LongTermDebtAndCapitalLeaseObligationsCurrent', 1, 1],
|
|
224
|
+
['us-gaap:ShortTermBorrowings', 1, 0],
|
|
225
|
+
],
|
|
226
|
+
[
|
|
227
|
+
['us-gaap:LongTermDebtCurrent', 1, 1],
|
|
228
|
+
['us-gaap:FinanceLeaseLiabilityCurrent', 1, 0],
|
|
229
|
+
['us-gaap:ShortTermBorrowings', 1, 0],
|
|
230
|
+
],
|
|
231
|
+
[['us-gaap:ShortTermBorrowings', 1, 0]],
|
|
232
|
+
],
|
|
233
|
+
liabilityNonCurrent: [
|
|
234
|
+
[['us-gaap:LiabilitiesNoncurrent', 1, 0]],
|
|
235
|
+
[
|
|
236
|
+
['liabilityTotal', 1, 1],
|
|
237
|
+
['liabilityCurrent', -1, 1],
|
|
238
|
+
],
|
|
239
|
+
],
|
|
240
|
+
liabilityNonCurrentDebt: [
|
|
241
|
+
[['us-gaap:LongTermDebtNoncurrent', 1, 0]],
|
|
242
|
+
[['us-gaap:LongTermDebtAndCapitalLeaseObligations', 1, 0]],
|
|
243
|
+
],
|
|
244
|
+
liabilityTotal: [
|
|
245
|
+
[['us-gaap:Liabilities', 1, 0]],
|
|
246
|
+
[
|
|
247
|
+
['us-gaap:LiabilitiesCurrent', 1, 0],
|
|
248
|
+
['us-gaap:LiabilitiesNoncurrent', 1, 0],
|
|
249
|
+
],
|
|
250
|
+
],
|
|
251
|
+
profitGross: [
|
|
252
|
+
[['us-gaap:GrossProfit', 1, 0]],
|
|
253
|
+
[
|
|
254
|
+
['revenueTotal', 1, 0],
|
|
255
|
+
['revenueCost', -1, 0],
|
|
256
|
+
],
|
|
257
|
+
],
|
|
258
|
+
revenueCost: [
|
|
259
|
+
[['us-gaap:CostOfRevenue', 1, 0]],
|
|
260
|
+
[['us-gaap:CostOfGoodsAndServicesSold', 1, 0]],
|
|
261
|
+
[['us-gaap:CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization', -1, 0]],
|
|
262
|
+
],
|
|
263
|
+
revenueOperating: [
|
|
264
|
+
[
|
|
265
|
+
['us-gaap:CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization', -1, 0],
|
|
266
|
+
['us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax', 1, 0],
|
|
267
|
+
],
|
|
268
|
+
[
|
|
269
|
+
['revenueCost', 1, 1],
|
|
270
|
+
['profitGross', 1, 1],
|
|
271
|
+
],
|
|
272
|
+
],
|
|
273
|
+
revenueTotal: [
|
|
274
|
+
[['us-gaap:Revenues', 1, 1]],
|
|
275
|
+
[
|
|
276
|
+
['us-gaap:CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization', -1, 0],
|
|
277
|
+
['us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax', 1, 1],
|
|
278
|
+
],
|
|
279
|
+
[['us-gaap:RevenueFromContractWithCustomerIncludingAssessedTax', 1, 1]],
|
|
280
|
+
[['ifrs-full:Revenue', 1, 1]],
|
|
281
|
+
[
|
|
282
|
+
['revenueCost', 1, 1],
|
|
283
|
+
['profitGross', 1, 1],
|
|
284
|
+
],
|
|
285
|
+
],
|
|
286
|
+
sharesOutstanding: [
|
|
287
|
+
[['us-gaap:WeightedAverageNumberOfSharesOutstandingBasic', 1, 0]],
|
|
288
|
+
[['us-gaap:CommonStockSharesOutstanding', 1, 0]],
|
|
289
|
+
[['dei:EntityCommonStockSharesOutstanding', 1, 0]],
|
|
290
|
+
],
|
|
291
|
+
sharesOutstandingDiluted: [[['us-gaap:WeightedAverageNumberOfDilutedSharesOutstanding', 1, 0]]],
|
|
292
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReportTranslated } from '../types/report-translated.type';
|
|
1
|
+
import type { ReportTranslated } from '../types/report-translated.type';
|
|
2
2
|
/**
|
|
3
3
|
* Checks if any of the array keys exist in the object to assign to the translated key
|
|
4
4
|
* These were checked against Yahoo Finance values, adding the ones that most often matched the yahoo values
|
|
@@ -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