@dracoonghost/trndup-sdk 1.3.26 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1754,6 +1754,172 @@ declare namespace Activity {
1754
1754
  limit?: number;
1755
1755
  }
1756
1756
  }
1757
+ declare namespace Trends {
1758
+ /** Trend categories */
1759
+ type Category = 'SPORTS' | 'NEWS' | 'TECH' | 'ENTERTAINMENT' | 'GAMING' | 'LIFESTYLE' | 'FINANCE' | 'EDUCATION' | 'OTHER';
1760
+ /** How fast the trend is growing */
1761
+ type Velocity = 'SLOW' | 'MEDIUM' | 'FAST' | 'VIRAL';
1762
+ /** Predicted viral potential */
1763
+ type ViralPrediction = 'LOW' | 'MEDIUM' | 'HIGH_VIRAL';
1764
+ /** Current trend status */
1765
+ type Status = 'NEW' | 'TRENDING' | 'PEAKING' | 'COOLING';
1766
+ /** Content idea difficulty level */
1767
+ type Difficulty = 'EASY' | 'MEDIUM' | 'HARD';
1768
+ /**
1769
+ * Content idea for a trend
1770
+ */
1771
+ interface ContentIdea {
1772
+ /** How hard it is to create */
1773
+ difficulty: Difficulty;
1774
+ /** Idea title */
1775
+ title: string;
1776
+ /** Detailed description */
1777
+ description: string;
1778
+ }
1779
+ /**
1780
+ * Example content from other creators
1781
+ */
1782
+ interface TopExample {
1783
+ /** Link to the video */
1784
+ videoUrl: string;
1785
+ /** Creator's name */
1786
+ creatorName?: string;
1787
+ /** View count display (e.g., "1.2M views") */
1788
+ views?: string;
1789
+ /** Thumbnail image URL */
1790
+ thumbnail?: string;
1791
+ }
1792
+ /**
1793
+ * Trend list item (compact)
1794
+ */
1795
+ interface TrendListItem {
1796
+ /** Unique trend ID */
1797
+ id: string;
1798
+ /** Trend topic title */
1799
+ topic: string;
1800
+ /** Brief summary */
1801
+ summary: string;
1802
+ /** Content category */
1803
+ category: Category;
1804
+ /** Growth velocity */
1805
+ velocity: Velocity;
1806
+ /** Viral potential prediction */
1807
+ viralPrediction: ViralPrediction;
1808
+ /** Relevance score (0-100) */
1809
+ relevanceScore: number;
1810
+ /** Current status */
1811
+ status: Status;
1812
+ /** Growth label (e.g., "🔥 Viral") */
1813
+ growthLabel: string;
1814
+ /** Peak timing hint (e.g., "🎯 Peak NOW") */
1815
+ peakWindow: string | null;
1816
+ /** Relevant platforms */
1817
+ platforms: string[];
1818
+ /** Related hashtags */
1819
+ hashtags: string[];
1820
+ /** When first detected */
1821
+ firstSeen: string;
1822
+ /** Number of content ideas */
1823
+ contentIdeasCount: number;
1824
+ }
1825
+ /**
1826
+ * Full trend details
1827
+ */
1828
+ interface TrendDetail {
1829
+ /** Unique trend ID */
1830
+ id: string;
1831
+ /** Trend topic title */
1832
+ topic: string;
1833
+ /** Detailed summary */
1834
+ summary: string;
1835
+ /** Content category */
1836
+ category: Category;
1837
+ /** Growth velocity */
1838
+ velocity: Velocity;
1839
+ /** Viral potential prediction */
1840
+ viralPrediction: ViralPrediction;
1841
+ /** Relevance score (0-100) */
1842
+ relevanceScore: number;
1843
+ /** Number of times spotted */
1844
+ sightingCount: number;
1845
+ /** Peak strength (1-5) */
1846
+ peakStrength: number;
1847
+ /** Current status */
1848
+ status: Status;
1849
+ /** Growth label */
1850
+ growthLabel: string;
1851
+ /** Peak timing hint */
1852
+ peakWindow: string | null;
1853
+ /** When first detected */
1854
+ firstSeen: string;
1855
+ /** Last activity timestamp */
1856
+ lastActivity: string;
1857
+ /** Relevant platforms */
1858
+ platforms: string[];
1859
+ /** Related hashtags */
1860
+ hashtags: string[];
1861
+ /** Target creator types */
1862
+ targetCreators: string[];
1863
+ /** Content ideas */
1864
+ contentIdeas: ContentIdea[];
1865
+ /** Example content */
1866
+ topExamples: TopExample[];
1867
+ /** Recommended video duration */
1868
+ recommendedDuration: string | null;
1869
+ /** Last updated */
1870
+ updatedAt: string;
1871
+ }
1872
+ /**
1873
+ * Response for list trends endpoint
1874
+ */
1875
+ interface ListResponse {
1876
+ trends: TrendListItem[];
1877
+ total: number;
1878
+ limit: number;
1879
+ offset: number;
1880
+ }
1881
+ /**
1882
+ * Category with trend count
1883
+ */
1884
+ interface CategoryCount {
1885
+ category: string;
1886
+ count: number;
1887
+ }
1888
+ /**
1889
+ * Platform with trend count
1890
+ */
1891
+ interface PlatformCount {
1892
+ platform: string;
1893
+ count: number;
1894
+ }
1895
+ /**
1896
+ * Sync status info
1897
+ */
1898
+ interface SyncStatus {
1899
+ lastSyncedAt: string | null;
1900
+ lastSyncStatus: 'SUCCESS' | 'FAILED' | null;
1901
+ trendsProcessed: number;
1902
+ trendsDeleted: number;
1903
+ totalTrends: number;
1904
+ }
1905
+ /**
1906
+ * Parameters for listing trends
1907
+ */
1908
+ interface ListParams {
1909
+ /** Filter by category */
1910
+ category?: Category;
1911
+ /** Filter by velocity */
1912
+ velocity?: Velocity;
1913
+ /** Filter by status */
1914
+ status?: Status;
1915
+ /** Filter by platform */
1916
+ platform?: string;
1917
+ /** Max results (default: 20, max: 100) */
1918
+ limit?: number;
1919
+ /** Pagination offset */
1920
+ offset?: number;
1921
+ }
1922
+ }
1757
1923
 
