sec-edgar-api 0.3.1 → 0.3.2

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.
@@ -57,11 +57,6 @@ export interface GetDocumentXMLParams {
57
57
  accessionNumber: string;
58
58
  primaryDocument: string;
59
59
  }
60
- export interface GetSubmissionsParams {
61
- /** symbol or cik */
62
- symbol: string;
63
- includeTranslated?: boolean;
64
- }
65
60
  /**
66
61
  * Gets reports from companies filed with the SEC
67
62
  *
@@ -93,7 +88,10 @@ export default class SecEdgarApi {
93
88
  *
94
89
  * endpoint: `/submissions/CIK${cik}.json`
95
90
  */
96
- getSubmissions(params: GetSubmissionsParams): Promise<SubmissionList>;
91
+ getSubmissions(params: GetSymbolParams): Promise<{
92
+ submissionList: SubmissionList;
93
+ filings: FilingListItemTranslated[];
94
+ }>;
97
95
  /**
98
96
  * The company-concept API returns all the XBRL disclosures from a single company (CIK)
99
97
  * and concept (a taxonomy and tag) into a single JSON file, with a separate array
@@ -165,7 +163,7 @@ export default class SecEdgarApi {
165
163
  */
166
164
  getMutualFundList(): Promise<FieldDataResponse<'cik' | 'seriesId' | 'classId' | 'symbol'>>;
167
165
  /**
168
- * Gets a raw xml document string. the parameters are found in the submission list response. (response.filings.recent or response.filings.recentTranslated)
166
+ * Gets a raw xml document string. the parameters are found in the submission list response.
169
167
  *
170
168
  * Some form types can be parsed using the DocumentParser such as form 4 (insider transactions) and form 13g (institutional holders)
171
169
  *
@@ -168,21 +168,19 @@ var SecEdgarApi = /** @class */ (function () {
168
168
  * endpoint: `/submissions/CIK${cik}.json`
169
169
  */
170
170
  SecEdgarApi.prototype.getSubmissions = function (params) {
171
+ var _a;
171
172
  return __awaiter(this, void 0, void 0, function () {
172
- var symbol, includeTranslated, cik, submissions;
173
- return __generator(this, function (_a) {
174
- switch (_a.label) {
173
+ var symbol, cik, submissionList;
174
+ return __generator(this, function (_b) {
175
+ switch (_b.label) {
175
176
  case 0:
176
- symbol = params.symbol, includeTranslated = params.includeTranslated;
177
+ symbol = params.symbol;
177
178
  cik = this.getCikString(symbol);
178
179
  return [4 /*yield*/, this.request("".concat(this.baseUrlEdgar, "/submissions/CIK").concat(cik, ".json"))];
179
180
  case 1:
180
- submissions = _a.sent();
181
- submissions.cik = Number(submissions.cik);
182
- if (!includeTranslated)
183
- return [2 /*return*/, submissions];
184
- submissions.filings.recentTranslated = this.mapFilingListDetails(cik, submissions.filings.recent);
185
- return [2 /*return*/, submissions];
181
+ submissionList = _b.sent();
182
+ submissionList.cik = Number(submissionList.cik);
183
+ return [2 /*return*/, { submissionList: submissionList, filings: this.mapFilingListDetails(cik, (_a = submissionList === null || submissionList === void 0 ? void 0 : submissionList.filings) === null || _a === void 0 ? void 0 : _a.recent) }];
186
184
  }
187
185
  });
188
186
  });
@@ -342,7 +340,7 @@ var SecEdgarApi = /** @class */ (function () {
342
340
  });
343
341
  };
344
342
  /**
345
- * Gets a raw xml document string. the parameters are found in the submission list response. (response.filings.recent or response.filings.recentTranslated)
343
+ * Gets a raw xml document string. the parameters are found in the submission list response.
346
344
  *
347
345
  * Some form types can be parsed using the DocumentParser such as form 4 (insider transactions) and form 13g (institutional holders)
348
346
  *
@@ -57,7 +57,6 @@ export interface FilingListItemTranslated {
57
57
  interface FilingList {
58
58
  recent: FilingListDetails;
59
59
  files: FileData[];
60
- recentTranslated?: FilingListItemTranslated[];
61
60
  }
62
61
  export interface SubmissionList {
63
62
  cik: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sec-edgar-api",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
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)",