reportify-sdk 0.2.7 → 0.2.8
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/dist/index.d.mts +23 -2
- package/dist/index.d.ts +23 -2
- package/dist/index.js +31 -6
- package/dist/index.mjs +31 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -176,9 +176,30 @@ declare class StockModule {
|
|
|
176
176
|
/**
|
|
177
177
|
* Get company overview including business description, sector, and key metrics
|
|
178
178
|
*
|
|
179
|
-
* @param
|
|
179
|
+
* @param options - Query options
|
|
180
|
+
* @param options.symbols - Stock symbols. You can enter multiple items, separated by commas(,)
|
|
181
|
+
* @param options.names - Stock names. You can enter multiple items, separated by commas(,)
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```typescript
|
|
185
|
+
* // Single stock by symbol
|
|
186
|
+
* const info = await client.stock.overview({ symbols: 'US:AAPL' });
|
|
187
|
+
* console.log(info.name, info.sector);
|
|
188
|
+
*
|
|
189
|
+
* // Multiple stocks by symbols
|
|
190
|
+
* const infos = await client.stock.overview({ symbols: 'US:AAPL,US:MSFT' });
|
|
191
|
+
* for (const info of infos) {
|
|
192
|
+
* console.log(info.name);
|
|
193
|
+
* }
|
|
194
|
+
*
|
|
195
|
+
* // Search by name
|
|
196
|
+
* const info = await client.stock.overview({ names: 'Apple Inc.' });
|
|
197
|
+
* ```
|
|
180
198
|
*/
|
|
181
|
-
overview(
|
|
199
|
+
overview(options: {
|
|
200
|
+
symbols?: string;
|
|
201
|
+
names?: string;
|
|
202
|
+
}): Promise<CompanyOverview | CompanyOverview[]>;
|
|
182
203
|
/**
|
|
183
204
|
* Get list of major shareholders
|
|
184
205
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -176,9 +176,30 @@ declare class StockModule {
|
|
|
176
176
|
/**
|
|
177
177
|
* Get company overview including business description, sector, and key metrics
|
|
178
178
|
*
|
|
179
|
-
* @param
|
|
179
|
+
* @param options - Query options
|
|
180
|
+
* @param options.symbols - Stock symbols. You can enter multiple items, separated by commas(,)
|
|
181
|
+
* @param options.names - Stock names. You can enter multiple items, separated by commas(,)
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```typescript
|
|
185
|
+
* // Single stock by symbol
|
|
186
|
+
* const info = await client.stock.overview({ symbols: 'US:AAPL' });
|
|
187
|
+
* console.log(info.name, info.sector);
|
|
188
|
+
*
|
|
189
|
+
* // Multiple stocks by symbols
|
|
190
|
+
* const infos = await client.stock.overview({ symbols: 'US:AAPL,US:MSFT' });
|
|
191
|
+
* for (const info of infos) {
|
|
192
|
+
* console.log(info.name);
|
|
193
|
+
* }
|
|
194
|
+
*
|
|
195
|
+
* // Search by name
|
|
196
|
+
* const info = await client.stock.overview({ names: 'Apple Inc.' });
|
|
197
|
+
* ```
|
|
180
198
|
*/
|
|
181
|
-
overview(
|
|
199
|
+
overview(options: {
|
|
200
|
+
symbols?: string;
|
|
201
|
+
names?: string;
|
|
202
|
+
}): Promise<CompanyOverview | CompanyOverview[]>;
|
|
182
203
|
/**
|
|
183
204
|
* Get list of major shareholders
|
|
184
205
|
*
|
package/dist/index.js
CHANGED
|
@@ -46,12 +46,37 @@ var StockModule = class {
|
|
|
46
46
|
/**
|
|
47
47
|
* Get company overview including business description, sector, and key metrics
|
|
48
48
|
*
|
|
49
|
-
* @param
|
|
49
|
+
* @param options - Query options
|
|
50
|
+
* @param options.symbols - Stock symbols. You can enter multiple items, separated by commas(,)
|
|
51
|
+
* @param options.names - Stock names. You can enter multiple items, separated by commas(,)
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* // Single stock by symbol
|
|
56
|
+
* const info = await client.stock.overview({ symbols: 'US:AAPL' });
|
|
57
|
+
* console.log(info.name, info.sector);
|
|
58
|
+
*
|
|
59
|
+
* // Multiple stocks by symbols
|
|
60
|
+
* const infos = await client.stock.overview({ symbols: 'US:AAPL,US:MSFT' });
|
|
61
|
+
* for (const info of infos) {
|
|
62
|
+
* console.log(info.name);
|
|
63
|
+
* }
|
|
64
|
+
*
|
|
65
|
+
* // Search by name
|
|
66
|
+
* const info = await client.stock.overview({ names: 'Apple Inc.' });
|
|
67
|
+
* ```
|
|
50
68
|
*/
|
|
51
|
-
async overview(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
69
|
+
async overview(options) {
|
|
70
|
+
if (!options.symbols && !options.names) {
|
|
71
|
+
throw new Error("Either symbols or names must be provided");
|
|
72
|
+
}
|
|
73
|
+
const body = {};
|
|
74
|
+
if (options.symbols) body.symbols = options.symbols;
|
|
75
|
+
if (options.names) body.names = options.names;
|
|
76
|
+
return this.client.post(
|
|
77
|
+
"/v1/stock/company-overview",
|
|
78
|
+
body
|
|
79
|
+
);
|
|
55
80
|
}
|
|
56
81
|
/**
|
|
57
82
|
* Get list of major shareholders
|
|
@@ -907,7 +932,7 @@ var Reportify = class {
|
|
|
907
932
|
headers: {
|
|
908
933
|
Authorization: `Bearer ${this.apiKey}`,
|
|
909
934
|
"Content-Type": "application/json",
|
|
910
|
-
"User-Agent": "reportify-sdk-js/0.2.
|
|
935
|
+
"User-Agent": "reportify-sdk-js/0.2.8"
|
|
911
936
|
},
|
|
912
937
|
body: options.body ? JSON.stringify(options.body) : void 0,
|
|
913
938
|
signal: controller.signal
|
package/dist/index.mjs
CHANGED
|
@@ -9,12 +9,37 @@ var StockModule = class {
|
|
|
9
9
|
/**
|
|
10
10
|
* Get company overview including business description, sector, and key metrics
|
|
11
11
|
*
|
|
12
|
-
* @param
|
|
12
|
+
* @param options - Query options
|
|
13
|
+
* @param options.symbols - Stock symbols. You can enter multiple items, separated by commas(,)
|
|
14
|
+
* @param options.names - Stock names. You can enter multiple items, separated by commas(,)
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* // Single stock by symbol
|
|
19
|
+
* const info = await client.stock.overview({ symbols: 'US:AAPL' });
|
|
20
|
+
* console.log(info.name, info.sector);
|
|
21
|
+
*
|
|
22
|
+
* // Multiple stocks by symbols
|
|
23
|
+
* const infos = await client.stock.overview({ symbols: 'US:AAPL,US:MSFT' });
|
|
24
|
+
* for (const info of infos) {
|
|
25
|
+
* console.log(info.name);
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* // Search by name
|
|
29
|
+
* const info = await client.stock.overview({ names: 'Apple Inc.' });
|
|
30
|
+
* ```
|
|
13
31
|
*/
|
|
14
|
-
async overview(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
32
|
+
async overview(options) {
|
|
33
|
+
if (!options.symbols && !options.names) {
|
|
34
|
+
throw new Error("Either symbols or names must be provided");
|
|
35
|
+
}
|
|
36
|
+
const body = {};
|
|
37
|
+
if (options.symbols) body.symbols = options.symbols;
|
|
38
|
+
if (options.names) body.names = options.names;
|
|
39
|
+
return this.client.post(
|
|
40
|
+
"/v1/stock/company-overview",
|
|
41
|
+
body
|
|
42
|
+
);
|
|
18
43
|
}
|
|
19
44
|
/**
|
|
20
45
|
* Get list of major shareholders
|
|
@@ -870,7 +895,7 @@ var Reportify = class {
|
|
|
870
895
|
headers: {
|
|
871
896
|
Authorization: `Bearer ${this.apiKey}`,
|
|
872
897
|
"Content-Type": "application/json",
|
|
873
|
-
"User-Agent": "reportify-sdk-js/0.2.
|
|
898
|
+
"User-Agent": "reportify-sdk-js/0.2.8"
|
|
874
899
|
},
|
|
875
900
|
body: options.body ? JSON.stringify(options.body) : void 0,
|
|
876
901
|
signal: controller.signal
|