@cstar.help/js 0.15.0 → 0.16.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.
@@ -233,64 +233,341 @@ interface ApiErrorBody {
233
233
  enable_url?: string;
234
234
  }
235
235
  /** Base error class for all cStar API errors. */
236
- declare class CStarErrorImpl extends Error {
237
- readonly type: string;
238
- readonly code: string;
239
- readonly param?: string;
240
- readonly docUrl: string;
241
- readonly requestId?: string;
242
- readonly statusCode: number;
243
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
244
- }
245
- declare class CStarAuthenticationErrorImpl extends CStarErrorImpl {
246
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
247
- }
248
- declare class CStarRateLimitErrorImpl extends CStarErrorImpl {
249
- readonly retryAfter: number;
250
- constructor(messageOrStatus: string | number, body?: ApiErrorBody, retryAfter?: number);
251
- }
252
- declare class CStarNotFoundErrorImpl extends CStarErrorImpl {
253
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
254
- }
255
- declare class CStarValidationErrorImpl extends CStarErrorImpl {
256
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
257
- }
258
- declare class CStarPermissionErrorImpl extends CStarErrorImpl {
259
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
260
- }
261
- declare class CStarConflictErrorImpl extends CStarErrorImpl {
262
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
263
- }
264
- declare class CStarServerErrorImpl extends CStarErrorImpl {
265
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
266
- }
267
- declare class CStarFeatureDisabledErrorImpl extends CStarErrorImpl {
268
- readonly feature: string;
269
- readonly enableUrl: string;
270
- constructor(messageOrStatus: string | number, body?: ApiErrorBody);
271
- }
272
- declare class CStarRealtimeUnavailableErrorImpl extends CStarErrorImpl {
273
- constructor(message?: string);
274
- }
275
- declare const CStarError: typeof CStarErrorImpl;
236
+ declare const CStarErrorImpl: {
237
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
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 CStarAuthenticationErrorImpl: {
253
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
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 CStarRateLimitErrorImpl: {
269
+ new (messageOrStatus: string | number, body?: ApiErrorBody, retryAfter?: number): {
270
+ readonly retryAfter: number;
271
+ readonly type: string;
272
+ readonly code: string;
273
+ readonly param?: string;
274
+ readonly docUrl: string;
275
+ readonly requestId?: string;
276
+ readonly statusCode: number;
277
+ name: string;
278
+ message: string;
279
+ stack?: string;
280
+ };
281
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
282
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
283
+ stackTraceLimit: number;
284
+ };
285
+ declare const CStarNotFoundErrorImpl: {
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
+ };
301
+ declare const CStarValidationErrorImpl: {
302
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
303
+ readonly type: string;
304
+ readonly code: string;
305
+ readonly param?: string;
306
+ readonly docUrl: string;
307
+ readonly requestId?: string;
308
+ readonly statusCode: number;
309
+ name: string;
310
+ message: string;
311
+ stack?: string;
312
+ };
313
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
314
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
315
+ stackTraceLimit: number;
316
+ };
317
+ declare const CStarPermissionErrorImpl: {
318
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
319
+ readonly type: string;
320
+ readonly code: string;
321
+ readonly param?: string;
322
+ readonly docUrl: string;
323
+ readonly requestId?: string;
324
+ readonly statusCode: number;
325
+ name: string;
326
+ message: string;
327
+ stack?: string;
328
+ };
329
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
330
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
331
+ stackTraceLimit: number;
332
+ };
333
+ declare const CStarConflictErrorImpl: {
334
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
335
+ readonly type: string;
336
+ readonly code: string;
337
+ readonly param?: string;
338
+ readonly docUrl: string;
339
+ readonly requestId?: string;
340
+ readonly statusCode: number;
341
+ name: string;
342
+ message: string;
343
+ stack?: string;
344
+ };
345
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
346
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
347
+ stackTraceLimit: number;
348
+ };
349
+ declare const CStarServerErrorImpl: {
350
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
351
+ readonly type: string;
352
+ readonly code: string;
353
+ readonly param?: string;
354
+ readonly docUrl: string;
355
+ readonly requestId?: string;
356
+ readonly statusCode: number;
357
+ name: string;
358
+ message: string;
359
+ stack?: string;
360
+ };
361
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
362
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
363
+ stackTraceLimit: number;
364
+ };
365
+ declare const CStarFeatureDisabledErrorImpl: {
366
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
367
+ readonly feature: string;
368
+ readonly enableUrl: string;
369
+ readonly type: string;
370
+ readonly code: string;
371
+ readonly param?: string;
372
+ readonly docUrl: string;
373
+ readonly requestId?: string;
374
+ readonly statusCode: number;
375
+ name: string;
376
+ message: string;
377
+ stack?: string;
378
+ };
379
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
380
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
381
+ stackTraceLimit: number;
382
+ };
383
+ declare const CStarRealtimeUnavailableErrorImpl: {
384
+ new (message?: string): {
385
+ readonly type: string;
386
+ readonly code: string;
387
+ readonly param?: string;
388
+ readonly docUrl: string;
389
+ readonly requestId?: string;
390
+ readonly statusCode: number;
391
+ name: string;
392
+ message: string;
393
+ stack?: string;
394
+ };
395
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
396
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
397
+ stackTraceLimit: number;
398
+ };
399
+ declare const CStarError: {
400
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
401
+ readonly type: string;
402
+ readonly code: string;
403
+ readonly param?: string;
404
+ readonly docUrl: string;
405
+ readonly requestId?: string;
406
+ readonly statusCode: number;
407
+ name: string;
408
+ message: string;
409
+ stack?: string;
410
+ };
411
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
412
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
413
+ stackTraceLimit: number;
414
+ };
276
415
  type CStarError = InstanceType<typeof CStarErrorImpl>;
