@cstar.help/js 0.15.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.
@@ -204,6 +204,26 @@ var registry = globalSlot[REGISTRY_KEY] ?? (globalSlot[REGISTRY_KEY] = {
204
204
  CStarFeatureDisabledError: CStarFeatureDisabledErrorImpl,
205
205
  CStarRealtimeUnavailableError: CStarRealtimeUnavailableErrorImpl
206
206
  });
207
+ var NAME_FIXES = [
208
+ "CStarError",
209
+ "CStarAuthenticationError",
210
+ "CStarRateLimitError",
211
+ "CStarNotFoundError",
212
+ "CStarValidationError",
213
+ "CStarPermissionError",
214
+ "CStarConflictError",
215
+ "CStarServerError",
216
+ "CStarFeatureDisabledError",
217
+ "CStarRealtimeUnavailableError"
218
+ ];
219
+ for (const key of NAME_FIXES) {
220
+ if (registry[key].name !== key) {
221
+ Object.defineProperty(registry[key], "name", {
222
+ value: key,
223
+ configurable: true
224
+ });
225
+ }
226
+ }
207
227
  var CStarError = registry.CStarError;
208
228
  var CStarAuthenticationError = registry.CStarAuthenticationError;
209
229
  var CStarRateLimitError = registry.CStarRateLimitError;
@@ -102,64 +102,341 @@ interface ApiErrorBody {
102
102
  enable_url?: string;
103
103
  }
104
104
  /** Base error class for all cStar API errors. */
