reportify-sdk 0.3.8 → 0.3.10

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/README.md CHANGED
@@ -98,19 +98,19 @@ const result = await client.docs.uploadDocs([
98
98
 
99
99
  ```typescript
100
100
  // Compute technical indicators
101
- const rsi = await client.quant.computeIndicators({
101
+ const rsi = await client.quant.indicatorsCompute({
102
102
  symbols: ['000001'],
103
103
  formula: 'RSI(14)'
104
104
  });
105
105
 
106
- const macd = await client.quant.computeIndicators({
106
+ const macd = await client.quant.indicatorsCompute({
107
107
  symbols: ['000001'],
108
108
  formula: 'MACD()'
109
109
  });
110
110
 
111
111
  // Screen stocks by formula
112
- const oversold = await client.quant.screen({ formula: 'RSI(14) < 30' });
113
- const goldenCross = await client.quant.screen({ formula: 'CROSS(MA(CLOSE, 5), MA(CLOSE, 20))' });
112
+ const oversold = await client.quant.factorsScreen({ formula: 'RSI(14) < 30' });
113
+ const goldenCross = await client.quant.factorsScreen({ formula: 'CROSS(MA(CLOSE, 5), MA(CLOSE, 20))' });
114
114
 
115
115
  // Get OHLCV data
116
116
  const ohlcv = await client.quant.ohlcv({ symbol: '000001', startDate: '2024-01-01' });
package/dist/index.d.mts CHANGED
@@ -62,6 +62,8 @@ interface EarningsSearchOptions {
62
62
  endDatetime?: string;
63
63
  fiscalYear?: string;
64
64
  fiscalQuarter?: string;
65
+ /** Sort order: 'date_desc' (newest first, default when no query), 'relevance' (recommended when query is provided), 'date_asc' (oldest first) */
66
+ sortBy?: 'relevance' | 'date_desc' | 'date_asc';
65
67
  }
66
68
  interface CompanyOverview {
67
69
  symbol: string;
@@ -757,13 +759,13 @@ interface BacktestResult {
757
759
  * @example
758
760
  * ```typescript
759
761
  * // Compute RSI indicator
760
- * const data = await client.quant.computeIndicators({
762
+ * const data = await client.quant.indicatorsCompute({
761
763
  * symbols: ['000001'],
762
764
  * formula: 'RSI(14)'
763
765
  * });
764
766
  *
765
767
  * // Screen stocks by formula
766
- * const stocks = await client.quant.screen({
768
+ * const stocks = await client.quant.factorsScreen({
767
769
  * formula: 'RSI(14) < 30'
768
770
  * });
769
771
  * ```
@@ -780,14 +782,14 @@ declare class QuantModule {
780
782
  *
781
783
  * @example
782
784
  * ```typescript
783
- * const indicators = await client.quant.listIndicators();
785
+ * const indicators = await client.quant.indicators();
784
786
  * indicators.forEach(ind => {
785
787
  * console.log(`${ind.name}: ${ind.description}`);
786
788
  * console.log(` Fields: ${ind.fields.join(', ')}`);
787
789
  * });
788
790
  * ```
789
791
  */
790
- listIndicators(): Promise<IndicatorMeta[]>;
792
+ indicators(): Promise<IndicatorMeta[]>;
791
793
  /**
792
794
  * Compute indicator values for given symbols
793
795
  *
@@ -801,25 +803,25 @@ declare class QuantModule {
801
803
  * @example
802
804
  * ```typescript
803
805
  * // RSI indicator
804
- * const data = await client.quant.computeIndicators({
806
+ * const data = await client.quant.indicatorsCompute({
805
807
  * symbols: ['000001'],
806
808
  * formula: 'RSI(14)'
807
809
  * });
808
810
  *
809
811
  * // MACD indicator
810
- * const data = await client.quant.computeIndicators({
812
+ * const data = await client.quant.indicatorsCompute({
811
813
  * symbols: ['000001'],
812
814
  * formula: 'MACD()'
813
815
  * });
814
816
  *
815
817
  * // Standard deviation
816
- * const data = await client.quant.computeIndicators({
818
+ * const data = await client.quant.indicatorsCompute({
817
819
  * symbols: ['000001'],
818
820
  * formula: 'STD(CLOSE, 20)'
819
821
  * });
820
822
  * ```
821
823
  */
822
- computeIndicators(params: IndicatorComputeParams): Promise<IndicatorData[]>;
824
+ indicatorsCompute(params: IndicatorComputeParams): Promise<IndicatorData[]>;
823
825
  /**
824
826
  * Get list of available factors (variables and functions)
825
827
  *
@@ -829,7 +831,7 @@ declare class QuantModule {
829
831
  *
830
832
  * @returns Array of factor definitions organized by level
831
833
  */
832
- listFactors(): Promise<FactorMeta[]>;
834
+ factors(): Promise<FactorMeta[]>;
833
835
  /**
834
836
  * Compute factor values for given symbols
835
837
  *
@@ -845,31 +847,31 @@ declare class QuantModule {
845
847
  * @example
846
848
  * ```typescript
847
849
  * // Simple indicator
848
- * const data = await client.quant.computeFactors({
850
+ * const data = await client.quant.factorsCompute({
849
851
  * symbols: ['000001'],
850
852
  * formula: 'RSI(14)'
851
853
  * });
852
854
  *
853
855
  * // MACD DIF line
854
- * const data = await client.quant.computeFactors({
856
+ * const data = await client.quant.factorsCompute({
855
857
  * symbols: ['000001'],
856
858
  * formula: 'MACD().dif'
857
859
  * });
858
860
  *
859
861
  * // Close above 20-day MA
860
- * const data = await client.quant.computeFactors({
862
+ * const data = await client.quant.factorsCompute({
861
863
  * symbols: ['000001'],
862
864
  * formula: 'CLOSE > MA(CLOSE, 20)'
863
865
  * });
864
866
  *
865
867
  * // Fundamental factors (note: functions require parentheses)
866
- * const data = await client.quant.computeFactors({
868
+ * const data = await client.quant.factorsCompute({
867
869
  * symbols: ['000001'],
868
870
  * formula: 'PE()'
869
871
  * });
870
872
  * ```
871
873
  */
872
- computeFactors(params: FactorComputeParams): Promise<IndicatorData[]>;
874
+ factorsCompute(params: FactorComputeParams): Promise<IndicatorData[]>;
873
875
  /**
874
876
  * Screen stocks based on factor formula
875
877
  *
@@ -883,27 +885,27 @@ declare class QuantModule {
883
885
  * @example
884
886
  * ```typescript
885
887
  * // RSI oversold
886
- * const stocks = await client.quant.screen({
888
+ * const stocks = await client.quant.factorsScreen({
887
889
  * formula: 'RSI(14) < 30'
888
890
  * });
889
891
  *
890
892
  * // Golden cross
891
- * const stocks = await client.quant.screen({
893
+ * const stocks = await client.quant.factorsScreen({
892
894
  * formula: 'CROSS(MA(CLOSE, 5), MA(CLOSE, 10))'
893
895
  * });
894
896
  *
895
897
  * // Uptrend
896
- * const stocks = await client.quant.screen({
898
+ * const stocks = await client.quant.factorsScreen({
897
899
  * formula: '(CLOSE > MA(CLOSE, 20)) & (MA(CLOSE, 20) > MA(CLOSE, 60))'
898
900
  * });
899
901
  *
900
902
  * // Fundamental screening (note: functions require parentheses)
901
- * const stocks = await client.quant.screen({
903
+ * const stocks = await client.quant.factorsScreen({
902
904
  * formula: '(PE() < 20) & (ROE() > 0.15)'
903
905
  * });
904
906
  * ```
905
907
  */
906
- screen(params: ScreenParams): Promise<ScreenedStock[]>;
908
+ factorsScreen(params: ScreenParams): Promise<ScreenedStock[]>;
907
909
  /**
908
910
  * Get OHLCV daily data for a single symbol
909
911
  *
@@ -1435,21 +1437,27 @@ declare class SearchModule {
1435
1437
  */
1436
1438
  filings(query: string, symbols: string[], options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
1437
1439
  /**
1438
- * Search earnings call transcripts and slides
1440
+ * Search for earnings-related conference call transcripts and presentation slides.
1441
+ * Query is optional - if not provided, returns documents in reverse chronological order;
1442
+ * if provided, results are sorted by relevance by default.
1439
1443
  *
1440
- * @param query - Search query string
1441
1444
  * @param symbols - Stock symbols in market:ticker format (required, e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
1442
- * @param options - Search options including fiscal year/quarter filters
1445
+ * @param options - Search options including query, fiscal year/quarter filters, and sort order
1443
1446
  */
1444
- conferenceCalls(query: string, symbols: string[], options?: EarningsSearchOptions): Promise<Document[]>;
1447
+ conferenceCalls(symbols: string[], options?: EarningsSearchOptions & {
1448
+ query?: string;
1449
+ }): Promise<Document[]>;
1445
1450
  /**
1446
- * Search earnings financial reports
1451
+ * Search for earnings-related documents submitted to exchanges, including quarterly reports,
1452
+ * semi-annual reports, and annual reports. Query is optional - if not provided, returns
1453
+ * documents in reverse chronological order; if provided, results are sorted by relevance by default.
1447
1454
  *
1448
- * @param query - Search query string
1449
1455
  * @param symbols - Stock symbols in market:ticker format (required, e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
1450
- * @param options - Search options including fiscal year/quarter filters
1456
+ * @param options - Search options including query, fiscal year/quarter filters, and sort order
1451
1457
  */
1452
- earningsPack(query: string, symbols: string[], options?: EarningsSearchOptions): Promise<Document[]>;
1458
+ earningsPack(symbols: string[], options?: EarningsSearchOptions & {
1459
+ query?: string;
1460
+ }): Promise<Document[]>;
1453
1461
  /**
1454
1462
  * Search conference calls and IR (Investor Relations) meetings
1455
1463
  */
package/dist/index.d.ts CHANGED
@@ -62,6 +62,8 @@ interface EarningsSearchOptions {
62
62
  endDatetime?: string;
63
63
  fiscalYear?: string;
64
64
  fiscalQuarter?: string;
65
+ /** Sort order: 'date_desc' (newest first, default when no query), 'relevance' (recommended when query is provided), 'date_asc' (oldest first) */
66
+ sortBy?: 'relevance' | 'date_desc' | 'date_asc';
65
67
  }
66
68
  interface CompanyOverview {
67
69
  symbol: string;
@@ -757,13 +759,13 @@ interface BacktestResult {
757
759
  * @example
758
760
  * ```typescript
759
761
  * // Compute RSI indicator
760
- * const data = await client.quant.computeIndicators({
762
+ * const data = await client.quant.indicatorsCompute({
761
763
  * symbols: ['000001'],
762
764
  * formula: 'RSI(14)'
763
765
  * });
764
766
  *
765
767
  * // Screen stocks by formula
766
- * const stocks = await client.quant.screen({
768
+ * const stocks = await client.quant.factorsScreen({
767
769
  * formula: 'RSI(14) < 30'
768
770
  * });
769
771
  * ```
@@ -780,14 +782,14 @@ declare class QuantModule {
780
782
  *
781
783
  * @example
782
784
  * ```typescript
783
- * const indicators = await client.quant.listIndicators();
785
+ * const indicators = await client.quant.indicators();
784
786
  * indicators.forEach(ind => {
785
787
  * console.log(`${ind.name}: ${ind.description}`);
786
788
  * console.log(` Fields: ${ind.fields.join(', ')}`);
787
789
  * });
788
790
  * ```
789
791
  */
790
- listIndicators(): Promise<IndicatorMeta[]>;
792
+ indicators(): Promise<IndicatorMeta[]>;
791
793
  /**
792
794
  * Compute indicator values for given symbols
793
795
  *
@@ -801,25 +803,25 @@ declare class QuantModule {
801
803
  * @example
802
804
  * ```typescript
803
805
  * // RSI indicator
804
- * const data = await client.quant.computeIndicators({
806
+ * const data = await client.quant.indicatorsCompute({
805
807
  * symbols: ['000001'],
806
808
  * formula: 'RSI(14)'
807
809
  * });
808
810
  *
809
811
  * // MACD indicator
810
- * const data = await client.quant.computeIndicators({
812
+ * const data = await client.quant.indicatorsCompute({
811
813
  * symbols: ['000001'],
812
814
  * formula: 'MACD()'
813
815
  * });
814
816
  *
815
817
  * // Standard deviation
816
- * const data = await client.quant.computeIndicators({
818
+ * const data = await client.quant.indicatorsCompute({
817
819
  * symbols: ['000001'],
818
820
  * formula: 'STD(CLOSE, 20)'
819
821
  * });
820
822
  * ```
821
823
  */
822
- computeIndicators(params: IndicatorComputeParams): Promise<IndicatorData[]>;
824
+ indicatorsCompute(params: IndicatorComputeParams): Promise<IndicatorData[]>;
823
825
  /**
824
826
  * Get list of available factors (variables and functions)
825
827
  *
@@ -829,7 +831,7 @@ declare class QuantModule {
829
831
  *
830
832
  * @returns Array of factor definitions organized by level
831
833
  */
832
- listFactors(): Promise<FactorMeta[]>;
834
+ factors(): Promise<FactorMeta[]>;
833
835
  /**
834
836
  * Compute factor values for given symbols
835
837
  *
@@ -845,31 +847,31 @@ declare class QuantModule {
845
847
  * @example
846
848
  * ```typescript
847
849
  * // Simple indicator
848
- * const data = await client.quant.computeFactors({
850
+ * const data = await client.quant.factorsCompute({
849
851
  * symbols: ['000001'],
850
852
  * formula: 'RSI(14)'
851
853
  * });
852
854
  *
853
855
  * // MACD DIF line
854
- * const data = await client.quant.computeFactors({
856
+ * const data = await client.quant.factorsCompute({
855
857
  * symbols: ['000001'],
856
858
  * formula: 'MACD().dif'
857
859
  * });
858
860
  *
859
861
  * // Close above 20-day MA
860
- * const data = await client.quant.computeFactors({
862
+ * const data = await client.quant.factorsCompute({
861
863
  * symbols: ['000001'],
862
864
  * formula: 'CLOSE > MA(CLOSE, 20)'
863
865
  * });
864
866
  *
865
867
  * // Fundamental factors (note: functions require parentheses)
866
- * const data = await client.quant.computeFactors({
868
+ * const data = await client.quant.factorsCompute({
867
869
  * symbols: ['000001'],
868
870
  * formula: 'PE()'
869
871
  * });
870
872
  * ```
871
873
  */
872
- computeFactors(params: FactorComputeParams): Promise<IndicatorData[]>;
874
+ factorsCompute(params: FactorComputeParams): Promise<IndicatorData[]>;
873
875
  /**
874
876
  * Screen stocks based on factor formula
875
877
  *
@@ -883,27 +885,27 @@ declare class QuantModule {
883
885
  * @example
884
886
  * ```typescript
885
887
  * // RSI oversold
886
- * const stocks = await client.quant.screen({
888
+ * const stocks = await client.quant.factorsScreen({
887
889
  * formula: 'RSI(14) < 30'
888
890
  * });
889
891
  *
890
892
  * // Golden cross
891
- * const stocks = await client.quant.screen({
893
+ * const stocks = await client.quant.factorsScreen({
892
894
  * formula: 'CROSS(MA(CLOSE, 5), MA(CLOSE, 10))'
893
895
  * });
894
896
  *
895
897
  * // Uptrend
896
- * const stocks = await client.quant.screen({
898
+ * const stocks = await client.quant.factorsScreen({
897
899
  * formula: '(CLOSE > MA(CLOSE, 20)) & (MA(CLOSE, 20) > MA(CLOSE, 60))'
898
900
  * });
899
901
  *
900
902
  * // Fundamental screening (note: functions require parentheses)
901
- * const stocks = await client.quant.screen({
903
+ * const stocks = await client.quant.factorsScreen({
902
904
  * formula: '(PE() < 20) & (ROE() > 0.15)'
903
905
  * });
904
906
  * ```
905
907
  */
906
- screen(params: ScreenParams): Promise<ScreenedStock[]>;
908
+ factorsScreen(params: ScreenParams): Promise<ScreenedStock[]>;
907
909
  /**
908
910
  * Get OHLCV daily data for a single symbol
909
911
  *
@@ -1435,21 +1437,27 @@ declare class SearchModule {
1435
1437
  */
1436
1438
  filings(query: string, symbols: string[], options?: Omit<SearchOptions, 'symbols' | 'categories' | 'industries' | 'channelIds'>): Promise<Document[]>;
1437
1439
  /**
1438
- * Search earnings call transcripts and slides
1440
+ * Search for earnings-related conference call transcripts and presentation slides.
1441
+ * Query is optional - if not provided, returns documents in reverse chronological order;
1442
+ * if provided, results are sorted by relevance by default.
1439
1443
  *
1440
- * @param query - Search query string
1441
1444
  * @param symbols - Stock symbols in market:ticker format (required, e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
1442
- * @param options - Search options including fiscal year/quarter filters
1445
+ * @param options - Search options including query, fiscal year/quarter filters, and sort order
1443
1446
  */
1444
- conferenceCalls(query: string, symbols: string[], options?: EarningsSearchOptions): Promise<Document[]>;
1447
+ conferenceCalls(symbols: string[], options?: EarningsSearchOptions & {
1448
+ query?: string;
1449
+ }): Promise<Document[]>;
1445
1450
  /**
1446
- * Search earnings financial reports
1451
+ * Search for earnings-related documents submitted to exchanges, including quarterly reports,
1452
+ * semi-annual reports, and annual reports. Query is optional - if not provided, returns
1453
+ * documents in reverse chronological order; if provided, results are sorted by relevance by default.
1447
1454
  *
1448
- * @param query - Search query string
1449
1455
  * @param symbols - Stock symbols in market:ticker format (required, e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
1450
- * @param options - Search options including fiscal year/quarter filters
1456
+ * @param options - Search options including query, fiscal year/quarter filters, and sort order
1451
1457
  */
1452
- earningsPack(query: string, symbols: string[], options?: EarningsSearchOptions): Promise<Document[]>;
1458
+ earningsPack(symbols: string[], options?: EarningsSearchOptions & {
1459
+ query?: string;
1460
+ }): Promise<Document[]>;
1453
1461
  /**
1454
1462
  * Search conference calls and IR (Investor Relations) meetings
1455
1463
  */
package/dist/index.js CHANGED
@@ -628,14 +628,14 @@ var QuantModule = class {
628
628
  *
629
629
  * @example
630
630
  * ```typescript
631
- * const indicators = await client.quant.listIndicators();
631
+ * const indicators = await client.quant.indicators();
632
632
  * indicators.forEach(ind => {
633
633
  * console.log(`${ind.name}: ${ind.description}`);
634
634
  * console.log(` Fields: ${ind.fields.join(', ')}`);
635
635
  * });
636
636
  * ```
637
637
  */
638
- async listIndicators() {
638
+ async indicators() {
639
639
  return this.client.get("/v1/quant/indicators");
640
640
  }
641
641
  /**
@@ -651,25 +651,25 @@ var QuantModule = class {
651
651
  * @example
652
652
  * ```typescript
653
653
  * // RSI indicator
654
- * const data = await client.quant.computeIndicators({
654
+ * const data = await client.quant.indicatorsCompute({
655
655
  * symbols: ['000001'],
656
656
  * formula: 'RSI(14)'
657
657
  * });
658
658
  *
659
659
  * // MACD indicator
660
- * const data = await client.quant.computeIndicators({
660
+ * const data = await client.quant.indicatorsCompute({
661
661
  * symbols: ['000001'],
662
662
  * formula: 'MACD()'
663
663
  * });
664
664
  *
665
665
  * // Standard deviation
666
- * const data = await client.quant.computeIndicators({
666
+ * const data = await client.quant.indicatorsCompute({
667
667
  * symbols: ['000001'],
668
668
  * formula: 'STD(CLOSE, 20)'
669
669
  * });
670
670
  * ```
671
671
  */
672
- async computeIndicators(params) {
672
+ async indicatorsCompute(params) {
673
673
  const response = await this.client.post("/v1/quant/indicators/compute", {
674
674
  symbols: params.symbols,
675
675
  formula: params.formula,
@@ -691,7 +691,7 @@ var QuantModule = class {
691
691
  *
692
692
  * @returns Array of factor definitions organized by level
693
693
  */
694
- async listFactors() {
694
+ async factors() {
695
695
  return this.client.get("/v1/quant/factors");
696
696
  }
697
697
  /**
@@ -709,31 +709,31 @@ var QuantModule = class {
709
709
  * @example
710
710
  * ```typescript
711
711
  * // Simple indicator
712
- * const data = await client.quant.computeFactors({
712
+ * const data = await client.quant.factorsCompute({
713
713
  * symbols: ['000001'],
714
714
  * formula: 'RSI(14)'
715
715
  * });
716
716
  *
717
717
  * // MACD DIF line
718
- * const data = await client.quant.computeFactors({
718
+ * const data = await client.quant.factorsCompute({
719
719
  * symbols: ['000001'],
720
720
  * formula: 'MACD().dif'
721
721
  * });
722
722
  *
723
723
  * // Close above 20-day MA
724
- * const data = await client.quant.computeFactors({
724
+ * const data = await client.quant.factorsCompute({
725
725
  * symbols: ['000001'],
726
726
  * formula: 'CLOSE > MA(CLOSE, 20)'
727
727
  * });
728
728
  *
729
729
  * // Fundamental factors (note: functions require parentheses)
730
- * const data = await client.quant.computeFactors({
730
+ * const data = await client.quant.factorsCompute({
731
731
  * symbols: ['000001'],
732
732
  * formula: 'PE()'
733
733
  * });
734
734
  * ```
735
735
  */
736
- async computeFactors(params) {
736
+ async factorsCompute(params) {
737
737
  const response = await this.client.post("/v1/quant/factors/compute", {
738
738
  symbols: params.symbols,
739
739
  formula: params.formula,
@@ -756,27 +756,27 @@ var QuantModule = class {
756
756
  * @example
757
757
  * ```typescript
758
758
  * // RSI oversold
759
- * const stocks = await client.quant.screen({
759
+ * const stocks = await client.quant.factorsScreen({
760
760
  * formula: 'RSI(14) < 30'
761
761
  * });
762
762
  *
763
763
  * // Golden cross
764
- * const stocks = await client.quant.screen({
764
+ * const stocks = await client.quant.factorsScreen({
765
765
  * formula: 'CROSS(MA(CLOSE, 5), MA(CLOSE, 10))'
766
766
  * });
767
767
  *
768
768
  * // Uptrend
769
- * const stocks = await client.quant.screen({
769
+ * const stocks = await client.quant.factorsScreen({
770
770
  * formula: '(CLOSE > MA(CLOSE, 20)) & (MA(CLOSE, 20) > MA(CLOSE, 60))'
771
771
  * });
772
772
  *
773
773
  * // Fundamental screening (note: functions require parentheses)
774
- * const stocks = await client.quant.screen({
774
+ * const stocks = await client.quant.factorsScreen({
775
775
  * formula: '(PE() < 20) & (ROE() > 0.15)'
776
776
  * });
777
777
  * ```
778
778
  */
779
- async screen(params) {
779
+ async factorsScreen(params) {
780
780
  const response = await this.client.post("/v1/quant/factors/screen", {
781
781
  formula: params.formula,
782
782
  market: params.market || "cn",
@@ -1495,18 +1495,20 @@ var SearchModule = class {
1495
1495
  return response.docs || [];
1496
1496
  }
1497
1497
  /**
1498
- * Search earnings call transcripts and slides
1498
+ * Search for earnings-related conference call transcripts and presentation slides.
1499
+ * Query is optional - if not provided, returns documents in reverse chronological order;
1500
+ * if provided, results are sorted by relevance by default.
1499
1501
  *
1500
- * @param query - Search query string
1501
1502
  * @param symbols - Stock symbols in market:ticker format (required, e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
1502
- * @param options - Search options including fiscal year/quarter filters
1503
+ * @param options - Search options including query, fiscal year/quarter filters, and sort order
1503
1504
  */
1504
- async conferenceCalls(query, symbols, options = {}) {
1505
+ async conferenceCalls(symbols, options = {}) {
1505
1506
  const body = {
1506
- query,
1507
1507
  symbols,
1508
- num: options.num || 10
1508
+ num: options.num || 10,
1509
+ sort_by: options.sortBy || "date_desc"
1509
1510
  };
1511
+ if (options.query) body.query = options.query;
1510
1512
  if (options.startDatetime) body.start_datetime = options.startDatetime;
1511
1513
  if (options.endDatetime) body.end_datetime = options.endDatetime;
1512
1514
  if (options.fiscalYear) body.fiscal_year = options.fiscalYear;
@@ -1515,18 +1517,20 @@ var SearchModule = class {
1515
1517
  return response.docs || [];
1516
1518
  }
1517
1519
  /**
1518
- * Search earnings financial reports
1520
+ * Search for earnings-related documents submitted to exchanges, including quarterly reports,
1521
+ * semi-annual reports, and annual reports. Query is optional - if not provided, returns
1522
+ * documents in reverse chronological order; if provided, results are sorted by relevance by default.
1519
1523
  *
1520
- * @param query - Search query string
1521
1524
  * @param symbols - Stock symbols in market:ticker format (required, e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
1522
- * @param options - Search options including fiscal year/quarter filters
1525
+ * @param options - Search options including query, fiscal year/quarter filters, and sort order
1523
1526
  */
1524
- async earningsPack(query, symbols, options = {}) {
1527
+ async earningsPack(symbols, options = {}) {
1525
1528
  const body = {
1526
- query,
1527
1529
  symbols,
1528
- num: options.num || 10
1530
+ num: options.num || 10,
1531
+ sort_by: options.sortBy || "date_desc"
1529
1532
  };
1533
+ if (options.query) body.query = options.query;
1530
1534
  if (options.startDatetime) body.start_datetime = options.startDatetime;
1531
1535
  if (options.endDatetime) body.end_datetime = options.endDatetime;
1532
1536
  if (options.fiscalYear) body.fiscal_year = options.fiscalYear;
@@ -1670,7 +1674,7 @@ var Reportify = class {
1670
1674
  headers: {
1671
1675
  Authorization: `Bearer ${this.apiKey}`,
1672
1676
  "Content-Type": "application/json",
1673
- "User-Agent": "reportify-sdk-js/0.3.8"
1677
+ "User-Agent": "reportify-sdk-js/0.3.10"
1674
1678
  },
1675
1679
  body: options.body ? JSON.stringify(options.body) : void 0,
1676
1680
  signal: controller.signal
@@ -1731,7 +1735,7 @@ var Reportify = class {
1731
1735
  headers: {
1732
1736
  Authorization: `Bearer ${this.apiKey}`,
1733
1737
  "Content-Type": "application/json",
1734
- "User-Agent": "reportify-sdk-typescript/0.3.8"
1738
+ "User-Agent": "reportify-sdk-typescript/0.3.10"
1735
1739
  }
1736
1740
  });
1737
1741
  if (!response.ok) {
package/dist/index.mjs CHANGED
@@ -586,14 +586,14 @@ var QuantModule = class {
586
586
  *
587
587
  * @example
588
588
  * ```typescript
589
- * const indicators = await client.quant.listIndicators();
589
+ * const indicators = await client.quant.indicators();
590
590
  * indicators.forEach(ind => {
591
591
  * console.log(`${ind.name}: ${ind.description}`);
592
592
  * console.log(` Fields: ${ind.fields.join(', ')}`);
593
593
  * });
594
594
  * ```
595
595
  */
596
- async listIndicators() {
596
+ async indicators() {
597
597
  return this.client.get("/v1/quant/indicators");
598
598
  }
599
599
  /**
@@ -609,25 +609,25 @@ var QuantModule = class {
609
609
  * @example
610
610
  * ```typescript
611
611
  * // RSI indicator
612
- * const data = await client.quant.computeIndicators({
612
+ * const data = await client.quant.indicatorsCompute({
613
613
  * symbols: ['000001'],
614
614
  * formula: 'RSI(14)'
615
615
  * });
616
616
  *
617
617
  * // MACD indicator
618
- * const data = await client.quant.computeIndicators({
618
+ * const data = await client.quant.indicatorsCompute({
619
619
  * symbols: ['000001'],
620
620
  * formula: 'MACD()'
621
621
  * });
622
622
  *
623
623
  * // Standard deviation
624
- * const data = await client.quant.computeIndicators({
624
+ * const data = await client.quant.indicatorsCompute({
625
625
  * symbols: ['000001'],
626
626
  * formula: 'STD(CLOSE, 20)'
627
627
  * });
628
628
  * ```
629
629
  */
630
- async computeIndicators(params) {
630
+ async indicatorsCompute(params) {
631
631
  const response = await this.client.post("/v1/quant/indicators/compute", {
632
632
  symbols: params.symbols,
633
633
  formula: params.formula,
@@ -649,7 +649,7 @@ var QuantModule = class {
649
649
  *
650
650
  * @returns Array of factor definitions organized by level
651
651
  */
652
- async listFactors() {
652
+ async factors() {
653
653
  return this.client.get("/v1/quant/factors");
654
654
  }
655
655
  /**
@@ -667,31 +667,31 @@ var QuantModule = class {
667
667
  * @example
668
668
  * ```typescript
669
669
  * // Simple indicator
670
- * const data = await client.quant.computeFactors({
670
+ * const data = await client.quant.factorsCompute({
671
671
  * symbols: ['000001'],
672
672
  * formula: 'RSI(14)'
673
673
  * });
674
674
  *
675
675
  * // MACD DIF line
676
- * const data = await client.quant.computeFactors({
676
+ * const data = await client.quant.factorsCompute({
677
677
  * symbols: ['000001'],
678
678
  * formula: 'MACD().dif'
679
679
  * });
680
680
  *
681
681
  * // Close above 20-day MA
682
- * const data = await client.quant.computeFactors({
682
+ * const data = await client.quant.factorsCompute({
683
683
  * symbols: ['000001'],
684
684
  * formula: 'CLOSE > MA(CLOSE, 20)'
685
685
  * });
686
686
  *
687
687
  * // Fundamental factors (note: functions require parentheses)
688
- * const data = await client.quant.computeFactors({
688
+ * const data = await client.quant.factorsCompute({
689
689
  * symbols: ['000001'],
690
690
  * formula: 'PE()'
691
691
  * });
692
692
  * ```
693
693
  */
694
- async computeFactors(params) {
694
+ async factorsCompute(params) {
695
695
  const response = await this.client.post("/v1/quant/factors/compute", {
696
696
  symbols: params.symbols,
697
697
  formula: params.formula,
@@ -714,27 +714,27 @@ var QuantModule = class {
714
714
  * @example
715
715
  * ```typescript
716
716
  * // RSI oversold
717
- * const stocks = await client.quant.screen({
717
+ * const stocks = await client.quant.factorsScreen({
718
718
  * formula: 'RSI(14) < 30'
719
719
  * });
720
720
  *
721
721
  * // Golden cross
722
- * const stocks = await client.quant.screen({
722
+ * const stocks = await client.quant.factorsScreen({
723
723
  * formula: 'CROSS(MA(CLOSE, 5), MA(CLOSE, 10))'
724
724
  * });
725
725
  *
726
726
  * // Uptrend
727
- * const stocks = await client.quant.screen({
727
+ * const stocks = await client.quant.factorsScreen({
728
728
  * formula: '(CLOSE > MA(CLOSE, 20)) & (MA(CLOSE, 20) > MA(CLOSE, 60))'
729
729
  * });
730
730
  *
731
731
  * // Fundamental screening (note: functions require parentheses)
732
- * const stocks = await client.quant.screen({
732
+ * const stocks = await client.quant.factorsScreen({
733
733
  * formula: '(PE() < 20) & (ROE() > 0.15)'
734
734
  * });
735
735
  * ```
736
736
  */
737
- async screen(params) {
737
+ async factorsScreen(params) {
738
738
  const response = await this.client.post("/v1/quant/factors/screen", {
739
739
  formula: params.formula,
740
740
  market: params.market || "cn",
@@ -1453,18 +1453,20 @@ var SearchModule = class {
1453
1453
  return response.docs || [];
1454
1454
  }
1455
1455
  /**
1456
- * Search earnings call transcripts and slides
1456
+ * Search for earnings-related conference call transcripts and presentation slides.
1457
+ * Query is optional - if not provided, returns documents in reverse chronological order;
1458
+ * if provided, results are sorted by relevance by default.
1457
1459
  *
1458
- * @param query - Search query string
1459
1460
  * @param symbols - Stock symbols in market:ticker format (required, e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
1460
- * @param options - Search options including fiscal year/quarter filters
1461
+ * @param options - Search options including query, fiscal year/quarter filters, and sort order
1461
1462
  */
1462
- async conferenceCalls(query, symbols, options = {}) {
1463
+ async conferenceCalls(symbols, options = {}) {
1463
1464
  const body = {
1464
- query,
1465
1465
  symbols,
1466
- num: options.num || 10
1466
+ num: options.num || 10,
1467
+ sort_by: options.sortBy || "date_desc"
1467
1468
  };
1469
+ if (options.query) body.query = options.query;
1468
1470
  if (options.startDatetime) body.start_datetime = options.startDatetime;
1469
1471
  if (options.endDatetime) body.end_datetime = options.endDatetime;
1470
1472
  if (options.fiscalYear) body.fiscal_year = options.fiscalYear;
@@ -1473,18 +1475,20 @@ var SearchModule = class {
1473
1475
  return response.docs || [];
1474
1476
  }
1475
1477
  /**
1476
- * Search earnings financial reports
1478
+ * Search for earnings-related documents submitted to exchanges, including quarterly reports,
1479
+ * semi-annual reports, and annual reports. Query is optional - if not provided, returns
1480
+ * documents in reverse chronological order; if provided, results are sorted by relevance by default.
1477
1481
  *
1478
- * @param query - Search query string
1479
1482
  * @param symbols - Stock symbols in market:ticker format (required, e.g., US:AAPL, HK:00700, SH:600519, SZ:000001)
1480
- * @param options - Search options including fiscal year/quarter filters
1483
+ * @param options - Search options including query, fiscal year/quarter filters, and sort order
1481
1484
  */
1482
- async earningsPack(query, symbols, options = {}) {
1485
+ async earningsPack(symbols, options = {}) {
1483
1486
  const body = {
1484
- query,
1485
1487
  symbols,
1486
- num: options.num || 10
1488
+ num: options.num || 10,
1489
+ sort_by: options.sortBy || "date_desc"
1487
1490
  };
1491
+ if (options.query) body.query = options.query;
1488
1492
  if (options.startDatetime) body.start_datetime = options.startDatetime;
1489
1493
  if (options.endDatetime) body.end_datetime = options.endDatetime;
1490
1494
  if (options.fiscalYear) body.fiscal_year = options.fiscalYear;
@@ -1628,7 +1632,7 @@ var Reportify = class {
1628
1632
  headers: {
1629
1633
  Authorization: `Bearer ${this.apiKey}`,
1630
1634
  "Content-Type": "application/json",
1631
- "User-Agent": "reportify-sdk-js/0.3.8"
1635
+ "User-Agent": "reportify-sdk-js/0.3.10"
1632
1636
  },
1633
1637
  body: options.body ? JSON.stringify(options.body) : void 0,
1634
1638
  signal: controller.signal
@@ -1689,7 +1693,7 @@ var Reportify = class {
1689
1693
  headers: {
1690
1694
  Authorization: `Bearer ${this.apiKey}`,
1691
1695
  "Content-Type": "application/json",
1692
- "User-Agent": "reportify-sdk-typescript/0.3.8"
1696
+ "User-Agent": "reportify-sdk-typescript/0.3.10"
1693
1697
  }
1694
1698
  });
1695
1699
  if (!response.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reportify-sdk",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "description": "TypeScript SDK for Reportify API - Financial data and document search",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",