@cstar.help/js 0.5.2 → 0.6.1

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
@@ -29,11 +29,117 @@ declare class HttpClient {
29
29
  request<T>(method: string, path: string, options?: FetchOptions): Promise<T>;
30
30
  private buildUrl;
31
31
  private buildHeaders;
32
+ /** Get the base URL for building SSE or other endpoints. */
33
+ getBaseUrl(): string;
34
+ /** Get authorization headers for non-fetch requests (e.g., SSE). */
35
+ getAuthHeaders(): Record<string, string>;
32
36
  /** Exponential backoff: 500ms, 1s, 2s, 4s... capped at 8s, plus jitter. */
33
37
  private getBackoffDelay;
34
38
  private sleep;
35
39
  }
36
40
 
41
+ /** Options for configuring the realtime connection. */
42
+ interface RealtimeOptions {
43
+ /** Event types to subscribe to (e.g., ['ticket.*', 'boss.*']). Omit for all. */
44
+ types?: string[];
45
+ /** Auto-reconnect on disconnect (default: true). */
46
+ autoReconnect?: boolean;
47
+ /** Max reconnection attempts before giving up (default: 10). */
48
+ maxRetries?: number;
49
+ }
50
+ /** A parsed realtime event from the SSE stream. */
51
+ interface RealtimeEvent<T = unknown> {
52
+ /** Event type (e.g., 'ticket.created'). */
53
+ type: string;
54
+ /** Unique event ID for reconnection. */
55
+ id: string;
56
+ /** Typed event payload. */
57
+ data: T;
58
+ /** ISO-8601 timestamp. */
59
+ timestamp: string;
60
+ /** Team ID that owns this event. */
61
+ teamId: string;
62
+ }
63
+ type EventHandler<T = unknown> = (event: RealtimeEvent<T>) => void;
64
+ type ErrorHandler = (error: Error) => void;
65
+ type ConnectionHandler = (connected: boolean) => void;
66
+ /**
67
+ * SSE-based realtime client for the cStar API.
68
+ *
69
+ * Manages a single EventSource connection to `/events/stream` and dispatches
70
+ * events to registered handlers. Supports wildcard matching (e.g., `ticket.*`),
71
+ * auto-reconnection with exponential backoff, and reconnection replay via
72
+ * `Last-Event-ID`.
73
+ */
74
+ declare class CStarRealtime {
75
+ private readonly httpClient;
76
+ private eventSource;
77
+ private handlers;
78
+ private anyHandlers;
79
+ private errorHandlers;
80
+ private connectionHandlers;
81
+ private lastEventId;
82
+ private retryCount;
83
+ private retryTimer;
84
+ private _connected;
85
+ private destroyed;
86
+ private connecting;
87
+ /** Short-lived SSE token (exchanged from secret key). */
88
+ private sseToken;
89
+ /** When the current SSE token expires (epoch ms). */
90
+ private sseTokenExpiresAt;
91
+ /** Timer that refreshes the SSE token before it expires. */
92
+ private tokenRefreshTimer;
93
+ private readonly autoReconnect;
94
+ private readonly maxRetries;
95
+ private readonly types;
96
+ constructor(httpClient: HttpClient, options?: RealtimeOptions);
97
+ /** Subscribe to a specific event type. Supports wildcards (e.g., 'ticket.*'). Returns an unsubscribe function. */
98
+ on<T = unknown>(eventType: string, handler: EventHandler<T>): () => void;
99
+ /** Subscribe to all events. Returns an unsubscribe function. */
100
+ onAny<T = unknown>(handler: EventHandler<T>): () => void;
101
+ /** Handle connection errors. */
102
+ onError(handler: ErrorHandler): this;
103
+ /** Handle connection state changes. */
104
+ onConnectionChange(handler: ConnectionHandler): this;
105
+ /** Remove a connection state handler. */
106
+ offConnectionChange(handler: ConnectionHandler): this;
107
+ /** Remove a handler for a specific event type. */
108
+ off<T = unknown>(eventType: string, handler: EventHandler<T>): this;
109
+ /** Remove a handler from the "any" subscription. */
110
+ offAny<T = unknown>(handler: EventHandler<T>): this;
111
+ /** Start the SSE connection. Called automatically on first handler registration. */
112
+ connect(): void;
113
+ /**
114
+ * Open the EventSource with the given auth token.
115
+ * Extracted so both the happy path and the fallback path share logic.
116
+ */
117
+ private connectWithToken;
118
+ /** Stop listening and clean up all resources. */
119
+ disconnect(): void;
120
+ /** Whether the SSE connection is currently open. */
121
+ get connected(): boolean;
122
+ private ensureConnected;
123
+ private handleMessage;
124
+ private dispatch;
125
+ private scheduleReconnect;
126
+ private setConnected;
127
+ private emitError;
128
+ /** Whether we hold a token that won't expire for at least 30 seconds. */
129
+ private hasFreshSseToken;
130
+ /**
131
+ * Exchange the secret API key for a short-lived SSE token via
132
+ * POST /events/token. Schedules automatic refresh before expiry.
133
+ */
134
+ private exchangeToken;
135
+ /**
136
+ * Schedule a background token refresh. On success the existing connection
137
+ * keeps working (tokens are validated at connect time). On the next
138
+ * reconnect the fresh token will be used automatically.
139
+ */
140
+ private scheduleTokenRefresh;
141
+ }
142
+
37
143
  /** Metadata: string key-value pairs. Max 50 keys, 40-char keys, 500-char values. */