105
- declare class CStarErrorImpl extends Error {
106
- readonly type: string;
107
- readonly code: string;
108
- readonly param?: string;
109
- readonly docUrl: string;
110
- readonly requestId?: string;
111
- readonly statusCode: number;
112
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
113
- }
114
- declare class CStarAuthenticationErrorImpl extends CStarErrorImpl {
115
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
116
- }
117
- declare class CStarRateLimitErrorImpl extends CStarErrorImpl {
118
- readonly retryAfter: number;
119
- constructor(messageOrStatus: string | number, body?: ApiErrorBody, retryAfter?: number);
120
- }
121
- declare class CStarNotFoundErrorImpl extends CStarErrorImpl {
122
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
123
- }
124
- declare class CStarValidationErrorImpl extends CStarErrorImpl {
125
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
126
- }
127
- declare class CStarPermissionErrorImpl extends CStarErrorImpl {
128
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
129
- }
130
- declare class CStarConflictErrorImpl extends CStarErrorImpl {
131
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
132
- }
133
- declare class CStarServerErrorImpl extends CStarErrorImpl {
134
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
135
- }
136
- declare class CStarFeatureDisabledErrorImpl extends CStarErrorImpl {
137
- readonly feature: string;
138
- readonly enableUrl: string;
139
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
140
- }
141
- declare class CStarRealtimeUnavailableErrorImpl extends CStarErrorImpl {
142
- constructor(message?: string);
143
- }
144
- declare const CStarError: typeof CStarErrorImpl;
105
+ declare const CStarErrorImpl: {
106
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
107
+ readonly type: string;
108
+ readonly code: string;
109
+ readonly param?: string;
110
+ readonly docUrl: string;
111
+ readonly requestId?: string;
112
+ readonly statusCode: number;
113
+ name: string;
114
+ message: string;
115
+ stack?: string;
116
+ };
117
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
118
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
119
+ stackTraceLimit: number;
120
+ };
121
+ declare const CStarAuthenticationErrorImpl: {
122
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
123
+ readonly type: string;
124
+ readonly code: string;
125
+ readonly param?: string;
126
+ readonly docUrl: string;
127
+ readonly requestId?: string;
128
+ readonly statusCode: number;
129
+ name: string;
130
+ message: string;
131
+ stack?: string;
132
+ };
133
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
134
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
135
+ stackTraceLimit: number;
136
+ };
137
+ declare const CStarRateLimitErrorImpl: {
138
+ new (messageOrStatus: string | number, body?: ApiErrorBody, retryAfter?: number): {
139
+ readonly retryAfter: number;
140
+ readonly type: string;
141
+ readonly code: string;
142
+ readonly param?: string;
143
+ readonly docUrl: string;
144
+ readonly requestId?: string;
145
+ readonly statusCode: number;
146
+ name: string;
147
+ message: string;
148
+ stack?: string;
149
+ };
150
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
151
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
152
+ stackTraceLimit: number;
153
+ };
154
+ declare const CStarNotFoundErrorImpl: {
155
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
156
+ readonly type: string;
157
+ readonly code: string;
158
+ readonly param?: string;
159
+ readonly docUrl: string;
160
+ readonly requestId?: string;
161
+ readonly statusCode: number;
162
+ name: string;
163
+ message: string;
164
+ stack?: string;
165
+ };
166
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
167
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
168
+ stackTraceLimit: number;
169
+ };
170
+ declare const CStarValidationErrorImpl: {
171
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
172
+ readonly type: string;
173
+ readonly code: string;
174
+ readonly param?: string;
175
+ readonly docUrl: string;
176
+ readonly requestId?: string;
177
+ readonly statusCode: number;
178
+ name: string;
179
+ message: string;
180
+ stack?: string;
181
+ };
182
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
183
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
184
+ stackTraceLimit: number;
185
+ };
186
+ declare const CStarPermissionErrorImpl: {
187
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
188
+ readonly type: string;
189
+ readonly code: string;
190
+ readonly param?: string;
191
+ readonly docUrl: string;
192
+ readonly requestId?: string;
193
+ readonly statusCode: number;
194
+ name: string;
195
+ message: string;
196
+ stack?: string;
197
+ };
198
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
199
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
200
+ stackTraceLimit: number;
201
+ };
202
+ declare const CStarConflictErrorImpl: {
203
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
204
+ readonly type: string;
205
+ readonly code: string;
206
+ readonly param?: string;
207
+ readonly docUrl: string;
208
+ readonly requestId?: string;
209
+ readonly statusCode: number;
210
+ name: string;
211
+ message: string;
212
+ stack?: string;
213
+ };
214
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
215
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
216
+ stackTraceLimit: number;
217
+ };
218
+ declare const CStarServerErrorImpl: {
219
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
220
+ readonly type: string;
221
+ readonly code: string;
222
+ readonly param?: string;
223
+ readonly docUrl: string;
224
+ readonly requestId?: string;
225
+ readonly statusCode: number;
226
+ name: string;
227
+ message: string;
228
+ stack?: string;
229
+ };
230
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
231
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
232
+ stackTraceLimit: number;
233
+ };
234
+ declare const CStarFeatureDisabledErrorImpl: {
235
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
236
+ readonly feature: string;
237
+ readonly enableUrl: string;
238
+ readonly type: string;
239
+ readonly code: string;
240
+ readonly param?: string;
241
+ readonly docUrl: string;
242
+ readonly requestId?: string;
243
+ readonly statusCode: number;
244
+ name: string;
245
+ message: string;
246
+ stack?: string;
247
+ };
248
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
249
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
250
+ stackTraceLimit: number;
251
+ };
252
+ declare const CStarRealtimeUnavailableErrorImpl: {
253
+ new (message?: string): {
254
+ readonly type: string;
255
+ readonly code: string;
256
+ readonly param?: string;
257
+ readonly docUrl: string;
258
+ readonly requestId?: string;
259
+ readonly statusCode: number;
260
+ name: string;
261
+ message: string;
262
+ stack?: string;
263
+ };
264
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
265
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
266
+ stackTraceLimit: number;
267
+ };
268
+ declare const CStarError: {
269
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
270
+ readonly type: string;
271
+ readonly code: string;
272
+ readonly param?: string;
273
+ readonly docUrl: string;
274
+ readonly requestId?: string;
275
+ readonly statusCode: number;
276
+ name: string;
277
+ message: string;
278
+ stack?: string;
279
+ };
280
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
281
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
282
+ stackTraceLimit: number;
283
+ };
145
284
  type CStarError = InstanceType<typeof CStarErrorImpl>;
146
- declare const CStarAuthenticationError: typeof CStarAuthenticationErrorImpl;
285
+ declare const CStarAuthenticationError: {
286
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
287
+ readonly type: string;
288
+ readonly code: string;
289
+ readonly param?: string;
290
+ readonly docUrl: string;
291
+ readonly requestId?: string;
292
+ readonly statusCode: number;
293
+ name: string;
294
+ message: string;
295
+ stack?: string;
296
+ };
297
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
298
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
299
+ stackTraceLimit: number;
300
+ };
147
301
  type CStarAuthenticationError = InstanceType<typeof CStarAuthenticationErrorImpl>;
148
- declare const CStarRateLimitError: typeof CStarRateLimitErrorImpl;
302
+ declare const CStarRateLimitError: {
303
+ new (messageOrStatus: string | number, body?: ApiErrorBody, retryAfter?: number): {
304
+ readonly retryAfter: number;
305
+ readonly type: string;
306
+ readonly code: string;
307
+ readonly param?: string;
308
+ readonly docUrl: string;
309
+ readonly requestId?: string;
310
+ readonly statusCode: number;
311
+ name: string;
312
+ message: string;
313
+ stack?: string;
314
+ };
315
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
316
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
317
+ stackTraceLimit: number;
318
+ };
149
319
  type CStarRateLimitError = InstanceType<typeof CStarRateLimitErrorImpl>;
