@cstar.help/js 0.16.0 → 0.17.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.cts CHANGED
@@ -1,3 +1,7 @@
1
+ import { W as WebhookEventType, a as WebhookEventDataMap } from './webhookEvents-1N2i2GcQ.cjs';
2
+ export { b as WEBHOOK_EVENT_CATALOG, c as WEBHOOK_EVENT_SAMPLES, d as WebhookEvent } from './webhookEvents-1N2i2GcQ.cjs';
3
+ export { A as ApiErrorBody, C as CStarAuthenticationError, a as CStarConflictError, b as CStarError, c as CStarFeatureDisabledError, d as CStarNotFoundError, e as CStarPermissionError, f as CStarRateLimitError, h as CStarServerError, i as CStarValidationError, E as ErrorType } from './errors-b5A4wfAg.cjs';
4
+
1
5
  /** Metadata: string key-value pairs. Max 50 keys, 40-char keys, 500-char values. */
2
6
  type Metadata = Record<string, string>;
3
7
  /** Standard pagination parameters accepted by list endpoints. */
@@ -66,6 +70,7 @@ interface ClientConfig {
66
70
  teamId: string;
67
71
  baseUrl?: string;
68
72
  version?: string;
73
+ /** Retry count. POST/PATCH network and 5xx retries require an idempotency key. */
69
74
  maxRetries?: number;
70
75
  timeout?: number;
71
76
  }