38
144
  type Metadata = Record<string, string>;
39
145
  /** Standard pagination parameters accepted by list endpoints. */
@@ -170,6 +276,51 @@ interface TicketUpdateParams {
170
276
  metadata?: Record<string, string | null>;
171
277
  }
172
278
 
279
+ type ChangeHandler<T> = (data: T[]) => void;
280
+ type ErrorEventHandler = (error: Error) => void;
281
+ declare class Subscription$1<T = unknown> {
282
+ private readonly realtime;
283
+ private readonly fetchFn;
284
+ private readonly resourcePath;
285
+ private readonly filterFn?;
286
+ private _data;
287
+ private _loading;
288
+ private _error;
289
+ private changeHandlers;
290
+ private errorEventHandlers;
291
+ private boundEventHandler;
292
+ private destroyed;
293
+ /** Generation counter to prevent stale refresh() from overwriting SSE updates. */
294
+ private generation;
295
+ constructor(realtime: CStarRealtime, fetchFn: () => Promise<ListResponse<T>>, resourcePath: string, filterFn?: ((item: T) => boolean) | undefined);
296
+ /** Current data array (updated in real-time). */
297
+ get data(): T[];
298
+ /** True during initial data fetch. */
299
+ get loading(): boolean;
300
+ /** Last error, if any. */
301
+ get error(): Error | null;
302
+ /** Register a callback for data changes or errors. */
303
+ on(event: 'change', handler: ChangeHandler<T>): this;
304
+ on(event: 'error', handler: ErrorEventHandler): this;
305
+ /** Manually refresh data from the server. */
306
+ refresh(): Promise<void>;
307
+ /**
308
+ * Apply an optimistic update to the local data.
309
+ * Returns a rollback function that reverts the change.
310
+ */
311
+ optimisticUpdate(id: string, changes: Partial<T>): () => void;
312
+ /** Stop the subscription and clean up all listeners. */
313
+ unsubscribe(): void;
314
+ private init;
315
+ private handleEvent;
316
+ private handleCreated;
317
+ private handleDeleted;
318
+ private handleUpdated;
319
+ private extractEntity;
320
+ private emitChange;
321
+ private emitError;
322
+ }
323
+
173
324
  /**
174
325
  * Base resource class implementing standard CRUD operations.
175
326
  * Resource-specific classes extend this with their own type parameters.
@@ -198,6 +349,19 @@ declare abstract class BaseResource<TEntity, TListParams extends PaginationParam
198
349
  * ```
199
350
  */
200
351
  listAutoPaginating(params?: Omit<TListParams, 'page'> & RequestOptions): AsyncIterable<TEntity>;
