@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.
- package/dist/auth/index.cjs +20 -0
- package/dist/auth/index.d.cts +326 -49
- package/dist/auth/index.d.ts +326 -49
- package/dist/auth/index.js +20 -0
- package/dist/community/index.cjs +20 -0
- package/dist/community/index.d.cts +326 -49
- package/dist/community/index.d.ts +326 -49
- package/dist/community/index.js +20 -0
- package/dist/index.cjs +478 -4
- package/dist/index.d.cts +392 -47
- package/dist/index.d.ts +392 -47
- package/dist/index.js +475 -3
- package/dist/library/index.cjs +20 -0
- package/dist/library/index.d.cts +326 -49
- package/dist/library/index.d.ts +326 -49
- package/dist/library/index.js +20 -0
- package/dist/quickhelp/index.cjs +20 -0
- package/dist/quickhelp/index.d.cts +326 -49
- package/dist/quickhelp/index.d.ts +326 -49
- package/dist/quickhelp/index.js +20 -0
- package/dist/webhook/index.d.cts +21 -1
- package/dist/webhook/index.d.ts +21 -1
- package/dist/webhook/node.d.cts +21 -1
- package/dist/webhook/node.d.ts +21 -1
- package/package.json +1 -1
|
@@ -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
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
declare
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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,
|
package/dist/community/index.js
CHANGED
|
@@ -165,6 +165,26 @@ var registry = globalSlot[REGISTRY_KEY] ?? (globalSlot[REGISTRY_KEY] = {
|
|
|
165
165
|
CStarFeatureDisabledError: CStarFeatureDisabledErrorImpl,
|
|
166
166
|
CStarRealtimeUnavailableError: CStarRealtimeUnavailableErrorImpl
|
|
167
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
|
+
}
|
|
168
188
|
var CStarError = registry.CStarError;
|
|
169
189
|
var CStarAuthenticationError = registry.CStarAuthenticationError;
|
|
170
190
|
var CStarRateLimitError = registry.CStarRateLimitError;
|