reportify-sdk 0.2.8 → 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;
@@ -204,49 +304,92 @@ declare class StockModule {
204
304
  * Get list of major shareholders
205
305
  *
206
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)
207
309
  */
208
- shareholders(symbol: string): Promise<Shareholder[]>;
310
+ shareholders(symbol: string, options?: {
311
+ type?: ShareholderType;
312
+ limit?: number;
313
+ }): Promise<Shareholder[]>;
209
314
  /**
210
315
  * Get income statement data
211
316
  *
212
317
  * @param symbol - Stock symbol
213
- * @param options.period - "annual" or "quarterly"
214
- * @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)
215
325
  */
216
326
  incomeStatement(symbol: string, options?: {
217
327
  period?: Period;
218
328
  limit?: number;
329
+ startDate?: string;
330
+ endDate?: string;
331
+ calendar?: Calendar;
332
+ fiscalYear?: string;
333
+ fiscalQuarter?: string;
219
334
  }): Promise<FinancialStatement[]>;
220
335
  /**
221
336
  * Get balance sheet data
222
337
  *
223
338
  * @param symbol - Stock symbol
224
339
  * @param options.period - "annual" or "quarterly"
225
- * @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)
226
346
  */
227
347
  balanceSheet(symbol: string, options?: {
228
- period?: Period;
348
+ period?: 'annual' | 'quarterly';
229
349
  limit?: number;
350
+ startDate?: string;
351
+ endDate?: string;
352
+ calendar?: Calendar;
353
+ fiscalYear?: string;
354
+ fiscalQuarter?: string;
230
355
  }): Promise<FinancialStatement[]>;
231
356
  /**
232
357
  * Get cash flow statement data
233
358
  *
234
359
  * @param symbol - Stock symbol
235
- * @param options.period - "annual" or "quarterly"
236
- * @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)
237
367
  */
238
368
  cashflowStatement(symbol: string, options?: {
239
369
  period?: Period;
240
370
  limit?: number;
371
+ startDate?: string;
372
+ endDate?: string;
373
+ calendar?: Calendar;
374
+ fiscalYear?: string;
375
+ fiscalQuarter?: string;
241
376
  }): Promise<FinancialStatement[]>;
242
377
  /**
243
- * Get revenue breakdown by segment, product, or region
378
+ * Get revenue breakdown
244
379
  *
245
380
  * @param symbol - Stock symbol
246
- * @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")
247
386
  */
248
387
  revenueBreakdown(symbol: string, options?: {
249
- breakdownType?: 'segment' | 'product' | 'region';
388
+ period?: string;
389
+ limit?: number;
390
+ startDate?: string;
391
+ endDate?: string;
392
+ fiscalYear?: string;
250
393
  }): Promise<FinancialStatement[]>;
251
394
  /**
252
395
  * Get historical stock prices
@@ -257,63 +400,61 @@ declare class StockModule {
257
400
  prices(symbol: string, options?: {
258
401
  startDate?: string;
259
402
  endDate?: string;
260
- limit?: number;
261
403
  }): Promise<PriceData[]>;
262
404
  /**
263
- * Get K-line (candlestick) data
405
+ * Get real-time stock quote
264
406
  *
265
407
  * @param symbol - Stock symbol
266
- * @param options - Query options
267
408
  */
268
- kline(symbol: string, options?: {
269
- interval?: Interval;
270
- adjust?: PriceAdjust;
271
- startDate?: string;
272
- endDate?: string;
273
- limit?: number;
274
- }): Promise<PriceData[]>;
275
- /**
276
- * Get real-time stock quotes
277
- *
278
- * @param symbols - Single symbol or array of symbols
279
- */
280
- quote(symbols: string | string[]): Promise<Quote[]>;
409
+ quote(symbol: string): Promise<Quote>;
281
410
  /**
282
411
  * Get stock index prices
283
412
  *
284
- * @param symbol - Index symbol
413
+ * @param symbol - Index symbol (e.g., HSI, SPX, DJI)
285
414
  * @param options - Query options
286
415
  */
287
416
  indexPrices(symbol: string, options?: {
288
417
  startDate?: string;
289
418
  endDate?: string;
290
- limit?: number;
291
419
  }): Promise<PriceData[]>;
292
420
  /**
293
421
  * Screen stocks based on various criteria
294
422
  */
295
423
  screener(options?: {
296
- market?: string;
297
- sector?: string;
298
- minMarketCap?: number;
299
- maxMarketCap?: number;
300
- minPe?: number;
301
- 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;
302
438
  limit?: number;
303
439
  }): Promise<CompanyOverview[]>;
304
440
  /**
305
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
306
447
  */
