sec-edgar-api 0.0.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/README.md +27 -0
- package/build/index.d.ts +21 -0
- package/build/index.js +26 -0
- package/build/services/FactFileReader/FactFileReader.d.ts +30 -0
- package/build/services/FactFileReader/FactFileReader.js +36 -0
- package/build/services/FactFileReader/index.d.ts +2 -0
- package/build/services/FactFileReader/index.js +4 -0
- package/build/services/ReportParser/FactIterator.d.ts +18 -0
- package/build/services/ReportParser/FactIterator.js +35 -0
- package/build/services/ReportParser/PropertyResolver.d.ts +25 -0
- package/build/services/ReportParser/PropertyResolver.js +44 -0
- package/build/services/ReportParser/ReportParser.d.ts +53 -0
- package/build/services/ReportParser/ReportParser.js +97 -0
- package/build/services/ReportParser/ReportRawParser.d.ts +34 -0
- package/build/services/ReportParser/ReportRawParser.js +154 -0
- package/build/services/ReportParser/ReportTranslatedProxy.d.ts +9 -0
- package/build/services/ReportParser/ReportTranslatedProxy.js +40 -0
- package/build/services/ReportParser/ReportWrapper.d.ts +27 -0
- package/build/services/ReportParser/ReportWrapper.js +89 -0
- package/build/services/ReportParser/index.d.ts +2 -0
- package/build/services/ReportParser/index.js +4 -0
- package/build/services/ReportParser/resolvers/helpers.d.ts +21 -0
- package/build/services/ReportParser/resolvers/helpers.js +49 -0
- package/build/services/ReportParser/resolvers/index.d.ts +31 -0
- package/build/services/ReportParser/resolvers/index.js +33 -0
- package/build/services/ReportParser/resolvers/resolve-asset-current.d.ts +2 -0
- package/build/services/ReportParser/resolvers/resolve-asset-current.js +20 -0
- package/build/services/ReportParser/resolvers/resolve-asset-non-current-ppe-gross.d.ts +2 -0
- package/build/services/ReportParser/resolvers/resolve-asset-non-current-ppe-gross.js +20 -0
- package/build/services/ReportParser/resolvers/resolve-cash-flow-capex.d.ts +5 -0
- package/build/services/ReportParser/resolvers/resolve-cash-flow-capex.js +37 -0
- package/build/services/ReportParser/resolvers/resolve-cash-flow-free.d.ts +2 -0
- package/build/services/ReportParser/resolvers/resolve-cash-flow-free.js +23 -0
- package/build/services/ReportParser/resolvers/resolve-cash-flow-operating.d.ts +2 -0
- package/build/services/ReportParser/resolvers/resolve-cash-flow-operating.js +39 -0
- package/build/services/ReportParser/resolvers/resolve-cash-flow-working-capital-non-cash.d.ts +2 -0
- package/build/services/ReportParser/resolvers/resolve-cash-flow-working-capital-non-cash.js +22 -0
- package/build/services/ReportParser/resolvers/resolve-ebit.d.ts +2 -0
- package/build/services/ReportParser/resolvers/resolve-ebit.js +25 -0
- package/build/services/ReportParser/resolvers/resolve-expense-depreciation.d.ts +2 -0
- package/build/services/ReportParser/resolvers/resolve-expense-depreciation.js +96 -0
- package/build/services/ReportParser/resolvers/resolve-expense-operating.d.ts +2 -0
- package/build/services/ReportParser/resolvers/resolve-expense-operating.js +22 -0
- package/build/services/ReportParser/resolvers/resolve-expense-total.d.ts +2 -0
- package/build/services/ReportParser/resolvers/resolve-expense-total.js +20 -0
- package/build/services/ReportParser/resolvers/resolve-fiscal-year-cumulative-properties.d.ts +5 -0
- package/build/services/ReportParser/resolvers/resolve-fiscal-year-cumulative-properties.js +70 -0
- package/build/services/ReportParser/resolvers/resolve-liability-current.d.ts +2 -0
- package/build/services/ReportParser/resolvers/resolve-liability-current.js +20 -0
- package/build/services/ReportParser/resolvers/resolve-q4-fiscal-year-matching-properties.d.ts +5 -0
- package/build/services/ReportParser/resolvers/resolve-q4-fiscal-year-matching-properties.js +24 -0
- package/build/services/ReportParser/resolvers/resolve-revenue-total.d.ts +2 -0
- package/build/services/ReportParser/resolvers/resolve-revenue-total.js +20 -0
- package/build/services/SecEdgarApi/Client.d.ts +44 -0
- package/build/services/SecEdgarApi/Client.js +104 -0
- package/build/services/SecEdgarApi/Downloader.d.ts +26 -0
- package/build/services/SecEdgarApi/Downloader.js +102 -0
- package/build/services/SecEdgarApi/FactsDownloader.d.ts +30 -0
- package/build/services/SecEdgarApi/FactsDownloader.js +125 -0
- package/build/services/SecEdgarApi/SecConnector.d.ts +47 -0
- package/build/services/SecEdgarApi/SecConnector.js +143 -0
- package/build/services/SecEdgarApi/SecEdgarApi.d.ts +92 -0
- package/build/services/SecEdgarApi/SecEdgarApi.js +184 -0
- package/build/services/SecEdgarApi/Throttler.d.ts +34 -0
- package/build/services/SecEdgarApi/Throttler.js +111 -0
- package/build/services/SecEdgarApi/Unzipper.d.ts +40 -0
- package/build/services/SecEdgarApi/Unzipper.js +40 -0
- package/build/services/SecEdgarApi/index.d.ts +3 -0
- package/build/services/SecEdgarApi/index.js +19 -0
- package/build/types/company-facts.type.d.ts +53 -0
- package/build/types/company-facts.type.js +2 -0
- package/build/types/index.d.ts +4 -0
- package/build/types/index.js +20 -0
- package/build/types/report-raw.type.d.ts +23 -0
- package/build/types/report-raw.type.js +2 -0
- package/build/types/report-translated.type.d.ts +58 -0
- package/build/types/report-translated.type.js +2 -0
- package/build/types/submission.type.d.ts +70 -0
- package/build/types/submission.type.js +2 -0
- package/build/util/cik-by-symbol.d.ts +5 -0
- package/build/util/cik-by-symbol.js +9632 -0
- package/build/util/key-translations.d.ts +7 -0
- package/build/util/key-translations.js +174 -0
- package/package.json +41 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReportTranslated } from '../types/report-translated.type';
|
|
2
|
+
/**
|
|
3
|
+
* Checks if any of the array keys exist in the object to assign to the translated key
|
|
4
|
+
* These were checked against Yahoo Finance values, adding the ones that most often matched the yahoo values
|
|
5
|
+
*/
|
|
6
|
+
declare const keyTranslations: Record<keyof ReportTranslated, string[]>;
|
|
7
|
+
export default keyTranslations;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Checks if any of the array keys exist in the object to assign to the translated key
|
|
5
|
+
* These were checked against Yahoo Finance values, adding the ones that most often matched the yahoo values
|
|
6
|
+
*/
|
|
7
|
+
var keyTranslations = {
|
|
8
|
+
// --- Added from ReportParser --- //
|
|
9
|
+
dateReport: ['dateReport'],
|
|
10
|
+
dateFiled: ['dateFiled'],
|
|
11
|
+
fiscalPeriod: ['fiscalPeriod'],
|
|
12
|
+
fiscalYear: ['fiscalYear'],
|
|
13
|
+
form: ['form'],
|
|
14
|
+
isTTM: ['isTTM'],
|
|
15
|
+
// ------------------------------- //
|
|
16
|
+
assetTotal: ['Assets'],
|
|
17
|
+
assetCurrent: ['AssetsCurrent', 'CurrentAssets'],
|
|
18
|
+
assetCurrentCashEquivalents: [
|
|
19
|
+
'CashAndCashEquivalentsAtCarryingValue',
|
|
20
|
+
'CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents',
|
|
21
|
+
'CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations',
|
|
22
|
+
'CashAndCashEquivalents',
|
|
23
|
+
'Cash',
|
|
24
|
+
'CashAndCashEquivalentsFairValueDisclosure',
|
|
25
|
+
'CashCashEquivalentsAndShortTermInvestments',
|
|
26
|
+
'CashAndCashEquivalentsAtCarryingValueIncludingDiscontinuedOperations',
|
|
27
|
+
'CashAndCashEquivalentsIfDifferentFromStatementOfFinancialPosition',
|
|
28
|
+
'CashAndDueFromBanks',
|
|
29
|
+
'CashAndBankBalancesAtCentralBanks',
|
|
30
|
+
],
|
|
31
|
+
assetCurrentInvestments: [
|
|
32
|
+
'ShortTermInvestments',
|
|
33
|
+
'MarketableSecuritiesCurrent',
|
|
34
|
+
'AvailableForSaleSecuritiesDebtSecuritiesCurrent',
|
|
35
|
+
'AvailableForSaleSecuritiesDebtSecurities',
|
|
36
|
+
'OtherShortTermInvestments',
|
|
37
|
+
'AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue',
|
|
38
|
+
'Investments',
|
|
39
|
+
'DebtSecuritiesAvailableForSaleExcludingAccruedInterestCurrent',
|
|
40
|
+
'SecuritiesPurchasedUnderAgreementsToResell',
|
|
41
|
+
'OtherCurrentFinancialAssets',
|
|
42
|
+
'EquitySecuritiesFvNi',
|
|
43
|
+
'MarketableSecurities',
|
|
44
|
+
],
|
|
45
|
+
assetCurrentAccountsReceivable: [
|
|
46
|
+
'AccountsReceivableNetCurrent',
|
|
47
|
+
'ReceivablesNetCurrent',
|
|
48
|
+
'AccountsReceivableNet',
|
|
49
|
+
'AccountsNotesAndLoansReceivableNetCurrent',
|
|
50
|
+
'AccountsAndOtherReceivablesNetCurrent',
|
|
51
|
+
],
|
|
52
|
+
assetCurrentInventory: [
|
|
53
|
+
'InventoryNet',
|
|
54
|
+
'Inventories',
|
|
55
|
+
'InventoryFinishedGoodsNetOfReserves',
|
|
56
|
+
'InventoryNetOfAllowancesCustomerAdvancesAndProgressBillings',
|
|
57
|
+
'InventoryGross',
|
|
58
|
+
],
|
|
59
|
+
assetNonCurrent: ['AssetsNonCurrent', 'NonCurrentAssets'],
|
|
60
|
+
assetNonCurrentGoodwill: ['Goodwill'],
|
|
61
|
+
assetNonCurrentIntangibleLessGoodwill: ['IntangibleAssetsNetExcludingGoodwill'],
|
|
62
|
+
assetNonCurrentPPENet: [
|
|
63
|
+
'PropertyPlantAndEquipmentNet',
|
|
64
|
+
// 'PropertyPlantAndEquipmentGross',
|
|
65
|
+
'PropertyPlantAndEquipment',
|
|
66
|
+
'PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization',
|
|
67
|
+
],
|
|
68
|
+
assetNonCurrentPPEGross: ['PropertyPlantAndEquipmentGross'],
|
|
69
|
+
assetNonCurrentInvestments: [
|
|
70
|
+
'LongTermInvestments',
|
|
71
|
+
'InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVentures',
|
|
72
|
+
'EquityMethodInvestments',
|
|
73
|
+
],
|
|
74
|
+
liabilityTotal: ['Liabilities'],
|
|
75
|
+
liabilityCurrent: ['LiabilitiesCurrent', 'CurrentLiabilities'],
|
|
76
|
+
liabilityCurrentAccountsPayable: [
|
|
77
|
+
'AccountsPayableCurrent',
|
|
78
|
+
'AccountsPayableTradeCurrent',
|
|
79
|
+
'AccountsPayableAndAccruedLiabilitiesCurrent',
|
|
80
|
+
'TradeAndOtherCurrentPayables',
|
|
81
|
+
'Deposits',
|
|
82
|
+
'AccountsPayableCurrentAndNoncurrent',
|
|
83
|
+
'AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent',
|
|
84
|
+
],
|
|
85
|
+
liabilityCurrentDebt: ['LongTermDebtCurrent', 'DebtCurrent', 'LongTermDebtAndCapitalLeaseObligationsCurrent'],
|
|
86
|
+
liabilityNonCurrent: ['LiabilitiesNonCurrent', 'NonCurrentLiabilities'],
|
|
87
|
+
liabilityNonCurrentDebt: [
|
|
88
|
+
'LongTermDebtNoncurrent',
|
|
89
|
+
'LongTermDebtAndCapitalLeaseObligations',
|
|
90
|
+
'LongTermDebt',
|
|
91
|
+
'UnsecuredLongTermDebt',
|
|
92
|
+
'DebtLongtermAndShorttermCombinedAmount',
|
|
93
|
+
'LongtermBorrowings',
|
|
94
|
+
'ConvertibleLongTermNotesPayable',
|
|
95
|
+
'LongTermNotesAndLoans',
|
|
96
|
+
'DebtAndCapitalLeaseObligations',
|
|
97
|
+
],
|
|
98
|
+
equityTotal: [
|
|
99
|
+
'StockholdersEquity',
|
|
100
|
+
'StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest',
|
|
101
|
+
'EquityAttributableToOwnersOfParent',
|
|
102
|
+
],
|
|
103
|
+
equityRetainedEarnings: ['RetainedEarningsAccumulatedDeficit', 'RetainedEarnings'],
|
|
104
|
+
equityStockPreferred: [
|
|
105
|
+
// TODO: Add this
|
|
106
|
+
],
|
|
107
|
+
sharesOutstanding: ['WeightedAverageNumberOfSharesOutstandingBasic', 'CommonStockSharesOutstanding'],
|
|
108
|
+
sharesOutstandingDiluted: ['WeightedAverageNumberOfDilutedSharesOutstanding'],
|
|
109
|
+
eps: ['EarningsPerShareBasic', 'EarningsPerShareBasicAndDiluted'],
|
|
110
|
+
epsDiluted: ['EarningsPerShareDiluted', 'EarningsPerShareBasicAndDiluted'],
|
|
111
|
+
ebit: ['OperatingIncomeLoss'],
|
|
112
|
+
ebitda: [],
|
|
113
|
+
profitGross: ['GrossProfit'],
|
|
114
|
+
revenueTotal: [
|
|
115
|
+
// 'RevenueFromContractWithCustomerExcludingAssessedTax',
|
|
116
|
+
'RevenueFromContractWithCustomerExcludingAssessedTax',
|
|
117
|
+
'Revenues',
|
|
118
|
+
'RevenueFromContractWithCustomerIncludingAssessedTax',
|
|
119
|
+
'Revenue',
|
|
120
|
+
],
|
|
121
|
+
revenueCost: ['CostOfGoodsAndServicesSold', 'CostOfRevenue', 'CostOfServices'],
|
|
122
|
+
revenueOperating: [
|
|
123
|
+
'OperatingIncomeLoss',
|
|
124
|
+
'IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest',
|
|
125
|
+
'ProfitLossBeforeTax',
|
|
126
|
+
],
|
|
127
|
+
expenseTotal: ['CostsAndExpenses'],
|
|
128
|
+
expenseOperating: ['OperatingExpenses', 'CostsAndExpenses'],
|
|
129
|
+
expenseResearchDevelopment: [
|
|
130
|
+
'ResearchAndDevelopmentExpense',
|
|
131
|
+
'ResearchAndDevelopmentExpenseExcludingAcquiredInProcessCost',
|
|
132
|
+
'ResearchAndDevelopmentExpenseSoftwareExcludingAcquiredInProcessCost',
|
|
133
|
+
],
|
|
134
|
+
expenseInterest: [
|
|
135
|
+
'InterestIncomeExpenseNet',
|
|
136
|
+
'InterestExpense',
|
|
137
|
+
'InterestIncomeExpenseNonoperatingNet',
|
|
138
|
+
'InterestRevenueExpenseNet',
|
|
139
|
+
],
|
|
140
|
+
expenseDepreciation: [
|
|
141
|
+
'DepreciationDepletionAndAmortization',
|
|
142
|
+
'DepreciationAndAmortization',
|
|
143
|
+
'DepreciationAndAmortisationExpense',
|
|
144
|
+
'DepreciationAmortizationAndAccretionNet',
|
|
145
|
+
'Depreciation',
|
|
146
|
+
'AdjustmentsForDepreciationAndAmortisationExpense',
|
|
147
|
+
'AmortisationExpense',
|
|
148
|
+
],
|
|
149
|
+
expenseDepreciationAccumulated: ['AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment'],
|
|
150
|
+
expenseTax: ['IncomeTaxExpenseBenefit', 'IncomeTaxExpenseContinuingOperations'],
|
|
151
|
+
expenseNonCashOther: ['OtherNoncashIncomeExpense'],
|
|
152
|
+
incomeOperating: [
|
|
153
|
+
'OperatingIncomeLoss',
|
|
154
|
+
'IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest',
|
|
155
|
+
'ProfitLossBeforeTax',
|
|
156
|
+
],
|
|
157
|
+
incomeNet: [
|
|
158
|
+
'NetIncomeLoss',
|
|
159
|
+
'NetIncomeLossAvailableToCommonStockholdersBasic',
|
|
160
|
+
'ProfitLoss',
|
|
161
|
+
'NetIncomeLossAvailableToCommonStockholdersDiluted',
|
|
162
|
+
'IncomeLossFromContinuingOperations',
|
|
163
|
+
'ProfitLossAttributableToOwnersOfParent',
|
|
164
|
+
],
|
|
165
|
+
cashFlowFree: [],
|
|
166
|
+
cashFlowDividendsPaid: ['PaymentsOfDividendsCommonStock', 'PaymentsOfDividends'],
|
|
167
|
+
cashFlowDividendsPaidPreferred: ['DividendsPreferredStock'],
|
|
168
|
+
cashFlowCapex: ['PaymentsToAcquirePropertyPlantAndEquipment'],
|
|
169
|
+
cashFlowOperating: ['NetCashProvidedByUsedInOperatingActivities'],
|
|
170
|
+
cashFlowDeferredTax: ['DeferredIncomeTaxExpenseBenefit'],
|
|
171
|
+
cashFlowWorkingCapitalNonCash: [],
|
|
172
|
+
expenseStockCompensation: ['AllocatedShareBasedCompensationExpense'],
|
|
173
|
+
};
|
|
174
|
+
exports.default = keyTranslations;
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sec-edgar-api",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Fetch and parse SEC earnings reports and other filings. Useful for financial analysis.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"author": "Andrew Evers (https://github.com/andyevers)",
|
|
7
|
+
"homepage": "https://github.com/andyevers/sec-edgar-api#readme",
|
|
8
|
+
"license": "ISC",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"unzipper": "^0.10.14"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/andyevers/sec-edgar-api.git"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "jest test",
|
|
18
|
+
"build": "tsc"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"sec",
|
|
22
|
+
"edgar",
|
|
23
|
+
"api",
|
|
24
|
+
"stock",
|
|
25
|
+
"financial",
|
|
26
|
+
"analysis",
|
|
27
|
+
"earnings",
|
|
28
|
+
"reports"
|
|
29
|
+
],
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/jest": "^29.5.2",
|
|
32
|
+
"@types/unzipper": "^0.10.6",
|
|
33
|
+
"jest": "^29.5.0",
|
|
34
|
+
"prettier": "^2.8.8",
|
|
35
|
+
"ts-jest": "^29.1.0",
|
|
36
|
+
"typescript": "^5.1.3"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"build/**/*"
|
|
40
|
+
]
|
|
41
|
+
}
|