hive-react-kit 1.5.1 → 1.5.4

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,8 @@
1
1
  import { AccountHistoryItem, ActivityListItem, DirectionFilter, GeneralFilter, RewardFilter } from "@/types/activityList";
2
+ export declare function buildOperationFilterMask(op?: string): {
3
+ low: string;
4
+ high: string;
5
+ } | null;
2
6
  declare class ActivityListService {
3
7
  /**
4
8
  * Get account history using condenser_api.get_account_history
@@ -17,7 +21,7 @@ declare class ActivityListService {
17
21
  * @param limit - Number of operations to fetch
18
22
  * @returns Promise<AccountHistoryItem[]>
19
23
  */
20
- getNextAccountHistoryPage(username: string, lastIndex: number, limit?: number): Promise<AccountHistoryItem[]>;
24
+ getNextAccountHistoryPage(username: string, lastIndex: number, limit?: number, operationFilterLow?: string, operationFilterHigh?: string): Promise<AccountHistoryItem[]>;
21
25
  /**
22
26
  * Convert account history items to activity list items
23
27
  * @param historyItems - Raw account history items
@@ -39,6 +43,7 @@ declare class ActivityListService {
39
43
  private parseEffectiveCommentVoteOperation;
40
44
  private parseCurationRewardOperation;
41
45
  private parseAuthorRewardOperation;
46
+ private parseTransferOperation;
42
47
  private parseCommentBenefactorRewardOperation;
43
48
  /**
44
49
  * Filter activities by direction (in/out)
@@ -11,6 +11,11 @@ declare class CommunityService {
11
11
  getCommunityAccounts(communityId: string): Promise<any[]>;
12
12
  getRankedPosts(communityId: string, sort?: string, limit?: number, startAuthor?: string, startPermlink?: string): Promise<any[]>;
13
13
  communityIcon(value: string): string;
14
+ /** Check whether `username` is subscribed to `communityId` using
15
+ * bridge.list_all_subscriptions. Returns false on network errors so
16
+ * the UI never blocks on a transient failure — the user can still
17
+ * press the button to (re)subscribe. */
18
+ isUserSubscribedToCommunity(username: string, communityId: string): Promise<boolean>;
14
19
  userOwnerThumb(value: string): string;
15
20
  getCommunityActivities(account: string, limit?: number, lastId?: number): Promise<CommunityActivity[]>;
16
21
  /**
@@ -19,7 +19,7 @@ export interface AccountHistoryResponse {
19
19
  }
20
20
  export interface ActivityListItem {
21
21
  id: string;
22
- type: 'vote' | 'comment' | 'custom_json' | 'comment_options' | 'effective_comment_vote' | 'curation_reward' | 'author_reward' | 'comment_benefactor_reward' | 'other';
22
+ type: 'vote' | 'comment' | 'custom_json' | 'comment_options' | 'effective_comment_vote' | 'curation_reward' | 'author_reward' | 'comment_benefactor_reward' | 'transfer' | 'other';
23
23
  op?: string;
24
24
  direction: 'in' | 'out';
25
25
  timestamp: string;
@@ -41,6 +41,10 @@ export interface ActivityListItem {
41
41
  benefactor?: string;
42
42
  parent_author?: string;
43
43
  parent_permlink?: string;
44
+ from?: string;
45
+ to?: string;
46
+ amount?: string;
47
+ memo?: string;
44
48
  }
45
49
  export type DirectionFilter = 'all' | 'in' | 'out';
46
50
  export type GeneralFilter = 'all' | 'votes' | 'comments' | 'replies' | 'curation' | 'others';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hive-react-kit",
3
3
  "private": false,
4
- "version": "1.5.1",
4
+ "version": "1.5.4",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",
7
7
  "module": "./dist/index.esm.js",