@bbearai/core 0.9.14 → 0.10.0

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 CHANGED
@@ -830,14 +830,12 @@ interface QATask {
830
830
  updatedAt: string;
831
831
  }
832
832
  /** Category for filtering tester issues in the widget */
833
- type IssueCategory = 'open' | 'retest' | 'done' | 'wont_fix' | 'reopened';
833
+ type IssueCategory = 'open' | 'fixed' | 'closed';
834
834
  /** Issue counts for each category (HomeScreen cards) */
835
835
  interface IssueCounts {
836
836
  open: number;
837
- retest: number;
838
- done: number;
839
- wont_fix: number;
840
- reopened: number;
837
+ fixed: number;
838
+ closed: number;
841
839
  }
842
840
  /** A report as seen by the tester in the widget */
843
841
  interface TesterIssue {
@@ -1447,6 +1445,14 @@ declare class BugBearClient {
1447
1445
  success: boolean;
1448
1446
  error?: string;
1449
1447
  }>;
1448
+ /**
1449
+ * Verify a fixed issue — tester confirms the fix works.
1450
+ * Transitions the report from fixed/ready_to_test to 'verified'.
1451
+ */
1452
+ verifyReport(reportId: string): Promise<{
1453
+ success: boolean;
1454
+ error?: string;
1455
+ }>;
1450
1456
  /**
1451
1457
  * Basic email format validation (defense in depth)
1452
1458
  */
package/dist/index.d.ts CHANGED
@@ -830,14 +830,12 @@ interface QATask {
830
830
  updatedAt: string;
831
831
  }
832
832
  /** Category for filtering tester issues in the widget */
833
- type IssueCategory = 'open' | 'retest' | 'done' | 'wont_fix' | 'reopened';
833
+ type IssueCategory = 'open' | 'fixed' | 'closed';
834
834
  /** Issue counts for each category (HomeScreen cards) */
835
835
  interface IssueCounts {
836
836
  open: number;
837
- retest: number;
838
- done: number;
839
- wont_fix: number;
840
- reopened: number;
837
+ fixed: number;
838
+ closed: number;
841
839
  }
842
840
  /** A report as seen by the tester in the widget */
843
841
  interface TesterIssue {
@@ -1447,6 +1445,14 @@ declare class BugBearClient {
1447
1445
  success: boolean;
1448
1446
  error?: string;
1449
1447
  }>;
1448
+ /**
1449
+ * Verify a fixed issue — tester confirms the fix works.
1450
+ * Transitions the report from fixed/ready_to_test to 'verified'.
1451
+ */
1452
+ verifyReport(reportId: string): Promise<{
1453
+ success: boolean;
1454
+ error?: string;
1455
+ }>;
1450
1456
  /**
1451
1457
  * Basic email format validation (defense in depth)
1452
1458
  */
package/dist/index.js CHANGED
@@ -2214,7 +2214,7 @@ var BugBearClient = class {
2214
2214
  * @param mineOnly - If true (default), only counts the tester's own reports. If false, counts all project reports.
2215
2215
  */
2216
2216
  async getIssueCounts(mineOnly = true) {
2217
- const empty = { open: 0, retest: 0, done: 0, wont_fix: 0, reopened: 0 };
2217
+ const empty = { open: 0, fixed: 0, closed: 0 };
2218
2218
  try {
2219
2219
  const testerInfo = await this.getTesterInfo();
2220
2220
  if (!testerInfo) return empty;
@@ -2229,10 +2229,8 @@ var BugBearClient = class {
2229
2229
  }
2230
2230
  return {
2231
2231
  open: data?.open ?? 0,
2232
- retest: data?.retest ?? 0,
2233
- done: data?.done ?? 0,
2234
- wont_fix: data?.wont_fix ?? 0,
2235
- reopened: data?.reopened ?? 0
2232
+ fixed: data?.fixed ?? 0,
2233
+ closed: data?.closed ?? 0
2236
2234
  };
2237
2235
  } catch (err) {
2238
2236
  console.error("BugBear: Error fetching issue counts", err);
@@ -2312,6 +2310,31 @@ var BugBearClient = class {
2312
2310
  return { success: false, error: "Unexpected error" };
2313
2311
  }
2314
2312
  }
2313
+ /**
2314
+ * Verify a fixed issue — tester confirms the fix works.
2315
+ * Transitions the report from fixed/ready_to_test to 'verified'.
2316
+ */
2317
+ async verifyReport(reportId) {
2318
+ try {
2319
+ const testerInfo = await this.getTesterInfo();
2320
+ if (!testerInfo) return { success: false, error: "Not authenticated as tester" };
2321
+ const { data, error } = await this.supabase.rpc("verify_report", {
2322
+ p_report_id: reportId,
2323
+ p_tester_id: testerInfo.id
2324
+ });
2325
+ if (error) {
2326
+ console.error("BugBear: Failed to verify report", formatPgError(error));
2327
+ return { success: false, error: error.message };
2328
+ }
2329
+ if (!data?.success) {
2330
+ return { success: false, error: data?.error || "Failed to verify report" };
2331
+ }
2332
+ return { success: true };
2333
+ } catch (err) {
2334
+ console.error("BugBear: Error verifying report", err);
2335
+ return { success: false, error: "Unexpected error" };
2336
+ }
2337
+ }
2315
2338
  /**
2316
2339
  * Basic email format validation (defense in depth)
2317
2340
  */
package/dist/index.mjs CHANGED
@@ -2168,7 +2168,7 @@ var BugBearClient = class {
2168
2168
  * @param mineOnly - If true (default), only counts the tester's own reports. If false, counts all project reports.
2169
2169
  */
2170
2170
  async getIssueCounts(mineOnly = true) {
2171
- const empty = { open: 0, retest: 0, done: 0, wont_fix: 0, reopened: 0 };
2171
+ const empty = { open: 0, fixed: 0, closed: 0 };
2172
2172
  try {
2173
2173
  const testerInfo = await this.getTesterInfo();
2174
2174
  if (!testerInfo) return empty;
@@ -2183,10 +2183,8 @@ var BugBearClient = class {
2183
2183
  }
2184
2184
  return {
2185
2185
  open: data?.open ?? 0,
2186
- retest: data?.retest ?? 0,
2187
- done: data?.done ?? 0,
2188
- wont_fix: data?.wont_fix ?? 0,
2189
- reopened: data?.reopened ?? 0
2186
+ fixed: data?.fixed ?? 0,
2187
+ closed: data?.closed ?? 0
2190
2188
  };
2191
2189
  } catch (err) {
2192
2190
  console.error("BugBear: Error fetching issue counts", err);
@@ -2266,6 +2264,31 @@ var BugBearClient = class {
2266
2264
  return { success: false, error: "Unexpected error" };
2267
2265
  }
2268
2266
  }
2267
+ /**
2268
+ * Verify a fixed issue — tester confirms the fix works.
2269
+ * Transitions the report from fixed/ready_to_test to 'verified'.
2270
+ */
2271
+ async verifyReport(reportId) {
2272
+ try {
2273
+ const testerInfo = await this.getTesterInfo();
2274
+ if (!testerInfo) return { success: false, error: "Not authenticated as tester" };
2275
+ const { data, error } = await this.supabase.rpc("verify_report", {
2276
+ p_report_id: reportId,
2277
+ p_tester_id: testerInfo.id
2278
+ });
2279
+ if (error) {
2280
+ console.error("BugBear: Failed to verify report", formatPgError(error));
2281
+ return { success: false, error: error.message };
2282
+ }
2283
+ if (!data?.success) {
2284
+ return { success: false, error: data?.error || "Failed to verify report" };
2285
+ }
2286
+ return { success: true };
2287
+ } catch (err) {
2288
+ console.error("BugBear: Error verifying report", err);
2289
+ return { success: false, error: "Unexpected error" };
2290
+ }
2291
+ }
2269
2292
  /**
2270
2293
  * Basic email format validation (defense in depth)
2271
2294
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbearai/core",
3
- "version": "0.9.14",
3
+ "version": "0.10.0",
4
4
  "description": "Core utilities and types for BugBear QA platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",