sec-edgar-api 0.2.2 → 0.2.3

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.
Files changed (58) hide show
  1. package/README.md +5 -3
  2. package/build/services/DocumentParser/XMLParser.d.ts +5 -20
  3. package/build/services/DocumentParser/XMLParser.js +118 -122
  4. package/build/services/DocumentParser/parsers/index.d.ts +3 -5
  5. package/build/services/DocumentParser/parsers/index.js +3 -5
  6. package/build/services/DocumentParser/parsers/parse-form-13g.js +2 -2
  7. package/build/services/DocumentParser/parsers/parse-form-4.d.ts +1 -6
  8. package/build/services/DocumentParser/parsers/parse-form-4.js +204 -134
  9. package/build/services/DocumentParser/parsers/parse-form-def14a.d.ts +2 -1
  10. package/build/services/DocumentParser/parsers/parse-form-def14a.js +106 -157
  11. package/build/services/ReportBuilder/FactFiscalCalculator.d.ts +4 -0
  12. package/build/services/ReportBuilder/FactFiscalCalculator.js +4 -0
  13. package/build/services/ReportBuilder/FactPeriodResolver.d.ts +6 -2
  14. package/build/services/ReportBuilder/FactPeriodResolver.js +6 -1
  15. package/build/services/ReportBuilder/FactRecordBuilder.d.ts +4 -1
  16. package/build/services/ReportBuilder/FactRecordBuilder.js +26 -4
  17. package/build/services/ReportBuilder/FactSplitAdjuster.d.ts +7 -0
  18. package/build/services/ReportBuilder/FactSplitAdjuster.js +19 -8
  19. package/build/services/ReportBuilder/ReportBuilder.d.ts +3 -0
  20. package/build/services/ReportBuilder/ReportBuilder.js +15 -9
  21. package/build/services/ReportParser/ReportParser.d.ts +3 -3
  22. package/build/services/ReportParser/ReportParser.js +7 -4
  23. package/build/services/ReportParser/ReportRawParser.d.ts +3 -9
  24. package/build/services/ReportParser/ReportRawParser.js +5 -33
  25. package/build/services/ReportParser/ReportWrapper.js +2 -0
  26. package/build/services/ReportParser/resolvers/resolve-fiscal-year-cumulative-properties.js +2 -1
  27. package/build/services/SecEdgarApi/SecEdgarApi.d.ts +45 -84
  28. package/build/services/SecEdgarApi/SecEdgarApi.js +108 -246
  29. package/build/types/index.d.ts +2 -2
  30. package/build/types/index.js +2 -2
  31. package/build/types/parsed-filings.type.d.ts +5 -144
  32. package/build/types/report-raw.type.d.ts +3 -1
  33. package/build/types/report-translated.type.d.ts +4 -1
  34. package/build/types/submission.type.d.ts +2 -3
  35. package/build/util/key-translations.js +5 -1
  36. package/package.json +2 -5
  37. package/build/services/DocumentParser/HtmlTableExtractor.d.ts +0 -41
  38. package/build/services/DocumentParser/HtmlTableExtractor.js +0 -408
  39. package/build/services/DocumentParser/parsers/parse-current-filings.d.ts +0 -3
  40. package/build/services/DocumentParser/parsers/parse-current-filings.js +0 -98
  41. package/build/services/DocumentParser/parsers/parse-form-13f.d.ts +0 -6
  42. package/build/services/DocumentParser/parsers/parse-form-13f.js +0 -91
  43. package/build/services/ReportParser/FactItem.d.ts +0 -66
  44. package/build/services/ReportParser/FactItem.js +0 -50
  45. package/build/services/ReportParser/FactItemFactory.d.ts +0 -22
  46. package/build/services/ReportParser/FactItemFactory.js +0 -150
  47. package/build/services/ReportParser/FactIterator.d.ts +0 -18
  48. package/build/services/ReportParser/FactIterator.js +0 -35
  49. package/build/services/ReportParser/FactSplitMap.d.ts +0 -16
  50. package/build/services/ReportParser/FactSplitMap.js +0 -101
  51. package/build/types/current-filings-xml.type.d.ts +0 -74
  52. package/build/types/current-filings-xml.type.js +0 -6
  53. package/build/types/current-filings.type.d.ts +0 -44
  54. package/build/types/current-filings.type.js +0 -2
  55. package/build/types/form-13f-xml.type.d.ts +0 -105
  56. package/build/types/form-13f-xml.type.js +0 -2
  57. package/build/types/form-4-xml.type.d.ts +0 -132
  58. package/build/types/form-4-xml.type.js +0 -2
