@cstar.help/js 0.15.0 → 0.16.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.js CHANGED
@@ -165,6 +165,26 @@ var registry = globalSlot[REGISTRY_KEY] ?? (globalSlot[REGISTRY_KEY] = {
165
165
  CStarFeatureDisabledError: CStarFeatureDisabledErrorImpl,
166
166
  CStarRealtimeUnavailableError: CStarRealtimeUnavailableErrorImpl
167
167
  });
168
+ var NAME_FIXES = [
169
+ "CStarError",
170
+ "CStarAuthenticationError",
171
+ "CStarRateLimitError",
172
+ "CStarNotFoundError",
173
+ "CStarValidationError",
174
+ "CStarPermissionError",
175
+ "CStarConflictError",
176
+ "CStarServerError",
177
+ "CStarFeatureDisabledError",
178
+ "CStarRealtimeUnavailableError"
179
+ ];
180
+ for (const key of NAME_FIXES) {
181
+ if (registry[key].name !== key) {
182
+ Object.defineProperty(registry[key], "name", {
183
+ value: key,
184
+ configurable: true
185
+ });
186
+ }
187
+ }
168
188
  var CStarError = registry.CStarError;
169
189
  var CStarAuthenticationError = registry.CStarAuthenticationError;
170
190
  var CStarRateLimitError = registry.CStarRateLimitError;
@@ -217,7 +237,7 @@ function parseError(statusCode, body, retryAfter) {
217
237
  }
218
238
 
219
239
  // src/client.ts
220
- var SDK_VERSION = "0.15.0";
240
+ var SDK_VERSION = "0.15.1";
221
241
  var DEFAULT_BASE_URL = "https://www.cstar.help";
222
242
  var DEFAULT_API_VERSION = "2026-03-01";
223
243
  var DEFAULT_MAX_RETRIES = 3;