@@ -97,7 +102,8 @@ declare class HttpClient {
97
102
  constructor(config: ClientConfig);
98
103
  /**
99
104
  * Make an authenticated request to the cStar API.
100
- * Automatically retries on 5xx errors and rate limits.
105
+ * Automatically retries rate limits and retry-safe failures. POST/PATCH
106
+ * network and 5xx failures require an idempotency key to avoid duplicate writes.
101
107
  */
102
108
  request<T>(method: string, path: string, options?: FetchOptions): Promise<T>;
103
109
  /**
@@ -189,6 +195,15 @@ declare class CStarRealtime {
189
195
  private errorHandlers;
190
196
  private connectionHandlers;
191
197
  private lastEventId;
198
+ /**
199
+ * Timestamp of the most recently received event, kept as an ISO-8601 string.
200
+ * Sent as `?since=<iso>` on reconnect so the server can replay events missed
201
+ * during the gap. The `id:` field on each SSE message is a prefixed entity
202
+ * ID (`evt_*`), which `new Date(...)` can't parse — passing it as `since`
203
+ * silently skips the replay branch on the server. Track the timestamp
204
+ * separately so reconnects actually catch up. R62.
205
+ */
206
+ private lastEventTimestamp;
192
207
  private retryCount;
193
208
  private retryTimer;
194
209
  private _connected;
@@ -230,7 +245,7 @@ declare class CStarRealtime {
230
245
  connect(): void;
231
246
  /**
232
247
  * Open the EventSource with the given auth token.
233
- * Extracted so both the happy path and the fallback path share logic.
248
+ * Secret keys reach this method only after exchanging for an SSE token.
234
249
  */
235
250
  private connectWithToken;
236
251
  /** Stop listening and clean up all resources. */
@@ -364,6 +379,8 @@ declare class Subscription$1<T = unknown> {
364
379
  private destroyed;
365
380
  /** Generation counter to prevent stale refresh() from overwriting SSE updates. */
366
381
  private generation;
382
+ /** Replay events against the initial snapshot instead of discarding that snapshot. */
383
+ private initialEvents;
367
384
  constructor(realtime: CStarRealtime, fetchFn: () => Promise<ListResponse<T>>, resourcePath: string, filterFn?: ((item: T) => boolean) | undefined);
368
385
  /** Current data array (updated in real-time). */
369
386
  get data(): T[];
@@ -581,454 +598,6 @@ declare class ArticlesResource extends BaseResource<Article, ArticleListParams,
581
598
  constructor(client: HttpClient);
582
599
  }
583
600
 
584
- /** Every webhook event type cStar can dispatch. */
585
- type WebhookEventType = 'agent.preferences_updated' | 'article.created' | 'article.deleted' | 'article.published' | 'article.updated' | 'boss.damaged' | 'boss.defeated' | 'boss.spawned' | 'community_post.commented' | 'community_post.created' | 'community_post.deleted' | 'community_post.status_changed' | 'community_post.updated' | 'community_post.voted' | 'customer.created' | 'customer.deleted' | 'customer.updated' | 'customer_group.created' | 'customer_group.deleted' | 'customer_group.updated' | 'player.achievement_unlocked' | 'player.level_up' | 'player.quest_completed' | 'player.streak_milestone' | 'player.xp_gained' | 'social.high_five_sent' | 'social.one_up_sent' | 'survey.submitted' | 'team.preferences_updated' | 'ticket.assigned' | 'ticket.closed' | 'ticket.created' | 'ticket.deleted' | 'ticket.message_added' | 'ticket.updated';
586
- /** Payload for `agent.preferences_updated` events. */
587
- interface AgentPreferencesUpdatedPayload {
588
- team_id: string;
589
- member_id: string;
590
- agent_id: string;
591
- changed: Array<string>;
592
- preferences: {
593
- boringMode: boolean;
594
- };
595
- }
596
- /** Payload for `article.created` events. */
597
- interface ArticleCreatedPayload {
598
- article: {
599
- id: string;
600
- title: string;
601
- slug: string;
602
- is_public: boolean;
603
- created_at: string;
604
- };
605
- }
606
- /** Payload for `article.deleted` events. */
607
- interface ArticleDeletedPayload {
608
- id: string;
609
- }
610
- /** Payload for `article.published` events. */
611
- interface ArticlePublishedPayload {
612
- article: {
613
- id: string;
614
- title: string;
615
- slug: string;
616
- is_public: boolean;
617
- published_at: string;
618
- };
619
- }
620
- /** Payload for `article.updated` events. */
621
- interface ArticleUpdatedPayload {
622
- article: {
623
- id: string;
624
- title: string;
625
- slug: string;
626
- is_public: boolean;
627
- };
628
- }
629
- /** Payload for `boss.damaged` events. */
630
- interface BossDamagedPayload {
631
- boss: {
632
- id: string;
633
- current_hp: number;
634
- };
635
- damage: number;
636
- by: {
637
- agent_id: string;
638
- name: string;
639
- };
640
- }
641
- /** Payload for `boss.defeated` events. */
642
- interface BossDefeatedPayload {
643
- boss: {
644
- id: string;
645
- name: string;
646
- };
647
- final_blow_by: {
648
- agent_id: string;
649
- name: string;
650
- };
651
- team_xp_awarded: number;
652
- }
653
- /** Payload for `boss.spawned` events. */
654
- interface BossSpawnedPayload {
655
- boss: {
656
- id: string;
657
- name: string;
658
- level: number;
659
- max_hp: number;
660
- };
661
- }
662
- /** Payload for `community_post.commented` events. */
663
- interface CommunityPostCommentedPayload {
664
- comment: {
665
- id: string;
666
- post_id: string;
667
- content: string;
668
- author_id: string;
669
- created_at: string;
670
- };
671
- }
672
- /** Payload for `community_post.created` events. */
673
- interface CommunityPostCreatedPayload {
674
- post: {
675
- id: string;
676
- prefixed_id: string;
677
- title: string;
678
- status: string;
679
- visibility: string;
680
- topic: string;
681
- created_at: string;
682
- };
683
- }
684
- /** Payload for `community_post.deleted` events. */
685
- interface CommunityPostDeletedPayload {
686
- post: {
687
- id: string;
688
- prefixed_id?: string;
689
- title?: string;
690
- };
691
- }
692
- /** Payload for `community_post.status_changed` events. */
693
- interface CommunityPostStatusChangedPayload {
694
- post: {
695
- id: string;
696
- title: string;
697
- status: string;
698
- visibility: string;
699
- };
700
- }
701
- /** Payload for `community_post.updated` events. */
702
- interface CommunityPostUpdatedPayload {
703
- post: {
704
- id: string;
705
- title: string;
706
- status: string;
707
- visibility: string;
708
- };
709
- }
710
- /** Payload for `community_post.voted` events. */
711
- interface CommunityPostVotedPayload {
712
- post: {
713
- id: string;
714
- vote_count: number;
715
- };
716
- voter: {
717
- id: string;
718
- };
719
- direction: string;
720
- }
721
- /** Payload for `customer.created` events. */
722
- interface CustomerCreatedPayload {
723
- customer: {
724
- id: string;
725
- name: string;
726
- email: string;
727
- status: string;
728
- tags: Array<string>;
729
- created_at: string;
730
- };
731
- }
732
- /** Payload for `customer.deleted` events. */
733
- interface CustomerDeletedPayload {
734
- id: string;
735
- }
736
- /** Payload for `customer.updated` events. */
737
- interface CustomerUpdatedPayload {
738
- customer: {
739
- id: string;
740
- name: string;
741
- email: string;
742
- status: string;
743
- tags: Array<string>;
744
- };
745
- changes: {
746
- tags: {
747
- from: Array<string>;
748
- to: Array<string>;
749
- };
750
- };
751
- }
752
- /** Payload for `customer_group.created` events. */
753
- interface CustomerGroupCreatedPayload {
754
- group: {
755
- id: string;
756
- name: string;
757
- color: string;
758
- member_count: number;
759
- };
760
- }
761
- /** Payload for `customer_group.deleted` events. */
762
- interface CustomerGroupDeletedPayload {
763
- customer_group: {
764
- id: string;
765
- };
766
- }
767
- /** Payload for `customer_group.updated` events. */
768
- interface CustomerGroupUpdatedPayload {
769
- group: {
770
- id: string;
771
- name: string;
772
- color: string;
773
- member_count: number;
774
- };
775
- }
776
- /** Payload for `player.achievement_unlocked` events. */
777
- interface PlayerAchievementUnlockedPayload {
778
- player: {
779
- agent_id: string;
780
- name: string;
781
- };
782
- achievement: {
783
- id: string;
784
- name: string;
785
- xp: number;
786
- };
787
- }
788
- /** Payload for `player.level_up` events. */
789
- interface PlayerLevelUpPayload {
790
- player: {
791
- agent_id: string;
792
- name: string;
793
- };
794
- level: {
795
- from: number;
796
- to: number;
797
- };
798
- title_unlocked: string;
799
- }
800
- /** Payload for `player.quest_completed` events. */
801
- interface PlayerQuestCompletedPayload {
802
- player: {
803
- agent_id: string;
804
- name: string;
805
- };
806
- quest: {
807
- id: string;
808
- name: string;
809
- xp: number;
810
- };
811
- }
812
- /** Payload for `player.streak_milestone` events. */
813
- interface PlayerStreakMilestonePayload {
814
- player: {
815
- agent_id: string;
816
- name: string;
817
- };
818
- streak_days: number;
819
- milestone: number;
820
- }
821
- /** Payload for `player.xp_gained` events. */
822
- interface PlayerXpGainedPayload {
823
- player: {
824
- agent_id: string;
825
- name: string;
826
- };
827
- amount: number;
828
- reason: string;
829
- ticket_id: string;
830
- }
831
- /** Payload for `social.high_five_sent` events. */
832
- interface SocialHighFiveSentPayload {
833
- from_team: {
834
- id: string;
835
- name: string;
836
- };
837
- to_team: {
838
- id: string;
839
- name: string;
840
- };
841
- message: string;
842
- }
843
- /** Payload for `social.one_up_sent` events. */
844
- interface SocialOneUpSentPayload {
845
- from: {
846
- agent_id: string;
847
- name: string;
848
- };
849
- to: {
850
- agent_id: string;
851
- name: string;
852
- };
853
- ticket_id: string;
854
- message: string;
855
- }
856
- /** Payload for `survey.submitted` events. */
857
- interface SurveySubmittedPayload {
858
- survey: {
859
- id: string;
860
- ticket_id: string;
861
- score: number;
862
- comment: string;
863
- submitted_at: string;
864
- };
865
- customer: {
866
- id: string;
867
- email: string;
868
- };
869
- }
870
- /** Payload for `team.preferences_updated` events. */
871
- interface TeamPreferencesUpdatedPayload {
872
- team_id: string;
873
- changed: Array<string>;
874
- preferences: {
875
- bossBattlesEnabled: boolean;
876
- };
877
- }
878
- /** Payload for `ticket.assigned` events. */
879
- interface TicketAssignedPayload {
880
- ticket: {
881
- id: string;
882
- prefixed_id: string;
883
- };
884
- assignee: {
885
- id: string;
886
- name: string;
887
- email: string;
888
- };
889
- previous_assignee: null;
890
- }
891
- /** Payload for `ticket.closed` events. */
892
- interface TicketClosedPayload {
893
- ticket: {
894
- id: string;
895
- prefixed_id: string;
896
- title: string;
897
- status: string;
898
- priority: string;
899
- channel: string;
900
- resolved_at: string;
901
- };
902
- changes?: Record<string, {
903
- from: string;
904
- to: string;
905
- }>;
906
- }
907
- /** Payload for `ticket.created` events. */
908
- interface TicketCreatedPayload {
909
- ticket: {
910
- id: string;
911
- prefixed_id: string;
912
- title: string;
913
- status: string;
914
- priority: string;
915
- channel: string;
916
- customer_id: string;
917
- created_at: string;
918
- };
919
- customer: {
920
- id: string;
921
- name: string;
922
- email: string;
923
- };
924
- }
925
- /** Payload for `ticket.deleted` events. */
926
- interface TicketDeletedPayload {
927
- id: string;
928
- }
929
- /** Payload for `ticket.message_added` events. */
930
- interface TicketMessageAddedPayload {
931
- ticket: {
932
- id: string;
933
- dashboard_url: string | null;
934
- };
935
- message: {
936
- id: string;
937
- sender: string;
938
- sender_name: string | null;
939
- content: string;
940
- created_at: string;
941
- };
942
- customer?: {
943
- id: string;
944
- name: string | null;
945
- email: string | null;
946
- };
947
- }
948
- /** Payload for `ticket.updated` events. */
949
- interface TicketUpdatedPayload {
950
- ticket: {
951
- id: string;
952
- prefixed_id: string;
953
- title: string;
954
- status: string;
955
- priority: string;
956
- channel: string;
957
- };
958
- changes?: Record<string, {
959
- from: string;
960
- to: string;
961
- } | {
962
- from: Array<string>;
963
- to: Array<string>;
964
- }>;
965
- }
966
- /** Maps each event type to its payload interface — used internally for the discriminated union. */
967
- interface WebhookEventDataMap {
968
- 'agent.preferences_updated': AgentPreferencesUpdatedPayload;
969
- 'article.created': ArticleCreatedPayload;
970
- 'article.deleted': ArticleDeletedPayload;
971
- 'article.published': ArticlePublishedPayload;
972
- 'article.updated': ArticleUpdatedPayload;
973
- 'boss.damaged': BossDamagedPayload;
974
- 'boss.defeated': BossDefeatedPayload;
975
- 'boss.spawned': BossSpawnedPayload;
976
- 'community_post.commented': CommunityPostCommentedPayload;
977
- 'community_post.created': CommunityPostCreatedPayload;
978
- 'community_post.deleted': CommunityPostDeletedPayload;
979
- 'community_post.status_changed': CommunityPostStatusChangedPayload;
980
- 'community_post.updated': CommunityPostUpdatedPayload;
981
- 'community_post.voted': CommunityPostVotedPayload;
982
- 'customer.created': CustomerCreatedPayload;
983
- 'customer.deleted': CustomerDeletedPayload;
984
- 'customer.updated': CustomerUpdatedPayload;
985
- 'customer_group.created': CustomerGroupCreatedPayload;
986
- 'customer_group.deleted': CustomerGroupDeletedPayload;
987
- 'customer_group.updated': CustomerGroupUpdatedPayload;
988
- 'player.achievement_unlocked': PlayerAchievementUnlockedPayload;
989
- 'player.level_up': PlayerLevelUpPayload;
990
- 'player.quest_completed': PlayerQuestCompletedPayload;
991
- 'player.streak_milestone': PlayerStreakMilestonePayload;
992
- 'player.xp_gained': PlayerXpGainedPayload;
993
- 'social.high_five_sent': SocialHighFiveSentPayload;
994
- 'social.one_up_sent': SocialOneUpSentPayload;
995
- 'survey.submitted': SurveySubmittedPayload;
996
- 'team.preferences_updated': TeamPreferencesUpdatedPayload;
997
- 'ticket.assigned': TicketAssignedPayload;
998
- 'ticket.closed': TicketClosedPayload;
999
- 'ticket.created': TicketCreatedPayload;
1000
- 'ticket.deleted': TicketDeletedPayload;
1001
- 'ticket.message_added': TicketMessageAddedPayload;
1002
- 'ticket.updated': TicketUpdatedPayload;
1003
- }
1004
- /** A webhook event delivered to your endpoint. */
1005
- interface WebhookEvent<T extends WebhookEventType = WebhookEventType> {
1006
- /** Unique event ID (idempotency key). */
1007
- id: string;
1008
- /** Event type. */
1009
- type: T;
1010
- /** When the event was created (ISO 8601). */
1011
- created_at: string;
1012
- /** Team that owns this event. */
1013
- team_id: string;
1014
- /** Event-specific payload. */
1015
- data: WebhookEventDataMap[T];
1016
- }
1017
- /**
1018
- * Stable representative payloads for each event type. Useful for testing
1019
- * your endpoint against realistic shapes without having to trigger a real
1020
- * event. Mirrors the dashboard's event catalog.
1021
- */
1022
- declare const WEBHOOK_EVENT_SAMPLES: {
1023
- [K in WebhookEventType]: WebhookEventDataMap[K];
1024
- };
1025
- /** Static metadata about every event — labels, descriptions, categories. */
1026
- declare const WEBHOOK_EVENT_CATALOG: Record<WebhookEventType, {
1027
- label: string;
1028
- description: string;
1029
- category: string;
1030
- }>;
1031
-
1032
601
  type WebhookEventData<T extends WebhookEventType> = WebhookEventDataMap[T];
1033
602
 
1034
603
  /** A cStar webhook endpoint. */
@@ -2194,21 +1763,48 @@ interface ExportResult {
2194
1763
  /** Import request parameters. */
2195
1764
  interface ImportCreateParams {
2196
1765
  resource: 'tickets' | 'customers' | 'articles';
1766
+ /**
1767
+ * Records to import. Flat objects with the per-entity fields you want
1768
+ * to set, e.g. `[{ name: 'Jane', email: 'jane@example.com' }]` for
1769
+ * `resource: 'customers'`. Each record is treated as a create. Server
1770
+ * also accepts the wrapped internal shape `{ data, action, existingId? }`
1771
+ * if you need to drive updates from the SDK.
1772
+ *
1773
+ * Ticket imports include details only, without conversation messages,
1774
+ * private notes or attachments. Ticket create/update records with nonempty
1775
+ * arrays at `messages`, `_messages`, `comments`, `audits`, `conversations`, `threads`,
1776
+ * `_embedded.threads`, `conversation_parts`, or
1777
+ * `conversation_parts.conversation_parts`, on the record or its `data`
1778
+ * object, cause HTTP 400 before any records in that request are written.
1779
+ * A truthy `source.body` paired with an array at `conversation_parts` or
1780
+ * `conversation_parts.conversation_parts` is also rejected, even if that
1781
+ * array is empty. Empty history without this initial-message shape,
1782
+ * customFields/metadata and wrapped records with `action: 'skip'` are allowed.
1783
+ */
2197
1784
  records: Record<string, unknown>[];
1785
+ /** How to handle duplicates. Defaults to `'overwrite'`. */
2198
1786
  mergeStrategy?: 'skip' | 'overwrite' | 'merge';
2199
1787
  }
2200
1788
  /** Import result. */
2201
1789
  interface ImportResult {
2202
1790
  object: 'import_result';
2203
- resource: string;
1791
+ /** ID of the persisted import-log row (null if the log row could not be written). */
1792
+ logId: string | null;
1793
+ /** Entity type imported — `ticket`, `customer`, or `article`. */
1794
+ entityType: string;
1795
+ /** True when every record imported without error. */
1796
+ success: boolean;
2204
1797
  total: number;
2205
1798
  created: number;
2206
1799
  updated: number;
2207
1800
  skipped: number;
2208
- errors: Array<{
1801
+ failed: number;
1802
+ errors?: Array<{
2209
1803
  index: number;
2210
1804
  error: string;
2211
1805
  }>;
1806
+ /** IDs of the rows created by this import. */
1807
+ createdIds: string[];
2212
1808
  }
2213
1809
  /** Import log entry. */
2214
1810
  interface ImportLog {
@@ -2545,6 +2141,8 @@ interface Achievement {
2545
2141
  }
2546
2142
  /** Parameters for listing achievements. */
2547
2143
  interface AchievementListParams extends PaginationParams {
2144
+ /** Whose achievement progress to load. Required — the endpoint 400s without it. */
2145
+ userId: string;
2548
2146
  category?: string;
2549
2147
  }
2550
2148
  /** A daily quest. */
@@ -2741,8 +2339,8 @@ declare class BossResource {
2741
2339
  declare class AchievementsResource {
2742
2340
  private readonly client;
2743
2341
  constructor(client: HttpClient);
2744
- /** List all achievements with progress. */
2745
- list(params?: AchievementListParams): Promise<ApiResponse<{
2342
+ /** List all achievements with progress. `params.userId` is required. */
2343
+ list(params: AchievementListParams): Promise<ApiResponse<{
2746
2344
  object: 'achievement_list';
2747
2345
  data: Achievement[];
2748
2346
  summary: {
@@ -3132,6 +2730,7 @@ declare class OfflineQueue {
3132
2730
  private autoFlushEnabled;
3133
2731
  private onlineHandler;
3134
2732
  private readonly useLocalStorage;
2733
+ private readonly storageKey;
3135
2734
  constructor(httpClient: HttpClient, options?: OfflineQueueOptions);
3136
2735
  /** Queue a mutation for later execution. Returns a queue item ID. */
3137
2736
  enqueue(method: string, path: string, body: Record<string, unknown>): string;
@@ -3158,356 +2757,6 @@ declare class OfflineQueue {
3158
2757
  private loadFromStorage;
3159
2758
  }
3160
2759
 
3161
- /**
3162
- * Error classes for the cStar SDK.
3163
- *
3164
- * NEW-v3-01 — Cross-subpath instanceof identity.
3165
- *
3166
- * Each public subpath (`/library`, `/auth`, `/community`, `/quickhelp`, ...)
3167
- * is bundled as a separate tsup entry with `splitting: false`, so each one
3168
- * carries its own copy of this module. Without deduplication, errors thrown
3169
- * by `LibraryClient` carry the LibraryClient-bundled `CStarError` class —
3170
- * not the one a consumer imports from `@cstar.help/js`. That makes
3171
- * `instanceof CStarError` checks fail silently, invalidating every "did the
3172
- * SDK throw a typed cStar error?" branch in user code.
3173
- *
3174
- * Fix: register each class on a `Symbol.for(...)` slot of `globalThis`. The
3175
- * symbol is realm-shared, so every bundled copy of this module resolves to
3176
- * the SAME class identity at runtime — the first copy to load wins, and all
3177
- * subsequent copies surface the canonical class via the same slot. The
3178
- * inline `Impl` definitions are only used as the seed for the very first
3179
- * copy to register. Internal `parseError` / `parsePublicError` reference the
3180
- * EXPORTED canonical names so instances they construct also land on the
3181
- * canonical class.
3182
- */
3183
- /** Error type constants matching the cStar API. */
3184
- declare const ErrorType: {
3185
- readonly AUTHENTICATION_ERROR: "authentication_error";
3186
- readonly PERMISSION_ERROR: "permission_error";
3187
- readonly INVALID_REQUEST_ERROR: "invalid_request_error";
3188
- readonly NOT_FOUND_ERROR: "not_found_error";
3189
- readonly CONFLICT_ERROR: "conflict_error";
3190
- readonly RATE_LIMIT_ERROR: "rate_limit_error";
3191
- readonly FEATURE_NOT_CONFIGURED: "feature_not_configured";
3192
- readonly API_ERROR: "api_error";
3193
- readonly SERVER_ERROR: "server_error";
3194
- };
3195
- /** Shape of the error object returned by the cStar API. */
3196
- interface ApiErrorBody {
3197
- type: string;
3198
- code: string;
3199
- message: string;
3200
- param?: string;
3201
- doc_url: string;
3202
- request_id?: string;
3203
- feature?: string;
3204
- enable_url?: string;
3205
- }
3206
- /** Base error class for all cStar API errors. */
3207
- declare const CStarErrorImpl: {
3208
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3209
- readonly type: string;
3210
- readonly code: string;
3211
- readonly param?: string;
3212
- readonly docUrl: string;
3213
- readonly requestId?: string;
3214
- readonly statusCode: number;
3215
- name: string;
3216
- message: string;
3217
- stack?: string;
3218
- };
3219
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3220
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3221
- stackTraceLimit: number;
3222
- };
3223
- declare const CStarAuthenticationErrorImpl: {
3224
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3225
- readonly type: string;
3226
- readonly code: string;
3227
- readonly param?: string;
3228
- readonly docUrl: string;
3229
- readonly requestId?: string;
3230
- readonly statusCode: number;
3231
- name: string;
3232
- message: string;
3233
- stack?: string;
3234
- };
3235
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3236
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3237
- stackTraceLimit: number;
3238
- };
3239
- declare const CStarRateLimitErrorImpl: {
3240
- new (messageOrStatus: string | number, body?: ApiErrorBody, retryAfter?: number): {
3241
- readonly retryAfter: number;
3242
- readonly type: string;
3243
- readonly code: string;
3244
- readonly param?: string;
3245
- readonly docUrl: string;
3246
- readonly requestId?: string;
3247
- readonly statusCode: number;
3248
- name: string;
3249
- message: string;
3250
- stack?: string;
3251
- };
3252
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3253
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3254
- stackTraceLimit: number;
3255
- };
3256
- declare const CStarNotFoundErrorImpl: {
3257
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3258
- readonly type: string;
3259
- readonly code: string;
3260
- readonly param?: string;
3261
- readonly docUrl: string;
3262
- readonly requestId?: string;
3263
- readonly statusCode: number;
3264
- name: string;
3265
- message: string;
3266
- stack?: string;
3267
- };
3268
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3269
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3270
- stackTraceLimit: number;
3271
- };
3272
- declare const CStarValidationErrorImpl: {
3273
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3274
- readonly type: string;
3275
- readonly code: string;
3276
- readonly param?: string;
3277
- readonly docUrl: string;
3278
- readonly requestId?: string;
3279
- readonly statusCode: number;
3280
- name: string;
3281
- message: string;
3282
- stack?: string;
3283
- };
3284
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3285
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3286
- stackTraceLimit: number;
3287
- };
3288
- declare const CStarPermissionErrorImpl: {
3289
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3290
- readonly type: string;
3291
- readonly code: string;
3292
- readonly param?: string;
3293
- readonly docUrl: string;
3294
- readonly requestId?: string;
3295
- readonly statusCode: number;
3296
- name: string;
3297
- message: string;
3298
- stack?: string;
3299
- };
3300
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3301
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3302
- stackTraceLimit: number;
3303
- };
3304
- declare const CStarConflictErrorImpl: {
3305
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3306
- readonly type: string;
3307
- readonly code: string;
3308
- readonly param?: string;
3309
- readonly docUrl: string;
3310
- readonly requestId?: string;
3311
- readonly statusCode: number;
3312
- name: string;
3313
- message: string;
3314
- stack?: string;
3315
- };
3316
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3317
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3318
- stackTraceLimit: number;
3319
- };
3320
- declare const CStarServerErrorImpl: {
3321
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3322
- readonly type: string;
3323
- readonly code: string;
3324
- readonly param?: string;
3325
- readonly docUrl: string;
3326
- readonly requestId?: string;
3327
- readonly statusCode: number;
3328
- name: string;
3329
- message: string;
3330
- stack?: string;
3331
- };
3332
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3333
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3334
- stackTraceLimit: number;
3335
- };
3336
- declare const CStarFeatureDisabledErrorImpl: {
3337
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3338
- readonly feature: string;
3339
- readonly enableUrl: string;
3340
- readonly type: string;
3341
- readonly code: string;
3342
- readonly param?: string;
3343
- readonly docUrl: string;
3344
- readonly requestId?: string;
3345
- readonly statusCode: number;
3346
- name: string;
3347
- message: string;
3348
- stack?: string;
3349
- };
3350
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3351
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3352
- stackTraceLimit: number;
3353
- };
3354
- declare const CStarError: {
3355
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3356
- readonly type: string;
3357
- readonly code: string;
3358
- readonly param?: string;
3359
- readonly docUrl: string;
3360
- readonly requestId?: string;
3361
- readonly statusCode: number;
3362
- name: string;
3363
- message: string;
3364
- stack?: string;
3365
- };
3366
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3367
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3368
- stackTraceLimit: number;
3369
- };
3370
- type CStarError = InstanceType<typeof CStarErrorImpl>;
3371
- declare const CStarAuthenticationError: {
3372
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3373
- readonly type: string;
3374
- readonly code: string;
3375
- readonly param?: string;
3376
- readonly docUrl: string;
3377
- readonly requestId?: string;
3378
- readonly statusCode: number;
3379
- name: string;
3380
- message: string;
3381
- stack?: string;
3382
- };
3383
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3384
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3385
- stackTraceLimit: number;
3386
- };
3387
- type CStarAuthenticationError = InstanceType<typeof CStarAuthenticationErrorImpl>;
3388
- declare const CStarRateLimitError: {
3389
- new (messageOrStatus: string | number, body?: ApiErrorBody, retryAfter?: number): {
3390
- readonly retryAfter: number;
3391
- readonly type: string;
3392
- readonly code: string;
3393
- readonly param?: string;
3394
- readonly docUrl: string;
3395
- readonly requestId?: string;
3396
- readonly statusCode: number;
3397
- name: string;
3398
- message: string;
3399
- stack?: string;
3400
- };
3401
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3402
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3403
- stackTraceLimit: number;
3404
- };
3405
- type CStarRateLimitError = InstanceType<typeof CStarRateLimitErrorImpl>;
3406
- declare const CStarNotFoundError: {
3407
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3408
- readonly type: string;
3409
- readonly code: string;
3410
- readonly param?: string;
3411
- readonly docUrl: string;
3412
- readonly requestId?: string;
3413
- readonly statusCode: number;
3414
- name: string;
3415
- message: string;
3416
- stack?: string;
3417
- };
3418
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3419
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3420
- stackTraceLimit: number;
3421
- };
3422
- type CStarNotFoundError = InstanceType<typeof CStarNotFoundErrorImpl>;
3423
- declare const CStarValidationError: {
3424
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3425
- readonly type: string;
3426
- readonly code: string;
3427
- readonly param?: string;
3428
- readonly docUrl: string;
3429
- readonly requestId?: string;
3430
- readonly statusCode: number;
3431
- name: string;
3432
- message: string;
3433
- stack?: string;
3434
- };
3435
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3436
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3437
- stackTraceLimit: number;
3438
- };
3439
- type CStarValidationError = InstanceType<typeof CStarValidationErrorImpl>;
3440
- declare const CStarPermissionError: {
3441
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3442
- readonly type: string;
3443
- readonly code: string;
3444
- readonly param?: string;
3445
- readonly docUrl: string;
3446
- readonly requestId?: string;
3447
- readonly statusCode: number;
3448
- name: string;
3449
- message: string;
3450
- stack?: string;
3451
- };
3452
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3453
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3454
- stackTraceLimit: number;
3455
- };
3456
- type CStarPermissionError = InstanceType<typeof CStarPermissionErrorImpl>;
3457
- declare const CStarConflictError: {
3458
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3459
- readonly type: string;
3460
- readonly code: string;
3461
- readonly param?: string;
3462
- readonly docUrl: string;
3463
- readonly requestId?: string;
3464
- readonly statusCode: number;
3465
- name: string;
3466
- message: string;
3467
- stack?: string;
3468
- };
3469
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3470
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3471
- stackTraceLimit: number;
3472
- };
3473
- type CStarConflictError = InstanceType<typeof CStarConflictErrorImpl>;
3474
- declare const CStarServerError: {
3475
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3476
- readonly type: string;
3477
- readonly code: string;
3478
- readonly param?: string;
3479
- readonly docUrl: string;
3480
- readonly requestId?: string;
3481
- readonly statusCode: number;
3482
- name: string;
3483
- message: string;
3484
- stack?: string;
3485
- };
3486
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3487
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3488
- stackTraceLimit: number;
3489
- };
3490
- type CStarServerError = InstanceType<typeof CStarServerErrorImpl>;
3491
- declare const CStarFeatureDisabledError: {
3492
- new (messageOrStatus: string | number, body?: ApiErrorBody): {
3493
- readonly feature: string;
3494
- readonly enableUrl: string;
3495
- readonly type: string;
3496
- readonly code: string;
3497
- readonly param?: string;
3498
- readonly docUrl: string;
3499
- readonly requestId?: string;
3500
- readonly statusCode: number;
3501
- name: string;
3502
- message: string;
3503
- stack?: string;
3504
- };
3505
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3506
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3507
- stackTraceLimit: number;
3508
- };
3509
- type CStarFeatureDisabledError = InstanceType<typeof CStarFeatureDisabledErrorImpl>;
3510
-
3511
2760
  /** Configuration for the CStarClient. */
