laplace-api 4.6.0 → 4.7.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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/client/news.ts +17 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "laplace-api",
3
- "version": "4.6.0",
3
+ "version": "4.7.0",
4
4
  "description": "Client library for Laplace API for the US stock market and BIST (Istanbul stock market) fundamental financial data.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -34,12 +34,24 @@ export interface News {
34
34
  qualityScore: number;
35
35
  createdAt: string;
36
36
  tickers?: NewsTicker[];
37
+ translations?: NewsTranslation;
37
38
  categories?: NewsCategories;
38
39
  sectors?: NewsSector;
39
40
  content?: NewsContent;
40
41
  industries?: NewsIndustry;
41
42
  }
42
43
 
44
+ export interface NewsTranslation {
45
+ title: string;
46
+ description: string;
47
+ content: string;
48
+ summary: string;
49
+ summaryParsed: string[];
50
+ investorInsight: string;
51
+ language: string;
52
+ originalLanguage: boolean;
53
+ }
54
+
43
55
  export interface NewsPublisher {
44
56
  name: string;
45
57
  logoUrl?: string;
@@ -95,7 +107,7 @@ export class NewsClient extends Client {
95
107
  async getNews(
96
108
  region: Region,
97
109
  locale: Locale,
98
- newsType: NewsType,
110
+ newsType: NewsType | null,
99
111
  page: number | null,
100
112
  size: number | null,
101
113
  orderBy: NewsOrderBy | null,
@@ -107,7 +119,10 @@ export class NewsClient extends Client {
107
119
  );
108
120
  url.searchParams.append("region", region);
109
121
  url.searchParams.append("locale", locale);
110
- url.searchParams.append("newsType", newsType);
122
+
123
+ if (newsType) {
124
+ url.searchParams.append("newsType", newsType);
125
+ }
111
126
 
112
127
  if (page) {
113
128
  url.searchParams.append("page", page.toString());