277
- declare const CStarAuthenticationError: typeof CStarAuthenticationErrorImpl;
416
+ declare const CStarAuthenticationError: {
417
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
418
+ readonly type: string;
419
+ readonly code: string;
420
+ readonly param?: string;
421
+ readonly docUrl: string;
422
+ readonly requestId?: string;
423
+ readonly statusCode: number;
424
+ name: string;
425
+ message: string;
426
+ stack?: string;
427
+ };
428
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
429
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
430
+ stackTraceLimit: number;
431
+ };
278
432
  type CStarAuthenticationError = InstanceType<typeof CStarAuthenticationErrorImpl>;
279
- declare const CStarRateLimitError: typeof CStarRateLimitErrorImpl;
433
+ declare const CStarRateLimitError: {
434
+ new (messageOrStatus: string | number, body?: ApiErrorBody, retryAfter?: number): {
435
+ readonly retryAfter: number;
436
+ readonly type: string;
437
+ readonly code: string;
438
+ readonly param?: string;
439
+ readonly docUrl: string;
440
+ readonly requestId?: string;
441
+ readonly statusCode: number;
442
+ name: string;
443
+ message: string;
444
+ stack?: string;
445
+ };
446
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
447
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
448
+ stackTraceLimit: number;
449
+ };
280
450
  type CStarRateLimitError = InstanceType<typeof CStarRateLimitErrorImpl>;
281
- declare const CStarNotFoundError: typeof CStarNotFoundErrorImpl;
451
+ declare const CStarNotFoundError: {
452
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
453
+ readonly type: string;
454
+ readonly code: string;
455
+ readonly param?: string;
456
+ readonly docUrl: string;
457
+ readonly requestId?: string;
458
+ readonly statusCode: number;
459
+ name: string;
460
+ message: string;
461
+ stack?: string;
462
+ };
463
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
464
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
465
+ stackTraceLimit: number;
466
+ };
282
467
  type CStarNotFoundError = InstanceType<typeof CStarNotFoundErrorImpl>;