352
+ /**
353
+ * Subscribe to real-time changes for this resource type.
354
+ *
355
+ * Fetches initial data, then auto-updates via SSE events.
356
+ * Requires a `CStarRealtime` instance (available from `CStarClient.realtime`).
357
+ *
358
+ * ```typescript
359
+ * const sub = cstar.tickets.subscribe(cstar.realtime, { status: 'open' });
360
+ * sub.on('change', (tickets) => console.log(tickets));
361
+ * // Later: sub.unsubscribe();
362
+ * ```
363
+ */
364
+ subscribe(realtime: CStarRealtime, params?: TListParams & RequestOptions, filterFn?: (item: TEntity) => boolean): Subscription$1<TEntity>;
201
365
  /** Convert params to string values for query string serialization. */
202
366
  protected serializeQuery(params: Record<string, unknown>): Record<string, string | string[] | undefined>;
203
367
  }
@@ -464,7 +628,7 @@ declare class WebhooksResource extends BaseResource<Webhook, WebhookListParams,
464
628
  /** Get a sample webhook payload for an event type (used by Zapier). */
465
629
  sample(event: string): Promise<ApiResponse<unknown[]>>;
466
630
  /** Subscribe to an event (REST Hooks / Zapier protocol). */
467
- subscribe(params: WebhookSubscribeParams, options?: RequestOptions): Promise<ApiResponse<WebhookSubscription>>;
631
+ restSubscribe(params: WebhookSubscribeParams, options?: RequestOptions): Promise<ApiResponse<WebhookSubscription>>;
468
632
  /** Unsubscribe from an event (REST Hooks / Zapier protocol). Returns void (204 No Content). */
469
633
  unsubscribe(subscriptionId: string): Promise<void>;
470
634
  /** Register a CLI listener (returns listenerId and signing secret). */
@@ -675,6 +839,13 @@ declare class CategoriesResource extends BaseResource<Category, CategoryListPara
675
839
  constructor(client: HttpClient);
676
840
  }
677
841
 
842
+ /** Attachment metadata for community posts and comments. */
843
+ interface CommunityAttachment {
844
+ filename: string;
845
+ content_type: string;
846
+ size_bytes: number;
847
+ storage_path: string;
848
+ }
678
849
  /** A community discussion topic (category/board). */
