@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.cjs CHANGED
@@ -74,7 +74,7 @@ function normalizeArgs(messageOrStatus, maybeBody, defaults) {
74
74
  }
75
75
  };
76
76
  }
77
- var CStarError = class extends Error {
77
+ var CStarErrorImpl = class extends Error {
78
78
  constructor(messageOrStatus, body) {
79
79
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body);
80
80
  super(resolved.message);
@@ -87,7 +87,7 @@ var CStarError = class extends Error {
87
87
  this.statusCode = statusCode;
88
88
  }
89
89
  };
90
- var CStarAuthenticationError = class extends CStarError {
90
+ var CStarAuthenticationErrorImpl = class extends CStarErrorImpl {
91
91
  constructor(messageOrStatus, body) {
92
92
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
93
93
  type: ErrorType.AUTHENTICATION_ERROR,
@@ -98,7 +98,7 @@ var CStarAuthenticationError = class extends CStarError {
98
98
  this.name = "CStarAuthenticationError";
99
99
  }
100
100
  };
101
- var CStarRateLimitError = class extends CStarError {
101
+ var CStarRateLimitErrorImpl = class extends CStarErrorImpl {
102
102
  constructor(messageOrStatus, body, retryAfter) {
103
103
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
104
104
  type: ErrorType.RATE_LIMIT_ERROR,
@@ -110,7 +110,7 @@ var CStarRateLimitError = class extends CStarError {
110
110
  this.retryAfter = retryAfter ?? 60;
111
111
  }
112
112
  };
113
- var CStarNotFoundError = class extends CStarError {
113
+ var CStarNotFoundErrorImpl = class extends CStarErrorImpl {
114
114
  constructor(messageOrStatus, body) {
115
115
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
116
116
  type: ErrorType.NOT_FOUND_ERROR,
@@ -121,7 +121,7 @@ var CStarNotFoundError = class extends CStarError {
121
121
  this.name = "CStarNotFoundError";
122
122
  }
123
123
  };
124
- var CStarValidationError = class extends CStarError {
124
+ var CStarValidationErrorImpl = class extends CStarErrorImpl {
125
125
  constructor(messageOrStatus, body) {
126
126
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
127
127
  type: ErrorType.INVALID_REQUEST_ERROR,
@@ -132,7 +132,7 @@ var CStarValidationError = class extends CStarError {
132
132
  this.name = "CStarValidationError";
133
133
  }
134
134
  };
135
- var CStarPermissionError = class extends CStarError {
135
+ var CStarPermissionErrorImpl = class extends CStarErrorImpl {
136
136
  constructor(messageOrStatus, body) {
137
137
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
138
138
  type: ErrorType.PERMISSION_ERROR,
@@ -143,7 +143,7 @@ var CStarPermissionError = class extends CStarError {
143
143
  this.name = "CStarPermissionError";
144
144
  }
145
145
  };
146
- var CStarConflictError = class extends CStarError {
146
+ var CStarConflictErrorImpl = class extends CStarErrorImpl {
147
147
  constructor(messageOrStatus, body) {
148
148
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
149
149
  type: ErrorType.CONFLICT_ERROR,
@@ -154,7 +154,7 @@ var CStarConflictError = class extends CStarError {
154
154
  this.name = "CStarConflictError";
155
155
  }
156
156
  };
157
- var CStarServerError = class extends CStarError {
157
+ var CStarServerErrorImpl = class extends CStarErrorImpl {
158
158
  constructor(messageOrStatus, body) {
159
159
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
160
160
  type: ErrorType.SERVER_ERROR,
@@ -165,7 +165,7 @@ var CStarServerError = class extends CStarError {
165
165
  this.name = "CStarServerError";
166
166
  }
167
167
  };
168
- var CStarFeatureDisabledError = class extends CStarError {
168
+ var CStarFeatureDisabledErrorImpl = class extends CStarErrorImpl {
169
169
  constructor(messageOrStatus, body) {
170
170
  const { statusCode, body: resolved } = normalizeArgs(messageOrStatus, body, {
171
171
  type: ErrorType.FEATURE_NOT_CONFIGURED,
@@ -178,7 +178,7 @@ var CStarFeatureDisabledError = class extends CStarError {
178
178
  this.enableUrl = resolved.enable_url ?? "";
179
179
  }
180
180
  };
181
- var CStarRealtimeUnavailableError = class extends CStarError {
181
+ var CStarRealtimeUnavailableErrorImpl = class extends CStarErrorImpl {
182
182
  constructor(message) {
183
183
  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";
184
184
  super(0, {
@@ -190,6 +190,50 @@ var CStarRealtimeUnavailableError = class extends CStarError {
190
190
  this.name = "CStarRealtimeUnavailableError";
191
191
  }
192
192
  };
193
+ var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("@cstar.help/js/errors/v1");
194
+ var globalSlot = globalThis;
195
+ var registry = globalSlot[REGISTRY_KEY] ?? (globalSlot[REGISTRY_KEY] = {
196
+ CStarError: CStarErrorImpl,
197
+ CStarAuthenticationError: CStarAuthenticationErrorImpl,
198
+ CStarRateLimitError: CStarRateLimitErrorImpl,
199
+ CStarNotFoundError: CStarNotFoundErrorImpl,
200
+ CStarValidationError: CStarValidationErrorImpl,
201
+ CStarPermissionError: CStarPermissionErrorImpl,
202
+ CStarConflictError: CStarConflictErrorImpl,
203
+ CStarServerError: CStarServerErrorImpl,
204
+ CStarFeatureDisabledError: CStarFeatureDisabledErrorImpl,
205
+ CStarRealtimeUnavailableError: CStarRealtimeUnavailableErrorImpl
206
+ });
207
+ var NAME_FIXES = [
208
+ "CStarError",
209
+ "CStarAuthenticationError",
210
+ "CStarRateLimitError",
211
+ "CStarNotFoundError",
212
+ "CStarValidationError",
213
+ "CStarPermissionError",
214
+ "CStarConflictError",
215
+ "CStarServerError",
216
+ "CStarFeatureDisabledError",
217
+ "CStarRealtimeUnavailableError"
218
+ ];
219
+ for (const key of NAME_FIXES) {
220
+ if (registry[key].name !== key) {
221
+ Object.defineProperty(registry[key], "name", {
222
+ value: key,
223
+ configurable: true
224
+ });
225
+ }
226
+ }
227
+ var CStarError = registry.CStarError;
228
+ var CStarAuthenticationError = registry.CStarAuthenticationError;
229
+ var CStarRateLimitError = registry.CStarRateLimitError;
230
+ var CStarNotFoundError = registry.CStarNotFoundError;
231
+ var CStarValidationError = registry.CStarValidationError;
232
+ var CStarPermissionError = registry.CStarPermissionError;
233
+ var CStarConflictError = registry.CStarConflictError;
234
+ var CStarServerError = registry.CStarServerError;
235
+ var CStarFeatureDisabledError = registry.CStarFeatureDisabledError;
236
+ var CStarRealtimeUnavailableError = registry.CStarRealtimeUnavailableError;
193
237
  var STATUS_TO_CLASS = {
194
238
  400: CStarValidationError,
195
239
  401: CStarAuthenticationError,
@@ -232,7 +276,7 @@ function parseError(statusCode, body, retryAfter) {
232
276
  }
233
277
 
234
278
  // src/client.ts
235
- var SDK_VERSION = "0.14.0";
279
+ var SDK_VERSION = "0.15.1";
236
280
  var DEFAULT_BASE_URL = "https://www.cstar.help";
237
281
  var DEFAULT_API_VERSION = "2026-03-01";
238
282
  var DEFAULT_MAX_RETRIES = 3;
package/dist/index.d.cts 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 {