@bbearai/core 0.2.1 → 0.2.3

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
@@ -161,6 +161,15 @@ interface BugBearTheme {
161
161
  }
162
162
  type TestTemplate = 'steps' | 'checklist' | 'rubric' | 'freeform';
163
163
  type RubricMode = 'pass_fail' | 'rating';
164
+ /** Skip reason for skipped test assignments */
165
+ type SkipReason = 'blocked' | 'not_ready' | 'dependency' | 'other';
166
+ /** Test group (folder) for organizing test cases */
167
+ interface TestGroup {
168
+ id: string;
169
+ name: string;
170
+ description?: string;
171
+ sortOrder: number;
172
+ }
164
173
  interface QATrack {
165
174
  id: string;
166
175
  name: string;
@@ -184,12 +193,20 @@ interface TestAssignment {
184
193
  /** Route/screen to navigate to when starting this test */
185
194
  targetRoute?: string;
186
195
  track?: QATrack;
196
+ /** Test group (folder) this test belongs to */
197
+ group?: TestGroup;
187
198
  };
188
- status: 'pending' | 'in_progress' | 'passed' | 'failed' | 'blocked';
199
+ status: 'pending' | 'in_progress' | 'passed' | 'failed' | 'blocked' | 'skipped';
200
+ /** Reason for skipping (when status is 'skipped') */
201
+ skipReason?: SkipReason;
189
202
  /** When the assignment was started (set to in_progress) */
190
203
  startedAt?: string;
191
204
  /** Duration in seconds (calculated when completed) */
192
205
  durationSeconds?: number;
206
+ /** Whether this is a verification assignment for a fixed bug */
207
+ isVerification?: boolean;
208
+ /** Original report ID if this is a verification assignment */
209
+ originalReportId?: string;
193
210
  }