679
850
  interface CommunityTopic {
680
851
  id: string;
@@ -703,6 +874,7 @@ interface CommunityPost {
703
874
  isFeatured: boolean;
704
875
  isLocked: boolean;
705
876
  commentsEnabled: boolean;
877
+ attachments: CommunityAttachment[];
706
878
  authorName: string;
707
879
  lastActivityAt: string;
708
880
  createdAt: string;
@@ -715,6 +887,7 @@ interface CommunityComment {
715
887
  body: string;
716
888
  isOfficial: boolean;
717
889
  voteScore: number;
890
+ attachments: CommunityAttachment[];
718
891
  authorName: string;
719
892
  parentCommentId: string | null;
720
893
  createdAt: string;
@@ -733,6 +906,7 @@ interface CommunityPostCreateParams {
733
906
  body?: string;
734
907
  topicId: string;
735
908
  visibility?: 'public' | 'members_only';
909
+ attachments?: CommunityAttachment[];
736
910
  }
737
911
  /** Parameters for updating a community post. */
738
912
  interface CommunityPostUpdateParams {
@@ -745,12 +919,14 @@ interface CommunityPostUpdateParams {
745
919
  isLocked?: boolean;
746
920
  isHidden?: boolean;
747
921
  commentsEnabled?: boolean;
922
+ attachments?: CommunityAttachment[];
748
923
  }
749
924
  /** Parameters for creating a comment on a community post. */
750
925
  interface CommunityCommentCreateParams {
751
926
  body: string;
752
927
  parentCommentId?: string;
753
928
  isOfficial?: boolean;
929
+ attachments?: CommunityAttachment[];
754
930
  }
755
931
 
756
932
  /** Manage community discussion posts. */
@@ -2158,6 +2334,26 @@ declare class GameResource {
2158
2334
  }): Promise<ApiResponse<LeaderboardEntry>>;
2159
2335
  /** Get game balance configuration (read-only constants). */
2160
2336
  config(): Promise<ApiResponse<GameConfig>>;
2337
+ /**
2338
+ * Subscribe to live boss battle state.
2339
+ * Updates on boss.spawned, boss.damaged, boss.defeated events.
2340
+ */
2341
+ subscribeBoss(realtime: CStarRealtime): Subscription$1<Boss>;
2342
+ /**
2343
+ * Subscribe to player stats (XP, gold, level, streaks).
2344
+ * Updates on achievement.unlocked, quest.completed, level.up events.
2345
+ */
2346
+ subscribePlayer(realtime: CStarRealtime, userId?: string): Subscription$1<Player>;
2347
+ /**
2348
+ * Subscribe to the team leaderboard.
2349
+ * Updates when scores change.
2350
+ */
2351
+ subscribeLeaderboard(realtime: CStarRealtime, params?: LeaderboardParams): Subscription$1<LeaderboardEntry>;
2352
+ /**
2353
+ * Subscribe to team activity feed (achievements, boss defeats, level ups).
2354
+ * Rolling feed of recent game events.
2355
+ */
2356
+ subscribeActivity(realtime: CStarRealtime): Subscription$1<Record<string, unknown>>;
2161
2357
  }
2162
2358
 
2163
2359
  /** AI action types. */
@@ -2272,13 +2468,84 @@ declare class BillingResource {
2272
2468
  portal(params?: BillingPortalParams): Promise<ApiResponse<BillingPortal>>;
2273
2469
  }
2274
2470
 
2471
+ interface QueueItem {
2472
+ /** Unique queue item ID. */
2473
+ id: string;
2474
+ /** HTTP method. */
2475
+ method: string;
2476
+ /** API path. */
2477
+ path: string;
2478
+ /** Request body. */
2479
+ body: Record<string, unknown>;
2480
+ /** When the item was queued. */
2481
+ queuedAt: string;
2482
+ }
2483
+ interface QueueResult {
2484
+ id: string;
2485
+ success: boolean;
2486
+ data?: unknown;
2487
+ error?: string;
2488
+ }
2489
+ interface OfflineQueueOptions {
2490
+ /** Storage backend: 'memory' (default) or 'localStorage' for browser persistence. */
2491
+ storage?: 'memory' | 'localStorage';
2492
+ }
2493
+ /**
2494
+ * Offline mutation queue that stores failed requests and replays them when online.
2495
+ *
2496
+ * When `CStarClient` is used with network issues, mutations can be enqueued
2497
+ * instead of failing. The queue persists to localStorage (in browsers) and
2498
+ * auto-flushes when the network comes back.
2499
+ *
2500
+ * ```typescript
2501
+ * const queue = new OfflineQueue(httpClient, { storage: 'localStorage' });
2502
+ * queue.enqueue('POST', '/tickets', { title: 'Bug report' });
2503
+ * // Later, when online:
2504
+ * const results = await queue.flush();
2505
+ * ```
2506
+ */
2507
+ declare class OfflineQueue {
2508
+ private readonly httpClient;
2509
+ private items;
2510
+ private autoFlushEnabled;
2511
+ private onlineHandler;
2512
+ private readonly useLocalStorage;
2513
+ constructor(httpClient: HttpClient, options?: OfflineQueueOptions);
2514
+ /** Queue a mutation for later execution. Returns a queue item ID. */
2515
+ enqueue(method: string, path: string, body: Record<string, unknown>): string;
2516
+ /**
2517
+ * Process all queued mutations in order. Returns results for each item.
2518
+ * Failed items are re-queued at the front to preserve ordering.
2519
+ * Items enqueued during flush are appended after re-queued failures.
2520
+ */
2521
+ flush(): Promise<QueueResult[]>;
2522
+ /** Get pending queue items. */
2523
+ get pending(): QueueItem[];
2524
+ /** Number of items in the queue. */
2525
+ get size(): number;
2526
+ /** Clear all pending items. */
2527
+ clear(): void;
2528
+ /**
2529
+ * Enable auto-flush when the browser goes online.
2530
+ * Only works in browser environments with the `online` event.
2531
+ */
2532
+ enableAutoFlush(): void;
2533
+ /** Disable auto-flush and clean up event listeners. */
2534
+ disableAutoFlush(): void;
2535
+ private saveToStorage;
2536
+ private loadFromStorage;
2537
+ }
2538
+
2275
2539
  /** Error type constants matching the cStar API. */
2276
2540
  declare const ErrorType: {
2277
2541
  readonly AUTHENTICATION_ERROR: "authentication_error";
2542
+ readonly PERMISSION_ERROR: "permission_error";
2278
2543
  readonly INVALID_REQUEST_ERROR: "invalid_request_error";
2279
2544
  readonly NOT_FOUND_ERROR: "not_found_error";
2545
+ readonly CONFLICT_ERROR: "conflict_error";
2280
2546
  readonly RATE_LIMIT_ERROR: "rate_limit_error";
2281
2547
  readonly API_ERROR: "api_error";
2548
+ readonly SERVER_ERROR: "server_error";
2282
2549
  };
2283
2550
  /** Shape of the error object returned by the cStar API. */
2284
2551
  interface ApiErrorBody {
@@ -2316,6 +2583,18 @@ declare class CStarNotFoundError extends CStarError {
2316
2583
  declare class CStarValidationError extends CStarError {
2317
2584
  constructor(statusCode: number, body: ApiErrorBody);
2318
2585
  }
2586
+ /** Thrown when authenticated but lacking permission (403). */
2587
+ declare class CStarPermissionError extends CStarError {
2588
+ constructor(statusCode: number, body: ApiErrorBody);
2589
+ }
2590
+ /** Thrown on resource conflicts (409). */
2591
+ declare class CStarConflictError extends CStarError {
2592
+ constructor(statusCode: number, body: ApiErrorBody);
2593
+ }
2594
+ /** Thrown on internal server errors (500+). */
2595
+ declare class CStarServerError extends CStarError {
2596
+ constructor(statusCode: number, body: ApiErrorBody);
2597
+ }
2319
2598
 
2320
2599
  /** Configuration for the CStarClient. */
2321
2600
  interface CStarClientConfig {
@@ -2331,6 +2610,8 @@ interface CStarClientConfig {
2331
2610
  maxRetries?: number;
2332
2611
  /** Request timeout in ms (defaults to 30000). */
2333
2612
  timeout?: number;
2613
+ /** Enable offline queue — queues mutations when network fails, auto-flushes on reconnect. */
2614
+ offline?: boolean | OfflineQueueOptions;
2334
2615
  }
2335
2616
  /**
2336
2617
  * The cStar admin API client. **Server-side only.**
@@ -2413,10 +2694,23 @@ declare class CStarClient {
2413
2694
  readonly views: ViewsResource;
2414
2695
  /** Access billing and subscription data. */
2415
2696
  readonly billing: BillingResource;
2416
- private readonly client;
2697
+ /** Real-time event stream via SSE. */
2698
+ readonly realtime: CStarRealtime;
2699
+ /**
2700
+ * Offline mutation queue. Only available when `offline: true` is passed to the constructor.
2701
+ * Queues failed mutations and replays them when the network returns.
2702
+ */
2703
+ readonly offlineQueue: OfflineQueue | null;
2704
+ /**
2705
+ * @internal The underlying HTTP client — used by realtime and subscription layers.
2706
+ * Not part of the public API. May change without notice between versions.
2707
+ */
2708
+ private readonly _httpClient;
2417
2709
  constructor(config: CStarClientConfig);
2710
+ /** Disconnect the realtime stream and clean up. */
2711
+ destroy(): void;
2418
2712
  /** Whether this client is using test mode keys (sk_test_* or pk_test_*). */
2419
2713
  get isTestMode(): boolean;
2420
2714
  }
2421
2715
 
2422
- 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, CStarError, CStarNotFoundError, CStarRateLimitError, CStarValidationError, type Category, type CategoryCreateParams, type CategoryListParams, type CategoryUpdateParams, type CommunityComment, type CommunityCommentCreateParams, type CommunityPost, type CommunityPostCreateParams, type CommunityPostListParams, type CommunityPostUpdateParams, type CommunityTopic, 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, ErrorType, 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, 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 QuickReply, type QuickReplyCreateParams, type QuickReplyUpdateParams, 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, type Subscription, type Tag, type TagListParams, type TeamSettings, type TeamSettingsUpdateParams, type Ticket, type TicketCreateParams, type TicketCustomerSummary, type TicketListParams, type TicketStatus, type TicketUpdateParams, type UnreadCount, type ViewCreateParams, type ViewExecuteParams, type ViewListParams, type ViewUpdateParams, 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 };
2716
+ 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, 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 UnreadCount, type ViewCreateParams, type ViewExecuteParams, type ViewListParams, type ViewUpdateParams, 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 };