@iotexproject/kit 0.1.91 → 0.1.92
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.ts +21 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9103,17 +9103,33 @@ export type Proposal = {
|
|
|
9103
9103
|
total_vote_weight?: number;
|
|
9104
9104
|
voter_count?: number;
|
|
9105
9105
|
yes_vote_count?: number;
|
|
9106
|
+
yes_vote_weight?: number;
|
|
9106
9107
|
no_vote_count?: number;
|
|
9108
|
+
no_vote_weight?: number;
|
|
9107
9109
|
abstain_vote_count?: number;
|
|
9110
|
+
abstain_vote_weight?: number;
|
|
9108
9111
|
created_at: string;
|
|
9109
9112
|
updated_at: string;
|
|
9110
9113
|
start_time: string;
|
|
9111
9114
|
end_time: string;
|
|
9112
9115
|
is_voted?: boolean;
|
|
9113
9116
|
votes?: Vote[];
|
|
9117
|
+
currentUser?: CurrentUser;
|
|
9118
|
+
slug: string;
|
|
9119
|
+
};
|
|
9120
|
+
export type CurrentUser = {
|
|
9121
|
+
voter?: string;
|
|
9122
|
+
is_voted: boolean;
|
|
9123
|
+
vote_value: "yes" | "no" | "abstain";
|
|
9124
|
+
vote_weight: number;
|
|
9114
9125
|
};
|
|
9115
9126
|
declare class Dao extends BaseDBModule {
|
|
9127
|
+
checkAuth(key: string): Promise<{
|
|
9128
|
+
ok: boolean;
|
|
9129
|
+
message: string;
|
|
9130
|
+
}>;
|
|
9116
9131
|
proposalsDataLoader: DataLoader<number, Proposal | undefined, number>;
|
|
9132
|
+
proposalsByNamesDataLoader: DataLoader<string, Proposal | undefined, number>;
|
|
9117
9133
|
blockLoader: DataLoader<string, number | undefined, string>;
|
|
9118
9134
|
voteWeightDataLoader: DataLoader<{
|
|
9119
9135
|
height: number;
|
|
@@ -9125,9 +9141,10 @@ declare class Dao extends BaseDBModule {
|
|
|
9125
9141
|
getVotesByProposalId({ proposal_id, }: {
|
|
9126
9142
|
proposal_id: number;
|
|
9127
9143
|
}): Promise<Vote[]>;
|
|
9128
|
-
getProposal({ id, voter }: {
|
|
9129
|
-
id
|
|
9144
|
+
getProposal({ id, voter, title }: {
|
|
9145
|
+
id?: number;
|
|
9130
9146
|
voter?: string;
|
|
9147
|
+
title?: string;
|
|
9131
9148
|
}): Promise<Proposal | undefined>;
|
|
9132
9149
|
getProposalListByIds({ ids }: {
|
|
9133
9150
|
ids: readonly number[];
|
|
@@ -9146,7 +9163,8 @@ declare class Dao extends BaseDBModule {
|
|
|
9146
9163
|
voter: string;
|
|
9147
9164
|
message: string;
|
|
9148
9165
|
signature: string;
|
|
9149
|
-
proposal_id
|
|
9166
|
+
proposal_id?: number;
|
|
9167
|
+
proposal_title?: string;
|
|
9150
9168
|
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
9151
9169
|
createProposal(args: {
|
|
9152
9170
|
title: string;
|