@cstar.help/js 0.14.0 → 0.15.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.ts CHANGED
@@ -1017,7 +1017,15 @@ interface Webhook {
1017
1017
  metadata: Metadata;
1018
1018
  createdAt: string;
1019
1019
  updatedAt: string;
1020
- /** Only returned on creation (POST). */
1020
+ /**
1021
+ * Signing secret for HMAC verification (`whsec_*`). Only returned on
1022
+ * creation (POST `/webhooks`). Save it immediately — subsequent reads
1023
+ * will not include it. Use it as the `secret` argument to
1024
+ * `constructEvent` / `verifySignature` from `@cstar.help/js/webhook`.
1025
+ */
1026
+ signingSecret?: string;
1027
+ /** @deprecated since 0.15.0 — use {@link signingSecret} instead. Kept
1028
+ * during the deprecation window so 0.14.x consumers keep working. */
1021
1029
  secret?: string;
1022
1030
  }
1023
1031
  /** Parameters for listing webhooks. */
@@ -3056,6 +3064,28 @@ declare class OfflineQueue {
3056
3064
  private loadFromStorage;
3057
3065
  }
3058
3066
 
3067
+ /**
3068
+ * Error classes for the cStar SDK.
3069
+ *
3070
+ * NEW-v3-01 — Cross-subpath instanceof identity.
3071
+ *
3072
+ * Each public subpath (`/library`, `/auth`, `/community`, `/quickhelp`, ...)
3073
+ * is bundled as a separate tsup entry with `splitting: false`, so each one
3074
+ * carries its own copy of this module. Without deduplication, errors thrown
3075
+ * by `LibraryClient` carry the LibraryClient-bundled `CStarError` class —
3076
+ * not the one a consumer imports from `@cstar.help/js`. That makes
3077
+ * `instanceof CStarError` checks fail silently, invalidating every "did the
3078
+ * SDK throw a typed cStar error?" branch in user code.
3079
+ *
3080
+ * Fix: register each class on a `Symbol.for(...)` slot of `globalThis`. The
3081
+ * symbol is realm-shared, so every bundled copy of this module resolves to
3082
+ * the SAME class identity at runtime — the first copy to load wins, and all
3083
+ * subsequent copies surface the canonical class via the same slot. The
3084
+ * inline `Impl` definitions are only used as the seed for the very first
3085
+ * copy to register. Internal `parseError` / `parsePublicError` reference the
3086
+ * EXPORTED canonical names so instances they construct also land on the
3087
+ * canonical class.
3088
+ */
3059
3089
  /** Error type constants matching the cStar API. */
