reportify-sdk 0.2.7 → 0.2.9

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 CHANGED
@@ -51,8 +51,10 @@ interface SearchOptions {
51
51
  num?: number;
52
52
  categories?: string[];
53
53
  symbols?: string[];
54
- startDate?: string;
55
- endDate?: string;
54
+ industries?: string[];
55
+ channelIds?: string[];
56
+ startDatetime?: string;
57
+ endDatetime?: string;
56
58
  }
57
59
  interface CompanyOverview {
58
60
  symbol: string;
@@ -110,9 +112,9 @@ interface IPOEvent {
110
112
  priceRange?: string;
111
113
  [key: string]: unknown;
112
114
  }
113
- type Period = 'annual' | 'quarterly';
114
- type Interval = '1d' | '1w' | '1m';
115
- type PriceAdjust = 'forward' | 'backward' | 'none';
115
+ type Period = 'annual' | 'quarterly' | 'cumulative quarterly';
116
+ type Calendar = 'calendar' | 'fiscal';
117
+ type ShareholderType = 'shareholders' | 'outstanding_shareholders';
116
118
  type Market = 'us' | 'hk' | 'cn';
117
119
  type IPOStatus = 'Filing' | 'Hearing' | 'Priced';
118
120
  interface IndustryConstituent {
@@ -136,15 +138,113 @@ interface IndexFund {
136
138
  symbol: string;
137
139
  [key: string]: unknown;
138
140
  }
139
- interface TimelineOptions {
140
- num?: number;
141
+ interface DocsListOptions {
142
+ symbols?: string[];
143
+ categories?: string[];
144
+ markets?: string[];
145
+ institutions?: string[];
146
+ tags?: Record<string, unknown[]>;
147
+ startDate?: string;
148
+ endDate?: string;
149
+ minScore?: number;
150
+ extendedFilters?: Record<string, unknown>[];
151
+ folderIds?: string[];
152
+ pageNum?: number;
153
+ pageSize?: number;
141
154
  }
142
- interface KBSearchOptions {
155
+ interface ChunkSearchOptions {
156
+ symbols?: string[];
157
+ categories?: string[];
143
158
  folderIds?: string[];
144
159
  docIds?: string[];
160
+ markets?: string[];
161
+ institutions?: string[];
162
+ tags?: Record<string, unknown[]>;
145
163
  startDate?: string;
146
164
  endDate?: string;
165
+ minScore?: number;
166
+ extendedFilters?: Record<string, unknown>[];
147
167
  num?: number;
168
+ includeDocExtraDetails?: boolean;
169
+ refineQuestion?: boolean;
170
+ dateRange?: 'h' | 'd' | 'w' | 'm' | 'y';
171
+ }
172
+ interface UploadDocRequest {
173
+ url: string;
174
+ name?: string;
175
+ metadatas?: Record<string, unknown>;
176
+ publishedAt?: number;
177
+ tags?: Record<string, unknown[]>;
178
+ }
179
+ interface Channel {
180
+ id: string;
181
+ name: string;
182
+ description?: string;
183
+ avatarUrl?: string;
184
+ following?: boolean;
185
+ }
186
+ type ChatMode = 'concise' | 'comprehensive' | 'deepresearch';
187
+ interface ChatCompletionOptions {
188
+ folderIds?: string[];
189
+ docIds?: string[];
190
+ categories?: string[];
191
+ markets?: string[];
192
+ institutions?: string[];
193
+ symbols?: string[];
194
+ tags?: Record<string, unknown[]>;
195
+ startDate?: string;
196
+ endDate?: string;
197
+ minScore?: number;
198
+ extendedFilters?: Record<string, unknown>[];
199
+ mode?: ChatMode;
200
+ sessionId?: string;
201
+ stream?: boolean;
202
+ }
203
+ interface ChatCompletionResponse {
204
+ type: string;
205
+ messageId: string;
206
+ message: string;
207
+ extra?: Record<string, unknown>;
208
+ }
209
+ interface AgentConversation {
210
+ id: number;
211
+ userId: number;
212
+ agentId: number;
213
+ type: string;
214
+ title?: string;
215
+ status: string;
216
+ createdAt: number;
217
+ updatedAt: number;
218
+ }
219
+ interface AgentMessage {
220
+ id: number;
221
+ userId: number;
222
+ conversationId: number;
223
+ turnId: number;
224
+ role: 'user' | 'assistant';
225
+ replyToMessageId?: number;
226
+ content?: Record<string, unknown>;
227
+ status: string;
228
+ errorInfo?: Record<string, unknown>;
229
+ assistantMessageId?: string;
230
+ createdAt: number;
231
+ updatedAt: number;
232
+ assistantEvents?: Record<string, unknown>[];
233
+ }
234
+ interface DocumentInput {
235
+ docId: string;
236
+ docTitle: string;
237
+ fileType?: string;
238
+ }
239
+ interface FollowedCompany {
240
+ symbol: string;
241
+ ticker?: string;
242
+ market?: string;
243
+ name?: string;
244
+ chineseName?: string;
245
+ englishName?: string;
246
+ logo?: string;
247
+ followedAt?: number;
148
248
  }
149
249
  declare class ReportifyError extends Error {
150
250
  statusCode?: number;
@@ -176,56 +276,120 @@ declare class StockModule {
176
276
  /**
177
277
  * Get company overview including business description, sector, and key metrics
178
278
  *
179
- * @param symbol - Stock symbol (e.g., "US:AAPL", "HK:0700")
279
+ * @param options - Query options
280
+ * @param options.symbols - Stock symbols. You can enter multiple items, separated by commas(,)
281
+ * @param options.names - Stock names. You can enter multiple items, separated by commas(,)
282
+ *
283
+ * @example
284
+ * ```typescript
285
+ * // Single stock by symbol
286
+ * const info = await client.stock.overview({ symbols: 'US:AAPL' });
287
+ * console.log(info.name, info.sector);
288
+ *
289
+ * // Multiple stocks by symbols
290
+ * const infos = await client.stock.overview({ symbols: 'US:AAPL,US:MSFT' });
291
+ * for (const info of infos) {
292
+ * console.log(info.name);
293
+ * }
294
+ *
295
+ * // Search by name
296
+ * const info = await client.stock.overview({ names: 'Apple Inc.' });
297
+ * ```
180
298
  */
181
- overview(symbol: string): Promise<CompanyOverview>;
299
+ overview(options: {
300
+ symbols?: string;
301
+ names?: string;
302
+ }): Promise<CompanyOverview | CompanyOverview[]>;
182
303
  /**
183
304
  * Get list of major shareholders
184
305
  *
185
306
  * @param symbol - Stock symbol
307
+ * @param options.type - Type of shareholders ('shareholders' or 'outstanding_shareholders')
308
+ * @param options.limit - Number of results to return (default: 10)
186
309
  */
187
- shareholders(symbol: string): Promise<Shareholder[]>;
310
+ shareholders(symbol: string, options?: {
311
+ type?: ShareholderType;
312
+ limit?: number;
313
+ }): Promise<Shareholder[]>;
188
314
  /**
189
315
  * Get income statement data
190
316
  *
191
317
  * @param symbol - Stock symbol
192
- * @param options.period - "annual" or "quarterly"
193
- * @param options.limit - Number of periods to return
318
+ * @param options.period - "annual", "quarterly", or "cumulative quarterly"
319
+ * @param options.limit - Number of periods to return (default: 8)
320
+ * @param options.startDate - Start date (YYYY-MM-DD)
321
+ * @param options.endDate - End date (YYYY-MM-DD)
322
+ * @param options.calendar - "calendar" or "fiscal" (default: "fiscal")
323
+ * @param options.fiscalYear - Specific fiscal year (e.g., "2023")
324
+ * @param options.fiscalQuarter - Specific fiscal quarter (Q1, Q2, Q3, Q4, FY, H1)
194
325
  */
195
326
  incomeStatement(symbol: string, options?: {
196
327
  period?: Period;
197
328
  limit?: number;
329
+ startDate?: string;
330
+ endDate?: string;
331
+ calendar?: Calendar;
332
+ fiscalYear?: string;
333
+ fiscalQuarter?: string;
198
334
  }): Promise<FinancialStatement[]>;
199
335
  /**
200
336
  * Get balance sheet data
201
337
  *
202
338
  * @param symbol - Stock symbol
203
339
  * @param options.period - "annual" or "quarterly"
204
- * @param options.limit - Number of periods to return
340
+ * @param options.limit - Number of periods to return (default: 8)
341
+ * @param options.startDate - Start date (YYYY-MM-DD)
342
+ * @param options.endDate - End date (YYYY-MM-DD)
343
+ * @param options.calendar - "calendar" or "fiscal" (default: "fiscal")
344
+ * @param options.fiscalYear - Specific fiscal year (e.g., "2023")
345
+ * @param options.fiscalQuarter - Specific fiscal quarter (Q1, Q2, Q3, Q4, FY)
205
346
  */
206
347
  balanceSheet(symbol: string, options?: {
207
- period?: Period;
348
+ period?: 'annual' | 'quarterly';
208
349
  limit?: number;
350
+ startDate?: string;
351
+ endDate?: string;
352
+ calendar?: Calendar;
353
+ fiscalYear?: string;
354
+ fiscalQuarter?: string;
209
355
  }): Promise<FinancialStatement[]>;
210
356
  /**
211
357
  * Get cash flow statement data
212
358
  *
213
359
  * @param symbol - Stock symbol
214
- * @param options.period - "annual" or "quarterly"
215
- * @param options.limit - Number of periods to return
360
+ * @param options.period - "annual", "quarterly", or "cumulative quarterly"
361
+ * @param options.limit - Number of periods to return (default: 8)
362
+ * @param options.startDate - Start date (YYYY-MM-DD)
363
+ * @param options.endDate - End date (YYYY-MM-DD)
364
+ * @param options.calendar - "calendar" or "fiscal" (default: "fiscal")
365
+ * @param options.fiscalYear - Specific fiscal year (e.g., "2023")
366
+ * @param options.fiscalQuarter - Specific fiscal quarter (Q1, Q2, Q3, Q4, FY, H1)
216
367
  */
217
368
  cashflowStatement(symbol: string, options?: {
218
369
  period?: Period;
219
370
  limit?: number;
371
+ startDate?: string;
372
+ endDate?: string;
373
+ calendar?: Calendar;
374
+ fiscalYear?: string;
375
+ fiscalQuarter?: string;
220
376
  }): Promise<FinancialStatement[]>;
221
377
  /**
222
- * Get revenue breakdown by segment, product, or region
378
+ * Get revenue breakdown
223
379
  *
224
380
  * @param symbol - Stock symbol
225
- * @param options.breakdownType - Type of breakdown
381
+ * @param options.period - Report cycle (e.g., "FY", "Q2")
382
+ * @param options.limit - Number of records to return (default: 6)
383
+ * @param options.startDate - Start date (YYYY-MM-DD)
384
+ * @param options.endDate - End date (YYYY-MM-DD)
385
+ * @param options.fiscalYear - Specific fiscal year (e.g., "2023")
226
386
  */
227
387
  revenueBreakdown(symbol: string, options?: {
228
- breakdownType?: 'segment' | 'product' | 'region';
388
+ period?: string;
389
+ limit?: number;
390
+ startDate?: string;
391
+ endDate?: string;
392
+ fiscalYear?: string;
229
393
  }): Promise<FinancialStatement[]>;
230
394
  /**
231
395
  * Get historical stock prices
@@ -236,63 +400,61 @@ declare class StockModule {
236
400
  prices(symbol: string, options?: {
237
401
  startDate?: string;
238
402
  endDate?: string;
239
- limit?: number;
240
403
  }): Promise<PriceData[]>;
241
404
  /**
242
- * Get K-line (candlestick) data
405
+ * Get real-time stock quote
243
406
  *
244
407
  * @param symbol - Stock symbol
245
- * @param options - Query options
246
- */
247
- kline(symbol: string, options?: {
248
- interval?: Interval;
249
- adjust?: PriceAdjust;
250
- startDate?: string;
251
- endDate?: string;
252
- limit?: number;
253
- }): Promise<PriceData[]>;
254
- /**
255
- * Get real-time stock quotes
256
- *
257
- * @param symbols - Single symbol or array of symbols
258
408
  */
259
- quote(symbols: string | string[]): Promise<Quote[]>;
409
+ quote(symbol: string): Promise<Quote>;
260
410
  /**
261
411
  * Get stock index prices
262
412
  *
263
- * @param symbol - Index symbol
413
+ * @param symbol - Index symbol (e.g., HSI, SPX, DJI)
264
414
  * @param options - Query options
265
415
  */
266
416
  indexPrices(symbol: string, options?: {
267
417
  startDate?: string;
268
418
  endDate?: string;
269
- limit?: number;
270
419
  }): Promise<PriceData[]>;
271
420
  /**
272
421
  * Screen stocks based on various criteria
273
422
  */
274
423
  screener(options?: {
275
- market?: string;
276
- sector?: string;
277
- minMarketCap?: number;
278
- maxMarketCap?: number;
279
- minPe?: number;
280
- maxPe?: number;
424
+ marketCapMoreThan?: number;
425
+ marketCapLowerThan?: number;
426
+ priceMoreThan?: number;
427
+ priceLowerThan?: number;
428
+ changePercentageMoreThan?: number;
429
+ changePercentageLowerThan?: number;
430
+ volumeMoreThan?: number;
431
+ volumeLowerThan?: number;
432
+ country?: string;
433
+ exchange?: string;
434
+ dividendYieldMoreThan?: number;
435
+ dividendYieldLowerThan?: number;
436
+ peTtmMoreThan?: number;
437
+ peTtmLowerThan?: number;
281
438
  limit?: number;
282
439
  }): Promise<CompanyOverview[]>;
283
440
  /**
284
441
  * Get earnings announcement calendar
442
+ *
443
+ * @param options.market - Required: Stock market (cn, hk, us)
444
+ * @param options.startDate - Required: Start date (YYYY-MM-DD)
445
+ * @param options.endDate - Required: End date (YYYY-MM-DD)
446
+ * @param options.symbol - Optional: Stock symbol
285
447
  */
286
- earningsCalendar(options?: {
287
- market?: Market;
288
- startDate?: string;
289
- endDate?: string;
448
+ earningsCalendar(options: {
449
+ market: Market;
450
+ startDate: string;
451
+ endDate: string;
290
452
  symbol?: string;
291
453
  }): Promise<EarningsEvent[]>;
292
454
  /**
293
455
  * Get Hong Kong IPO calendar
294
456
  */
295
- ipoCalendarHK(status?: IPOStatus): Promise<IPOEvent[]>;
457
+ ipoCalendarHK(status: IPOStatus): Promise<IPOEvent[]>;
296
458
  /**
297
459
  * Get constituent stocks of an industry
298
460
  *
@@ -346,84 +508,6 @@ declare class StockModule {
346
508
  private normalizeArrayResponse;
347
509
  }
348
510
 
349
- /**
350
- * Timeline Module
351
- *
352
- * Provides access to timeline feeds based on user's followed entities.
353
- */
354
-
355
- declare class TimelineModule {
356
- private client;
357
- constructor(client: Reportify);
358
- /**
359
- * Get timeline for followed companies
360
- *
361
- * Returns recent content related to companies the user is following.
362
- *
363
- * @param options.num - Number of items to return (default: 10, max: 100)
364
- */
365
- companies(options?: TimelineOptions): Promise<Document[]>;
366
- /**
367
- * Get timeline for followed topics
368
- *
369
- * Returns recent content related to custom topics the user is following.
370
- *
371
- * @param options.num - Number of items to return
372
- */
373
- topics(options?: TimelineOptions): Promise<Document[]>;
374
- /**
375
- * Get timeline for followed professional institutes
376
- *
377
- * Returns recent content from research institutions, banks, etc.
378
- *
379
- * @param options.num - Number of items to return
380
- */
381
- institutes(options?: TimelineOptions): Promise<Document[]>;
382
- /**
383
- * Get timeline for followed public media
384
- *
385
- * Returns recent content from public media accounts.
386
- *
387
- * @param options.num - Number of items to return
388
- */
389
- publicMedia(options?: TimelineOptions): Promise<Document[]>;
390
- /**
391
- * Get timeline for followed social media
392
- *
393
- * Returns recent content from social media accounts.
394
- *
395
- * @param options.num - Number of items to return
396
- */
397
- socialMedia(options?: TimelineOptions): Promise<Document[]>;
398
- }
399
-
400
- /**
401
- * Knowledge Base Module
402
- *
403
- * Provides access to user's personal knowledge base for searching
404
- * uploaded documents.
405
- */
406
-
407
- declare class KBModule {
408
- private client;
409
- constructor(client: Reportify);
410
- /**
411
- * Search user's knowledge base
412
- *
413
- * Performs semantic search across documents the user has uploaded.
414
- *
415
- * @param query - Search query string
416
- * @param options - Search options
417
- *
418
- * @example
419
- * ```typescript
420
- * const results = await client.kb.search('quarterly revenue', { num: 5 });
421
- * results.forEach(chunk => console.log(chunk.content));
422
- * ```
423
- */
424
- search(query: string, options?: KBSearchOptions): Promise<Chunk[]>;
425
- }
426
-
427
511
  /**
428
512
  * Documents Module
429
513
  *
@@ -446,21 +530,6 @@ interface DocSummary {
446
530
  keyPoints?: string[];
447
531
  [key: string]: unknown;
448
532
  }
449
- interface DocsListOptions {
450
- symbols?: string[];
451
- categories?: string[];
452
- startDate?: string;
453
- endDate?: string;
454
- page?: number;
455
- pageSize?: number;
456
- }
457
- interface ChunkSearchOptions {
458
- symbols?: string[];
459
- categories?: string[];
460
- startDate?: string;
461
- endDate?: string;
462
- num?: number;
463
- }
464
533
  declare class DocsModule {
465
534
  private client;
466
535
  constructor(client: Reportify);
@@ -488,6 +557,34 @@ declare class DocsModule {
488
557
  * @param options - Filter options
489
558
  */
490
559
  list(options?: DocsListOptions): Promise<PaginatedResponse<Document>>;
560
+ /**
561
+ * Query documents by symbols
562
+ *
563
+ * @param symbols - Required: Stock symbols
564
+ * @param options - Filter options
565
+ */
566
+ queryBySymbols(symbols: string[], options?: {
567
+ categories?: string[];
568
+ markets?: string[];
569
+ startDate?: string;
570
+ endDate?: string;
571
+ pageNum?: number;
572
+ pageSize?: number;
573
+ }): Promise<PaginatedResponse<Document>>;
574
+ /**
575
+ * Query documents by tags
576
+ *
577
+ * @param tags - Required: Document tags
578
+ * @param options - Filter options
579
+ */
580
+ queryByTags(tags: Record<string, unknown[]>, options?: {
581
+ categories?: string[];
582
+ markets?: string[];
583
+ startDate?: string;
584
+ endDate?: string;
585
+ pageNum?: number;
586
+ pageSize?: number;
587
+ }): Promise<PaginatedResponse<Document>>;
491
588
  /**
492
589
  * Search document chunks semantically
493
590
  *
@@ -495,6 +592,78 @@ declare class DocsModule {
495
592
  * @param options - Search options
496
593
  */
497
594
  searchChunks(query: string, options?: ChunkSearchOptions): Promise<Chunk[]>;
595
+ /**
596
+ * Create a new document folder
597
+ *
598
+ * @param name - Folder name
599
+ * @returns Folder ID
600
+ */
601
+ createFolder(name: string): Promise<{
602
+ folderId: string;
603
+ }>;
604
+ /**
605
+ * Delete a document folder and all files within it
606
+ *
607
+ * @param folderId - Folder ID to delete
608
+ * @returns Deleted folder ID and document IDs
609
+ */
610
+ deleteFolder(folderId: string): Promise<{
611
+ folderId: string;
612
+ docIds: string[];
613
+ }>;
614
+ /**
615
+ * Upload documents by URL
616
+ *
617
+ * @param docs - Array of document upload requests
618
+ * @param options.folderId - Optional folder ID
619
+ * @param options.pdfParsingMode - PDF parsing mode (1: by page, 3: by logic)
620
+ */
621
+ uploadDocs(docs: UploadDocRequest[], options?: {
622
+ folderId?: string;
623
+ pdfParsingMode?: number;
624
+ }): Promise<{
625
+ docs: Array<{
626
+ id: string;
627
+ title: string;
628
+ originalUrl: string;
629
+ }>;
630
+ }>;
631
+ /**
632
+ * Upload documents by URL asynchronously
633
+ *
634
+ * @param docs - Array of document upload requests
635
+ * @param options.folderId - Optional folder ID
636
+ * @param options.pdfParsingMode - PDF parsing mode (1: by page, 3: by logic)
637
+ */
638
+ uploadDocsAsync(docs: UploadDocRequest[], options?: {
639
+ folderId?: string;
640
+ pdfParsingMode?: number;
641
+ }): Promise<{
642
+ docs: Array<{
643
+ id: string;
644
+ title: string;
645
+ originalUrl: string;
646
+ }>;
647
+ }>;
648
+ /**
649
+ * Get upload status of a document
650
+ *
651
+ * @param docId - Document ID
652
+ * @returns Upload status (pending, processing, completed)
653
+ */
654
+ getUploadStatus(docId: string): Promise<{
655
+ id: string;
656
+ status: 'pending' | 'processing' | 'completed';
657
+ }>;
658
+ /**
659
+ * Delete documents
660
+ *
661
+ * @param docIds - Array of document IDs to delete
662
+ * @returns Deleted document IDs
663
+ */
664
+ deleteDocs(docIds: string[]): Promise<{
665
+ docIds: string[];
666
+ }>;
498
667
  }
499
668
 
500
669
  /**
@@ -904,6 +1073,297 @@ declare class ConceptsModule {
904
1073
  today(): Promise<ConceptFeed[]>;
905
1074
  }
906
1075
 
1076
+ /**
1077
+ * Channels Module
1078
+ *
1079
+ * Provides access to channel search, following, and document feeds.
1080
+ */
1081
+
1082
+ declare class ChannelsModule {
1083
+ private client;
1084
+ constructor(client: Reportify);
1085
+ /**
1086
+ * Search for channels by query string
1087
+ *
1088
+ * @param query - Search query string
1089
+ * @param options - Pagination options
1090
+ */
1091
+ search(query: string, options?: {
1092
+ pageNum?: number;
1093
+ pageSize?: number;
1094
+ }): Promise<PaginatedResponse<Channel>>;
1095
+ /**
1096
+ * Get list of channels user is following
1097
+ *
1098
+ * @param options - Pagination options
1099
+ */
1100
+ getFollowings(options?: {
1101
+ pageNum?: number;
1102
+ pageSize?: number;
1103
+ }): Promise<PaginatedResponse<Channel>>;
1104
+ /**
1105
+ * Follow a channel
1106
+ *
1107
+ * @param channelId - Channel ID to follow
1108
+ */
1109
+ follow(channelId: string): Promise<Channel>;
1110
+ /**
1111
+ * Unfollow a channel
1112
+ *
1113
+ * @param channelId - Channel ID to unfollow
1114
+ */
1115
+ unfollow(channelId: string): Promise<{
1116
+ status: boolean;
1117
+ message: string;
1118
+ }>;
1119
+ /**
1120
+ * Get documents from followed channels
1121
+ *
1122
+ * @param options - Query options
1123
+ */
1124
+ getDocs(options?: {
1125
+ channelIds?: string;
1126
+ pageNum?: number;
1127
+ pageSize?: number;
1128
+ }): Promise<PaginatedResponse<Document>>;
1129
+ }
1130
+
1131
+ /**
1132
+ * Chat Module
1133
+ *
1134
+ * Provides chat completion based on document content.
1135
+ */
1136
+
1137
+ declare class ChatModule {
1138
+ private client;
1139
+ constructor(client: Reportify);
1140
+ /**
1141
+ * Chat completion based on document content
1142
+ *
1143
+ * @param query - User query
1144
+ * @param options - Chat options
1145
+ */
1146
+ completion(query: string, options?: ChatCompletionOptions): Promise<ChatCompletionResponse>;
1147
+ }
1148
+
1149
+ /**
1150
+ * Agent Module
1151
+ *
1152
+ * Provides access to agent conversations and chat functionality.
1153
+ */
1154
+
1155
+ declare class AgentModule {
1156
+ private client;
1157
+ constructor(client: Reportify);
1158
+ /**
1159
+ * Create a new agent conversation
1160
+ *
1161
+ * @param agentId - Agent ID
1162
+ * @param title - Optional conversation title
1163
+ */
1164
+ createConversation(agentId: number, title?: string): Promise<AgentConversation>;
1165
+ /**
1166
+ * Chat with agent in a conversation
1167
+ *
1168
+ * @param conversationId - Conversation ID
1169
+ * @param message - User message
1170
+ * @param options - Chat options
1171
+ */
1172
+ chat(conversationId: number, message: string, options?: {
1173
+ documents?: DocumentInput[];
1174
+ stream?: boolean;
1175
+ }): Promise<unknown>;
1176
+ /**
1177
+ * Get conversation details
1178
+ *
1179
+ * @param conversationId - Conversation ID
1180
+ */
1181
+ getConversation(conversationId: number): Promise<AgentConversation>;
1182
+ /**
1183
+ * List messages in a conversation
1184
+ *
1185
+ * @param conversationId - Conversation ID
1186
+ * @param options - Query options
1187
+ */
1188
+ listMessages(conversationId: number, options?: {
1189
+ limit?: number;
1190
+ beforeMessageId?: number;
1191
+ }): Promise<{
1192
+ messages: AgentMessage[];
1193
+ }>;
1194
+ /**
1195
+ * Get assistant message events (streaming or non-streaming)
1196
+ *
1197
+ * @param conversationId - Conversation ID
1198
+ * @param assistantMessageId - Assistant message ID from chat response header
1199
+ * @param options - Query options
1200
+ */
1201
+ getAssistantMessageEvents(conversationId: number, assistantMessageId: string, options?: {
1202
+ stream?: boolean;
1203
+ timeout?: number;
1204
+ fromOffset?: number;
1205
+ }): Promise<unknown>;
1206
+ /**
1207
+ * Cancel agent execution
1208
+ *
1209
+ * @param conversationId - Conversation ID
1210
+ * @param assistantMessageId - Assistant message ID
1211
+ */
1212
+ cancelExecution(conversationId: number, assistantMessageId: string): Promise<{
1213
+ responseId: string;
1214
+ status: string;
1215
+ }>;
1216
+ /**
1217
+ * Get agent generated file
1218
+ *
1219
+ * @param fileId - Agent generated file ID
1220
+ * @returns File content as ArrayBuffer
1221
+ *
1222
+ * @example
1223
+ * ```typescript
1224
+ * const fileContent = await client.agent.getFile('file_abc123');
1225
+ * // Save to file in Node.js
1226
+ * fs.writeFileSync('output.xlsx', Buffer.from(fileContent));
1227
+ * ```
1228
+ */
1229
+ getFile(fileId: string): Promise<ArrayBuffer>;
1230
+ }
1231
+
1232
+ /**
1233
+ * Knowledge Base Module
1234
+ *
1235
+ * Provides access to user's personal knowledge base for searching
1236
+ * uploaded documents.
1237
+ *
1238
+ * NOTE: This module uses internal APIs that are not documented in the public OpenAPI spec.
1239
+ * These endpoints may change without notice. For production use, consider using
1240
+ * the documented docs.searchChunks() method instead.
1241
+ */
1242
+
1243
+ interface KBSearchOptions {
1244
+ folderIds?: string[];
1245
+ docIds?: string[];
1246
+ startDate?: string;
1247
+ endDate?: string;
1248
+ num?: number;
1249
+ }
1250
+ declare class KBModule {
1251
+ private client;
1252
+ constructor(client: Reportify);
1253
+ /**
1254
+ * Search user's knowledge base
1255
+ *
1256
+ * @deprecated This method uses an internal API not documented in the public OpenAPI spec.
1257
+ * Consider using client.docs.searchChunks() instead.
1258
+ *
1259
+ * Performs semantic search across documents the user has uploaded
1260
+ * to their personal knowledge base.
1261
+ *
1262
+ * @param query - Search query string
1263
+ * @param options - Search options
1264
+ *
1265
+ * @example
1266
+ * ```typescript
1267
+ * const results = await client.kb.search('quarterly revenue', { num: 5 });
1268
+ * results.forEach(chunk => console.log(chunk.content));
1269
+ * ```
1270
+ */
1271
+ search(query: string, options?: KBSearchOptions): Promise<Chunk[]>;
1272
+ }
1273
+
1274
+ /**
1275
+ * Timeline Module
1276
+ *
1277
+ * Provides access to timeline feeds based on user's followed entities.
1278
+ *
1279
+ * NOTE: This module uses internal APIs that are not documented in the public OpenAPI spec.
1280
+ * These endpoints may change without notice.
1281
+ */
1282
+
1283
+ interface TimelineOptions {
1284
+ num?: number;
1285
+ }
1286
+ declare class TimelineModule {
1287
+ private client;
1288
+ constructor(client: Reportify);
1289
+ /**
1290
+ * Get timeline for followed companies
1291
+ *
1292
+ * @deprecated This method uses an internal API not documented in the public OpenAPI spec.
1293
+ *
1294
+ * Returns recent content related to companies the user is following.
1295
+ *
1296
+ * @param options.num - Number of items to return (default: 10, max: 100)
1297
+ */
1298
+ companies(options?: TimelineOptions): Promise<Document[]>;
1299
+ /**
1300
+ * Get timeline for followed topics
1301
+ *
1302
+ * @deprecated This method uses an internal API not documented in the public OpenAPI spec.
1303
+ *
1304
+ * Returns recent content related to custom topics the user is following.
1305
+ *
1306
+ * @param options.num - Number of items to return
1307
+ */
1308
+ topics(options?: TimelineOptions): Promise<Document[]>;
1309
+ /**
1310
+ * Get timeline for followed professional institutes
1311
+ *
1312
+ * @deprecated This method uses an internal API not documented in the public OpenAPI spec.
1313
+ *
1314
+ * Returns recent content from research institutions, banks, etc.
1315
+ *
1316
+ * @param options.num - Number of items to return
1317
+ */
1318
+ institutes(options?: TimelineOptions): Promise<Document[]>;
1319
+ /**
1320
+ * Get timeline for followed public media
1321
+ *
1322
+ * @deprecated This method uses an internal API not documented in the public OpenAPI spec.
1323
+ *
1324
+ * Returns recent content from public media accounts.
1325
+ *
1326
+ * @param options.num - Number of items to return
1327
+ */
1328
+ publicMedia(options?: TimelineOptions): Promise<Document[]>;
1329
+ /**
1330
+ * Get timeline for followed social media
1331
+ *
1332
+ * @deprecated This method uses an internal API not documented in the public OpenAPI spec.
1333
+ *
1334
+ * Returns recent content from social media accounts.
1335
+ *
1336
+ * @param options.num - Number of items to return
1337
+ */
1338
+ socialMedia(options?: TimelineOptions): Promise<Document[]>;
1339
+ }
1340
+
1341
+ /**
1342
+ * User Module
1343
+ *
1344
+ * Provides access to user-related tools and data.
1345
+ */
1346
+
1347
+ declare class UserModule {
1348
+ private client;
1349
+ constructor(client: Reportify);
1350
+ /**
1351
+ * Get all companies followed by the user
1352
+ *
1353
+ * Returns a list of companies that the user is following,
1354
+ * including company details like symbol, name, logo, and follow timestamp.
1355
+ *
1356
+ * @example
1357
+ * ```typescript
1358
+ * const companies = await client.user.followedCompanies();
1359
+ * companies.forEach(company => {
1360
+ * console.log(`${company.symbol}: ${company.name}`);
1361
+ * });
1362
+ * ```
1363
+ */
1364
+ followedCompanies(): Promise<FollowedCompany[]>;
1365
+ }
1366
+
907
1367
  /**
908
1368
  * Reportify Client
909
1369
  *
@@ -929,11 +1389,15 @@ declare class Reportify {
929
1389
  private baseUrl;
930
1390
  private timeout;
931
1391
  readonly stock: StockModule;
932
- readonly timeline: TimelineModule;
933
- readonly kb: KBModule;
934
1392
  readonly docs: DocsModule;
935
1393
  readonly quant: QuantModule;
936
1394
  readonly concepts: ConceptsModule;
1395
+ readonly channels: ChannelsModule;
1396
+ readonly chat: ChatModule;
1397
+ readonly agent: AgentModule;
1398
+ readonly kb: KBModule;
1399
+ readonly timeline: TimelineModule;
1400
+ readonly user: UserModule;
937
1401
  constructor(config: ReportifyConfig);
938
1402
  /**
939
1403
  * Make an HTTP request to the API
@@ -950,6 +1414,14 @@ declare class Reportify {
950
1414
  * Make a POST request
951
1415
  */
952
1416
  post<T = unknown>(path: string, body?: Record<string, unknown>): Promise<T>;
1417
+ /**
1418
+ * Make a DELETE request
1419
+ */
1420
+ delete<T = unknown>(path: string, body?: Record<string, unknown>): Promise<T>;
1421
+ /**
1422
+ * Make a GET request and return raw bytes (for file downloads)
1423
+ */
1424
+ getBytes(path: string): Promise<ArrayBuffer>;
953
1425
  /**
954
1426
  * Search documents across all categories
955
1427
  *
@@ -974,12 +1446,44 @@ declare class Reportify {
974
1446
  searchReports(query: string, options?: SearchOptions): Promise<Document[]>;
975
1447
  /**
976
1448
  * Search company filings
1449
+ * @param query - Search query string
1450
+ * @param symbols - Required: Stock symbols to filter by
1451
+ * @param options - Search options
1452
+ */
1453
+ searchFilings(query: string, symbols: string[], options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
1454
+ /**
1455
+ * Search earnings pack documents (Financial reports, Earnings call transcripts, etc.)
1456
+ * @param query - Search query string
1457
+ * @param symbols - Required: Stock symbols to filter by
1458
+ * @param options - Search options
1459
+ */
1460
+ searchEarningsPack(query: string, symbols: string[], options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
1461
+ /**
1462
+ * Search conference call transcripts
1463
+ * @param query - Search query string
1464
+ * @param symbols - Required: Stock symbols to filter by
1465
+ * @param options - Search options
1466
+ */
1467
+ searchConferenceCalls(query: string, symbols: string[], options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
1468
+ /**
1469
+ * Search minutes transcripts (Conference calls, IR meetings)
1470
+ * @param query - Search query string
1471
+ * @param options - Search options
1472
+ */
1473
+ searchMinutes(query: string, options?: SearchOptions): Promise<Document[]>;
1474
+ /**
1475
+ * Search social media content
1476
+ */
1477
+ searchSocials(query: string, options?: SearchOptions): Promise<Document[]>;
1478
+ /**
1479
+ * Search webpage content
977
1480
  */
978
- searchFilings(query: string, options?: SearchOptions): Promise<Document[]>;
1481
+ searchWebpages(query: string, options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
979
1482
  /**
1483
+ * @deprecated Use searchConferenceCalls instead
980
1484
  * Search earnings call transcripts
981
1485
  */
982
- searchTranscripts(query: string, options?: SearchOptions): Promise<Document[]>;
1486
+ searchTranscripts(query: string, symbols: string[], options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
983
1487
  }
984
1488
 
985
- export { APIError, AuthenticationError, type BacktestParams, type BacktestResult, type BatchOHLCVParams, type Chunk, type CompanyInfo, type CompanyOverview, type Concept, type ConceptDoc, type ConceptEvent, type ConceptFeed, type ConceptStock, ConceptsModule, DocsModule, type Document, type EarningsEvent, type FactorComputeParams, type FactorMeta, type FinancialStatement, type IPOEvent, type IPOStatus, type IndexConstituent, type IndexFund, type IndicatorComputeParams, type IndicatorData, type IndicatorMeta, type IndustryConstituent, type Interval, KBModule, type KBSearchOptions, type Market, NotFoundError, type OHLCVData, type OHLCVParams, type PaginatedResponse, type Period, type PriceAdjust, type PriceData, QuantModule, type Quote, RateLimitError, Reportify, type ReportifyConfig, ReportifyError, type ScreenParams, type ScreenedStock, type SearchOptions, type Shareholder, type StockInfo, type StockMarket, StockModule, TimelineModule, type TimelineOptions };
1489
+ export { APIError, type AgentConversation, type AgentMessage, AgentModule, AuthenticationError, type BacktestParams, type BacktestResult, type BatchOHLCVParams, type Calendar, type Channel, ChannelsModule, type ChatCompletionOptions, type ChatCompletionResponse, type ChatMode, ChatModule, type Chunk, type ChunkSearchOptions, type CompanyInfo, type CompanyOverview, type Concept, type ConceptDoc, type ConceptEvent, type ConceptFeed, type ConceptStock, ConceptsModule, type DocsListOptions, DocsModule, type Document, type DocumentInput, type EarningsEvent, type FactorComputeParams, type FactorMeta, type FinancialStatement, type FollowedCompany, type IPOEvent, type IPOStatus, type IndexConstituent, type IndexFund, type IndicatorComputeParams, type IndicatorData, type IndicatorMeta, type IndustryConstituent, KBModule, type KBSearchOptions, type Market, NotFoundError, type OHLCVData, type OHLCVParams, type PaginatedResponse, type Period, type PriceData, QuantModule, type Quote, RateLimitError, Reportify, type ReportifyConfig, ReportifyError, type ScreenParams, type ScreenedStock, type SearchOptions, type Shareholder, type ShareholderType, type StockInfo, type StockMarket, StockModule, TimelineModule, type TimelineOptions, type UploadDocRequest, UserModule };