@bbearai/core 0.1.4 → 0.1.5

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.js CHANGED
@@ -479,8 +479,7 @@ var BugBearClient = class {
479
479
  const { error } = await this.supabase.from("discussion_messages").insert({
480
480
  thread_id: threadId,
481
481
  sender_type: "tester",
482
- sender_id: testerInfo.id,
483
- sender_name: testerInfo.name,
482
+ sender_tester_id: testerInfo.id,
484
483
  content
485
484
  });
486
485
  if (error) {
@@ -541,11 +540,13 @@ var BugBearClient = class {
541
540
  subject: options.subject,
542
541
  thread_type: options.threadType || "direct",
543
542
  priority: "normal",
544
- audience: "selected",
545
- // Tester-initiated threads go to admins
543
+ audience: "individual",
544
+ // Tester-initiated thread visible to this tester
546
545
  audience_tester_ids: [testerInfo.id],
547
546
  // Include the tester so they can see it
548
- created_by_tester_id: testerInfo.id,
547
+ created_by_admin: false,
548
+ // Created by tester, not admin
549
+ created_by_id: testerInfo.id,
549
550
  last_message_at: (/* @__PURE__ */ new Date()).toISOString()
550
551
  }).select("id").single();
551
552
  if (threadError) {
@@ -555,8 +556,7 @@ var BugBearClient = class {
555
556
  const { error: messageError } = await this.supabase.from("discussion_messages").insert({
556
557
  thread_id: thread.id,
557
558
  sender_type: "tester",
558
- sender_id: testerInfo.id,
559
- sender_name: testerInfo.name,
559
+ sender_tester_id: testerInfo.id,
560
560
  content: options.message
561
561
  });
562
562
  if (messageError) {
package/dist/index.mjs CHANGED
@@ -450,8 +450,7 @@ var BugBearClient = class {
450
450
  const { error } = await this.supabase.from("discussion_messages").insert({
451
451
  thread_id: threadId,
452
452
  sender_type: "tester",
453
- sender_id: testerInfo.id,
454
- sender_name: testerInfo.name,
453
+ sender_tester_id: testerInfo.id,
455
454
  content
456
455
  });
457
456
  if (error) {
@@ -512,11 +511,13 @@ var BugBearClient = class {
512
511
  subject: options.subject,
513
512
  thread_type: options.threadType || "direct",
514
513
  priority: "normal",
515
- audience: "selected",
516
- // Tester-initiated threads go to admins
514
+ audience: "individual",
515
+ // Tester-initiated thread visible to this tester
517
516
  audience_tester_ids: [testerInfo.id],
518
517
  // Include the tester so they can see it
519
- created_by_tester_id: testerInfo.id,
518
+ created_by_admin: false,
519
+ // Created by tester, not admin
520
+ created_by_id: testerInfo.id,
520
521
  last_message_at: (/* @__PURE__ */ new Date()).toISOString()
521
522
  }).select("id").single();
522
523
  if (threadError) {
@@ -526,8 +527,7 @@ var BugBearClient = class {
526
527
  const { error: messageError } = await this.supabase.from("discussion_messages").insert({
527
528
  thread_id: thread.id,
528
529
  sender_type: "tester",
529
- sender_id: testerInfo.id,
530
- sender_name: testerInfo.name,
530
+ sender_tester_id: testerInfo.id,
531
531
  content: options.message
532
532
  });
533
533
  if (messageError) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbearai/core",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Core utilities and types for BugBear QA platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",