283
- declare const CStarValidationError: typeof CStarValidationErrorImpl;
468
+ declare const CStarValidationError: {
469
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
470
+ readonly type: string;
471
+ readonly code: string;
472
+ readonly param?: string;
473
+ readonly docUrl: string;
474
+ readonly requestId?: string;
475
+ readonly statusCode: number;
476
+ name: string;
477
+ message: string;
478
+ stack?: string;
479
+ };
480
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
481
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
482
+ stackTraceLimit: number;
483
+ };
284
484
  type CStarValidationError = InstanceType<typeof CStarValidationErrorImpl>;
285
- declare const CStarPermissionError: typeof CStarPermissionErrorImpl;
485
+ declare const CStarPermissionError: {
486
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
487
+ readonly type: string;
488
+ readonly code: string;
489
+ readonly param?: string;
490
+ readonly docUrl: string;
491
+ readonly requestId?: string;
492
+ readonly statusCode: number;
493
+ name: string;
494
+ message: string;
495
+ stack?: string;
496
+ };
497
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
498
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
499
+ stackTraceLimit: number;
500
+ };
286
501
  type CStarPermissionError = InstanceType<typeof CStarPermissionErrorImpl>;
287
- declare const CStarConflictError: typeof CStarConflictErrorImpl;
502
+ declare const CStarConflictError: {
503
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
504
+ readonly type: string;
505
+ readonly code: string;
506
+ readonly param?: string;
507
+ readonly docUrl: string;
508
+ readonly requestId?: string;
509
+ readonly statusCode: number;
510
+ name: string;
511
+ message: string;
512
+ stack?: string;
513
+ };
514
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
515
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
516
+ stackTraceLimit: number;
517
+ };
288
518
  type CStarConflictError = InstanceType<typeof CStarConflictErrorImpl>;
289
- declare const CStarServerError: typeof CStarServerErrorImpl;
519
+ declare const CStarServerError: {
520
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
521
+ readonly type: string;
522
+ readonly code: string;
523
+ readonly param?: string;
524
+ readonly docUrl: string;
525
+ readonly requestId?: string;
526
+ readonly statusCode: number;
527
+ name: string;
528
+ message: string;
529
+ stack?: string;
530
+ };
531
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
532
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
533
+ stackTraceLimit: number;
534
+ };
290
535
  type CStarServerError = InstanceType<typeof CStarServerErrorImpl>;
291
- declare const CStarFeatureDisabledError: typeof CStarFeatureDisabledErrorImpl;
536
+ declare const CStarFeatureDisabledError: {
537
+ new (messageOrStatus: string | number, body?: ApiErrorBody): {
538
+ readonly feature: string;
539
+ readonly enableUrl: string;
540
+ readonly type: string;
541
+ readonly code: string;
542
+ readonly param?: string;
543
+ readonly docUrl: string;
544
+ readonly requestId?: string;
545
+ readonly statusCode: number;
546
+ name: string;
547
+ message: string;
548
+ stack?: string;
549
+ };
550
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
551
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
552
+ stackTraceLimit: number;
553
+ };
292
554
  type CStarFeatureDisabledError = InstanceType<typeof CStarFeatureDisabledErrorImpl>;
293
- declare const CStarRealtimeUnavailableError: typeof CStarRealtimeUnavailableErrorImpl;
555
+ declare const CStarRealtimeUnavailableError: {
556
+ new (message?: string): {
557
+ readonly type: string;
558
+ readonly code: string;
559
+ readonly param?: string;
560
+ readonly docUrl: string;
561
+ readonly requestId?: string;
562
+ readonly statusCode: number;
563
+ name: string;
564
+ message: string;
565
+ stack?: string;
566
+ };
567
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
568
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
569
+ stackTraceLimit: number;
570
+ };
294
571
  type CStarRealtimeUnavailableError = InstanceType<typeof CStarRealtimeUnavailableErrorImpl>;
295
572
  /**
296
573
  * Parse a public-route response (anonymous LibraryClient, CommunityClient,