1758
1924
  /**
1759
1925
  * TrndUp SDK - Base Client
@@ -2587,6 +2753,114 @@ declare class ActivityModule {
2587
2753
  getLatest(jobType: Activity.JobType): Promise<Activity.LogEntry | null>;
2588
2754
  }
2589
2755
 
2756
+ /**
2757
+ * Trends Module
2758
+ *
2759
+ * Methods for fetching trending content ideas from TrendPulse.
2760
+ */
2761
+
2762
+ declare class TrendsModule {
2763
+ private client;
2764
+ constructor(client: TrndUpClient);
2765
+ /**
2766
+ * List trending topics with optional filters
2767
+ *
2768
+ * @param params - Filter and pagination options
2769
+ * @returns Paginated list of trends sorted by relevance
2770
+ *
2771
+ * @example
2772
+ * ```typescript
2773
+ * // Get top trends
2774
+ * const trends = await sdk.trends.list();
2775
+ *
2776
+ * // Filter by category
2777
+ * const sportsTrends = await sdk.trends.list({ category: 'SPORTS' });
2778
+ *
2779
+ * // Filter by velocity
2780
+ * const viralTrends = await sdk.trends.list({ velocity: 'VIRAL' });
2781
+ *
2782
+ * // Paginate
2783
+ * const page2 = await sdk.trends.list({ limit: 20, offset: 20 });
2784
+ * ```
2785
+ */
2786
+ list(params?: Trends.ListParams): Promise<Trends.ListResponse>;
2787
+ /**
2788
+ * Get full details of a specific trend
2789
+ *
2790
+ * @param trendId - The unique trend ID
2791
+ * @returns Full trend details including content ideas and examples
2792
+ *
2793
+ * @example
2794
+ * ```typescript
2795
+ * const trend = await sdk.trends.getById('trend_123');
2796
+ * console.log(trend.contentIdeas);
2797
+ * console.log(trend.topExamples);
2798
+ * ```
2799
+ */
2800
+ getById(trendId: string): Promise<Trends.TrendDetail>;
2801
+ /**
2802
+ * Get all categories with trend counts
2803
+ *
2804
+ * @returns List of categories and their trend counts
2805
+ *
2806
+ * @example
2807
+ * ```typescript
2808
+ * const categories = await sdk.trends.getCategories();
2809
+ * // [{ category: 'SPORTS', count: 15 }, { category: 'TECH', count: 12 }, ...]
2810
+ * ```
2811
+ */
2812
+ getCategories(): Promise<Trends.CategoryCount[]>;
2813
+ /**
2814
+ * Get all platforms with trend counts
2815
+ *
2816
+ * @returns List of platforms and their trend counts
2817
+ *
2818
+ * @example
2819
+ * ```typescript
2820
+ * const platforms = await sdk.trends.getPlatforms();
2821
+ * // [{ platform: 'YouTube', count: 25 }, { platform: 'Instagram', count: 18 }, ...]
2822
+ * ```
2823
+ */
2824
+ getPlatforms(): Promise<Trends.PlatformCount[]>;
2825
+ /**
2826
+ * Get sync status information
2827
+ *
2828
+ * @returns Current sync status and statistics
2829
+ *
2830
+ * @example
2831
+ * ```typescript
2832
+ * const status = await sdk.trends.getSyncStatus();
2833
+ * console.log(status.lastSyncedAt);
2834
+ * console.log(status.totalTrends);
2835
+ * ```
2836
+ */
2837
+ getSyncStatus(): Promise<Trends.SyncStatus>;
2838
+ /**
2839
+ * Get viral trends (velocity = VIRAL)
2840
+ * Convenience method for filtering viral trends
2841
+ *
2842
+ * @param limit - Max results (default: 10)
2843
+ * @returns List of viral trends
2844
+ */
2845
+ getViral(limit?: number): Promise<Trends.ListResponse>;
2846
+ /**
2847
+ * Get peaking trends (status = PEAKING)
2848
+ * Convenience method for filtering trends at peak
2849
+ *
2850
+ * @param limit - Max results (default: 10)
2851
+ * @returns List of peaking trends
2852
+ */
2853
+ getPeaking(limit?: number): Promise<Trends.ListResponse>;
2854
+ /**
2855
+ * Get trends for a specific platform
2856
+ *
2857
+ * @param platform - Platform name (e.g., 'YouTube', 'Instagram')
2858
+ * @param limit - Max results (default: 20)
2859
+ * @returns List of trends for the platform
2860
+ */
2861
+ getByPlatform(platform: string, limit?: number): Promise<Trends.ListResponse>;
2862
+ }
2863
+
2590
2864
  /**
2591
2865
  * TrndUp API SDK
2592
2866
  *
@@ -2632,9 +2906,10 @@ declare class TrndUpSDK extends TrndUpClient {
2632
2906
  social: SocialModule;
2633
2907
  insights: InsightsModule;
2634
2908
  activity: ActivityModule;
2909
+ trends: TrendsModule;
2635
2910
  constructor(config: TrndUpClientConfig);
2636
2911
  }
2637
2912
 
2638
2913
  declare const SDK_VERSION = "1.0.0";
2639
2914
 
2640
- export { Activity, Auth, INSTAGRAM_SCOPES, Insights, Instagram, type RequestOptions, SDK_VERSION, Social, TrndUpApiError, type TrndUpClientConfig, TrndUpNetworkError, TrndUpSDK, YOUTUBE_SCOPES, YouTube };
2915
+ export { Activity, Auth, INSTAGRAM_SCOPES, Insights, Instagram, type RequestOptions, SDK_VERSION, Social, Trends, TrndUpApiError, type TrndUpClientConfig, TrndUpNetworkError, TrndUpSDK, YOUTUBE_SCOPES, YouTube };
package/dist/index.d.ts CHANGED
@@ -1754,6 +1754,172 @@ declare namespace Activity {
1754
1754
  limit?: number;
1755
1755
  }
1756
1756
  }
1757
+ declare namespace Trends {
1758
+ /** Trend categories */
1759
+ type Category = 'SPORTS' | 'NEWS' | 'TECH' | 'ENTERTAINMENT' | 'GAMING' | 'LIFESTYLE' | 'FINANCE' | 'EDUCATION' | 'OTHER';
1760
+ /** How fast the trend is growing */
1761
+ type Velocity = 'SLOW' | 'MEDIUM' | 'FAST' | 'VIRAL';
1762
+ /** Predicted viral potential */
1763
+ type ViralPrediction = 'LOW' | 'MEDIUM' | 'HIGH_VIRAL';
1764
+ /** Current trend status */
1765
+ type Status = 'NEW' | 'TRENDING' | 'PEAKING' | 'COOLING';
1766
+ /** Content idea difficulty level */
1767
+ type Difficulty = 'EASY' | 'MEDIUM' | 'HARD';
1768
+ /**
1769
+ * Content idea for a trend
1770
+ */
1771
+ interface ContentIdea {
1772
+ /** How hard it is to create */
1773
+ difficulty: Difficulty;
1774
+ /** Idea title */
1775
+ title: string;
1776
+ /** Detailed description */
1777
+ description: string;
1778
+ }
1779
+ /**
1780
+ * Example content from other creators
1781
+ */
1782
+ interface TopExample {
1783
+ /** Link to the video */
1784
+ videoUrl: string;
1785
+ /** Creator's name */
1786
+ creatorName?: string;
1787
+ /** View count display (e.g., "1.2M views") */
1788
+ views?: string;
1789
+ /** Thumbnail image URL */
1790
+ thumbnail?: string;
1791
+ }
1792
+ /**
1793
+ * Trend list item (compact)
1794
+ */
1795
+ interface TrendListItem {
1796
+ /** Unique trend ID */
1797
+ id: string;
1798
+ /** Trend topic title */
1799
+ topic: string;
1800
+ /** Brief summary */
1801
+ summary: string;
1802
+ /** Content category */
1803
+ category: Category;
1804
+ /** Growth velocity */
1805
+ velocity: Velocity;
1806
+ /** Viral potential prediction */
1807
+ viralPrediction: ViralPrediction;
1808
+ /** Relevance score (0-100) */
1809
+ relevanceScore: number;
1810
+ /** Current status */
1811
+ status: Status;
1812
+ /** Growth label (e.g., "🔥 Viral") */
1813
+ growthLabel: string;
1814
+ /** Peak timing hint (e.g., "🎯 Peak NOW") */
1815
+ peakWindow: string | null;
1816
+ /** Relevant platforms */
1817
+ platforms: string[];
1818
+ /** Related hashtags */
1819
+ hashtags: string[];
1820
+ /** When first detected */
1821
+ firstSeen: string;
1822
+ /** Number of content ideas */
1823
+ contentIdeasCount: number;
1824
+ }
1825
+ /**
1826
+ * Full trend details
1827
+ */
1828
+ interface TrendDetail {
1829
+ /** Unique trend ID */
1830
+ id: string;
1831
+ /** Trend topic title */
1832
+ topic: string;
1833
+ /** Detailed summary */
1834
+ summary: string;
1835
+ /** Content category */
1836
+ category: Category;
1837
+ /** Growth velocity */
1838
+ velocity: Velocity;
1839
+ /** Viral potential prediction */
1840
+ viralPrediction: ViralPrediction;
1841
+ /** Relevance score (0-100) */
1842
+ relevanceScore: number;
1843
+ /** Number of times spotted */
1844
+ sightingCount: number;
1845
+ /** Peak strength (1-5) */
1846
+ peakStrength: number;
1847
+ /** Current status */
1848
+ status: Status;
1849
+ /** Growth label */
1850
+ growthLabel: string;
1851
+ /** Peak timing hint */
1852
+ peakWindow: string | null;
1853
+ /** When first detected */
1854
+ firstSeen: string;
1855
+ /** Last activity timestamp */
1856
+ lastActivity: string;
1857
+ /** Relevant platforms */
1858
+ platforms: string[];
1859
+ /** Related hashtags */
1860
+ hashtags: string[];
1861
+ /** Target creator types */
1862
+ targetCreators: string[];
1863
+ /** Content ideas */
1864
+ contentIdeas: ContentIdea[];
1865
+ /** Example content */
1866
+ topExamples: TopExample[];
1867
+ /** Recommended video duration */
1868
+ recommendedDuration: string | null;
1869
+ /** Last updated */
1870
+ updatedAt: string;
1871
+ }
1872
+ /**
1873
+ * Response for list trends endpoint
1874
+ */
1875
+ interface ListResponse {
1876
+ trends: TrendListItem[];
1877
+ total: number;
1878
+ limit: number;
1879
+ offset: number;
1880
+ }
1881
+ /**
1882
+ * Category with trend count
1883
+ */
1884
+ interface CategoryCount {
1885
+ category: string;
1886
+ count: number;
1887
+ }
1888
+ /**
1889
+ * Platform with trend count
1890
+ */
1891
+ interface PlatformCount {
1892
+ platform: string;
1893
+ count: number;
1894
+ }
1895
+ /**
1896
+ * Sync status info
1897
+ */
1898
+ interface SyncStatus {
1899
+ lastSyncedAt: string | null;
1900
+ lastSyncStatus: 'SUCCESS' | 'FAILED' | null;
1901
+ trendsProcessed: number;
1902
+ trendsDeleted: number;
1903
+ totalTrends: number;
1904
+ }
1905
+ /**
1906
+ * Parameters for listing trends
1907
+ */
1908
+ interface ListParams {
1909
+ /** Filter by category */
1910
+ category?: Category;
1911
+ /** Filter by velocity */
1912
+ velocity?: Velocity;
1913
+ /** Filter by status */
1914
+ status?: Status;
1915
+ /** Filter by platform */
1916
+ platform?: string;
1917
+ /** Max results (default: 20, max: 100) */
1918
+ limit?: number;
1919
+ /** Pagination offset */
1920
+ offset?: number;
1921
+ }
1922
+ }
1757
1923
 
