wisdom-sdk
Version:
Core business logic and data access layer for prediction markets
69 lines (67 loc) • 2.13 kB
text/typescript
declare class BugReportStore {
/**
* Get all bug reports
*/
getAllBugReports(): Promise<({} | undefined)[]>;
/**
* Get specific bug report by ID
*/
getBugReport(id: string): Promise<any>;
/**
* Get all bug reports for a specific user
*/
getUserBugReports(userId: string): Promise<any[]>;
/**
* Create a new bug report
*/
createBugReport(data: {
title: string;
description: string;
severity: string;
url?: string;
createdBy: string;
}): Promise<{
id: string;
title: string;
description: string;
severity: string;
url: string | undefined;
createdBy: string;
createdAt: string;
status: string;
}>;
/**
* Update an existing bug report
*/
updateBugReport(id: string, data: any): Promise<any>;
deleteBugReport(id: string): Promise<boolean>;
/**
* Process a reward payment for a bug report
* This handles giving the initial or confirmation reward to a user
*
* @param reportId Bug report ID
* @param userId User ID to receive the reward
* @param rewardType Type of reward (initial or confirmation)
* @param customAmount Optional custom amount (overrides defaults)
* @returns Result object with success/error status
*/
/**
* Confirm a bug report (mark as verified by admin)
* @param id Bug report ID
* @param adminId ID of the admin confirming the report
*/
confirmBugReport(id: string, adminId: string): Promise<any>;
/**
* Pay a reward for a bug report
* @param id Bug report ID
* @param isInitialReward Whether to pay the initial (true) or confirmation (false) reward
*/
payReward(id: string, isInitialReward: boolean): Promise<any>;
/**
* Internal helper method to process reward payments
* This handles giving the initial or confirmation reward to a user
*/
private processRewardPayment;
}
declare const bugReportStore: BugReportStore;
export { BugReportStore, bugReportStore };