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.
Files changed (45) hide show
  1. package/README.md +6 -2
  2. package/build/index.d.ts +4 -2
  3. package/build/index.js +5 -16
  4. package/build/services/DocumentParser/DocumentParser.d.ts +1 -1
  5. package/build/services/DocumentParser/XBRLParser/InstanceParser.d.ts +1 -1
  6. package/build/services/DocumentParser/XBRLParser/LinkbaseParser.d.ts +1 -1
  7. package/build/services/DocumentParser/XBRLParser/SchemaParser.d.ts +1 -1
  8. package/build/services/DocumentParser/XBRLParser/XBRLParser.d.ts +1 -1
  9. package/build/services/DocumentParser/parsers/parse-companies.d.ts +1 -2
  10. package/build/services/DocumentParser/parsers/parse-insider-transaction.d.ts +1 -2
  11. package/build/services/DocumentParser/parsers/parse-xbrl.d.ts +2 -2
  12. package/build/services/DocumentParser/parsers/parse-xbrl.js +12 -8
  13. package/build/services/ReportParser/ReportParser.d.ts +19 -6
  14. package/build/services/ReportParser/ReportParser.js +53 -22
  15. package/build/services/ReportParser/ReportResolvable.d.ts +52 -0
  16. package/build/services/ReportParser/ReportResolvable.js +135 -0
  17. package/build/services/ReportParser/ReportTranslatedProxy.d.ts +1 -1
  18. package/build/services/ReportParser/ReportWrapper.d.ts +1 -1
  19. package/build/services/ReportParser/resolvers/resolve-ebit.js +6 -0
  20. package/build/services/ReportParser/resolvers/resolve-q4-fiscal-year-matching-properties.js +0 -1
  21. package/build/services/ReportRawBuilder/FactFiscalCalculator.d.ts +8 -0
  22. package/build/services/ReportRawBuilder/FactFiscalCalculator.js +34 -1
  23. package/build/services/ReportRawBuilder/FactGrouper.d.ts +1 -1
  24. package/build/services/ReportRawBuilder/FactPeriodResolver.d.ts +1 -1
  25. package/build/services/ReportRawBuilder/FactRecordBuilder.d.ts +1 -1
  26. package/build/services/ReportRawBuilder/FactSplitAdjuster.d.ts +1 -1
  27. package/build/services/ReportRawBuilder/ReportRawBuilder.d.ts +2 -3
  28. package/build/services/SecEdgarApi/FilingMapper.d.ts +1 -1
  29. package/build/services/SecEdgarApi/RequestWrapper.d.ts +1 -1
  30. package/build/services/SecEdgarApi/SecEdgarApi.d.ts +21 -4
  31. package/build/services/SecEdgarApi/SecEdgarApi.js +32 -2
  32. package/build/types/calculation-map.type.d.ts +13 -0
  33. package/build/types/calculation-map.type.js +2 -0
  34. package/build/types/common.type.d.ts +1 -10
  35. package/build/types/company-facts.type.d.ts +6 -1
  36. package/build/types/index.d.ts +11 -9
  37. package/build/types/index.js +0 -23
  38. package/build/types/report-translated.type.d.ts +6 -3
  39. package/build/util/calculation-map.d.ts +2 -0
  40. package/build/util/calculation-map.js +292 -0
  41. package/build/util/key-translations.d.ts +1 -1
  42. package/build/util/key-translations.js +6 -6
  43. package/build/util/util-map.d.ts +12 -0
  44. package/build/util/util-map.js +50 -0
  45. package/package.json +1 -1
@@ -5,7 +5,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  * Then measures the offset from the end date to the next/previous fiscal year end.
6
6
  */