150
- declare const CStarNotFoundError: typeof CStarNotFoundErrorImpl;
320
+ declare const CStarNotFoundError: {
321
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
322
+ readonly type: string;
323
+ readonly code: string;
324
+ readonly param?: string;
325
+ readonly docUrl: string;
326
+ readonly requestId?: string;
327
+ readonly statusCode: number;
328
+ name: string;
329
+ message: string;
330
+ stack?: string;
331
+ };
332
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
333
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
334
+ stackTraceLimit: number;
335
+ };
151
336
  type CStarNotFoundError = InstanceType<typeof CStarNotFoundErrorImpl>;
152
- declare const CStarValidationError: typeof CStarValidationErrorImpl;
337
+ declare const CStarValidationError: {
338
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
339
+ readonly type: string;
340
+ readonly code: string;
341
+ readonly param?: string;
342
+ readonly docUrl: string;
343
+ readonly requestId?: string;
344
+ readonly statusCode: number;
345
+ name: string;
346
+ message: string;
347
+ stack?: string;
348
+ };
349
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
350
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
351
+ stackTraceLimit: number;
352
+ };
153
353
  type CStarValidationError = InstanceType<typeof CStarValidationErrorImpl>;
154
- declare const CStarPermissionError: typeof CStarPermissionErrorImpl;
354
+ declare const CStarPermissionError: {
355
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
356
+ readonly type: string;
357
+ readonly code: string;
358
+ readonly param?: string;
359
+ readonly docUrl: string;
360
+ readonly requestId?: string;
361
+ readonly statusCode: number;
362
+ name: string;
363
+ message: string;
364
+ stack?: string;
365
+ };
366
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
367
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
368
+ stackTraceLimit: number;
369
+ };
155
370
  type CStarPermissionError = InstanceType<typeof CStarPermissionErrorImpl>;
156
- declare const CStarConflictError: typeof CStarConflictErrorImpl;
371
+ declare const CStarConflictError: {
372
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
373
+ readonly type: string;
374
+ readonly code: string;
375
+ readonly param?: string;
376
+ readonly docUrl: string;
377
+ readonly requestId?: string;
378
+ readonly statusCode: number;
379
+ name: string;
380
+ message: string;
381
+ stack?: string;
382
+ };
383
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
384
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
385
+ stackTraceLimit: number;
386
+ };
157
387
  type CStarConflictError = InstanceType<typeof CStarConflictErrorImpl>;
158
- declare const CStarServerError: typeof CStarServerErrorImpl;
388
+ declare const CStarServerError: {
389
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
390
+ readonly type: string;
391
+ readonly code: string;
392
+ readonly param?: string;
393
+ readonly docUrl: string;
394
+ readonly requestId?: string;
395
+ readonly statusCode: number;
396
+ name: string;
397
+ message: string;
398
+ stack?: string;
399
+ };
400
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
401
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
402
+ stackTraceLimit: number;
403
+ };
159
404
  type CStarServerError = InstanceType<typeof CStarServerErrorImpl>;
160
- declare const CStarFeatureDisabledError: typeof CStarFeatureDisabledErrorImpl;
405
+ declare const CStarFeatureDisabledError: {
406
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
407
+ readonly feature: string;
408
+ readonly enableUrl: string;
409
+ readonly type: string;
410
+ readonly code: string;
411
+ readonly param?: string;
412
+ readonly docUrl: string;
413
+ readonly requestId?: string;
414
+ readonly statusCode: number;
415
+ name: string;
416
+ message: string;
417
+ stack?: string;
418
+ };
419
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
420
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
421
+ stackTraceLimit: number;
422
+ };
161
423
  type CStarFeatureDisabledError = InstanceType<typeof CStarFeatureDisabledErrorImpl>;
162
- declare const CStarRealtimeUnavailableError: typeof CStarRealtimeUnavailableErrorImpl;
424
+ declare const CStarRealtimeUnavailableError: {
425
+ new (message?: string): {
426
+ readonly type: string;
427
+ readonly code: string;
428
+ readonly param?: string;
429
+ readonly docUrl: string;
430
+ readonly requestId?: string;
431
+ readonly statusCode: number;
432
+ name: string;
433
+ message: string;
434
+ stack?: string;
435
+ };
436
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
437
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
438
+ stackTraceLimit: number;
439
+ };
163
440
  type CStarRealtimeUnavailableError = InstanceType<typeof CStarRealtimeUnavailableErrorImpl>;
164
441
  /**
165
442
  * Parse a public-route response (anonymous LibraryClient, CommunityClient,