@@ -296,7 +316,8 @@ var HttpClient = class {
296
316
  let lastError = null;
297
317
  for (let attempt = 0; attempt <= this.config.maxRetries; attempt++) {
298
318
  if (attempt > 0 && lastError) {
299
- const delay = lastError instanceof CStarRateLimitError ? lastError.retryAfter * 1e3 : this.getBackoffDelay(attempt);
319
+ const RATE_LIMIT_RETRY_CAP_MS = 6e4;
320
+ const delay = lastError instanceof CStarRateLimitError ? Math.min(lastError.retryAfter * 1e3, RATE_LIMIT_RETRY_CAP_MS) : this.getBackoffDelay(attempt);
300
321
  await this.sleep(delay);
301
322
  }
302
323
  let response;
@@ -1280,10 +1301,31 @@ var InvitesResource = class {
1280
1301
  return this.client.request("DELETE", `/invites/${inviteId}`);
1281
1302
  }
1282
1303
  };
1304
+ var MemberPreferencesResource = class {
1305
+ constructor(client) {
1306
+ this.client = client;
1307
+ }
1308
+ /** Get an agent's UX preferences (boring mode, etc.). */
1309
+ async get(memberId) {
1310
+ return this.client.request(
1311
+ "GET",
1312
+ `/members/${memberId}/preferences`
1313
+ );
1314
+ }
1315
+ /** Update an agent's UX preferences. Only provided fields are written. */
1316
+ async update(memberId, params) {
1317
+ return this.client.request(
1318
+ "PATCH",
1319
+ `/members/${memberId}/preferences`,
1320
+ { body: params }
1321
+ );
1322
+ }
1323
+ };
1283
1324
  var MembersResource = class {
1284
1325
  constructor(client) {
1285
1326
  this.client = client;
1286
1327
  this.invites = new InvitesResource(client);
1328
+ this.preferences = new MemberPreferencesResource(client);
1287
1329
  }
1288
1330
  /** List all team members. */
1289
1331
  async list(params) {
@@ -2246,6 +2288,23 @@ var BillingResource = class {
2246
2288
  }
2247
2289
  };
2248
2290
 
2291
+ // src/resources/preferences.ts
2292
+ var PreferencesResource = class {
2293
+ constructor(client) {
2294
+ this.client = client;
2295
+ }
2296
+ /** Get team preferences. */
2297
+ async get() {
2298
+ return this.client.request("GET", "/preferences");
2299
+ }
2300
+ /** Update team preferences. Only provided fields are written. */
2301
+ async update(params) {
2302
+ return this.client.request("PATCH", "/preferences", {
2303
+ body: params
2304
+ });
2305
+ }
2306
+ };
2307
+
2249
2308
  // src/offline.ts
2250
2309
  var STORAGE_KEY = "cstar_offline_queue";
2251
2310
  var OfflineQueue = class {
@@ -2363,6 +2422,416 @@ var OfflineQueue = class {
2363
2422
  }
2364
2423
  };
2365
2424
 
2425
+ // src/types/generated/webhookEvents.ts
2426
+ var WEBHOOK_EVENT_SAMPLES = {
2427
+ "agent.preferences_updated": {
2428
+ "team_id": "team_01H8X9YZ7E0J3K4M5N6U",
2429
+ "member_id": "mem_01H8X9YZ7E0J3K4M5N6U",
2430
+ "agent_id": "agt_01H8X9YZ7E0J3K4M5N6U",
2431
+ "changed": [
2432
+ "boringMode"
2433
+ ],
2434
+ "preferences": {
2435
+ "boringMode": true
2436
+ }
2437
+ },
2438
+ "article.created": {
2439
+ "article": {
2440
+ "id": "art_01H8X9YZ7E0J3K4M5N6U",
2441
+ "title": "How to reset your password",
2442
+ "slug": "how-to-reset-your-password",
2443
+ "is_public": false,
2444
+ "created_at": "2026-04-27T18:42:11.000Z"
2445
+ }
2446
+ },
2447
+ "article.deleted": {
2448
+ "id": "art_01H8X9YZ7E0J3K4M5N6U"
2449
+ },
2450
+ "article.published": {
2451
+ "article": {
2452
+ "id": "art_01H8X9YZ7E0J3K4M5N6U",
2453
+ "title": "How to reset your password",
2454
+ "slug": "how-to-reset-your-password",
2455
+ "is_public": true,
2456
+ "published_at": "2026-04-27T19:00:00.000Z"
2457
+ }
2458
+ },
2459
+ "article.updated": {
2460
+ "article": {
2461
+ "id": "art_01H8X9YZ7E0J3K4M5N6U",
2462
+ "title": "How to reset your password (updated)",
2463
+ "slug": "how-to-reset-your-password",
2464
+ "is_public": true
2465
+ }
2466
+ },
2467
+ "boss.damaged": {
2468
+ "boss": {
2469
+ "id": "boss_thunder_drake",
2470
+ "current_hp": 740
2471
+ },
2472
+ "damage": 120,
2473
+ "by": {
2474
+ "agent_id": "usr_01H8X9YZ7E0J3K4M5N6S",
2475
+ "name": "Riley"
2476
+ }
2477
+ },
2478
+ "boss.defeated": {
2479
+ "boss": {
2480
+ "id": "boss_thunder_drake",
2481
+ "name": "The Thunder Drake"
2482
+ },
2483
+ "final_blow_by": {
2484
+ "agent_id": "usr_01H8X9YZ7E0J3K4M5N6S",
2485
+ "name": "Riley"
2486
+ },
2487
+ "team_xp_awarded": 1500
2488
+ },
2489
+ "boss.spawned": {
2490
+ "boss": {
2491
+ "id": "boss_thunder_drake",
2492
+ "name": "The Thunder Drake",
2493
+ "level": 4,
2494
+ "max_hp": 1200
2495
+ }
2496
+ },
2497
+ "community_post.commented": {
2498
+ "comment": {
2499
+ "id": "cmt_01H8X9YZ7E0J3K4M5N6X",
2500
+ "post_id": "post_01H8X9YZ7E0J3K4M5N6W",
2501
+ "content": "I would love this \u2014 bumping for visibility.",
2502
+ "author_id": "cus_01H8X9YZ7E0J3K4M5N6Q",
2503
+ "created_at": "2026-04-27T18:55:02.000Z"
2504
+ }
2505
+ },
2506
+ "community_post.created": {
2507
+ "post": {
2508
+ "id": "post_01H8X9YZ7E0J3K4M5N6W",
2509
+ "prefixed_id": "IDEA-42",
2510
+ "title": "Add Slack-style threading to tickets",
2511
+ "status": "open",
2512
+ "visibility": "public",
2513
+ "topic": "feature-requests",
2514
+ "created_at": "2026-04-27T18:42:11.000Z"
2515
+ }
2516
+ },
2517
+ "community_post.deleted": {
2518
+ "post": {
2519
+ "id": "post_01H8X9YZ7E0J3K4M5N6W",
2520
+ "prefixed_id": "IDEA-42",
2521
+ "title": "Add Slack-style threading to tickets"
2522
+ }
2523
+ },
2524
+ "community_post.status_changed": {
2525
+ "post": {
2526
+ "id": "post_01H8X9YZ7E0J3K4M5N6W",
2527
+ "title": "Add Slack-style threading to tickets",
2528
+ "status": "planned",
2529
+ "visibility": "public"
2530
+ }
2531
+ },
2532
+ "community_post.updated": {
2533
+ "post": {
2534
+ "id": "post_01H8X9YZ7E0J3K4M5N6W",
2535
+ "title": "Add Slack-style threading to tickets (revised)",
2536
+ "status": "open",
2537
+ "visibility": "public"
2538
+ }
2539
+ },
2540
+ "community_post.voted": {
2541
+ "post": {
2542
+ "id": "post_01H8X9YZ7E0J3K4M5N6W",
2543
+ "vote_count": 13
2544
+ },
2545
+ "voter": {
2546
+ "id": "cus_01H8X9YZ7E0J3K4M5N6Q"
2547
+ },
2548
+ "direction": "up"
2549
+ },
2550
+ "customer.created": {
2551
+ "customer": {
2552
+ "id": "cus_01H8X9YZ7E0J3K4M5N6Q",
2553
+ "name": "Casey Patel",
2554
+ "email": "casey@example.com",
2555
+ "status": "active",
2556
+ "tags": [
2557
+ "trial"
2558
+ ],
2559
+ "created_at": "2026-04-27T18:42:11.000Z"
2560
+ }
2561
+ },
2562
+ "customer.deleted": {
2563
+ "id": "cus_01H8X9YZ7E0J3K4M5N6Q"
2564
+ },
2565
+ "customer.updated": {
2566
+ "customer": {
2567
+ "id": "cus_01H8X9YZ7E0J3K4M5N6Q",
2568
+ "name": "Casey Patel",
2569
+ "email": "casey@example.com",
2570
+ "status": "active",
2571
+ "tags": [
2572
+ "trial",
2573
+ "paying"
2574
+ ]
2575
+ },
2576
+ "changes": {
2577
+ "tags": {
2578
+ "from": [
2579
+ "trial"
2580
+ ],
2581
+ "to": [
2582
+ "trial",
2583
+ "paying"
2584
+ ]
2585
+ }
2586
+ }
2587
+ },
2588
+ "customer_group.created": {
2589
+ "group": {
2590
+ "id": "grp_01H8X9YZ7E0J3K4M5N6T",
2591
+ "name": "Pro Plan",
2592
+ "color": "indigo",
2593
+ "member_count": 0
2594
+ }
2595
+ },
2596
+ "customer_group.deleted": {
2597
+ "customer_group": {
2598
+ "id": "grp_01H8X9YZ7E0J3K4M5N6T"
2599
+ }
2600
+ },
2601
+ "customer_group.updated": {
2602
+ "group": {
2603
+ "id": "grp_01H8X9YZ7E0J3K4M5N6T",
2604
+ "name": "Pro Plan (Annual)",
2605
+ "color": "indigo",
2606
+ "member_count": 38
2607
+ }
2608
+ },
2609
+ "player.achievement_unlocked": {
2610
+ "player": {
2611
+ "agent_id": "usr_01H8X9YZ7E0J3K4M5N6S",
2612
+ "name": "Riley"
2613
+ },
2614
+ "achievement": {
2615
+ "id": "first_resolve",
2616
+ "name": "First Resolve",
2617
+ "xp": 50
2618
+ }
2619
+ },
2620
+ "player.level_up": {
2621
+ "player": {
2622
+ "agent_id": "usr_01H8X9YZ7E0J3K4M5N6S",
2623
+ "name": "Riley"
2624
+ },
2625
+ "level": {
2626
+ "from": 7,
2627
+ "to": 8
2628
+ },
2629
+ "title_unlocked": "Apprentice Healer"
2630
+ },
2631
+ "player.quest_completed": {
2632
+ "player": {
2633
+ "agent_id": "usr_01H8X9YZ7E0J3K4M5N6S",
2634
+ "name": "Riley"
2635
+ },
2636
+ "quest": {
2637
+ "id": "resolve_5_tickets",
2638
+ "name": "Resolve 5 tickets today",
2639
+ "xp": 100
2640
+ }
2641
+ },
2642
+ "player.streak_milestone": {
2643
+ "player": {
2644
+ "agent_id": "usr_01H8X9YZ7E0J3K4M5N6S",
2645
+ "name": "Riley"
2646
+ },
2647
+ "streak_days": 5,
2648
+ "milestone": 5
2649
+ },
2650
+ "player.xp_gained": {
2651
+ "player": {
2652
+ "agent_id": "usr_01H8X9YZ7E0J3K4M5N6S",
2653
+ "name": "Riley"
2654
+ },
2655
+ "amount": 75,
2656
+ "reason": "ticket.resolved",
2657
+ "ticket_id": "tkt_01H8X9YZ7E0J3K4M5N6P"
2658
+ },
2659
+ "social.high_five_sent": {
2660
+ "from_team": {
2661
+ "id": "team_acme",
2662
+ "name": "Acme Support"
2663
+ },
2664
+ "to_team": {
2665
+ "id": "team_globex",
2666
+ "name": "Globex Support"
2667
+ },
2668
+ "message": "Thanks for the assist!"
2669
+ },
2670
+ "social.one_up_sent": {
2671
+ "from": {
2672
+ "agent_id": "usr_01H8X9YZ7E0J3K4M5N6S",
2673
+ "name": "Riley"
2674
+ },
2675
+ "to": {
2676
+ "agent_id": "usr_01H8X9YZ7E0J3K4M5N6V",
2677
+ "name": "Sam"
2678
+ },
2679
+ "ticket_id": "tkt_01H8X9YZ7E0J3K4M5N6P",
2680
+ "message": "Great empathy on this one"
2681
+ },
2682
+ "survey.submitted": {
2683
+ "survey": {
2684
+ "id": "svy_01H8X9YZ7E0J3K4M5N6Y",
2685
+ "ticket_id": "tkt_01H8X9YZ7E0J3K4M5N6P",
2686
+ "score": 5,
2687
+ "comment": "Resolved fast, thank you!",
2688
+ "submitted_at": "2026-04-27T19:30:00.000Z"
2689
+ },
2690
+ "customer": {
2691
+ "id": "cus_01H8X9YZ7E0J3K4M5N6Q",
2692
+ "email": "casey@example.com"
2693
+ }
2694
+ },
2695
+ "team.preferences_updated": {
2696
+ "team_id": "team_01H8X9YZ7E0J3K4M5N6U",
2697
+ "changed": [
2698
+ "bossBattlesEnabled"
2699
+ ],
2700
+ "preferences": {
2701
+ "bossBattlesEnabled": false
2702
+ }
2703
+ },
2704
+ "ticket.assigned": {
2705
+ "ticket": {
2706
+ "id": "tkt_01H8X9YZ7E0J3K4M5N6P",
2707
+ "prefixed_id": "CST-1024"
2708
+ },
2709
+ "assignee": {
2710
+ "id": "usr_01H8X9YZ7E0J3K4M5N6S",
2711
+ "name": "Riley",
2712
+ "email": "riley@acme.test"
2713
+ },
2714
+ "previous_assignee": null
2715
+ },
2716
+ "ticket.closed": {
2717
+ "ticket": {
2718
+ "id": "tkt_01H8X9YZ7E0J3K4M5N6P",
2719
+ "prefixed_id": "CST-1024",
2720
+ "title": "Cannot reset password",
2721
+ "status": "resolved",
2722
+ "priority": "normal",
2723
+ "channel": "widget",
2724
+ "resolved_at": "2026-04-27T19:08:43.000Z"
2725
+ },
2726
+ "changes": {
2727
+ "status": {
2728
+ "from": "open",
2729
+ "to": "resolved"
2730
+ }
2731
+ }
2732
+ },
2733
+ "ticket.created": {
2734
+ "ticket": {
2735
+ "id": "tkt_01H8X9YZ7E0J3K4M5N6P",
2736
+ "prefixed_id": "CST-1024",
2737
+ "title": "Cannot reset password",
2738
+ "status": "new",
2739
+ "priority": "normal",
2740
+ "channel": "widget",
2741
+ "customer_id": "cus_01H8X9YZ7E0J3K4M5N6Q",
2742
+ "created_at": "2026-04-27T18:42:11.000Z"
2743
+ },
2744
+ "customer": {
2745
+ "id": "cus_01H8X9YZ7E0J3K4M5N6Q",
2746
+ "name": "Casey Patel",
2747
+ "email": "casey@example.com"
2748
+ }
2749
+ },
2750
+ "ticket.deleted": {
2751
+ "id": "CST-1024"
2752
+ },
2753
+ "ticket.message_added": {
2754
+ "ticket": {
2755
+ "id": "tkt_01H8X9YZ7E0J3K4M5N6P",
2756
+ "dashboard_url": "https://www.cstar.help/team/acme/tickets?selected=tkt_01H8X9YZ7E0J3K4M5N6P"
2757
+ },
2758
+ "message": {
2759
+ "id": "msg_01H8X9YZ7E0J3K4M5N6R",
2760
+ "sender": "agent",
2761
+ "sender_name": "Riley",
2762
+ "content": "I just sent a reset link to your inbox \u2014 let me know if it lands.",
2763
+ "created_at": "2026-04-27T18:55:02.000Z"
2764
+ },
2765
+ "customer": {
2766
+ "id": "cus_01H8X9YZ7E0J3K4M5N6Q",
2767
+ "name": "Casey Patel",
2768
+ "email": "casey@example.com"
2769
+ }
2770
+ },
2771
+ "ticket.updated": {
2772
+ "ticket": {
2773
+ "id": "tkt_01H8X9YZ7E0J3K4M5N6P",
2774
+ "prefixed_id": "CST-1024",
2775
+ "title": "Cannot reset password",
2776
+ "status": "open",
2777
+ "priority": "high",
2778
+ "channel": "widget"
2779
+ },
2780
+ "changes": {
2781
+ "priority": {
2782
+ "from": "normal",
2783
+ "to": "high"
2784
+ },
2785
+ "tags": {
2786
+ "from": [
2787
+ "bug"
2788
+ ],
2789
+ "to": [
2790
+ "bug",
2791
+ "feature-request"
2792
+ ]
2793
+ }
2794
+ }
2795
+ }
2796
+ };
2797
+ var WEBHOOK_EVENT_CATALOG = {
2798
+ "agent.preferences_updated": { label: "Agent Preferences Updated", description: "Fired when an agent's per-user UX preferences change (e.g., boringMode toggled)", category: "team" },
2799
+ "article.created": { label: "New Article Created", description: "Fired when a new Library article is created", category: "articles" },
2800
+ "article.deleted": { label: "Article Deleted", description: "Fired when an article is deleted via app or API", category: "articles" },
2801
+ "article.published": { label: "Article Published", description: "Fired when an article is published to the Public Library", category: "articles" },
2802
+ "article.updated": { label: "Article Updated", description: "Fired when an article content or metadata is modified", category: "articles" },
2803
+ "boss.damaged": { label: "Boss Damaged", description: "Fired when a boss takes damage from a ticket close", category: "gamification" },
2804
+ "boss.defeated": { label: "Boss Defeated", description: "Fired when a boss is defeated by the team", category: "gamification" },
2805
+ "boss.spawned": { label: "Boss Battle Started", description: "Fired when a boss appears for the team", category: "gamification" },
2806
+ "community_post.commented": { label: "New Comment on Post", description: "Fired when a new comment is added to a community post", category: "community" },
2807
+ "community_post.created": { label: "New Community Post", description: "Fired when a new community post is created", category: "community" },
2808
+ "community_post.deleted": { label: "Community Post Deleted", description: "Fired when a community post is deleted", category: "community" },
2809
+ "community_post.status_changed": { label: "Post Status Changed", description: "Fired when a community post status is changed (e.g., Planned, Completed)", category: "community" },
2810
+ "community_post.updated": { label: "Community Post Updated", description: "Fired when a community post is updated", category: "community" },
2811
+ "community_post.voted": { label: "Post Voted On", description: "Fired when a community post receives a vote", category: "community" },
2812
+ "customer.created": { label: "New Customer Added", description: "Fired when a new customer is created", category: "customers" },
2813
+ "customer.deleted": { label: "Customer Deleted", description: "Fired when a customer is deleted via app or API", category: "customers" },
2814
+ "customer.updated": { label: "Customer Updated", description: "Fired when customer details are modified", category: "customers" },
2815
+ "customer_group.created": { label: "New Customer Group", description: "Fired when a customer group is created", category: "customers" },
2816
+ "customer_group.deleted": { label: "Customer Group Deleted", description: "Fired when a customer group is deleted", category: "customers" },
2817
+ "customer_group.updated": { label: "Customer Group Updated", description: "Fired when a customer group is modified", category: "customers" },
2818
+ "player.achievement_unlocked": { label: "Achievement Unlocked", description: "Fired when a player unlocks an achievement", category: "gamification" },
2819
+ "player.level_up": { label: "Player Leveled Up", description: "Fired when a player reaches a new level", category: "gamification" },
2820
+ "player.quest_completed": { label: "Quest Completed", description: "Fired when a player completes a daily quest", category: "gamification" },
2821
+ "player.streak_milestone": { label: "Streak Milestone", description: "Fired when a player hits a streak milestone (3, 5, 10, or 25 days)", category: "gamification" },
2822
+ "player.xp_gained": { label: "XP Gained", description: "Fired when a player earns XP from closing a ticket or quest", category: "gamification" },
2823
+ "social.high_five_sent": { label: "High Five Sent", description: "Fired when a team sends a high five to another team", category: "gamification" },
2824
+ "social.one_up_sent": { label: "One-Up Sent", description: "Fired when a teammate sends a one-up recognition", category: "gamification" },
2825
+ "survey.submitted": { label: "Customer Feedback Received", description: "Fired when a customer submits a CSAT survey response", category: "csat" },
2826
+ "team.preferences_updated": { label: "Team Preferences Updated", description: "Fired when team-wide UX preferences change (e.g., bossBattlesEnabled toggled)", category: "team" },
2827
+ "ticket.assigned": { label: "Ticket Assigned", description: "Fired when a ticket is assigned to an agent", category: "tickets" },
2828
+ "ticket.closed": { label: "Ticket Closed/Resolved", description: "Fired when a ticket is resolved or closed", category: "tickets" },
2829
+ "ticket.created": { label: "New Ticket Created", description: "Fired when a new ticket is created via app, widget, API, or email", category: "tickets" },
2830
+ "ticket.deleted": { label: "Ticket Deleted", description: "Fired when a ticket is deleted via app or API", category: "tickets" },
2831
+ "ticket.message_added": { label: "New Message on Ticket", description: "Fired when a new message is added to a ticket", category: "tickets" },
2832
+ "ticket.updated": { label: "Ticket Updated", description: "Fired when a ticket status, priority, or assignment changes", category: "tickets" }
2833
+ };
2834
+
2366
2835
  // src/index.ts
2367
2836
  var CStarClient = class {
2368
2837
  constructor(config) {
@@ -2379,6 +2848,7 @@ var CStarClient = class {
2379
2848
  };
2380
2849
  this.members = new MembersResource(this._httpClient);
2381
2850
  this.settings = new SettingsResource(this._httpClient);
2851
+ this.preferences = new PreferencesResource(this._httpClient);
2382
2852
  this.notifications = new NotificationsResource(this._httpClient);
2383
2853
  this.mentions = new MentionsResource(this._httpClient);
2384
2854
  this.attachments = new AttachmentsResource(this._httpClient);
@@ -2461,5 +2931,7 @@ export {
2461
2931
  CStarValidationError,
2462
2932
  ErrorType,
2463
2933
  OfflineQueue,
2464
- Subscription
2934
+ Subscription,
2935
+ WEBHOOK_EVENT_CATALOG,
2936
+ WEBHOOK_EVENT_SAMPLES
2465
2937
  };
@@ -204,6 +204,26 @@ var registry = globalSlot[REGISTRY_KEY] ?? (globalSlot[REGISTRY_KEY] = {
204
204
  CStarFeatureDisabledError: CStarFeatureDisabledErrorImpl,
205
205
  CStarRealtimeUnavailableError: CStarRealtimeUnavailableErrorImpl
206
206
  });
207
+ var NAME_FIXES = [
208
+ "CStarError",
209
+ "CStarAuthenticationError",
210
+ "CStarRateLimitError",
211
+ "CStarNotFoundError",
212
+ "CStarValidationError",
213
+ "CStarPermissionError",
214
+ "CStarConflictError",
215
+ "CStarServerError",
216
+ "CStarFeatureDisabledError",
217
+ "CStarRealtimeUnavailableError"
218
+ ];
219
+ for (const key of NAME_FIXES) {
220
+ if (registry[key].name !== key) {
221
+ Object.defineProperty(registry[key], "name", {
222
+ value: key,
223
+ configurable: true
224
+ });
225
+ }
226
+ }
207
227
  var CStarError = registry.CStarError;
208
228
  var CStarAuthenticationError = registry.CStarAuthenticationError;
209
229
  var CStarRateLimitError = registry.CStarRateLimitError;