7
7
  var FactFiscalCalculator = /** @class */ (function () {
8
- function FactFiscalCalculator() {
8
+ function FactFiscalCalculator(params) {
9
+ var _this = this;
9
10
  this.endDateByYear = new Map();
10
11
  this.fiscalsByEndDate = new Map();
11
12
  this.datesByFiscals = new Map();
@@ -13,7 +14,39 @@ var FactFiscalCalculator = /** @class */ (function () {
13
14
  this.endDateCountMap = new Map();
14
15
  this.filedDateCountByEndDate = new Map();
15
16
  this.didResolve = false;
17
+ var _a = params !== null && params !== void 0 ? params : {}, _b = _a.facts, facts = _b === void 0 ? [] : _b, _c = _a.filings, filings = _c === void 0 ? [] : _c;
18
+ if (filings.length > 0) {
19
+ this.useFilingsForDates({ filings: filings });
20
+ }
21
+ facts.forEach(function (fact) { return _this.add(fact); });
16
22
  }
23
+ FactFiscalCalculator.prototype.useFilingsForDates = function (params) {
24
+ var _this = this;
25
+ var filings = params.filings;
26
+ var endDateByYear = new Map();
27
+ filings.forEach(function (_a) {
28
+ var reportDate = _a.reportDate, form = _a.form;
29
+ if (form === '10-K' || form === '20-F') {
30
+ endDateByYear.set(Number(reportDate.substring(0, 4)), new Date(reportDate));
31
+ }
32
+ });
33
+ filings.forEach(function (filing) {
34
+ if (filing.form === '10-K' || filing.form === '10-Q' || filing.form === '20-F' || filing.form === '40-F') {
35
+ var _a = _this.getFiscalYearQuarter({
36
+ dateStr: filing.reportDate,
37
+ endDateByYear: endDateByYear,
38
+ }), quarter = _a.quarter, year = _a.year;
39
+ _this.setReportDates({
40
+ accn: filing.accessionNumber,
41
+ end: filing.reportDate,
42
+ filed: filing.filingDate,
43
+ isAnnual: filing.form === '10-K' || filing.form === '20-F',
44
+ quarter: quarter,
45
+ year: year,
46
+ });
47
+ }
48
+ });
49
+ };
17
50
  FactFiscalCalculator.prototype.add = function (fact) {
18
51
  var _a, _b, _c;
19
52
  var end = fact.end, filed = fact.filed;
@@ -1,4 +1,4 @@
1
- import { FactItem, FactGroup, SplitData } from '../../types';
1
+ import type { FactItem, FactGroup, SplitData } from '../../types';
2
2
  import FactFiscalCalculator from './FactFiscalCalculator';
3
3
  /**
4
4
  * There are many facts properties for the same period but filed at different times.
@@ -1,4 +1,4 @@
1
- import { FiscalPeriod } from '../../types/report-raw.type';
1
+ import type { FiscalPeriod } from '../../types/report-raw.type';
2
2
  /**
3
3
  * Resolves quarterly and annual values for a property. This is because filers provide total values for the
4
4
  * current fiscal year, rather than values for the individual quarters
@@ -1,4 +1,4 @@
1
- import { CompanyFactListData, FactItem } from '../../types';
1
+ import type { CompanyFactListData, FactItem } from '../../types';
2
2
  /**
3
3
  * Builds an array of fact records.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { CompanyFactListData, FactGroup, FactItem, FactValue, SplitData } from '../../types';
1
+ import type { CompanyFactListData, FactGroup, FactItem, FactValue, SplitData } from '../../types';
2
2
  /**
3
3
  * Splits can be filed multiple times throughout different reports. There is no clear
4
4
  * indication on when the split is executed or what facts the split has been applied to. This
@@ -1,6 +1,6 @@
1
- import { CompanyFactListData, FactGroup, FactItem, ReportRaw, SplitData } from '../../types';
1
+ import type { CompanyFactListData, FactGroup, FactItem, ReportRaw, SplitData } from '../../types';
2
2
  import FactFiscalCalculator, { SetReportDatesParams } from './FactFiscalCalculator';
3
- interface BuildReportsParams {
3
+ export interface BuildReportsParams {
4
4
  facts: FactItem[];
5
5
  /**
6
6
  * for more accurate dates, add this. Otherwise, dates will be inferred
@@ -37,4 +37,3 @@ export default class ReportRawBuilder {
37
37
  cik: number;
38
38
  }): ReportRaw[];
39
39
  }
40
- export {};
@@ -1,4 +1,4 @@
1
- import { FilingListDetails, FilingListItemTranslated } from '../../types';
1
+ import type { FilingListDetails, FilingListItemTranslated } from '../../types';
2
2
  export default class FilingMapper {
3
3
  mapFilingListDetails(cik: string | number, filingListDetails: FilingListDetails): FilingListItemTranslated[];
4
4
  }
@@ -1,4 +1,4 @@
1
- import { FilingListItemTranslated } from '../../types/submission.type';
1
+ import type { FilingListItemTranslated } from '../../types/submission.type';
2
2
  export interface SubmissionRequestWrapperOptions {
3
3
  maxRequests?: number;
4
4
  }
@@ -1,5 +1,4 @@
1
- import { CompanyFactFrame, CompanyFactListData, CompanyTickerItem, DailyFilingFormType, FieldDataResponse, Form10KData, Form13GData, Form4Data, FormDef14aData, MultiCompanyFactFrame, ReportRaw, ReportTranslated } from '../../types';
2
- import { FilingListDetails, FilingListItemTranslated, SubmissionList } from '../../types/submission.type';
1
+ import type { CompanyFactFrame, CompanyFactListData, CompanyTickerItem, DailyFilingFormType, FieldDataResponse, Form10KData, Form13GData, Form4Data, FormDef14aData, MultiCompanyFactFrame, ReportRaw, ReportTranslated, FilingListDetails, FilingListItemTranslated, SubmissionList, CalculationMap } from '../../types';
3
2
  import { IClient } from '../Client';
4
3
  import DocumentParser from '../DocumentParser';
5
4
  import ReportParser from '../ReportParser';
@@ -160,6 +159,19 @@ export default class SecEdgarApi {
160
159
  * endpoint `/api/xbrl/frames/${taxonomy}/${fact}/${unit}/${frame}.json`
161
160
  */
162
161
  getFactFrame(params: GetFactFrameParams): Promise<MultiCompanyFactFrame>;
162
+ /**
163
+ * Note: Properties that are not provied from report are calculated an may not be accurate,
164
+ * verify results finance.yahoo.com (ex: https://finance.yahoo.com/quote/AAPL/financials)
165
+ *
166
+ * Please contribute to improve resolving report properties: https://github.com/andyevers/sec-edgar-api
167
+ *
168
+ * Parses reports from company facts. Calculates missing properties and uses a single interface
169
+ * for all reports. This includes only 10-K and 10-Q annual and quarterly reports. To include
170
+ * all reports, use getReportsRaw.
171
+ *
172
+ * @deprecated Formerly getReports. This will be removed in a future version.
173
+ */
174
+ getReportsLegacy<T extends GetReportsParams>(params: T): Promise<T['withWrapper'] extends true ? ReportWrapper[] : ReportTranslated[]>;
163
175
  /**
164
176
  * Note: Properties that are not provied from report are calculated an may not be accurate,
165
177
  * verify results finance.yahoo.com (ex: https://finance.yahoo.com/quote/AAPL/financials)
@@ -170,7 +182,12 @@ export default class SecEdgarApi {
170
182
  * for all reports. This includes only 10-K and 10-Q annual and quarterly reports. To include
171
183
  * all reports, use getReportsRaw.
172
184
  */
173
- getReports<T extends GetReportsParams>(params: T): Promise<T['withWrapper'] extends true ? ReportWrapper[] : ReportTranslated[]>;
185
+ getReports<R = ReportTranslated>(params: {
186
+ symbol: string | number;
187
+ adjustForSplits?: boolean;
188
+ resolvePeriodValues?: boolean;
189
+ calculationMap?: CalculationMap<R>;
190
+ }): Promise<(typeof params.calculationMap extends undefined ? ReportTranslated : ReportRaw & R)[]>;
174
191
  /**
175
192
  * Parses reports from company facts.
176
193
  */
@@ -216,7 +233,7 @@ export default class SecEdgarApi {
216
233
  */
217
234
  getDocumentXbrl(params: GetDocumentXbrlParams): Promise<import("../DocumentParser/XBRLParser/XBRLParser").XbrlParseResult & {
218
235
  report: ReportRaw | null;
219
- facts: import("../../types").FactItem[];
236
+ facts: import("../../types").FactItemExtended[];
220
237
  xml: string;
221
238
  }>;
222
239
  /**
@@ -270,8 +270,10 @@ var SecEdgarApi = /** @class */ (function () {
270
270
  * Parses reports from company facts. Calculates missing properties and uses a single interface
271
271
  * for all reports. This includes only 10-K and 10-Q annual and quarterly reports. To include
272
272
  * all reports, use getReportsRaw.
273
+ *
274
+ * @deprecated Formerly getReports. This will be removed in a future version.
273
275
  */
274
- SecEdgarApi.prototype.getReports = function (params) {
276
+ SecEdgarApi.prototype.getReportsLegacy = function (params) {
275
277
  return __awaiter(this, void 0, void 0, function () {
276
278
  var _a, withWrapper, _b, usePropertyResolver, reportsRaw, reportsWithWrapper, reports;
277
279
  return __generator(this, function (_c) {
@@ -281,13 +283,41 @@ var SecEdgarApi = /** @class */ (function () {
281
283
  return [4 /*yield*/, this.getReportsRaw(__assign(__assign({}, params), { includeNamePrefix: false }))];
282
284
  case 1:
283
285
  reportsRaw = _c.sent();
284
- reportsWithWrapper = this.reportParser.parseReportsFromRaw({ reportsRaw: reportsRaw, usePropertyResolver: usePropertyResolver });
286
+ reportsWithWrapper = this.reportParser.parseReportsFromRawLegacy({ reportsRaw: reportsRaw, usePropertyResolver: usePropertyResolver });
285
287
  reports = withWrapper ? reportsWithWrapper : reportsWithWrapper.map(function (report) { return report.getReport(); });
286
288
  return [2 /*return*/, reports];
287
289
  }
288
290
  });
289
291
  });
290
292
  };
293
+ /**
294
+ * Note: Properties that are not provied from report are calculated an may not be accurate,
295
+ * verify results finance.yahoo.com (ex: https://finance.yahoo.com/quote/AAPL/financials)
296
+ *
297
+ * Please contribute to improve resolving report properties: https://github.com/andyevers/sec-edgar-api
298
+ *
299
+ * Parses reports from company facts. Calculates missing properties and uses a single interface
300
+ * for all reports. This includes only 10-K and 10-Q annual and quarterly reports. To include
301
+ * all reports, use getReportsRaw.
302
+ */
303
+ SecEdgarApi.prototype.getReports = function (params) {
304
+ return __awaiter(this, void 0, void 0, function () {
305
+ var calculationMap, reportsRaw;
306
+ return __generator(this, function (_a) {
307
+ switch (_a.label) {
308
+ case 0:
309
+ calculationMap = params.calculationMap;
310
+ return [4 /*yield*/, this.getReportsRaw(__assign(__assign({}, params), { includeNamePrefix: true }))];
311
+ case 1:
312
+ reportsRaw = _a.sent();
313
+ return [2 /*return*/, this.reportParser.parseReportsFromRaw({
314
+ reportsRaw: reportsRaw,
315
+ calculationMap: calculationMap,
316
+ })];
317
+ }
318
+ });
319
+ });
320
+ };
291
321
  /**
292
322
  * Parses reports from company facts.
293
323
  */
@@ -0,0 +1,13 @@
1
+ export type CalculationMap<T = any> = Record<keyof T, CalculationMapItem>;
2
+ export interface CalculationMapCalculationItem {
3
+ key: string;
4
+ weight: number;
5
+ isRequired: boolean;
6
+ }
7
+ export interface CalculationMapCalculation {
8
+ calculation: CalculationMapCalculationItem[];
9
+ }
10
+ export interface CalculationMapItem {
11
+ groups: CalculationMapCalculation[];
12
+ }
13
+ export type CalculationMapCondensed<T = object> = Record<keyof T, (string | number)[][][]>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
- import { FactItem } from './company-facts.type';
1
+ import type { FactItem } from './company-facts.type';
2
2
  export interface XMLParams {
3
3
  xml: string;
4
4
  }
@@ -42,12 +42,3 @@ export interface FactGroup {
42
42
  valueTrailingFirst: number | string | null;
43
43
  valueTrailingLast: number | string | null;
44
44
  }
45
- export interface FactItemExtended extends FactItem {
46
- period: number;
47
- year: number;
48
- quarter: number;
49
- periodValue: number | null;
50
- trailingValue: number | null;
51
- splitValue: number | null;
52
- splitsApplied: number[];
53
- }
@@ -1,4 +1,4 @@
1
- import { FiscalPeriod } from './report-raw.type';
1
+ import type { FiscalPeriod } from './report-raw.type';
2
2
  export interface CompanyFactListData {
3
3
  cik: number;
4
4
  entityName: string;
@@ -74,6 +74,11 @@ export interface FactItem {
74
74
  }[];
75
75
  uuid?: string;
76
76
  }
77
+ export interface FactItemExtended extends FactItem {
78
+ isUsedInReport?: boolean;
79
+ decimals?: number;
80
+ scale?: number;
81
+ }
77
82
  export interface FactItemWithFiscals extends FactItem {
78
83
  fiscalPeriod: FiscalPeriod;
79
84
  year: number;
@@ -1,9 +1,11 @@
1
- export * from './company-facts.type';
2
- export * from './report-raw.type';
3
- export * from './report-translated.type';
4
- export * from './submission.type';
5
- export * from './parsed-filings.type';
6
- export * from './common.type';
7
- export * from './insider-transaction.type';
8
- export * from './company-search.type';
9
- export * from './current-filings.type';
1
+ export type * from './company-facts.type';
2
+ export type * from './report-raw.type';
3
+ export type * from './report-translated.type';
4
+ export type * from './submission.type';
5
+ export type * from './parsed-filings.type';
6
+ export type * from './common.type';
7
+ export type * from './insider-transaction.type';
8
+ export type * from './company-search.type';
9
+ export type * from './current-filings.type';
10
+ export type * from './xbrl.type';
11
+ export type * from './calculation-map.type';
@@ -1,25 +1,2 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./company-facts.type"), exports);
18
- __exportStar(require("./report-raw.type"), exports);
19
- __exportStar(require("./report-translated.type"), exports);
20
- __exportStar(require("./submission.type"), exports);
21
- __exportStar(require("./parsed-filings.type"), exports);
22
- __exportStar(require("./common.type"), exports);
23
- __exportStar(require("./insider-transaction.type"), exports);
24
- __exportStar(require("./company-search.type"), exports);
25
- __exportStar(require("./current-filings.type"), exports);
@@ -1,4 +1,4 @@
1
- import { FiscalPeriod } from './report-raw.type';
1
+ import type { FiscalPeriod } from './report-raw.type';
2
2
  export interface ReportTranslated {
3
3
  cik: number;
4
4
  url: string | null;
@@ -28,7 +28,6 @@ export interface ReportTranslated {
28
28
  liabilityNonCurrentDebt: number | null;
29
29
  equityTotal: number | null;
30
30
  equityRetainedEarnings: number | null;
31
- equityStockPreferred: number | null;
32
31
  sharesOutstanding: number | null;
33
32
  sharesOutstandingDiluted: number | null;
34
33
  eps: number | null;
@@ -48,13 +47,17 @@ export interface ReportTranslated {
48
47
  expenseDepreciationAccumulated: number | null;
49
48
  expenseStockCompensation: number | null;
50
49
  expenseNonCashOther: number | null;
50
+ expenseSellingGeneralAdministrative: number | null;
51
51
  incomeOperating: number | null;
52
52
  incomeNet: number | null;
53
+ incomePretax: number | null;
53
54
  cashFlowFree: number | null;
54
55
  cashFlowDividendsPaid: number | null;
55
56
  cashFlowDividendsPaidPreferred: number | null;
56
- cashFlowCapex: number | null;
57
57
  cashFlowOperating: number | null;
58
+ cashFlowInvesting: number | null;
59
+ cashFlowFinancing: number | null;
60
+ cashFlowCapex: number | null;
58
61
  cashFlowDeferredTax: number | null;
59
62
  cashFlowWorkingCapitalNonCash: number | null;
60
63
  }
@@ -0,0 +1,2 @@
1
+ import { CalculationMapCondensed, ReportTranslated } from '../types';
2
+ export declare const calculationMapCondensed: CalculationMapCondensed<ReportTranslated>;
@@ -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