@bbearai/core 0.9.13 → 0.9.14

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
@@ -497,6 +497,8 @@ interface TesterInfo {
497
497
  completedTests: number;
498
498
  /** Role: 'tester' for QA testers, 'feedback' for feedback-only users */
499
499
  role?: 'tester' | 'feedback';
500
+ /** When set and in the future, the widget should be hidden for this tester */
501
+ widgetPausedUntil?: string;
500
502
  }
501
503
  interface TesterProfileUpdate {
502
504
  name?: string;
@@ -1259,6 +1261,7 @@ declare class BugBearClient {
1259
1261
  onAssignmentChange?: () => void;
1260
1262
  onMessageChange?: () => void;
1261
1263
  onReportChange?: () => void;
1264
+ onTesterChange?: () => void;
1262
1265
  }): () => void;
1263
1266
  /** Remove all active Realtime channels. */
1264
1267
  unsubscribeAll(): void;
package/dist/index.d.ts CHANGED
@@ -497,6 +497,8 @@ interface TesterInfo {
497
497
  completedTests: number;
498
498
  /** Role: 'tester' for QA testers, 'feedback' for feedback-only users */
499
499
  role?: 'tester' | 'feedback';
500
+ /** When set and in the future, the widget should be hidden for this tester */
501
+ widgetPausedUntil?: string;
500
502
  }
501
503
  interface TesterProfileUpdate {
502
504
  name?: string;
@@ -1259,6 +1261,7 @@ declare class BugBearClient {
1259
1261
  onAssignmentChange?: () => void;
1260
1262
  onMessageChange?: () => void;
1261
1263
  onReportChange?: () => void;
1264
+ onTesterChange?: () => void;
1262
1265
  }): () => void;
1263
1266
  /** Remove all active Realtime channels. */
1264
1267
  unsubscribeAll(): void;
package/dist/index.js CHANGED
@@ -1279,6 +1279,20 @@ var BugBearClient = class {
1279
1279
  });
1280
1280
  this.realtimeChannels.push(channel);
1281
1281
  }
1282
+ if (callbacks.onTesterChange) {
1283
+ const debouncedCb = debounce(callbacks.onTesterChange);
1284
+ const channel = this.supabase.channel("bugbear-testers").on("postgres_changes", {
1285
+ event: "UPDATE",
1286
+ schema: "public",
1287
+ table: "testers",
1288
+ filter: `project_id=eq.${projectId}`
1289
+ }, debouncedCb).subscribe((status) => {
1290
+ if (status === "CHANNEL_ERROR") {
1291
+ console.warn("BugBear: Realtime subscription failed for testers");
1292
+ }
1293
+ });
1294
+ this.realtimeChannels.push(channel);
1295
+ }
1282
1296
  return () => this.unsubscribeAll();
1283
1297
  }
1284
1298
  /** Remove all active Realtime channels. */
@@ -2164,7 +2178,8 @@ var BugBearClient = class {
2164
2178
  platforms: tester.platforms || [],
2165
2179
  assignedTests: tester.assigned_count || 0,
2166
2180
  completedTests: tester.completed_count || 0,
2167
- role: tester.role || "tester"
2181
+ role: tester.role || "tester",
2182
+ widgetPausedUntil: tester.widget_paused_until || void 0
2168
2183
  };
2169
2184
  } catch (err) {
2170
2185
  console.error("BugBear: getTesterInfo error", err);
package/dist/index.mjs CHANGED
@@ -1233,6 +1233,20 @@ var BugBearClient = class {
1233
1233
  });
1234
1234
  this.realtimeChannels.push(channel);
1235
1235
  }
1236
+ if (callbacks.onTesterChange) {
1237
+ const debouncedCb = debounce(callbacks.onTesterChange);
1238
+ const channel = this.supabase.channel("bugbear-testers").on("postgres_changes", {
1239
+ event: "UPDATE",
1240
+ schema: "public",
1241
+ table: "testers",
1242
+ filter: `project_id=eq.${projectId}`
1243
+ }, debouncedCb).subscribe((status) => {
1244
+ if (status === "CHANNEL_ERROR") {
1245
+ console.warn("BugBear: Realtime subscription failed for testers");
1246
+ }
1247
+ });
1248
+ this.realtimeChannels.push(channel);
1249
+ }
1236
1250
  return () => this.unsubscribeAll();
1237
1251
  }
1238
1252
  /** Remove all active Realtime channels. */
@@ -2118,7 +2132,8 @@ var BugBearClient = class {
2118
2132
  platforms: tester.platforms || [],
2119
2133
  assignedTests: tester.assigned_count || 0,
2120
2134
  completedTests: tester.completed_count || 0,
2121
- role: tester.role || "tester"
2135
+ role: tester.role || "tester",
2136
+ widgetPausedUntil: tester.widget_paused_until || void 0
2122
2137
  };
2123
2138
  } catch (err) {
2124
2139
  console.error("BugBear: getTesterInfo error", err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbearai/core",
3
- "version": "0.9.13",
3
+ "version": "0.9.14",
4
4
  "description": "Core utilities and types for BugBear QA platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",