hive-react-kit 0.0.34 → 0.0.35

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.
@@ -1,4 +1,4 @@
1
- import { ActivityHistoryItem, ActivityDisplayItem } from "@/types/activity";
1
+ import { UserChannelItem, ActivityDisplayItem } from "@/types/activity";
2
2
  declare class ActivityService {
3
3
  /**
4
4
  * Get activity history for a user (posts, comments, replies)
@@ -8,43 +8,43 @@ declare class ActivityService {
8
8
  * @param startAuthor - Starting author for pagination (optional)
9
9
  * @param startPermlink - Starting permlink for pagination (optional)
10
10
  * @param observer - Observer username for personalized results (optional)
11
- * @returns Promise<ActivityHistoryItem[]>
11
+ * @returns Promise<UserChannelItem[]>
12
12
  */
13
- getActivityHistory(username: string, sortBy?: 'posts' | 'comments' | 'replies', limit?: number, startAuthor?: string | null, startPermlink?: string | null, observer?: string | null): Promise<ActivityHistoryItem[]>;
13
+ getUserChannel(username: string, sortBy?: "posts" | "comments" | "replies", limit?: number, startAuthor?: string | null, startPermlink?: string | null, observer?: string | null): Promise<UserChannelItem[]>;
14
14
  /**
15
15
  * Get user's posts only
16
16
  * @param username - Hive username
17
17
  * @param limit - Maximum number of posts to return
18
- * @returns Promise<ActivityHistoryItem[]>
18
+ * @returns Promise<UserChannelItem[]>
19
19
  */
20
- getUserPosts(username: string, limit?: number): Promise<ActivityHistoryItem[]>;
20
+ getUserPosts(username: string, limit?: number): Promise<UserChannelItem[]>;
21
21
  /**
22
22
  * Get user's comments only
23
23
  * @param username - Hive username
24
24
  * @param limit - Maximum number of comments to return
25
- * @returns Promise<ActivityHistoryItem[]>
25
+ * @returns Promise<UserChannelItem[]>
26
26
  */
27
- getUserComments(username: string, limit?: number): Promise<ActivityHistoryItem[]>;
27
+ getUserComments(username: string, limit?: number): Promise<UserChannelItem[]>;
28
28
  /**
29
29
  * Get user's replies only
30
30
  * @param username - Hive username
31
31
  * @param limit - Maximum number of replies to return
32
- * @returns Promise<ActivityHistoryItem[]>
32
+ * @returns Promise<UserChannelItem[]>
33
33
  */
34
- getUserReplies(username: string, limit?: number): Promise<ActivityHistoryItem[]>;
34
+ getUserReplies(username: string, limit?: number): Promise<UserChannelItem[]>;
35
35
  /**
36
36
  * Get all user activity (posts, comments, and replies combined)
37
37
  * @param username - Hive username
38
38
  * @param limit - Maximum number of items per type
39
- * @returns Promise<ActivityHistoryItem[]>
39
+ * @returns Promise<UserChannelItem[]>
40
40
  */
41
- getAllUserActivity(username: string, limit?: number): Promise<ActivityHistoryItem[]>;
41
+ getAllUserActivity(username: string, limit?: number): Promise<UserChannelItem[]>;
42
42
  /**
43
43
  * Convert raw activity item to display format
44
44
  * @param item - Raw activity history item
45
45
  * @returns ActivityDisplayItem
46
46
  */
47
- convertToDisplayItem(item: ActivityHistoryItem): ActivityDisplayItem;
47
+ convertToDisplayItem(item: UserChannelItem): ActivityDisplayItem;
48
48
  /**
49
49
  * Format activity timestamp to readable date
50
50
  * @param timestamp - Activity timestamp
@@ -69,7 +69,7 @@ declare class ActivityService {
69
69
  * @param activities - Array of activities
70
70
  * @returns Summary statistics
71
71
  */
72
- getActivitySummary(activities: ActivityHistoryItem[]): {
72
+ getActivitySummary(activities: UserChannelItem[]): {
73
73
  totalActivities: number;
74
74
  postsCount: number;
75
75
  commentsCount: number;
@@ -83,7 +83,7 @@ declare class ActivityService {
83
83
  * @param category - Category to filter by
84
84
  * @returns Filtered activities
85
85
  */
86
- filterByCategory(activities: ActivityHistoryItem[], category: string): ActivityHistoryItem[];
86
+ filterByCategory(activities: UserChannelItem[], category: string): UserChannelItem[];
87
87
  /**
88
88
  * Filter activities by date range
89
89
  * @param activities - Array of activities
@@ -91,14 +91,14 @@ declare class ActivityService {
91
91
  * @param endDate - End date
92
92
  * @returns Filtered activities
93
93
  */
94
- filterByDateRange(activities: ActivityHistoryItem[], startDate: Date, endDate: Date): ActivityHistoryItem[];
94
+ filterByDateRange(activities: UserChannelItem[], startDate: Date, endDate: Date): UserChannelItem[];
95
95
  /**
96
96
  * Search activities by text
97
97
  * @param activities - Array of activities
98
98
  * @param searchText - Text to search for
99
99
  * @returns Filtered activities
100
100
  */
101
- searchActivities(activities: ActivityHistoryItem[], searchText: string): ActivityHistoryItem[];
101
+ searchActivities(activities: UserChannelItem[], searchText: string): UserChannelItem[];
102
102
  }
103
103
  export declare const activityService: ActivityService;
104
104
  export {};
@@ -46,6 +46,7 @@ declare class ApiService {
46
46
  getCommentsList(author: string, permlink: string): Promise<Discussion[]>;
47
47
  getMyVideos(authToken: string): Promise<ThreeSpeakVideo[]>;
48
48
  getRankedPosts(sort?: PostSort, tag?: string, observer?: string, limit?: number, start_author?: string, start_permlink?: string): Promise<Post[]>;
49
+ getPostContent(author: string, permlink: string): Promise<Post | null>;
49
50
  }
50
51
  export declare const apiService: ApiService;
51
52
  export { server };
@@ -1,4 +1,4 @@
1
- export interface ActivityHistoryItem {
1
+ export interface UserChannelItem {
2
2
  id: number;
3
3
  author: string;
4
4
  permlink: string;
@@ -80,16 +80,16 @@ export interface ActivityHistoryItem {
80
80
  author_downvote_manabar: any;
81
81
  author_rc_manabar: any;
82
82
  }
83
- export interface ActivityHistoryParams {
83
+ export interface UserChannelParams {
84
84
  username: string;
85
- sortBy?: 'posts' | 'comments' | 'replies';
85
+ sortBy?: "posts" | "comments" | "replies";
86
86
  limit?: number;
87
87
  startAuthor?: string;
88
88
  startPermlink?: string;
89
89
  observer?: string;
90
90
  }
91
- export interface ActivityHistoryResponse {
92
- result: ActivityHistoryItem[];
91
+ export interface UserChannelResponse {
92
+ result: UserChannelItem[];
93
93
  }
94
94
  export interface ActivityDisplayItem {
95
95
  id: number;
@@ -104,5 +104,5 @@ export interface ActivityDisplayItem {
104
104
  total_payout_value: string;
105
105
  pending_payout_value: string;
106
106
  url: string;
107
- type: 'post' | 'comment';
107
+ type: "post" | "comment";
108
108
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hive-react-kit",
3
3
  "private": false,
4
- "version": "0.0.34",
4
+ "version": "0.0.35",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",
7
7
  "module": "./dist/index.esm.js",
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- interface ActivityHistoryProps {
3
- username: string;
4
- className?: string;
5
- }
6
- declare const ActivityHistory: React.FC<ActivityHistoryProps>;
7
- export default ActivityHistory;
@@ -1,8 +0,0 @@
1
- interface CommentsModalProps {
2
- author: string;
3
- permlink: string;
4
- currentUser?: string;
5
- onClose: () => void;
6
- }
7
- declare const CommentsModal: ({ author, permlink, currentUser, onClose }: CommentsModalProps) => import("react/jsx-runtime").JSX.Element;
8
- export default CommentsModal;
@@ -1,7 +0,0 @@
1
- interface UpvoteListModalProps {
2
- author: string;
3
- permlink: string;
4
- onClose: () => void;
5
- }
6
- declare const UpvoteListModal: ({ author, permlink, onClose }: UpvoteListModalProps) => import("react/jsx-runtime").JSX.Element;
7
- export default UpvoteListModal;