307
- earningsCalendar(options?: {
308
- market?: Market;
309
- startDate?: string;
310
- endDate?: string;
448
+ earningsCalendar(options: {
449
+ market: Market;
450
+ startDate: string;
451
+ endDate: string;
311
452
  symbol?: string;
312
453
  }): Promise<EarningsEvent[]>;
313
454
  /**
314
455
  * Get Hong Kong IPO calendar
315
456
  */
316
- ipoCalendarHK(status?: IPOStatus): Promise<IPOEvent[]>;
457
+ ipoCalendarHK(status: IPOStatus): Promise<IPOEvent[]>;
317
458
  /**
318
459
  * Get constituent stocks of an industry
319
460
  *
@@ -367,84 +508,6 @@ declare class StockModule {
367
508
  private normalizeArrayResponse;
368
509
  }
369
510
 
370
- /**
371
- * Timeline Module
372
- *
373
- * Provides access to timeline feeds based on user's followed entities.
374
- */
375
-
376
- declare class TimelineModule {
377
- private client;
378
- constructor(client: Reportify);
379
- /**
380
- * Get timeline for followed companies
381
- *
382
- * Returns recent content related to companies the user is following.
383
- *
384
- * @param options.num - Number of items to return (default: 10, max: 100)
385
- */
386
- companies(options?: TimelineOptions): Promise<Document[]>;
387
- /**
388
- * Get timeline for followed topics
389
- *
390
- * Returns recent content related to custom topics the user is following.
391
- *
392
- * @param options.num - Number of items to return
393
- */
394
- topics(options?: TimelineOptions): Promise<Document[]>;
395
- /**
396
- * Get timeline for followed professional institutes
397
- *
398
- * Returns recent content from research institutions, banks, etc.
399
- *
400
- * @param options.num - Number of items to return
401
- */
402
- institutes(options?: TimelineOptions): Promise<Document[]>;
403
- /**
404
- * Get timeline for followed public media
405
- *
406
- * Returns recent content from public media accounts.
407
- *
408
- * @param options.num - Number of items to return
409
- */
410
- publicMedia(options?: TimelineOptions): Promise<Document[]>;
411
- /**
412
- * Get timeline for followed social media
413
- *
414
- * Returns recent content from social media accounts.
415
- *
416
- * @param options.num - Number of items to return
417
- */
418
- socialMedia(options?: TimelineOptions): Promise<Document[]>;
419
- }
420
-
421
- /**
422
- * Knowledge Base Module
423
- *
424
- * Provides access to user's personal knowledge base for searching
425
- * uploaded documents.
426
- */
427
-
428
- declare class KBModule {
429
- private client;
430
- constructor(client: Reportify);
431
- /**
432
- * Search user's knowledge base
433
- *
434
- * Performs semantic search across documents the user has uploaded.
435
- *
436
- * @param query - Search query string
437
- * @param options - Search options
438
- *
439
- * @example
440
- * ```typescript
441
- * const results = await client.kb.search('quarterly revenue', { num: 5 });
442
- * results.forEach(chunk => console.log(chunk.content));
443
- * ```
444
- */
445
- search(query: string, options?: KBSearchOptions): Promise<Chunk[]>;
446
- }
447
-
448
511
  /**
449
512
  * Documents Module
450
513
  *
@@ -467,21 +530,6 @@ interface DocSummary {
467
530
  keyPoints?: string[];
468
531
  [key: string]: unknown;
469
532
  }
470
- interface DocsListOptions {
471
- symbols?: string[];
472
- categories?: string[];
473
- startDate?: string;
474
- endDate?: string;
475
- page?: number;
476
- pageSize?: number;
477
- }
478
- interface ChunkSearchOptions {
479
- symbols?: string[];
480
- categories?: string[];
481
- startDate?: string;
482
- endDate?: string;
483
- num?: number;
484
- }
485
533
  declare class DocsModule {
486
534
  private client;
487
535
  constructor(client: Reportify);
@@ -509,6 +557,34 @@ declare class DocsModule {
509
557
  * @param options - Filter options
510
558
  */
511
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>>;
512
588
  /**
513
589
  * Search document chunks semantically
514
590
  *
@@ -516,6 +592,78 @@ declare class DocsModule {
516
592
  * @param options - Search options
517
593
  */
518
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
+ }>;
519
667
  }
520
668
 
521
669
  /**
@@ -925,6 +1073,297 @@ declare class ConceptsModule {
925
1073
  today(): Promise<ConceptFeed[]>;
926
1074
  }
927
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
+
928
1367
  /**
929
1368
  * Reportify Client
930
1369
  *
@@ -950,11 +1389,15 @@ declare class Reportify {
950
1389
  private baseUrl;
951
1390
  private timeout;
952
1391
  readonly stock: StockModule;
953
- readonly timeline: TimelineModule;
954
- readonly kb: KBModule;
955
1392
  readonly docs: DocsModule;
956
1393
  readonly quant: QuantModule;
957
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;
958
1401
  constructor(config: ReportifyConfig);
959
1402
  /**
960
1403
  * Make an HTTP request to the API
@@ -971,6 +1414,14 @@ declare class Reportify {
971
1414
  * Make a POST request
972
1415
  */
973
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>;
974
1425
  /**
975
1426
  * Search documents across all categories
976
1427
  *
@@ -995,12 +1446,44 @@ declare class Reportify {
995
1446
  searchReports(query: string, options?: SearchOptions): Promise<Document[]>;
996
1447
  /**
997
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
998
1480
  */
999
- searchFilings(query: string, options?: SearchOptions): Promise<Document[]>;
1481
+ searchWebpages(query: string, options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
1000
1482
  /**
1483
+ * @deprecated Use searchConferenceCalls instead
1001
1484
  * Search earnings call transcripts
1002
1485
  */
1003
- searchTranscripts(query: string, options?: SearchOptions): Promise<Document[]>;
1486
+ searchTranscripts(query: string, symbols: string[], options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
1004
1487
  }
1005
1488
 
1006
- 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 };