3060
3090
  declare const ErrorType: {
3061
3091
  readonly AUTHENTICATION_ERROR: "authentication_error";
@@ -3080,58 +3110,309 @@ interface ApiErrorBody {
3080
3110
  enable_url?: string;
3081
3111
  }
3082
3112
  /** Base error class for all cStar API errors. */
3083
- declare class CStarError extends Error {
3084
- readonly type: string;
3085
- readonly code: string;
3086
- readonly param?: string;
3087
- readonly docUrl: string;
3088
- readonly requestId?: string;
3089
- readonly statusCode: number;
3090
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
3091
- }
3092
- /** Thrown when authentication fails (401). */
3093
- declare class CStarAuthenticationError extends CStarError {
3094
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
3095
- }
3096
- /** Thrown when rate limited (429). Includes retry timing. */
3097
- declare class CStarRateLimitError extends CStarError {
3098
- readonly retryAfter: number;
3099
- constructor(messageOrStatus: string | number, body?: ApiErrorBody, retryAfter?: number);
3100
- }
3101
- /** Thrown when a resource is not found (404). */
3102
- declare class CStarNotFoundError extends CStarError {
3103
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
3104
- }
3105
- /** Thrown on invalid request parameters (400/422). */
3106
- declare class CStarValidationError extends CStarError {
3107
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
3108
- }
3109
- /** Thrown when authenticated but lacking permission (403). */
3110
- declare class CStarPermissionError extends CStarError {
3111
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
3112
- }
3113
- /** Thrown on resource conflicts (409). */
3114
- declare class CStarConflictError extends CStarError {
3115
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
3116
- }
3117
- /** Thrown on internal server errors (500+). */
3118
- declare class CStarServerError extends CStarError {
3119
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
3120
- }
3121
- /**
3122
- * Thrown when the call landed on a feature that the team has not enabled
3123
- * or configured (e.g. Quick Help on a team without an AI agent). Carries
3124
- * `feature` and `enableUrl` so the caller can route the user to the
3125
- * dashboard setting that fixes it.
3126
- *
3127
- * Closes F-031 — anonymous QuickHelp `.ask()` previously surfaced as an
3128
- * unactionable 503.
3129
- */
3130
- declare class CStarFeatureDisabledError extends CStarError {
3131
- readonly feature: string;
3132
- readonly enableUrl: string;
3133
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
3134
- }
3113
+ declare const CStarErrorImpl: {
3114
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3115
+ readonly type: string;
3116
+ readonly code: string;
3117
+ readonly param?: string;
3118
+ readonly docUrl: string;
3119
+ readonly requestId?: string;
3120
+ readonly statusCode: number;
3121
+ name: string;
3122
+ message: string;
3123
+ stack?: string;
3124
+ };
3125
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3126
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3127
+ stackTraceLimit: number;
3128
+ };
3129
+ declare const CStarAuthenticationErrorImpl: {
3130
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3131
+ readonly type: string;
3132
+ readonly code: string;
3133
+ readonly param?: string;
3134
+ readonly docUrl: string;
3135
+ readonly requestId?: string;
3136
+ readonly statusCode: number;
3137
+ name: string;
3138
+ message: string;
3139
+ stack?: string;
3140
+ };
3141
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3142
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3143
+ stackTraceLimit: number;
3144
+ };
3145
+ declare const CStarRateLimitErrorImpl: {
3146
+ new (messageOrStatus: string | number, body?: ApiErrorBody, retryAfter?: number): {
3147
+ readonly retryAfter: number;
3148
+ readonly type: string;
3149
+ readonly code: string;
3150
+ readonly param?: string;
3151
+ readonly docUrl: string;
3152
+ readonly requestId?: string;
3153
+ readonly statusCode: number;
3154
+ name: string;
3155
+ message: string;
3156
+ stack?: string;
3157
+ };
3158
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3159
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3160
+ stackTraceLimit: number;
3161
+ };
3162
+ declare const CStarNotFoundErrorImpl: {
3163
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3164
+ readonly type: string;
3165
+ readonly code: string;
3166
+ readonly param?: string;
3167
+ readonly docUrl: string;
3168
+ readonly requestId?: string;
3169
+ readonly statusCode: number;
3170
+ name: string;
3171
+ message: string;
3172
+ stack?: string;
3173
+ };
3174
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3175
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3176
+ stackTraceLimit: number;
3177
+ };
3178
+ declare const CStarValidationErrorImpl: {
3179
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3180
+ readonly type: string;
3181
+ readonly code: string;
3182
+ readonly param?: string;
3183
+ readonly docUrl: string;
3184
+ readonly requestId?: string;
3185
+ readonly statusCode: number;
3186
+ name: string;
3187
+ message: string;
3188
+ stack?: string;
3189
+ };
3190
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3191
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3192
+ stackTraceLimit: number;
3193
+ };
3194
+ declare const CStarPermissionErrorImpl: {
3195
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3196
+ readonly type: string;
3197
+ readonly code: string;
3198
+ readonly param?: string;
3199
+ readonly docUrl: string;
3200
+ readonly requestId?: string;
3201
+ readonly statusCode: number;
3202
+ name: string;
3203
+ message: string;
3204
+ stack?: string;
3205
+ };
3206
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3207
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3208
+ stackTraceLimit: number;
3209
+ };
3210
+ declare const CStarConflictErrorImpl: {
3211
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3212
+ readonly type: string;
3213
+ readonly code: string;
3214
+ readonly param?: string;
3215
+ readonly docUrl: string;
3216
+ readonly requestId?: string;
3217
+ readonly statusCode: number;
3218
+ name: string;
3219
+ message: string;
3220
+ stack?: string;
3221
+ };
3222
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3223
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3224
+ stackTraceLimit: number;
3225
+ };
3226
+ declare const CStarServerErrorImpl: {
3227
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3228
+ readonly type: string;
3229
+ readonly code: string;
3230
+ readonly param?: string;
3231
+ readonly docUrl: string;
3232
+ readonly requestId?: string;
3233
+ readonly statusCode: number;
3234
+ name: string;
3235
+ message: string;
3236
+ stack?: string;
3237
+ };
3238
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3239
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3240
+ stackTraceLimit: number;
3241
+ };
3242
+ declare const CStarFeatureDisabledErrorImpl: {
3243
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3244
+ readonly feature: string;
3245
+ readonly enableUrl: string;
3246
+ readonly type: string;
3247
+ readonly code: string;
3248
+ readonly param?: string;
3249
+ readonly docUrl: string;
3250
+ readonly requestId?: string;
3251
+ readonly statusCode: number;
3252
+ name: string;
3253
+ message: string;
3254
+ stack?: string;
3255
+ };
3256
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3257
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3258
+ stackTraceLimit: number;
3259
+ };
3260
+ declare const CStarError: {
3261
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3262
+ readonly type: string;
3263
+ readonly code: string;
3264
+ readonly param?: string;
3265
+ readonly docUrl: string;
3266
+ readonly requestId?: string;
3267
+ readonly statusCode: number;
3268
+ name: string;
3269
+ message: string;
3270
+ stack?: string;
3271
+ };
3272
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3273
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3274
+ stackTraceLimit: number;
3275
+ };
3276
+ type CStarError = InstanceType<typeof CStarErrorImpl>;
3277
+ declare const CStarAuthenticationError: {
3278
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3279
+ readonly type: string;
3280
+ readonly code: string;
3281
+ readonly param?: string;
3282
+ readonly docUrl: string;
3283
+ readonly requestId?: string;
3284
+ readonly statusCode: number;
3285
+ name: string;
3286
+ message: string;
3287
+ stack?: string;
3288
+ };
3289
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3290
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3291
+ stackTraceLimit: number;
3292
+ };
3293
+ type CStarAuthenticationError = InstanceType<typeof CStarAuthenticationErrorImpl>;
3294
+ declare const CStarRateLimitError: {
3295
+ new (messageOrStatus: string | number, body?: ApiErrorBody, retryAfter?: number): {
3296
+ readonly retryAfter: number;
3297
+ readonly type: string;
3298
+ readonly code: string;
3299
+ readonly param?: string;
3300
+ readonly docUrl: string;
3301
+ readonly requestId?: string;
3302
+ readonly statusCode: number;
3303
+ name: string;
3304
+ message: string;
3305
+ stack?: string;
3306
+ };
3307
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3308
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3309
+ stackTraceLimit: number;
3310
+ };
3311
+ type CStarRateLimitError = InstanceType<typeof CStarRateLimitErrorImpl>;
3312
+ declare const CStarNotFoundError: {
3313
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3314
+ readonly type: string;
3315
+ readonly code: string;
3316
+ readonly param?: string;
3317
+ readonly docUrl: string;
3318
+ readonly requestId?: string;
3319
+ readonly statusCode: number;
3320
+ name: string;
3321
+ message: string;
3322
+ stack?: string;
3323
+ };
3324
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3325
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3326
+ stackTraceLimit: number;
3327
+ };
3328
+ type CStarNotFoundError = InstanceType<typeof CStarNotFoundErrorImpl>;
3329
+ declare const CStarValidationError: {
3330
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3331
+ readonly type: string;
3332
+ readonly code: string;
3333
+ readonly param?: string;
3334
+ readonly docUrl: string;
3335
+ readonly requestId?: string;
3336
+ readonly statusCode: number;
3337
+ name: string;
3338
+ message: string;
3339
+ stack?: string;
3340
+ };
3341
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3342
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3343
+ stackTraceLimit: number;
3344
+ };
3345
+ type CStarValidationError = InstanceType<typeof CStarValidationErrorImpl>;
3346
+ declare const CStarPermissionError: {
3347
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3348
+ readonly type: string;
3349
+ readonly code: string;
3350
+ readonly param?: string;
3351
+ readonly docUrl: string;
3352
+ readonly requestId?: string;
3353
+ readonly statusCode: number;
3354
+ name: string;
3355
+ message: string;
3356
+ stack?: string;
3357
+ };
3358
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3359
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3360
+ stackTraceLimit: number;
3361
+ };
3362
+ type CStarPermissionError = InstanceType<typeof CStarPermissionErrorImpl>;
3363
+ declare const CStarConflictError: {
3364
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3365
+ readonly type: string;
3366
+ readonly code: string;
3367
+ readonly param?: string;
3368
+ readonly docUrl: string;
3369
+ readonly requestId?: string;
3370
+ readonly statusCode: number;
3371
+ name: string;
3372
+ message: string;
3373
+ stack?: string;
3374
+ };
3375
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3376
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3377
+ stackTraceLimit: number;
3378
+ };
3379
+ type CStarConflictError = InstanceType<typeof CStarConflictErrorImpl>;
3380
+ declare const CStarServerError: {
3381
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3382
+ readonly type: string;
3383
+ readonly code: string;
3384
+ readonly param?: string;
3385
+ readonly docUrl: string;
3386
+ readonly requestId?: string;
3387
+ readonly statusCode: number;
3388
+ name: string;
3389
+ message: string;
3390
+ stack?: string;
3391
+ };
3392
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3393
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3394
+ stackTraceLimit: number;
3395
+ };
3396
+ type CStarServerError = InstanceType<typeof CStarServerErrorImpl>;
3397
+ declare const CStarFeatureDisabledError: {
3398
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
3399
+ readonly feature: string;
3400
+ readonly enableUrl: string;
3401
+ readonly type: string;
3402
+ readonly code: string;
3403
+ readonly param?: string;
3404
+ readonly docUrl: string;
3405
+ readonly requestId?: string;
3406
+ readonly statusCode: number;
3407
+ name: string;
3408
+ message: string;
3409
+ stack?: string;
3410
+ };
3411
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
3412
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
3413
+ stackTraceLimit: number;
3414
+ };
3415
+ type CStarFeatureDisabledError = InstanceType<typeof CStarFeatureDisabledErrorImpl>;
3135
3416
 
