@bbearai/core 0.9.11 → 0.9.12
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 +4 -6
- package/dist/index.d.ts +4 -6
- package/dist/index.js +6 -3
- package/dist/index.mjs +6 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -828,11 +828,13 @@ interface QATask {
|
|
|
828
828
|
updatedAt: string;
|
|
829
829
|
}
|
|
830
830
|
/** Category for filtering tester issues in the widget */
|
|
831
|
-
type IssueCategory = 'open' | 'done' | 'reopened';
|
|
831
|
+
type IssueCategory = 'open' | 'retest' | 'done' | 'wont_fix' | 'reopened';
|
|
832
832
|
/** Issue counts for each category (HomeScreen cards) */
|
|
833
833
|
interface IssueCounts {
|
|
834
834
|
open: number;
|
|
835
|
+
retest: number;
|
|
835
836
|
done: number;
|
|
837
|
+
wont_fix: number;
|
|
836
838
|
reopened: number;
|
|
837
839
|
}
|
|
838
840
|
/** A report as seen by the tester in the widget */
|
|
@@ -1426,11 +1428,7 @@ declare class BugBearClient {
|
|
|
1426
1428
|
* Used by the widget HomeScreen cards
|
|
1427
1429
|
* @param mineOnly - If true (default), only counts the tester's own reports. If false, counts all project reports.
|
|
1428
1430
|
*/
|
|
1429
|
-
getIssueCounts(mineOnly?: boolean): Promise<
|
|
1430
|
-
open: number;
|
|
1431
|
-
done: number;
|
|
1432
|
-
reopened: number;
|
|
1433
|
-
}>;
|
|
1431
|
+
getIssueCounts(mineOnly?: boolean): Promise<IssueCounts>;
|
|
1434
1432
|
/**
|
|
1435
1433
|
* Get issues for the tester by category.
|
|
1436
1434
|
* Returns enriched data: done issues include verification proof,
|
package/dist/index.d.ts
CHANGED
|
@@ -828,11 +828,13 @@ interface QATask {
|
|
|
828
828
|
updatedAt: string;
|
|
829
829
|
}
|
|
830
830
|
/** Category for filtering tester issues in the widget */
|
|
831
|
-
type IssueCategory = 'open' | 'done' | 'reopened';
|
|
831
|
+
type IssueCategory = 'open' | 'retest' | 'done' | 'wont_fix' | 'reopened';
|
|
832
832
|
/** Issue counts for each category (HomeScreen cards) */
|
|
833
833
|
interface IssueCounts {
|
|
834
834
|
open: number;
|
|
835
|
+
retest: number;
|
|
835
836
|
done: number;
|
|
837
|
+
wont_fix: number;
|
|
836
838
|
reopened: number;
|
|
837
839
|
}
|
|
838
840
|
/** A report as seen by the tester in the widget */
|
|
@@ -1426,11 +1428,7 @@ declare class BugBearClient {
|
|
|
1426
1428
|
* Used by the widget HomeScreen cards
|
|
1427
1429
|
* @param mineOnly - If true (default), only counts the tester's own reports. If false, counts all project reports.
|
|
1428
1430
|
*/
|
|
1429
|
-
getIssueCounts(mineOnly?: boolean): Promise<
|
|
1430
|
-
open: number;
|
|
1431
|
-
done: number;
|
|
1432
|
-
reopened: number;
|
|
1433
|
-
}>;
|
|
1431
|
+
getIssueCounts(mineOnly?: boolean): Promise<IssueCounts>;
|
|
1434
1432
|
/**
|
|
1435
1433
|
* Get issues for the tester by category.
|
|
1436
1434
|
* Returns enriched data: done issues include verification proof,
|
package/dist/index.js
CHANGED
|
@@ -2199,9 +2199,10 @@ var BugBearClient = class {
|
|
|
2199
2199
|
* @param mineOnly - If true (default), only counts the tester's own reports. If false, counts all project reports.
|
|
2200
2200
|
*/
|
|
2201
2201
|
async getIssueCounts(mineOnly = true) {
|
|
2202
|
+
const empty = { open: 0, retest: 0, done: 0, wont_fix: 0, reopened: 0 };
|
|
2202
2203
|
try {
|
|
2203
2204
|
const testerInfo = await this.getTesterInfo();
|
|
2204
|
-
if (!testerInfo) return
|
|
2205
|
+
if (!testerInfo) return empty;
|
|
2205
2206
|
const { data, error } = await this.supabase.rpc("get_tester_issue_counts", {
|
|
2206
2207
|
p_project_id: this.config.projectId,
|
|
2207
2208
|
p_tester_id: testerInfo.id,
|
|
@@ -2209,16 +2210,18 @@ var BugBearClient = class {
|
|
|
2209
2210
|
});
|
|
2210
2211
|
if (error) {
|
|
2211
2212
|
console.error("BugBear: Failed to fetch issue counts", formatPgError(error));
|
|
2212
|
-
return
|
|
2213
|
+
return empty;
|
|
2213
2214
|
}
|
|
2214
2215
|
return {
|
|
2215
2216
|
open: data?.open ?? 0,
|
|
2217
|
+
retest: data?.retest ?? 0,
|
|
2216
2218
|
done: data?.done ?? 0,
|
|
2219
|
+
wont_fix: data?.wont_fix ?? 0,
|
|
2217
2220
|
reopened: data?.reopened ?? 0
|
|
2218
2221
|
};
|
|
2219
2222
|
} catch (err) {
|
|
2220
2223
|
console.error("BugBear: Error fetching issue counts", err);
|
|
2221
|
-
return
|
|
2224
|
+
return empty;
|
|
2222
2225
|
}
|
|
2223
2226
|
}
|
|
2224
2227
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -2153,9 +2153,10 @@ var BugBearClient = class {
|
|
|
2153
2153
|
* @param mineOnly - If true (default), only counts the tester's own reports. If false, counts all project reports.
|
|
2154
2154
|
*/
|
|
2155
2155
|
async getIssueCounts(mineOnly = true) {
|
|
2156
|
+
const empty = { open: 0, retest: 0, done: 0, wont_fix: 0, reopened: 0 };
|
|
2156
2157
|
try {
|
|
2157
2158
|
const testerInfo = await this.getTesterInfo();
|
|
2158
|
-
if (!testerInfo) return
|
|
2159
|
+
if (!testerInfo) return empty;
|
|
2159
2160
|
const { data, error } = await this.supabase.rpc("get_tester_issue_counts", {
|
|
2160
2161
|
p_project_id: this.config.projectId,
|
|
2161
2162
|
p_tester_id: testerInfo.id,
|
|
@@ -2163,16 +2164,18 @@ var BugBearClient = class {
|
|
|
2163
2164
|
});
|
|
2164
2165
|
if (error) {
|
|
2165
2166
|
console.error("BugBear: Failed to fetch issue counts", formatPgError(error));
|
|
2166
|
-
return
|
|
2167
|
+
return empty;
|
|
2167
2168
|
}
|
|
2168
2169
|
return {
|
|
2169
2170
|
open: data?.open ?? 0,
|
|
2171
|
+
retest: data?.retest ?? 0,
|
|
2170
2172
|
done: data?.done ?? 0,
|
|
2173
|
+
wont_fix: data?.wont_fix ?? 0,
|
|
2171
2174
|
reopened: data?.reopened ?? 0
|
|
2172
2175
|
};
|
|
2173
2176
|
} catch (err) {
|
|
2174
2177
|
console.error("BugBear: Error fetching issue counts", err);
|
|
2175
|
-
return
|
|
2178
|
+
return empty;
|
|
2176
2179
|
}
|
|
2177
2180
|
}
|
|
2178
2181
|
/**
|