@@ -67,7 +67,6 @@ export interface ExecutiveCompensation {
67
67
  name: string;
68
68
  position: string | null;
69
69
  year: number | null;
70
- positionLevel: 'Executive' | 'Director';
71
70
  salaryDollars: number | null;
72
71
  bonusDollars: number | null;
73
72
  stockAwardDollars: number | null;
@@ -81,155 +80,17 @@ export interface Holder {
81
80
  shares: number | null;
82
81
  percentOfClass: string | null;
83
82
  }
83
+ export interface Form4Data {
84
+ transactions: InsiderTransaction[];
85
+ }
84
86
  export interface Form10KData {
85
87
  tables: TableData[];
86
88
  }
87
89
  export interface Form13GData {
88
- institutionalHolders: InstitutionalHolder[];
90
+ holders: InstitutionalHolder[];
89
91
  }
90
92
  export interface FormDef14aData {
91
93
  executiveCompensation: ExecutiveCompensation[];
92
- }
93
- export interface Form4Data {
94
- schemaVersion: string;
95
- documentType: string;
96
- periodOfReport: string;
97
- issuerCik: number;
98
- issuerName: string;
99
- issuerTradingSymbol: string;
100
- notSubjectToSection16: boolean;
101
- reportingOwners: ReportingOwner[];
102
- aff10b5One: boolean;
103
- nonDerivativeHolding: NonDerivativeHolding[];
104
- nonDerivativeTransaction: NonDerivativeTransaction[];
105
- derivativeHolding: DerivativeHolding[];
106
- derivativeTransaction: DerivativeTransaction[];
107
- footnotes: string[];
108
- remarks: string;
109
- signatureName: string;
110
- signatureDate: string;
111
- }
112
- export interface DerivativeHolding {
113
- securityTitle: string;
114
- directOrIndirectOwnership: string;
115
- natureOfOwnership: string | null;
116
- sharesOwnedFollowingTransaction: number;
117
- conversionOrExercisePrice: number | null;
118
- exerciseDate: string | null;
119
- expirationDate: string | null;
120
- underlyingSecurityShares: number | null;
121
- underlyingSecurityTitle: string | null;
122
- }
123
- export interface DerivativeTransaction {
124
- securityTitle: string;
125
- directOrIndirectOwnership: string;
126
- natureOfOwnership: string | null;
127
- sharesOwnedFollowingTransaction: number;
128
- deemedExecutionDate: string | null;
129
- equitySwapInvolved: boolean;
130
- transactionShares: number;
131
- transactionCode: string;
132
- transactionFormType: string;
133
- transactionDate: string;
134
- transactionTimeliness: string | null;
135
- transactionPricePerShare: number | null;
136
- transactionAcquiredDisposedCode: string;
137
- conversionOrExercisePrice: number | null;
138
- exerciseDate: string | null;
139
- expirationDate: string | null;
140
- underlyingSecurityShares: number | null;
141
- underlyingSecurityTitle: string | null;
142
- }
143
- export interface NonDerivativeHolding {
144
- securityTitle: string;
145
- directOrIndirectOwnership: string;
146
- natureOfOwnership: string | null;
147
- sharesOwnedFollowingTransaction: number;
148
- }
149
- export interface NonDerivativeTransaction {
150
- securityTitle: string;
151
- directOrIndirectOwnership: string;
152
- natureOfOwnership: string | null;
153
- sharesOwnedFollowingTransaction: number;
154
- deemedExecutionDate: string | null;
155
- equitySwapInvolved: boolean;
156
- transactionShares: number;
157
- transactionCode: string;
158
- transactionFormType: string;
159
- transactionDate: string;
160
- transactionTimeliness: string | null;
161
- transactionPricePerShare: number | null;
162
- transactionAcquiredDisposedCode: string;
163
- }
164
- export interface ReportingOwner {
165
- rptOwnerCity: string;
166
- rptOwnerState: string;
167
- rptOwnerStateDescription: string;
168
- rptOwnerStreet1: string;
169
- rptOwnerStreet2: string;
170
- rptOwnerZipCode: string;
171
- rptOwnerCik: number;
172
- rptOwnerName: string;
173
- isDirector: boolean;
174
- isOfficer: boolean;
175
- isTenPercentOwner: boolean;
176
- isOther: boolean;
177
- }
178
- export interface Form13FData {
179
- submissionType: string;
180
- periodOfReport: string;
181
- cik: number;
182
- ccc: string;
183
- form13FFileNumber: string;
184
- liveTestFlag: string;
185
- reportCalendarOrQuarter: string;
186
- reportType: string;
187
- confirmingCopyFlag: boolean;
188
- overrideInternetFlag: boolean;
189
- returnCopyFlag: boolean;
190
- filingManager: FilingManager;
191
- otherManagers: Manager[];
192
- provideInfoForInstruction5: string;
193
- signatureBlock: SignatureBlock;
194
- otherManagers2: Manager[];
195
- otherIncludedManagersCount: number;
196
- tableEntryTotal: number;
197
- tableValueTotal: number;
198
- isConfidentialOmitted: boolean;
199
- infoTable: InfoTable[];
200
- }
201
- export interface FilingManager {
202
- name: string;
203
- ns1City: string;
204
- ns1StateOrCountry: string;
205
- ns1Street1: string;
206
- ns1ZipCode: string;
207
- }
208
- export interface InfoTable {
209
- nameOfIssuer: string;
210
- titleOfClass: string;
211
- cusip: string;
212
- value: number;
213
- sharesOrPrincipalAmount: number;
214
- isPrincipalAmount: boolean;
215
- investmentDiscretion: string;
216
- votingAuthoritySole: number;
217
- votingAuthorityShared: number;
218
- votingAuthorityNone: number;
219
- otherManagers: number[];
220
- }
221
- export interface Manager {
222
- sequenceNumber: number | null;
223
- name: string;
224
- form13FFileNumber: string;
225
- }
226
- export interface SignatureBlock {
227
- city: string;
228
- name: string;
229
- phone: string;
230
- signature: string;
231
- signatureDate: string;
232
- stateOrCountry: string;
233
- title: string;
94
+ holders: Holder[];
234
95
  }
235
96
  export {};
@@ -3,6 +3,8 @@
3
3
  */
4
4
  export type ReportRaw = {
5
5
  [key: string]: string | number | boolean | null;
6
+ cik: number;
7
+ url: string | null;
6
8
  dateReport: string;
7
9
  dateFiled: string;
8
10
  fiscalPeriod: FiscalPeriod;
@@ -16,5 +18,5 @@ export type ReportRaw = {
16
18
  *
17
19
  * for dei, see https://www.sec.gov/structureddata/announcement/osd-announcement-2212-new-2022q4-taxonomies
18
20
  */
19
- export type ReportType = 'QUARTERLY' | 'ANNUAL' | '8K';
21
+ export type ReportType = 'QUARTERLY' | 'ANNUAL' | '8K' | 'DOCUMENT_ENTITY_INFO';
20
22
  export type FiscalPeriod = 'Q1' | 'Q2' | 'Q3' | 'Q4' | 'FY';
@@ -1,9 +1,13 @@
1
1
  import { FiscalPeriod } from './report-raw.type';
2
2
  export interface ReportTranslated {
3
+ cik: number;
4
+ url: string | null;
3
5
  dateReport: string;
4
6
  dateFiled: string;
5
7
  fiscalPeriod: FiscalPeriod;
6
8
  fiscalYear: number;
9
+ splitDate: string | null;
10
+ splitRatio: number | null;
7
11
  assetTotal: number | null;
8
12
  assetCurrent: number | null;
9
13
  assetCurrentCashEquivalents: number | null;
@@ -53,5 +57,4 @@ export interface ReportTranslated {
53
57
  cashFlowOperating: number | null;
54
58
  cashFlowDeferredTax: number | null;
55
59
  cashFlowWorkingCapitalNonCash: number | null;
56
- splitRatio: number | null;
57
60
  }
@@ -53,12 +53,11 @@ export interface FilingListItemTranslated {
53
53
  primaryDocument: string;
54
54
  primaryDocDescription: string;
55
55
  url: string;
56
- urlXml: string;
57
56
  }
58
- export interface FilingList {
57
+ interface FilingList {
59
58
  recent: FilingListDetails;
60
59
  files: FileData[];
61
- recentTranslated: FilingListItemTranslated[];
60
+ recentTranslated?: FilingListItemTranslated[];
62
61
  }
63
62
  export interface SubmissionList {
64
63
  cik: number;
@@ -6,10 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  */
7
7
  var keyTranslations = {
8
8
  // --- Added from ReportParser --- //
9
+ cik: ['cik'],
10
+ url: ['url'],
9
11
  dateReport: ['dateReport'],
10
12
  dateFiled: ['dateFiled'],
11
13
  fiscalPeriod: ['fiscalPeriod'],
12
14
  fiscalYear: ['fiscalYear'],
15
+ splitDate: ['splitDate'],
16
+ splitRatio: ['StockholdersEquityNoteStockSplitConversionRatio1'],
13
17
  // ------------------------------- //
14
18
  assetTotal: ['Assets'],
15
19
  assetCurrent: ['AssetsCurrent', 'CurrentAssets'],
@@ -92,6 +96,7 @@ var keyTranslations = {
92
96
  'ConvertibleLongTermNotesPayable',
93
97
  'LongTermNotesAndLoans',
94
98
  'DebtAndCapitalLeaseObligations',
99
+ 'LongTermDebtAndCapitalLeaseObligationsIncludingCurrentMaturities',
95
100
  ],
96
101
  equityTotal: [
97
102
  'StockholdersEquity',
@@ -168,6 +173,5 @@ var keyTranslations = {
168
173
  cashFlowDeferredTax: ['DeferredIncomeTaxExpenseBenefit'],
169
174
  cashFlowWorkingCapitalNonCash: [],
170
175
  expenseStockCompensation: ['AllocatedShareBasedCompensationExpense'],
171
- splitRatio: ['StockholdersEquityNoteStockSplitConversionRatio1'],
172
176
  };
173
177
  exports.default = keyTranslations;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sec-edgar-api",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
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)",
@@ -34,8 +34,5 @@
34
34
  },
35
35
  "files": [
36
36
  "build/**/*"
37
- ],
38
- "dependencies": {
39
- "fast-xml-parser": "^4.5.0"
40
- }
37
+ ]
41
38
  }
@@ -1,41 +0,0 @@
1
- export interface Cell {
2
- attributes: string;
3
- rowSpan: number;
4
- colSpan: number;
5
- rowIndex: number;
6
- colIndex: number;
7
- tableCellIndex: number;
8
- html: string;
9
- isHeaderRowCell: boolean;
10
- isBodyTitleRowCell: boolean;
11
- valueParsed: string | number | null;
12
- headerCol: string | null;
13
- headerRowIndex: number | null;
14
- }
15
- export interface TableHTMLData {
16
- tableIndex: number;
17
- parentTableIndex: number | null;
18
- childTableIndexes: number[];
19
- positionStart: number;
20
- positionEnd: number;
21
- htmlBefore: string;
22
- html: string;
23
- rows: Cell[][];
24
- }
25
- interface ParseOptions {
26
- tagsToExclude?: string[];
27
- tagsToInclude?: string[];
28
- stripParenthesis?: boolean;
29
- stripHtml?: boolean;
30
- }
31
- export default class HtmlTableExtractor {
32
- extractTables(html: string, options?: ParseOptions): TableHTMLData[];
33
- mergeHeaderRows(tables: TableHTMLData[]): void;
34
- removeEmptyColumns(tables: TableHTMLData[]): TableHTMLData[];
35
- private addTableCells;
36
- private addMissingNameCol;
37
- private addTableCellValues;
38
- stripHtml(str: string, options?: Omit<ParseOptions, 'stripHtml' | 'stripParenthesis'>): string;
39
- parseValue(str: string | number | null, options?: ParseOptions): string | number | null;
40
- }
41
- export {};