3136
3417
  /** Configuration for the CStarClient. */
3137
3418
  interface CStarClientConfig {
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ function normalizeArgs(messageOrStatus, maybeBody, defaults) {
35
35
  }
36
36
  };
37
37
  }
38
- var CStarError = class extends Error {
38
+ var CStarErrorImpl = class extends Error {
39
39
  constructor(messageOrStatus, body) {
40
40
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body);
41
41
  super(resolved.message);
@@ -48,7 +48,7 @@ var CStarError = class extends Error {
48
48
  this.statusCode = statusCode;
49
49
  }
50
50
  };
51
- var CStarAuthenticationError = class extends CStarError {
51
+ var CStarAuthenticationErrorImpl = class extends CStarErrorImpl {
52
52
  constructor(messageOrStatus, body) {
53
53
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
54
54
  type: ErrorType.AUTHENTICATION_ERROR,
@@ -59,7 +59,7 @@ var CStarAuthenticationError = class extends CStarError {
59
59
  this.name = "CStarAuthenticationError";
60
60
  }
61
61
  };
62
- var CStarRateLimitError = class extends CStarError {
62
+ var CStarRateLimitErrorImpl = class extends CStarErrorImpl {
63
63
  constructor(messageOrStatus, body, retryAfter) {
64
64
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
65
65
  type: ErrorType.RATE_LIMIT_ERROR,
@@ -71,7 +71,7 @@ var CStarRateLimitError = class extends CStarError {
71
71
  this.retryAfter = retryAfter ?? 60;
72
72
  }
73
73
  };
74
- var CStarNotFoundError = class extends CStarError {
74
+ var CStarNotFoundErrorImpl = class extends CStarErrorImpl {
75
75
  constructor(messageOrStatus, body) {
76
76
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
77
77
  type: ErrorType.NOT_FOUND_ERROR,
@@ -82,7 +82,7 @@ var CStarNotFoundError = class extends CStarError {
82
82
  this.name = "CStarNotFoundError";
83
83
  }
84
84
  };
85
- var CStarValidationError = class extends CStarError {
85
+ var CStarValidationErrorImpl = class extends CStarErrorImpl {
86
86
  constructor(messageOrStatus, body) {
87
87
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
88
88
  type: ErrorType.INVALID_REQUEST_ERROR,
@@ -93,7 +93,7 @@ var CStarValidationError = class extends CStarError {
93
93
  this.name = "CStarValidationError";
94
94
  }
95
95
  };
96
- var CStarPermissionError = class extends CStarError {
96
+ var CStarPermissionErrorImpl = class extends CStarErrorImpl {
97
97
  constructor(messageOrStatus, body) {
98
98
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
99
99
  type: ErrorType.PERMISSION_ERROR,
@@ -104,7 +104,7 @@ var CStarPermissionError = class extends CStarError {
104
104
  this.name = "CStarPermissionError";
105
105
  }
106
106
  };
107
- var CStarConflictError = class extends CStarError {
107
+ var CStarConflictErrorImpl = class extends CStarErrorImpl {
108
108
  constructor(messageOrStatus, body) {
109
109
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
110
110
  type: ErrorType.CONFLICT_ERROR,
@@ -115,7 +115,7 @@ var CStarConflictError = class extends CStarError {
115
115
  this.name = "CStarConflictError";
116
116
  }
117
117
  };
118
- var CStarServerError = class extends CStarError {
118
+ var CStarServerErrorImpl = class extends CStarErrorImpl {
119
119
  constructor(messageOrStatus, body) {
120
120
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
121
121
  type: ErrorType.SERVER_ERROR,
@@ -126,7 +126,7 @@ var CStarServerError = class extends CStarError {
126
126
  this.name = "CStarServerError";
127
127
  }
128
128
  };
129
- var CStarFeatureDisabledError = class extends CStarError {
129
+ var CStarFeatureDisabledErrorImpl = class extends CStarErrorImpl {
130
130
  constructor(messageOrStatus, body) {
131
131
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
132
132
  type: ErrorType.FEATURE_NOT_CONFIGURED,
@@ -139,7 +139,7 @@ var CStarFeatureDisabledError = class extends CStarError {
139
139
  this.enableUrl = resolved.enable_url ?? "";
140
140
  }
141
141
  };
142
- var CStarRealtimeUnavailableError = class extends CStarError {
142
+ var CStarRealtimeUnavailableErrorImpl = class extends CStarErrorImpl {
143
143
  constructor(message) {
144
144
  const resolved = message ?? "EventSource is not available in this environment. Real-time subscriptions only work in the browser. Move the call to a client-only path (`useEffect` / `onMount`), or pass an `eventSource` polyfill via the realtime options. See https://cstar.help/developers/sdk/realtime#ssr";
145
145
  super(0, {
@@ -151,6 +151,50 @@ var CStarRealtimeUnavailableError = class extends CStarError {
151
151
  this.name = "CStarRealtimeUnavailableError";
152
152
  }
153
153
  };
154
+ var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("@cstar.help/js/errors/v1");
155
+ var globalSlot = globalThis;
156
+ var registry = globalSlot[REGISTRY_KEY] ?? (globalSlot[REGISTRY_KEY] = {
157
+ CStarError: CStarErrorImpl,
158
+ CStarAuthenticationError: CStarAuthenticationErrorImpl,
159
+ CStarRateLimitError: CStarRateLimitErrorImpl,
160
+ CStarNotFoundError: CStarNotFoundErrorImpl,
161
+ CStarValidationError: CStarValidationErrorImpl,
162
+ CStarPermissionError: CStarPermissionErrorImpl,
163
+ CStarConflictError: CStarConflictErrorImpl,
164
+ CStarServerError: CStarServerErrorImpl,
165
+ CStarFeatureDisabledError: CStarFeatureDisabledErrorImpl,
166
+ CStarRealtimeUnavailableError: CStarRealtimeUnavailableErrorImpl
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
+ }
188
+ var CStarError = registry.CStarError;
189
+ var CStarAuthenticationError = registry.CStarAuthenticationError;
190
+ var CStarRateLimitError = registry.CStarRateLimitError;
191
+ var CStarNotFoundError = registry.CStarNotFoundError;
192
+ var CStarValidationError = registry.CStarValidationError;
193
+ var CStarPermissionError = registry.CStarPermissionError;
194
+ var CStarConflictError = registry.CStarConflictError;
195
+ var CStarServerError = registry.CStarServerError;
196
+ var CStarFeatureDisabledError = registry.CStarFeatureDisabledError;
197
+ var CStarRealtimeUnavailableError = registry.CStarRealtimeUnavailableError;
154
198
  var STATUS_TO_CLASS = {
155
199
  400: CStarValidationError,
156
200
  401: CStarAuthenticationError,
@@ -193,7 +237,7 @@ function parseError(statusCode, body, retryAfter) {
193
237
  }
194
238
 
195
239
  // src/client.ts
196
- var SDK_VERSION = "0.14.0";
240
+ var SDK_VERSION = "0.15.1";
197
241
  var DEFAULT_BASE_URL = "https://www.cstar.help";
198
242
  var DEFAULT_API_VERSION = "2026-03-01";
199
243
  var DEFAULT_MAX_RETRIES = 3;