@bbearai/core 0.8.1 → 0.9.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 +35 -1
- package/dist/index.d.ts +35 -1
- package/dist/index.js +44 -1
- package/dist/index.mjs +44 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -692,6 +692,10 @@ interface QASession {
|
|
|
692
692
|
track?: string;
|
|
693
693
|
/** Platform being tested */
|
|
694
694
|
platform?: string;
|
|
695
|
+
/** Session type: exploratory or ad_hoc */
|
|
696
|
+
sessionType: QASessionType;
|
|
697
|
+
/** Linked task ID (ad hoc sessions) */
|
|
698
|
+
taskId?: string;
|
|
695
699
|
/** Timing */
|
|
696
700
|
startedAt: string;
|
|
697
701
|
endedAt?: string;
|
|
@@ -737,11 +741,17 @@ interface QAFinding {
|
|
|
737
741
|
createdAt: string;
|
|
738
742
|
updatedAt: string;
|
|
739
743
|
}
|
|
744
|
+
/** Session type */
|
|
745
|
+
type QASessionType = 'exploratory' | 'ad_hoc';
|
|
740
746
|
/** Options for starting a QA session */
|
|
741
747
|
interface StartSessionOptions {
|
|
742
748
|
focusArea?: string;
|
|
743
749
|
track?: string;
|
|
744
750
|
platform?: string;
|
|
751
|
+
/** Session type: exploratory (default) or ad_hoc */
|
|
752
|
+
sessionType?: QASessionType;
|
|
753
|
+
/** Link to a qa_task (ad hoc mode) */
|
|
754
|
+
taskId?: string;
|
|
745
755
|
}
|
|
746
756
|
/** Options for ending a QA session */
|
|
747
757
|
interface EndSessionOptions {
|
|
@@ -761,6 +771,22 @@ interface AddFindingOptions {
|
|
|
761
771
|
deviceInfo?: DeviceInfo;
|
|
762
772
|
appContext?: AppContext;
|
|
763
773
|
}
|
|
774
|
+
/** QA Task priority */
|
|
775
|
+
type QATaskPriority = 'high' | 'normal' | 'low';
|
|
776
|
+
/** QA Task status */
|
|
777
|
+
type QATaskStatus = 'active' | 'archived';
|
|
778
|
+
/** Lightweight task prompt for ad hoc testing */
|
|
779
|
+
interface QATask {
|
|
780
|
+
id: string;
|
|
781
|
+
projectId: string;
|
|
782
|
+
title: string;
|
|
783
|
+
description?: string;
|
|
784
|
+
trackId?: string;
|
|
785
|
+
priority: QATaskPriority;
|
|
786
|
+
status: QATaskStatus;
|
|
787
|
+
createdAt: string;
|
|
788
|
+
updatedAt: string;
|
|
789
|
+
}
|
|
764
790
|
/** Category for filtering tester issues in the widget */
|
|
765
791
|
type IssueCategory = 'open' | 'done' | 'reopened';
|
|
766
792
|
/** Issue counts for each category (HomeScreen cards) */
|
|
@@ -1570,6 +1596,14 @@ declare class BugBearClient {
|
|
|
1570
1596
|
success: boolean;
|
|
1571
1597
|
error?: string;
|
|
1572
1598
|
}>;
|
|
1599
|
+
/**
|
|
1600
|
+
* Get active QA tasks for the project
|
|
1601
|
+
*/
|
|
1602
|
+
getTasks(status?: string): Promise<QATask[]>;
|
|
1603
|
+
/**
|
|
1604
|
+
* Transform database task to QATask type
|
|
1605
|
+
*/
|
|
1606
|
+
private transformTask;
|
|
1573
1607
|
/**
|
|
1574
1608
|
* Transform database session to QASession type
|
|
1575
1609
|
*/
|
|
@@ -1696,4 +1730,4 @@ interface EmailInterceptor {
|
|
|
1696
1730
|
*/
|
|
1697
1731
|
declare function createEmailInterceptor(client: BugBearClient, options?: EmailInterceptorOptions): EmailInterceptor;
|
|
1698
1732
|
|
|
1699
|
-
export { type AddFindingOptions, type AppContext, BUG_CATEGORIES, BugBearClient, type BugBearConfig, type BugBearMode, type BugBearReport, type BugBearTheme, type BugCategory, type ChecklistItem, type ChecklistResult, type ConsoleLogEntry, type CoverageGap, type CoverageMatrixCell, type CoverageMatrixRow, DedupWindow, type DeployChecklist, type DeviceInfo, type EmailCaptureMode, type EmailCapturePayload, type EmailCaptureResult, type EmailDeliveryStatus, type EmailInterceptorOptions, type EmailPayloadExtractor, type EndSessionOptions, type EnhancedBugContext, ErrorMonitor, type ExtractedEmailPayload, type FindingSeverity, type FindingType, type HostUserInfo, type IssueCategory, type IssueCounts, LocalStorageAdapter, type MessageSenderType, type MonitorDeps, type MonitoringConfig, type MonitoringEvent, type NetworkRequest, OfflineQueue, type OfflineQueueConfig, type PriorityFactors, type ProjectRole, type QAFinding, type QAHealthMetrics, type QAHealthScore, type QASession, type QASessionStatus, type QATrack, type QueueItem, type QueueItemType, RNApiFailureHandler, RNCrashHandler, RNRageClickHandler, RageClickDetector, type RageClickEvent, type RegressionEvent, type ReportSource, type ReportStatus, type ReportType, type RoutePriority, type RouteTestStats, type RubricMode, type RubricResult, type Severity, type SkipReason, type StartSessionOptions, type StorageAdapter, type SubmitFeedbackOptions, type TestAssignment, type TestFeedback, type TestGroup, type TestResult, type TestStep, type TestTemplate, type TesterInfo, type TesterIssue, type TesterMessage, type TesterProfileUpdate, type TesterThread, type ThreadPriority, type ThreadType, WebApiFailureHandler, WebCrashHandler, WebRageClickHandler, type WidgetColorScheme, type WidgetConfig, captureError, contextCapture, createBugBear, createEmailInterceptor, generateFingerprint, isBugCategory, isNetworkError, scrubUrl };
|
|
1733
|
+
export { type AddFindingOptions, type AppContext, BUG_CATEGORIES, BugBearClient, type BugBearConfig, type BugBearMode, type BugBearReport, type BugBearTheme, type BugCategory, type ChecklistItem, type ChecklistResult, type ConsoleLogEntry, type CoverageGap, type CoverageMatrixCell, type CoverageMatrixRow, DedupWindow, type DeployChecklist, type DeviceInfo, type EmailCaptureMode, type EmailCapturePayload, type EmailCaptureResult, type EmailDeliveryStatus, type EmailInterceptorOptions, type EmailPayloadExtractor, type EndSessionOptions, type EnhancedBugContext, ErrorMonitor, type ExtractedEmailPayload, type FindingSeverity, type FindingType, type HostUserInfo, type IssueCategory, type IssueCounts, LocalStorageAdapter, type MessageSenderType, type MonitorDeps, type MonitoringConfig, type MonitoringEvent, type NetworkRequest, OfflineQueue, type OfflineQueueConfig, type PriorityFactors, type ProjectRole, type QAFinding, type QAHealthMetrics, type QAHealthScore, type QASession, type QASessionStatus, type QASessionType, type QATask, type QATaskPriority, type QATaskStatus, type QATrack, type QueueItem, type QueueItemType, RNApiFailureHandler, RNCrashHandler, RNRageClickHandler, RageClickDetector, type RageClickEvent, type RegressionEvent, type ReportSource, type ReportStatus, type ReportType, type RoutePriority, type RouteTestStats, type RubricMode, type RubricResult, type Severity, type SkipReason, type StartSessionOptions, type StorageAdapter, type SubmitFeedbackOptions, type TestAssignment, type TestFeedback, type TestGroup, type TestResult, type TestStep, type TestTemplate, type TesterInfo, type TesterIssue, type TesterMessage, type TesterProfileUpdate, type TesterThread, type ThreadPriority, type ThreadType, WebApiFailureHandler, WebCrashHandler, WebRageClickHandler, type WidgetColorScheme, type WidgetConfig, captureError, contextCapture, createBugBear, createEmailInterceptor, generateFingerprint, isBugCategory, isNetworkError, scrubUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -692,6 +692,10 @@ interface QASession {
|
|
|
692
692
|
track?: string;
|
|
693
693
|
/** Platform being tested */
|
|
694
694
|
platform?: string;
|
|
695
|
+
/** Session type: exploratory or ad_hoc */
|
|
696
|
+
sessionType: QASessionType;
|
|
697
|
+
/** Linked task ID (ad hoc sessions) */
|
|
698
|
+
taskId?: string;
|
|
695
699
|
/** Timing */
|
|
696
700
|
startedAt: string;
|
|
697
701
|
endedAt?: string;
|
|
@@ -737,11 +741,17 @@ interface QAFinding {
|
|
|
737
741
|
createdAt: string;
|
|
738
742
|
updatedAt: string;
|
|
739
743
|
}
|
|
744
|
+
/** Session type */
|
|
745
|
+
type QASessionType = 'exploratory' | 'ad_hoc';
|
|
740
746
|
/** Options for starting a QA session */
|
|
741
747
|
interface StartSessionOptions {
|
|
742
748
|
focusArea?: string;
|
|
743
749
|
track?: string;
|
|
744
750
|
platform?: string;
|
|
751
|
+
/** Session type: exploratory (default) or ad_hoc */
|
|
752
|
+
sessionType?: QASessionType;
|
|
753
|
+
/** Link to a qa_task (ad hoc mode) */
|
|
754
|
+
taskId?: string;
|
|
745
755
|
}
|
|
746
756
|
/** Options for ending a QA session */
|
|
747
757
|
interface EndSessionOptions {
|
|
@@ -761,6 +771,22 @@ interface AddFindingOptions {
|
|
|
761
771
|
deviceInfo?: DeviceInfo;
|
|
762
772
|
appContext?: AppContext;
|
|
763
773
|
}
|
|
774
|
+
/** QA Task priority */
|
|
775
|
+
type QATaskPriority = 'high' | 'normal' | 'low';
|
|
776
|
+
/** QA Task status */
|
|
777
|
+
type QATaskStatus = 'active' | 'archived';
|
|
778
|
+
/** Lightweight task prompt for ad hoc testing */
|
|
779
|
+
interface QATask {
|
|
780
|
+
id: string;
|
|
781
|
+
projectId: string;
|
|
782
|
+
title: string;
|
|
783
|
+
description?: string;
|
|
784
|
+
trackId?: string;
|
|
785
|
+
priority: QATaskPriority;
|
|
786
|
+
status: QATaskStatus;
|
|
787
|
+
createdAt: string;
|
|
788
|
+
updatedAt: string;
|
|
789
|
+
}
|
|
764
790
|
/** Category for filtering tester issues in the widget */
|
|
765
791
|
type IssueCategory = 'open' | 'done' | 'reopened';
|
|
766
792
|
/** Issue counts for each category (HomeScreen cards) */
|
|
@@ -1570,6 +1596,14 @@ declare class BugBearClient {
|
|
|
1570
1596
|
success: boolean;
|
|
1571
1597
|
error?: string;
|
|
1572
1598
|
}>;
|
|
1599
|
+
/**
|
|
1600
|
+
* Get active QA tasks for the project
|
|
1601
|
+
*/
|
|
1602
|
+
getTasks(status?: string): Promise<QATask[]>;
|
|
1603
|
+
/**
|
|
1604
|
+
* Transform database task to QATask type
|
|
1605
|
+
*/
|
|
1606
|
+
private transformTask;
|
|
1573
1607
|
/**
|
|
1574
1608
|
* Transform database session to QASession type
|
|
1575
1609
|
*/
|
|
@@ -1696,4 +1730,4 @@ interface EmailInterceptor {
|
|
|
1696
1730
|
*/
|
|
1697
1731
|
declare function createEmailInterceptor(client: BugBearClient, options?: EmailInterceptorOptions): EmailInterceptor;
|
|
1698
1732
|
|
|
1699
|
-
export { type AddFindingOptions, type AppContext, BUG_CATEGORIES, BugBearClient, type BugBearConfig, type BugBearMode, type BugBearReport, type BugBearTheme, type BugCategory, type ChecklistItem, type ChecklistResult, type ConsoleLogEntry, type CoverageGap, type CoverageMatrixCell, type CoverageMatrixRow, DedupWindow, type DeployChecklist, type DeviceInfo, type EmailCaptureMode, type EmailCapturePayload, type EmailCaptureResult, type EmailDeliveryStatus, type EmailInterceptorOptions, type EmailPayloadExtractor, type EndSessionOptions, type EnhancedBugContext, ErrorMonitor, type ExtractedEmailPayload, type FindingSeverity, type FindingType, type HostUserInfo, type IssueCategory, type IssueCounts, LocalStorageAdapter, type MessageSenderType, type MonitorDeps, type MonitoringConfig, type MonitoringEvent, type NetworkRequest, OfflineQueue, type OfflineQueueConfig, type PriorityFactors, type ProjectRole, type QAFinding, type QAHealthMetrics, type QAHealthScore, type QASession, type QASessionStatus, type QATrack, type QueueItem, type QueueItemType, RNApiFailureHandler, RNCrashHandler, RNRageClickHandler, RageClickDetector, type RageClickEvent, type RegressionEvent, type ReportSource, type ReportStatus, type ReportType, type RoutePriority, type RouteTestStats, type RubricMode, type RubricResult, type Severity, type SkipReason, type StartSessionOptions, type StorageAdapter, type SubmitFeedbackOptions, type TestAssignment, type TestFeedback, type TestGroup, type TestResult, type TestStep, type TestTemplate, type TesterInfo, type TesterIssue, type TesterMessage, type TesterProfileUpdate, type TesterThread, type ThreadPriority, type ThreadType, WebApiFailureHandler, WebCrashHandler, WebRageClickHandler, type WidgetColorScheme, type WidgetConfig, captureError, contextCapture, createBugBear, createEmailInterceptor, generateFingerprint, isBugCategory, isNetworkError, scrubUrl };
|
|
1733
|
+
export { type AddFindingOptions, type AppContext, BUG_CATEGORIES, BugBearClient, type BugBearConfig, type BugBearMode, type BugBearReport, type BugBearTheme, type BugCategory, type ChecklistItem, type ChecklistResult, type ConsoleLogEntry, type CoverageGap, type CoverageMatrixCell, type CoverageMatrixRow, DedupWindow, type DeployChecklist, type DeviceInfo, type EmailCaptureMode, type EmailCapturePayload, type EmailCaptureResult, type EmailDeliveryStatus, type EmailInterceptorOptions, type EmailPayloadExtractor, type EndSessionOptions, type EnhancedBugContext, ErrorMonitor, type ExtractedEmailPayload, type FindingSeverity, type FindingType, type HostUserInfo, type IssueCategory, type IssueCounts, LocalStorageAdapter, type MessageSenderType, type MonitorDeps, type MonitoringConfig, type MonitoringEvent, type NetworkRequest, OfflineQueue, type OfflineQueueConfig, type PriorityFactors, type ProjectRole, type QAFinding, type QAHealthMetrics, type QAHealthScore, type QASession, type QASessionStatus, type QASessionType, type QATask, type QATaskPriority, type QATaskStatus, type QATrack, type QueueItem, type QueueItemType, RNApiFailureHandler, RNCrashHandler, RNRageClickHandler, RageClickDetector, type RageClickEvent, type RegressionEvent, type ReportSource, type ReportStatus, type ReportType, type RoutePriority, type RouteTestStats, type RubricMode, type RubricResult, type Severity, type SkipReason, type StartSessionOptions, type StorageAdapter, type SubmitFeedbackOptions, type TestAssignment, type TestFeedback, type TestGroup, type TestResult, type TestStep, type TestTemplate, type TesterInfo, type TesterIssue, type TesterMessage, type TesterProfileUpdate, type TesterThread, type ThreadPriority, type ThreadType, WebApiFailureHandler, WebCrashHandler, WebRageClickHandler, type WidgetColorScheme, type WidgetConfig, captureError, contextCapture, createBugBear, createEmailInterceptor, generateFingerprint, isBugCategory, isNetworkError, scrubUrl };
|
package/dist/index.js
CHANGED
|
@@ -2800,7 +2800,9 @@ var BugBearClient = class {
|
|
|
2800
2800
|
p_tester_id: testerInfo.id,
|
|
2801
2801
|
p_focus_area: options.focusArea || null,
|
|
2802
2802
|
p_track: options.track || null,
|
|
2803
|
-
p_platform: options.platform || null
|
|
2803
|
+
p_platform: options.platform || null,
|
|
2804
|
+
p_session_type: options.sessionType || "exploratory",
|
|
2805
|
+
p_task_id: options.taskId || null
|
|
2804
2806
|
});
|
|
2805
2807
|
if (error) {
|
|
2806
2808
|
console.error("BugBear: Failed to start session", formatPgError(error));
|
|
@@ -2984,6 +2986,45 @@ var BugBearClient = class {
|
|
|
2984
2986
|
return { success: false, error: message };
|
|
2985
2987
|
}
|
|
2986
2988
|
}
|
|
2989
|
+
// ============================================
|
|
2990
|
+
// QA Tasks (Ad Hoc Testing)
|
|
2991
|
+
// ============================================
|
|
2992
|
+
/**
|
|
2993
|
+
* Get active QA tasks for the project
|
|
2994
|
+
*/
|
|
2995
|
+
async getTasks(status = "active") {
|
|
2996
|
+
try {
|
|
2997
|
+
await this.ensureReady();
|
|
2998
|
+
const { data, error } = await this.supabase.rpc("list_qa_tasks", {
|
|
2999
|
+
p_project_id: this.config.projectId,
|
|
3000
|
+
p_status: status
|
|
3001
|
+
});
|
|
3002
|
+
if (error) {
|
|
3003
|
+
console.error("BugBear: Failed to fetch tasks", formatPgError(error));
|
|
3004
|
+
return [];
|
|
3005
|
+
}
|
|
3006
|
+
return (data || []).map((t) => this.transformTask(t));
|
|
3007
|
+
} catch (err) {
|
|
3008
|
+
console.error("BugBear: Error fetching tasks", err);
|
|
3009
|
+
return [];
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
3012
|
+
/**
|
|
3013
|
+
* Transform database task to QATask type
|
|
3014
|
+
*/
|
|
3015
|
+
transformTask(data) {
|
|
3016
|
+
return {
|
|
3017
|
+
id: data.id,
|
|
3018
|
+
projectId: data.project_id,
|
|
3019
|
+
title: data.title,
|
|
3020
|
+
description: data.description || void 0,
|
|
3021
|
+
trackId: data.track_id || void 0,
|
|
3022
|
+
priority: data.priority,
|
|
3023
|
+
status: data.status,
|
|
3024
|
+
createdAt: data.created_at,
|
|
3025
|
+
updatedAt: data.updated_at
|
|
3026
|
+
};
|
|
3027
|
+
}
|
|
2987
3028
|
/**
|
|
2988
3029
|
* Transform database session to QASession type
|
|
2989
3030
|
*/
|
|
@@ -2995,6 +3036,8 @@ var BugBearClient = class {
|
|
|
2995
3036
|
focusArea: data.focus_area,
|
|
2996
3037
|
track: data.track,
|
|
2997
3038
|
platform: data.platform,
|
|
3039
|
+
sessionType: data.session_type || "exploratory",
|
|
3040
|
+
taskId: data.task_id || void 0,
|
|
2998
3041
|
startedAt: data.started_at,
|
|
2999
3042
|
endedAt: data.ended_at,
|
|
3000
3043
|
notes: data.notes,
|
package/dist/index.mjs
CHANGED
|
@@ -2754,7 +2754,9 @@ var BugBearClient = class {
|
|
|
2754
2754
|
p_tester_id: testerInfo.id,
|
|
2755
2755
|
p_focus_area: options.focusArea || null,
|
|
2756
2756
|
p_track: options.track || null,
|
|
2757
|
-
p_platform: options.platform || null
|
|
2757
|
+
p_platform: options.platform || null,
|
|
2758
|
+
p_session_type: options.sessionType || "exploratory",
|
|
2759
|
+
p_task_id: options.taskId || null
|
|
2758
2760
|
});
|
|
2759
2761
|
if (error) {
|
|
2760
2762
|
console.error("BugBear: Failed to start session", formatPgError(error));
|
|
@@ -2938,6 +2940,45 @@ var BugBearClient = class {
|
|
|
2938
2940
|
return { success: false, error: message };
|
|
2939
2941
|
}
|
|
2940
2942
|
}
|
|
2943
|
+
// ============================================
|
|
2944
|
+
// QA Tasks (Ad Hoc Testing)
|
|
2945
|
+
// ============================================
|
|
2946
|
+
/**
|
|
2947
|
+
* Get active QA tasks for the project
|
|
2948
|
+
*/
|
|
2949
|
+
async getTasks(status = "active") {
|
|
2950
|
+
try {
|
|
2951
|
+
await this.ensureReady();
|
|
2952
|
+
const { data, error } = await this.supabase.rpc("list_qa_tasks", {
|
|
2953
|
+
p_project_id: this.config.projectId,
|
|
2954
|
+
p_status: status
|
|
2955
|
+
});
|
|
2956
|
+
if (error) {
|
|
2957
|
+
console.error("BugBear: Failed to fetch tasks", formatPgError(error));
|
|
2958
|
+
return [];
|
|
2959
|
+
}
|
|
2960
|
+
return (data || []).map((t) => this.transformTask(t));
|
|
2961
|
+
} catch (err) {
|
|
2962
|
+
console.error("BugBear: Error fetching tasks", err);
|
|
2963
|
+
return [];
|
|
2964
|
+
}
|
|
2965
|
+
}
|
|
2966
|
+
/**
|
|
2967
|
+
* Transform database task to QATask type
|
|
2968
|
+
*/
|
|
2969
|
+
transformTask(data) {
|
|
2970
|
+
return {
|
|
2971
|
+
id: data.id,
|
|
2972
|
+
projectId: data.project_id,
|
|
2973
|
+
title: data.title,
|
|
2974
|
+
description: data.description || void 0,
|
|
2975
|
+
trackId: data.track_id || void 0,
|
|
2976
|
+
priority: data.priority,
|
|
2977
|
+
status: data.status,
|
|
2978
|
+
createdAt: data.created_at,
|
|
2979
|
+
updatedAt: data.updated_at
|
|
2980
|
+
};
|
|
2981
|
+
}
|
|
2941
2982
|
/**
|
|
2942
2983
|
* Transform database session to QASession type
|
|
2943
2984
|
*/
|
|
@@ -2949,6 +2990,8 @@ var BugBearClient = class {
|
|
|
2949
2990
|
focusArea: data.focus_area,
|
|
2950
2991
|
track: data.track,
|
|
2951
2992
|
platform: data.platform,
|
|
2993
|
+
sessionType: data.session_type || "exploratory",
|
|
2994
|
+
taskId: data.task_id || void 0,
|
|
2952
2995
|
startedAt: data.started_at,
|
|
2953
2996
|
endedAt: data.ended_at,
|
|
2954
2997
|
notes: data.notes,
|