@bbearai/core 0.1.5 → 0.1.6

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
@@ -217,9 +217,24 @@ interface TesterInfo {
217
217
  id: string;
218
218
  name: string;
219
219
  email: string;
220
+ /** Additional email addresses for testing on different accounts */
221
+ additionalEmails: string[];
222
+ /** URL to profile photo/avatar */
223
+ avatarUrl?: string;
224
+ /** Testing platforms (ios, android, web) */
225
+ platforms: string[];
220
226
  assignedTests: number;
221
227
  completedTests: number;
222
228
  }
229
+ interface TesterProfileUpdate {
230
+ name?: string;
231
+ /** Additional email addresses for testing */
232
+ additionalEmails?: string[];
233
+ /** URL to profile photo/avatar */
234
+ avatarUrl?: string;
235
+ /** Testing platforms */
236
+ platforms?: string[];
237
+ }
223
238
  type ThreadType = 'announcement' | 'direct' | 'report' | 'general_note';
224
239
  type ThreadPriority = 'low' | 'normal' | 'high' | 'urgent';
225
240
  type MessageSenderType = 'admin' | 'tester';
@@ -291,6 +306,14 @@ declare class BugBearClient {
291
306
  * Looks up tester by email from the host app's authenticated user
292
307
  */
293
308
  getTesterInfo(): Promise<TesterInfo | null>;
309
+ /**
310
+ * Update tester profile
311
+ * Allows testers to update their name, additional emails, avatar, and platforms
312
+ */
313
+ updateTesterProfile(updates: TesterProfileUpdate): Promise<{
314
+ success: boolean;
315
+ error?: string;
316
+ }>;
294
317
  /**
295
318
  * Check if current user is a tester for this project
296
319
  */
@@ -444,4 +467,4 @@ declare function captureError(error: Error, errorInfo?: {
444
467
  componentStack?: string;
445
468
  };
446
469
 
447
- export { type AppContext, BugBearClient, type BugBearConfig, type BugBearReport, type BugBearTheme, type ChecklistResult, type ConsoleLogEntry, type DeviceInfo, type EnhancedBugContext, type HostUserInfo, type MessageSenderType, type NetworkRequest, type QATrack, type ReportStatus, type ReportType, type RubricMode, type RubricResult, type Severity, type TestAssignment, type TestResult, type TestStep, type TestTemplate, type TesterInfo, type TesterMessage, type TesterThread, type ThreadPriority, type ThreadType, captureError, contextCapture, createBugBear };
470
+ export { type AppContext, BugBearClient, type BugBearConfig, type BugBearReport, type BugBearTheme, type ChecklistResult, type ConsoleLogEntry, type DeviceInfo, type EnhancedBugContext, type HostUserInfo, type MessageSenderType, type NetworkRequest, type QATrack, type ReportStatus, type ReportType, type RubricMode, type RubricResult, type Severity, type TestAssignment, type TestResult, type TestStep, type TestTemplate, type TesterInfo, type TesterMessage, type TesterProfileUpdate, type TesterThread, type ThreadPriority, type ThreadType, captureError, contextCapture, createBugBear };
package/dist/index.d.ts CHANGED
@@ -217,9 +217,24 @@ interface TesterInfo {
217
217
  id: string;
218
218
  name: string;
219
219
  email: string;
220
+ /** Additional email addresses for testing on different accounts */
221
+ additionalEmails: string[];
222
+ /** URL to profile photo/avatar */
223
+ avatarUrl?: string;
224
+ /** Testing platforms (ios, android, web) */
225
+ platforms: string[];
220
226
  assignedTests: number;
221
227
  completedTests: number;
222
228
  }
229
+ interface TesterProfileUpdate {
230
+ name?: string;
231
+ /** Additional email addresses for testing */
232
+ additionalEmails?: string[];
233
+ /** URL to profile photo/avatar */
234
+ avatarUrl?: string;
235
+ /** Testing platforms */
236
+ platforms?: string[];
237
+ }
223
238
  type ThreadType = 'announcement' | 'direct' | 'report' | 'general_note';
224
239
  type ThreadPriority = 'low' | 'normal' | 'high' | 'urgent';
225
240
  type MessageSenderType = 'admin' | 'tester';
@@ -291,6 +306,14 @@ declare class BugBearClient {
291
306
  * Looks up tester by email from the host app's authenticated user
292
307
  */
293
308
  getTesterInfo(): Promise<TesterInfo | null>;
309
+ /**
310
+ * Update tester profile
311
+ * Allows testers to update their name, additional emails, avatar, and platforms
312
+ */
313
+ updateTesterProfile(updates: TesterProfileUpdate): Promise<{
314
+ success: boolean;
315
+ error?: string;
316
+ }>;
294
317
  /**
295
318
  * Check if current user is a tester for this project
296
319
  */
@@ -444,4 +467,4 @@ declare function captureError(error: Error, errorInfo?: {
444
467
  componentStack?: string;
445
468
  };
446
469
 
447
- export { type AppContext, BugBearClient, type BugBearConfig, type BugBearReport, type BugBearTheme, type ChecklistResult, type ConsoleLogEntry, type DeviceInfo, type EnhancedBugContext, type HostUserInfo, type MessageSenderType, type NetworkRequest, type QATrack, type ReportStatus, type ReportType, type RubricMode, type RubricResult, type Severity, type TestAssignment, type TestResult, type TestStep, type TestTemplate, type TesterInfo, type TesterMessage, type TesterThread, type ThreadPriority, type ThreadType, captureError, contextCapture, createBugBear };
470
+ export { type AppContext, BugBearClient, type BugBearConfig, type BugBearReport, type BugBearTheme, type ChecklistResult, type ConsoleLogEntry, type DeviceInfo, type EnhancedBugContext, type HostUserInfo, type MessageSenderType, type NetworkRequest, type QATrack, type ReportStatus, type ReportType, type RubricMode, type RubricResult, type Severity, type TestAssignment, type TestResult, type TestStep, type TestTemplate, type TesterInfo, type TesterMessage, type TesterProfileUpdate, type TesterThread, type ThreadPriority, type ThreadType, captureError, contextCapture, createBugBear };
package/dist/index.js CHANGED
@@ -203,6 +203,9 @@ var BugBearClient = class {
203
203
  id: data.id,
204
204
  name: data.name,
205
205
  email: data.email,
206
+ additionalEmails: data.additional_emails || [],
207
+ avatarUrl: data.avatar_url || void 0,
208
+ platforms: data.platforms || [],
206
209
  assignedTests: data.assigned_count || 0,
207
210
  completedTests: data.completed_count || 0
208
211
  };
@@ -211,6 +214,32 @@ var BugBearClient = class {
211
214
  return null;
212
215
  }
213
216
  }
217
+ /**
218
+ * Update tester profile
219
+ * Allows testers to update their name, additional emails, avatar, and platforms
220
+ */
221
+ async updateTesterProfile(updates) {
222
+ try {
223
+ const userInfo = await this.getCurrentUserInfo();
224
+ if (!userInfo) {
225
+ return { success: false, error: "Not authenticated" };
226
+ }
227
+ const updateData = {};
228
+ if (updates.name !== void 0) updateData.name = updates.name;
229
+ if (updates.additionalEmails !== void 0) updateData.additional_emails = updates.additionalEmails;
230
+ if (updates.avatarUrl !== void 0) updateData.avatar_url = updates.avatarUrl;
231
+ if (updates.platforms !== void 0) updateData.platforms = updates.platforms;
232
+ const { error } = await this.supabase.from("testers").update(updateData).eq("project_id", this.config.projectId).eq("email", userInfo.email);
233
+ if (error) {
234
+ console.error("BugBear: updateTesterProfile error", error);
235
+ return { success: false, error: error.message };
236
+ }
237
+ return { success: true };
238
+ } catch (err) {
239
+ console.error("BugBear: updateTesterProfile error", err);
240
+ return { success: false, error: "Failed to update profile" };
241
+ }
242
+ }
214
243
  /**
215
244
  * Check if current user is a tester for this project
216
245
  */
package/dist/index.mjs CHANGED
@@ -174,6 +174,9 @@ var BugBearClient = class {
174
174
  id: data.id,
175
175
  name: data.name,
176
176
  email: data.email,
177
+ additionalEmails: data.additional_emails || [],
178
+ avatarUrl: data.avatar_url || void 0,
179
+ platforms: data.platforms || [],
177
180
  assignedTests: data.assigned_count || 0,
178
181
  completedTests: data.completed_count || 0
179
182
  };
@@ -182,6 +185,32 @@ var BugBearClient = class {
182
185
  return null;
183
186
  }
184
187
  }
188
+ /**
189
+ * Update tester profile
190
+ * Allows testers to update their name, additional emails, avatar, and platforms
191
+ */
192
+ async updateTesterProfile(updates) {
193
+ try {
194
+ const userInfo = await this.getCurrentUserInfo();
195
+ if (!userInfo) {
196
+ return { success: false, error: "Not authenticated" };
197
+ }
198
+ const updateData = {};
199
+ if (updates.name !== void 0) updateData.name = updates.name;
200
+ if (updates.additionalEmails !== void 0) updateData.additional_emails = updates.additionalEmails;
201
+ if (updates.avatarUrl !== void 0) updateData.avatar_url = updates.avatarUrl;
202
+ if (updates.platforms !== void 0) updateData.platforms = updates.platforms;
203
+ const { error } = await this.supabase.from("testers").update(updateData).eq("project_id", this.config.projectId).eq("email", userInfo.email);
204
+ if (error) {
205
+ console.error("BugBear: updateTesterProfile error", error);
206
+ return { success: false, error: error.message };
207
+ }
208
+ return { success: true };
209
+ } catch (err) {
210
+ console.error("BugBear: updateTesterProfile error", err);
211
+ return { success: false, error: "Failed to update profile" };
212
+ }
213
+ }
185
214
  /**
186
215
  * Check if current user is a tester for this project
187
216
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbearai/core",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Core utilities and types for BugBear QA platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",