3512
2761
  interface CStarClientConfig {
3513
2762
  /** Your API key (sk_live_*, sk_test_*, pk_live_*, or pk_test_*). */
@@ -3661,4 +2910,4 @@ declare class CStarClient {
3661
2910
  get lastMeta(): LastMeta;
3662
2911
  }
3663
2912
 
3664
- export { type Achievement, type AchievementListParams, type ActivityEvent, type ActivityListParams, type AiAction, type AiActionParams, type AiActionResult, type AnalyticsOverview, type AnalyticsParams, type ApiErrorBody, type ApiResponse, type Article, type ArticleCreateParams, type ArticleListParams, type ArticleUpdateParams, type Attachment, type AttachmentListParams, type AuditLogEntry, type AuditLogListParams, type AutomationAction, type AutomationCondition, type AutomationConditions, type AutomationCreateParams, type AutomationExecution, type AutomationExecutionListParams, type AutomationListParams, type AutomationRule, type AutomationTestResult, type AutomationUpdateParams, type BillingPortal, type BillingPortalParams, type Boss, type BossDamageParams, type BossDamageResult, type BossDefeat, type BossDefeatListParams, type BossSpawnParams, type BulkDeleteParams, type BulkResult, type BulkUpdateParams, type BusinessHours, type BusinessHoursUpdateParams, CStarAuthenticationError, CStarClient, type CStarClientConfig, CStarConflictError, CStarError, CStarFeatureDisabledError, CStarNotFoundError, CStarPermissionError, CStarRateLimitError, CStarRealtime, CStarServerError, CStarValidationError, type Category, type CategoryCreateParams, type CategoryListParams, type CategoryUpdateParams, type CommunityComment, type CommunityCommentCreateParams, type CommunityPost, type CommunityPostCreateParams, type CommunityPostListParams, type CommunityPostUpdateParams, type CommunityTopic, type ConnectionHandler, type Cosmetic, type CosmeticPreferences, type CsatSettings, type CsatSettingsUpdateParams, type CsatStats, type CsatSurvey, type CsatSurveyCreateParams, type CsatSurveyListParams, type CustomField, type CustomFieldCreateParams, type CustomFieldListParams, type CustomFieldUpdateParams, type Customer, type CustomerCreateParams, type CustomerGroup, type CustomerGroupAddMembersParams, type CustomerGroupAddResult, type CustomerGroupCreateParams, type CustomerGroupListParams, type CustomerGroupMemberListParams, type CustomerGroupMembersResult, type CustomerGroupRemoveResult, type CustomerGroupUpdateParams, type CustomerListParams, type CustomerUpdateParams, type DeleteResponse, type ErrorHandler, ErrorType, type EventHandler, type ExportCreateParams, type ExportResult, type GameConfig, type HighFive, type HighFiveCanSend, type HighFiveCreateParams, type HighFiveListParams, type ImportCreateParams, type ImportLog, type ImportLogListParams, type ImportResult, type Invite, type InviteCreateParams, type InviteListParams, type LeaderboardEntry, type LeaderboardParams, type ListResponse, type Member, type MemberListParams, type MemberUpdateParams, type Mention, type MentionListParams, type MentionUnreadCount, type Message, type MessageCreateParams, type Metadata, type Notification, type NotificationListParams, OfflineQueue, type OfflineQueueOptions, type OneUp, type OneUpCreateParams, type OneUpListParams, type OneUpRemaining, type PaginationInfo, type PaginationParams, type Player, type Puzzle, type PuzzleCompleteParams, type PuzzleCompleteResult, type PuzzleStreak, type Quest, type QueueItem, type QueueResult, type QuickReply, type QuickReplyCreateParams, type QuickReplyUpdateParams, type RealtimeEvent, type RealtimeOptions, type RequestOptions, type SavedView, type SearchParams, type SearchResult, type Season, type SeasonStats, type SkillAllocateParams, type SkillAllocateResult, type SkillTree, type SlaMetrics, type SlaMetricsParams, type SlaRule, type SlaRuleCreateParams, type SlaRuleListParams, type SlaRuleUpdateParams, type StatusCreateParams, type StatusUpdateParams, Subscription$1 as Subscription, type Tag, type TagListParams, type TeamSettings, type TeamSettingsUpdateParams, type Ticket, type TicketCreateParams, type TicketCustomerSummary, type TicketListParams, type TicketStatus, type TicketUpdateParams, type TopicCustomField, type UnreadCount, type ViewCreateParams, type ViewExecuteParams, type ViewListParams, type ViewUpdateParams, WEBHOOK_EVENT_CATALOG, WEBHOOK_EVENT_SAMPLES, type Webhook, type WebhookCreateParams, type WebhookEvent, type WebhookEventData, type WebhookEventType, type WebhookListParams, type WebhookListener, type WebhookListenerParams, type WebhookSubscribeParams, type WebhookSubscription, type WebhookTestResult, type WebhookTriggerTestParams, type WebhookTriggerTestResult, type WebhookUpdateParams, type WidgetSettings, type WidgetSettingsUpdateParams };
2913
+ export { type Achievement, type AchievementListParams, type ActivityEvent, type ActivityListParams, type AiAction, type AiActionParams, type AiActionResult, type AnalyticsOverview, type AnalyticsParams, type ApiResponse, type Article, type ArticleCreateParams, type ArticleListParams, type ArticleUpdateParams, type Attachment, type AttachmentListParams, type AuditLogEntry, type AuditLogListParams, type AutomationAction, type AutomationCondition, type AutomationConditions, type AutomationCreateParams, type AutomationExecution, type AutomationExecutionListParams, type AutomationListParams, type AutomationRule, type AutomationTestResult, type AutomationUpdateParams, type BillingPortal, type BillingPortalParams, type Boss, type BossDamageParams, type BossDamageResult, type BossDefeat, type BossDefeatListParams, type BossSpawnParams, type BulkDeleteParams, type BulkResult, type BulkUpdateParams, type BusinessHours, type BusinessHoursUpdateParams, CStarClient, type CStarClientConfig, CStarRealtime, type Category, type CategoryCreateParams, type CategoryListParams, type CategoryUpdateParams, type CommunityComment, type CommunityCommentCreateParams, type CommunityPost, type CommunityPostCreateParams, type CommunityPostListParams, type CommunityPostUpdateParams, type CommunityTopic, type ConnectionHandler, type Cosmetic, type CosmeticPreferences, type CsatSettings, type CsatSettingsUpdateParams, type CsatStats, type CsatSurvey, type CsatSurveyCreateParams, type CsatSurveyListParams, type CustomField, type CustomFieldCreateParams, type CustomFieldListParams, type CustomFieldUpdateParams, type Customer, type CustomerCreateParams, type CustomerGroup, type CustomerGroupAddMembersParams, type CustomerGroupAddResult, type CustomerGroupCreateParams, type CustomerGroupListParams, type CustomerGroupMemberListParams, type CustomerGroupMembersResult, type CustomerGroupRemoveResult, type CustomerGroupUpdateParams, type CustomerListParams, type CustomerUpdateParams, type DeleteResponse, type ErrorHandler, type EventHandler, type ExportCreateParams, type ExportResult, type GameConfig, type HighFive, type HighFiveCanSend, type HighFiveCreateParams, type HighFiveListParams, type ImportCreateParams, type ImportLog, type ImportLogListParams, type ImportResult, type Invite, type InviteCreateParams, type InviteListParams, type LeaderboardEntry, type LeaderboardParams, type ListResponse, type Member, type MemberListParams, type MemberUpdateParams, type Mention, type MentionListParams, type MentionUnreadCount, type Message, type MessageCreateParams, type Metadata, type Notification, type NotificationListParams, OfflineQueue, type OfflineQueueOptions, type OneUp, type OneUpCreateParams, type OneUpListParams, type OneUpRemaining, type PaginationInfo, type PaginationParams, type Player, type Puzzle, type PuzzleCompleteParams, type PuzzleCompleteResult, type PuzzleStreak, type Quest, type QueueItem, type QueueResult, type QuickReply, type QuickReplyCreateParams, type QuickReplyUpdateParams, type RealtimeEvent, type RealtimeOptions, type RequestOptions, type SavedView, type SearchParams, type SearchResult, type Season, type SeasonStats, type SkillAllocateParams, type SkillAllocateResult, type SkillTree, type SlaMetrics, type SlaMetricsParams, type SlaRule, type SlaRuleCreateParams, type SlaRuleListParams, type SlaRuleUpdateParams, type StatusCreateParams, type StatusUpdateParams, Subscription$1 as Subscription, type Tag, type TagListParams, type TeamSettings, type TeamSettingsUpdateParams, type Ticket, type TicketCreateParams, type TicketCustomerSummary, type TicketListParams, type TicketStatus, type TicketUpdateParams, type TopicCustomField, type UnreadCount, type ViewCreateParams, type ViewExecuteParams, type ViewListParams, type ViewUpdateParams, type Webhook, type WebhookCreateParams, type WebhookEventData, WebhookEventType, type WebhookListParams, type WebhookListener, type WebhookListenerParams, type WebhookSubscribeParams, type WebhookSubscription, type WebhookTestResult, type WebhookTriggerTestParams, type WebhookTriggerTestResult, type WebhookUpdateParams, type WidgetSettings, type WidgetSettingsUpdateParams };