@bbearai/core 0.9.11 → 0.9.13

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
@@ -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,18 +1428,14 @@ 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,
1437
1435
  * reopened issues include original bug context.
1438
1436
  * @param mineOnly - If true (default), only returns the tester's own reports. If false, returns all project reports.
1439
1437
  */
1440
- getIssues(category: 'open' | 'done' | 'reopened', mineOnly?: boolean): Promise<TesterIssue[]>;
1438
+ getIssues(category: IssueCategory, mineOnly?: boolean): Promise<TesterIssue[]>;
1441
1439
  /**
1442
1440
  * Reopen a done issue that the tester believes isn't actually fixed.
1443
1441
  * Transitions the report from a done status back to 'confirmed'.
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,18 +1428,14 @@ 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,
1437
1435
  * reopened issues include original bug context.
1438
1436
  * @param mineOnly - If true (default), only returns the tester's own reports. If false, returns all project reports.
1439
1437
  */
1440
- getIssues(category: 'open' | 'done' | 'reopened', mineOnly?: boolean): Promise<TesterIssue[]>;
1438
+ getIssues(category: IssueCategory, mineOnly?: boolean): Promise<TesterIssue[]>;
1441
1439
  /**
1442
1440
  * Reopen a done issue that the tester believes isn't actually fixed.
1443
1441
  * Transitions the report from a done status back to 'confirmed'.
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 { open: 0, done: 0, reopened: 0 };
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 { open: 0, done: 0, reopened: 0 };
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 { open: 0, done: 0, reopened: 0 };
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 { open: 0, done: 0, reopened: 0 };
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 { open: 0, done: 0, reopened: 0 };
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 { open: 0, done: 0, reopened: 0 };
2178
+ return empty;
2176
2179
  }
2177
2180
  }
2178
2181
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbearai/core",
3
- "version": "0.9.11",
3
+ "version": "0.9.13",
4
4
  "description": "Core utilities and types for BugBear QA platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",