194
211
  interface TestStep {
195
212
  stepNumber: number;
@@ -624,6 +641,14 @@ declare class BugBearClient {
624
641
  error?: string;
625
642
  durationSeconds?: number;
626
643
  }>;
644
+ /**
645
+ * Skip a test assignment with a required reason
646
+ * Marks the assignment as 'skipped' and records why it was skipped
647
+ */
648
+ skipAssignment(assignmentId: string, reason: SkipReason, notes?: string): Promise<{
649
+ success: boolean;
650
+ error?: string;
651
+ }>;
627
652
  /**
628
653
  * Submit feedback on a test case to help improve test quality
629
654
  * This empowers testers to shape better tests over time
@@ -888,4 +913,4 @@ declare function captureError(error: Error, errorInfo?: {
888
913
  componentStack?: string;
889
914
  };
890
915
 
891
- export { type AddFindingOptions, type AppContext, BugBearClient, type BugBearConfig, type BugBearReport, type BugBearTheme, type ChecklistItem, type ChecklistResult, type ConsoleLogEntry, type CoverageGap, type CoverageMatrixCell, type CoverageMatrixRow, type DeployChecklist, type DeviceInfo, type EndSessionOptions, type EnhancedBugContext, type FindingSeverity, type FindingType, type HostUserInfo, type MessageSenderType, type NetworkRequest, type PriorityFactors, type QAFinding, type QAHealthMetrics, type QAHealthScore, type QASession, type QASessionStatus, type QATrack, type RegressionEvent, type ReportStatus, type ReportType, type RoutePriority, type RouteTestStats, type RubricMode, type RubricResult, type Severity, type StartSessionOptions, type SubmitFeedbackOptions, type TestAssignment, type TestFeedback, type TestResult, type TestStep, type TestTemplate, type TesterInfo, type TesterMessage, type TesterProfileUpdate, type TesterThread, type ThreadPriority, type ThreadType, captureError, contextCapture, createBugBear };
916
+ export { type AddFindingOptions, type AppContext, BugBearClient, type BugBearConfig, type BugBearReport, type BugBearTheme, type ChecklistItem, type ChecklistResult, type ConsoleLogEntry, type CoverageGap, type CoverageMatrixCell, type CoverageMatrixRow, type DeployChecklist, type DeviceInfo, type EndSessionOptions, type EnhancedBugContext, type FindingSeverity, type FindingType, type HostUserInfo, type MessageSenderType, type NetworkRequest, type PriorityFactors, type QAFinding, type QAHealthMetrics, type QAHealthScore, type QASession, type QASessionStatus, type QATrack, type RegressionEvent, type ReportStatus, type ReportType, type RoutePriority, type RouteTestStats, type RubricMode, type RubricResult, type Severity, type SkipReason, type StartSessionOptions, type SubmitFeedbackOptions, type TestAssignment, type TestFeedback, type TestGroup, 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
@@ -161,6 +161,15 @@ interface BugBearTheme {
161
161
  }
162
162
  type TestTemplate = 'steps' | 'checklist' | 'rubric' | 'freeform';
163
163
  type RubricMode = 'pass_fail' | 'rating';
164
+ /** Skip reason for skipped test assignments */
165
+ type SkipReason = 'blocked' | 'not_ready' | 'dependency' | 'other';
166
+ /** Test group (folder) for organizing test cases */
167
+ interface TestGroup {
168
+ id: string;
169
+ name: string;
170
+ description?: string;
171
+ sortOrder: number;
172
+ }
164
173
  interface QATrack {
165
174
  id: string;
166
175
  name: string;
@@ -184,12 +193,20 @@ interface TestAssignment {
184
193
  /** Route/screen to navigate to when starting this test */
185
194
  targetRoute?: string;
186
195
  track?: QATrack;
196
+ /** Test group (folder) this test belongs to */
197
+ group?: TestGroup;
187
198
  };
188
- status: 'pending' | 'in_progress' | 'passed' | 'failed' | 'blocked';
199
+ status: 'pending' | 'in_progress' | 'passed' | 'failed' | 'blocked' | 'skipped';
200
+ /** Reason for skipping (when status is 'skipped') */
201
+ skipReason?: SkipReason;
189
202
  /** When the assignment was started (set to in_progress) */
190
203
  startedAt?: string;
191
204
  /** Duration in seconds (calculated when completed) */
192
205
  durationSeconds?: number;
206
+ /** Whether this is a verification assignment for a fixed bug */
207
+ isVerification?: boolean;
208
+ /** Original report ID if this is a verification assignment */
209
+ originalReportId?: string;
193
210
  }
194
211
  interface TestStep {
195
212
  stepNumber: number;
@@ -624,6 +641,14 @@ declare class BugBearClient {
624
641
  error?: string;
625
642
  durationSeconds?: number;
626
643
  }>;
644
+ /**
645
+ * Skip a test assignment with a required reason
646
+ * Marks the assignment as 'skipped' and records why it was skipped
647
+ */
648
+ skipAssignment(assignmentId: string, reason: SkipReason, notes?: string): Promise<{
649
+ success: boolean;
650
+ error?: string;
651
+ }>;
627
652
  /**
628
653
  * Submit feedback on a test case to help improve test quality
629
654
  * This empowers testers to shape better tests over time
@@ -888,4 +913,4 @@ declare function captureError(error: Error, errorInfo?: {
888
913
  componentStack?: string;
889
914
  };
890
915
 
891
- export { type AddFindingOptions, type AppContext, BugBearClient, type BugBearConfig, type BugBearReport, type BugBearTheme, type ChecklistItem, type ChecklistResult, type ConsoleLogEntry, type CoverageGap, type CoverageMatrixCell, type CoverageMatrixRow, type DeployChecklist, type DeviceInfo, type EndSessionOptions, type EnhancedBugContext, type FindingSeverity, type FindingType, type HostUserInfo, type MessageSenderType, type NetworkRequest, type PriorityFactors, type QAFinding, type QAHealthMetrics, type QAHealthScore, type QASession, type QASessionStatus, type QATrack, type RegressionEvent, type ReportStatus, type ReportType, type RoutePriority, type RouteTestStats, type RubricMode, type RubricResult, type Severity, type StartSessionOptions, type SubmitFeedbackOptions, type TestAssignment, type TestFeedback, type TestResult, type TestStep, type TestTemplate, type TesterInfo, type TesterMessage, type TesterProfileUpdate, type TesterThread, type ThreadPriority, type ThreadType, captureError, contextCapture, createBugBear };
916
+ export { type AddFindingOptions, type AppContext, BugBearClient, type BugBearConfig, type BugBearReport, type BugBearTheme, type ChecklistItem, type ChecklistResult, type ConsoleLogEntry, type CoverageGap, type CoverageMatrixCell, type CoverageMatrixRow, type DeployChecklist, type DeviceInfo, type EndSessionOptions, type EnhancedBugContext, type FindingSeverity, type FindingType, type HostUserInfo, type MessageSenderType, type NetworkRequest, type PriorityFactors, type QAFinding, type QAHealthMetrics, type QAHealthScore, type QASession, type QASessionStatus, type QATrack, type RegressionEvent, type ReportStatus, type ReportType, type RoutePriority, type RouteTestStats, type RubricMode, type RubricResult, type Severity, type SkipReason, type StartSessionOptions, type SubmitFeedbackOptions, type TestAssignment, type TestFeedback, type TestGroup, 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
@@ -147,6 +147,9 @@ var BugBearClient = class {
147
147
  id,
148
148
  status,
149
149
  started_at,
150
+ skip_reason,
151
+ is_verification,
152
+ original_report_id,
150
153
  test_case:test_cases(
151
154
  id,
152
155
  title,
@@ -164,6 +167,12 @@ var BugBearClient = class {
164
167
  test_template,
165
168
  rubric_mode,
166
169
  description
170
+ ),
171
+ group:test_groups(
172
+ id,
173
+ name,
174
+ description,
175
+ sort_order
167
176
  )
168
177
  )
169
178
  `).eq("project_id", this.config.projectId).eq("tester_id", testerInfo.id).in("status", ["pending", "in_progress"]).order("created_at", { ascending: true });
@@ -175,6 +184,9 @@ var BugBearClient = class {
175
184
  id: item.id,
176
185
  status: item.status,
177
186
  startedAt: item.started_at,
187
+ skipReason: item.skip_reason,
188
+ isVerification: item.is_verification || false,
189
+ originalReportId: item.original_report_id,
178
190
  testCase: {
179
191
  id: item.test_case.id,
180
192
  title: item.test_case.title,
@@ -192,6 +204,12 @@ var BugBearClient = class {
192
204
  testTemplate: item.test_case.track.test_template,
193
205
  rubricMode: item.test_case.track.rubric_mode || "pass_fail",
194
206
  description: item.test_case.track.description
207
+ } : void 0,
208
+ group: item.test_case.group ? {
209
+ id: item.test_case.group.id,
210
+ name: item.test_case.group.name,
211
+ description: item.test_case.group.description,
212
+ sortOrder: item.test_case.group.sort_order
195
213
  } : void 0
196
214
  }
197
215
  }));
@@ -328,6 +346,32 @@ var BugBearClient = class {
328
346
  return { success: false, error: message };
329
347
  }
330
348
  }
349
+ /**
350
+ * Skip a test assignment with a required reason
351
+ * Marks the assignment as 'skipped' and records why it was skipped
352
+ */
353
+ async skipAssignment(assignmentId, reason, notes) {
354
+ try {
355
+ const updateData = {
356
+ status: "skipped",
357
+ skip_reason: reason,
358
+ completed_at: (/* @__PURE__ */ new Date()).toISOString()
359
+ };
360
+ if (notes) {
361
+ updateData.notes = notes;
362
+ }
363
+ const { error } = await this.supabase.from("test_assignments").update(updateData).eq("id", assignmentId);
364
+ if (error) {
365
+ console.error("BugBear: Failed to skip assignment", error);
366
+ return { success: false, error: error.message };
367
+ }
368
+ return { success: true };
369
+ } catch (err) {
370
+ const message = err instanceof Error ? err.message : "Unknown error";
371
+ console.error("BugBear: Error skipping assignment", err);
372
+ return { success: false, error: message };
373
+ }
374
+ }
331
375
  /**
332
376
  * Submit feedback on a test case to help improve test quality
333
377
  * This empowers testers to shape better tests over time
package/dist/index.mjs CHANGED
@@ -118,6 +118,9 @@ var BugBearClient = class {
118
118
  id,
119
119
  status,
120
120
  started_at,
121
+ skip_reason,
122
+ is_verification,
123
+ original_report_id,
121
124
  test_case:test_cases(
122
125
  id,
123
126
  title,
@@ -135,6 +138,12 @@ var BugBearClient = class {
135
138
  test_template,
136
139
  rubric_mode,
137
140
  description
141
+ ),
142
+ group:test_groups(
143
+ id,
144
+ name,
145
+ description,
146
+ sort_order
138
147
  )
139
148
  )
140
149
  `).eq("project_id", this.config.projectId).eq("tester_id", testerInfo.id).in("status", ["pending", "in_progress"]).order("created_at", { ascending: true });
@@ -146,6 +155,9 @@ var BugBearClient = class {
146
155
  id: item.id,
147
156
  status: item.status,
148
157
  startedAt: item.started_at,
158
+ skipReason: item.skip_reason,
159
+ isVerification: item.is_verification || false,
160
+ originalReportId: item.original_report_id,
149
161
  testCase: {
150
162
  id: item.test_case.id,
151
163
  title: item.test_case.title,
@@ -163,6 +175,12 @@ var BugBearClient = class {
163
175
  testTemplate: item.test_case.track.test_template,
164
176
  rubricMode: item.test_case.track.rubric_mode || "pass_fail",
165
177
  description: item.test_case.track.description
178
+ } : void 0,
179
+ group: item.test_case.group ? {
180
+ id: item.test_case.group.id,
181
+ name: item.test_case.group.name,
182
+ description: item.test_case.group.description,
183
+ sortOrder: item.test_case.group.sort_order
166
184
  } : void 0
167
185
  }
168
186
  }));
@@ -299,6 +317,32 @@ var BugBearClient = class {
299
317
  return { success: false, error: message };
300
318
  }
301
319
  }
320
+ /**
321
+ * Skip a test assignment with a required reason
322
+ * Marks the assignment as 'skipped' and records why it was skipped
323
+ */
324
+ async skipAssignment(assignmentId, reason, notes) {
325
+ try {
326
+ const updateData = {
327
+ status: "skipped",
328
+ skip_reason: reason,
329
+ completed_at: (/* @__PURE__ */ new Date()).toISOString()
330
+ };
331
+ if (notes) {
332
+ updateData.notes = notes;
333
+ }
334
+ const { error } = await this.supabase.from("test_assignments").update(updateData).eq("id", assignmentId);
335
+ if (error) {
336
+ console.error("BugBear: Failed to skip assignment", error);
337
+ return { success: false, error: error.message };
338
+ }
339
+ return { success: true };
340
+ } catch (err) {
341
+ const message = err instanceof Error ? err.message : "Unknown error";
342
+ console.error("BugBear: Error skipping assignment", err);
343
+ return { success: false, error: message };
344
+ }
345
+ }
302
346
  /**
303
347
  * Submit feedback on a test case to help improve test quality
304
348
  * This empowers testers to shape better tests over time
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbearai/core",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Core utilities and types for BugBear QA platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",