1758
1924
  /**
1759
1925
  * TrndUp SDK - Base Client
@@ -2587,6 +2753,114 @@ declare class ActivityModule {
2587
2753
  getLatest(jobType: Activity.JobType): Promise<Activity.LogEntry | null>;
2588
2754
  }
2589
2755
 
2756
+ /**
2757
+ * Trends Module
2758
+ *
2759
+ * Methods for fetching trending content ideas from TrendPulse.
2760
+ */
2761
+
2762
+ declare class TrendsModule {
2763
+ private client;
2764
+ constructor(client: TrndUpClient);
2765
+ /**
2766
+ * List trending topics with optional filters
2767
+ *
2768
+ * @param params - Filter and pagination options
2769
+ * @returns Paginated list of trends sorted by relevance
2770
+ *
2771
+ * @example
2772
+ * ```typescript
2773
+ * // Get top trends
2774
+ * const trends = await sdk.trends.list();
2775
+ *
2776
+ * // Filter by category
2777
+ * const sportsTrends = await sdk.trends.list({ category: 'SPORTS' });
2778
+ *
2779
+ * // Filter by velocity
2780
+ * const viralTrends = await sdk.trends.list({ velocity: 'VIRAL' });
2781
+ *
2782
+ * // Paginate
2783
+ * const page2 = await sdk.trends.list({ limit: 20, offset: 20 });
2784
+ * ```
2785
+ */
2786
+ list(params?: Trends.ListParams): Promise<Trends.ListResponse>;
2787
+ /**
2788
+ * Get full details of a specific trend
2789
+ *
2790
+ * @param trendId - The unique trend ID
2791
+ * @returns Full trend details including content ideas and examples
2792
+ *
2793
+ * @example
2794
+ * ```typescript
2795
+ * const trend = await sdk.trends.getById('trend_123');
2796
+ * console.log(trend.contentIdeas);
2797
+ * console.log(trend.topExamples);
2798
+ * ```
2799
+ */
2800
+ getById(trendId: string): Promise<Trends.TrendDetail>;
2801
+ /**
2802
+ * Get all categories with trend counts
2803
+ *
2804
+ * @returns List of categories and their trend counts
2805
+ *
2806
+ * @example
2807
+ * ```typescript
2808
+ * const categories = await sdk.trends.getCategories();
2809
+ * // [{ category: 'SPORTS', count: 15 }, { category: 'TECH', count: 12 }, ...]
2810
+ * ```
2811
+ */
2812
+ getCategories(): Promise<Trends.CategoryCount[]>;
2813
+ /**
2814
+ * Get all platforms with trend counts
2815
+ *
2816
+ * @returns List of platforms and their trend counts
2817
+ *
2818
+ * @example
2819
+ * ```typescript
2820
+ * const platforms = await sdk.trends.getPlatforms();
2821
+ * // [{ platform: 'YouTube', count: 25 }, { platform: 'Instagram', count: 18 }, ...]
2822
+ * ```
2823
+ */
2824
+ getPlatforms(): Promise<Trends.PlatformCount[]>;
2825
+ /**
2826
+ * Get sync status information
2827
+ *
2828
+ * @returns Current sync status and statistics
2829
+ *
2830
+ * @example
2831
+ * ```typescript
2832
+ * const status = await sdk.trends.getSyncStatus();
2833
+ * console.log(status.lastSyncedAt);
2834
+ * console.log(status.totalTrends);
2835
+ * ```
2836
+ */
2837
+ getSyncStatus(): Promise<Trends.SyncStatus>;
2838
+ /**
2839
+ * Get viral trends (velocity = VIRAL)
2840
+ * Convenience method for filtering viral trends
2841
+ *
2842
+ * @param limit - Max results (default: 10)
2843
+ * @returns List of viral trends
2844
+ */
2845
+ getViral(limit?: number): Promise<Trends.ListResponse>;
2846
+ /**
2847
+ * Get peaking trends (status = PEAKING)
2848
+ * Convenience method for filtering trends at peak
2849
+ *
2850
+ * @param limit - Max results (default: 10)
2851
+ * @returns List of peaking trends
2852
+ */
2853
+ getPeaking(limit?: number): Promise<Trends.ListResponse>;
2854
+ /**
2855
+ * Get trends for a specific platform
2856
+ *
2857
+ * @param platform - Platform name (e.g., 'YouTube', 'Instagram')
2858
+ * @param limit - Max results (default: 20)
2859
+ * @returns List of trends for the platform
2860
+ */
2861
+ getByPlatform(platform: string, limit?: number): Promise<Trends.ListResponse>;
2862
+ }
2863
+
2590
2864
  /**
2591
2865
  * TrndUp API SDK
2592
2866
  *
@@ -2632,9 +2906,10 @@ declare class TrndUpSDK extends TrndUpClient {
2632
2906
  social: SocialModule;
2633
2907
  insights: InsightsModule;
2634
2908
  activity: ActivityModule;
2909
+ trends: TrendsModule;
2635
2910
  constructor(config: TrndUpClientConfig);
2636
2911
  }
2637
2912
 
2638
2913
  declare const SDK_VERSION = "1.0.0";
2639
2914
 
2640
- export { Activity, Auth, INSTAGRAM_SCOPES, Insights, Instagram, type RequestOptions, SDK_VERSION, Social, TrndUpApiError, type TrndUpClientConfig, TrndUpNetworkError, TrndUpSDK, YOUTUBE_SCOPES, YouTube };
2915
+ export { Activity, Auth, INSTAGRAM_SCOPES, Insights, Instagram, type RequestOptions, SDK_VERSION, Social, Trends, TrndUpApiError, type TrndUpClientConfig, TrndUpNetworkError, TrndUpSDK, YOUTUBE_SCOPES, YouTube };