tornapi-typescript 5.2.1 → 5.2.3

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
@@ -362,6 +362,127 @@ export interface ReportsResponse {
362
362
  _metadata: RequestMetadataWithLinks;
363
363
  }
364
364
  export type SelectionCategoryEnum = ReportTypeEnum | UserListEnum | PersonalStatsCategoryEnum | RacingRaceTypeEnum;
365
+ export interface ErrorUnknown {
366
+ code: number;
367
+ error: string;
368
+ }
369
+ export interface ErrorKeyEmpty {
370
+ code: 1;
371
+ error: string;
372
+ }
373
+ export interface ErrorIncorrectKey {
374
+ code: 2;
375
+ error: string;
376
+ }
377
+ export interface ErrorWrongType {
378
+ code: 3;
379
+ error: string;
380
+ }
381
+ export interface ErrorWrongFields {
382
+ code: 4;
383
+ error: string;
384
+ }
385
+ export interface ErrorTooManyRequests {
386
+ code: 5;
387
+ error: string;
388
+ }
389
+ export interface ErrorIncorrectId {
390
+ code: 6;
391
+ error: string;
392
+ }
393
+ export interface ErrorIncorrectIdEntityRelation {
394
+ code: 7;
395
+ error: string;
396
+ }
397
+ export interface ErrorIpBlocked {
398
+ code: 8;
399
+ error: string;
400
+ }
401
+ export interface ErrorApiDisabled {
402
+ code: 9;
403
+ error: string;
404
+ }
405
+ export interface ErrorKeyOwnerInFederalJail {
406
+ code: 10;
407
+ error: string;
408
+ }
409
+ export interface ErrorKeyChangeCooldown {
410
+ code: 11;
411
+ error: string;
412
+ }
413
+ export interface ErrorKeyReadError {
414
+ code: 12;
415
+ error: string;
416
+ }
417
+ export interface ErrorKeyTemporaryDisabled {
418
+ code: 13;
419
+ error: string;
420
+ }
421
+ export interface ErrorDailyReadLimitReached {
422
+ code: 14;
423
+ error: string;
424
+ }
425
+ export interface ErrorLogUnavailable {
426
+ code: 15;
427
+ error: string;
428
+ }
429
+ export interface ErrorAccessLevelTooLow {
430
+ code: 16;
431
+ error: string;
432
+ }
433
+ export interface ErrorBackendError {
434
+ code: 17;
435
+ error: string;
436
+ }
437
+ export interface ErrorApiKeyPaused {
438
+ code: 18;
439
+ error: string;
440
+ }
441
+ export interface ErrorMustMigrateToCrimesV2 {
442
+ code: 19;
443
+ error: string;
444
+ }
445
+ export interface ErrorRaceNotFinished {
446
+ code: 20;
447
+ error: string;
448
+ }
449
+ export interface ErrorIncorrectCategory {
450
+ code: 21;
451
+ error: string;
452
+ }
453
+ export interface ErrorOnlyAvailableInApiV1 {
454
+ code: 22;
455
+ error: string;
456
+ }
457
+ export interface ErrorOnlyAvailableInApiV2 {
458
+ code: 23;
459
+ error: string;
460
+ }
461
+ export interface ErrorClosedTemporarily {
462
+ code: 24;
463
+ error: string;
464
+ }
465
+ export interface ErrorInvalidStatRequested {
466
+ code: 25;
467
+ error: string;
468
+ }
469
+ export interface ErrorOnlyCategoryOrStatsAllowed {
470
+ code: 26;
471
+ error: string;
472
+ }
473
+ export interface ErrorMustMigrateToOrganizedCrimesV2 {
474
+ code: 27;
475
+ error: string;
476
+ }
477
+ export interface ErrorIncorrectLogId {
478
+ code: 28;
479
+ error: string;
480
+ }
481
+ export interface ErrorCategorySelectionUnavailableForInteractionLogs {
482
+ code: 29;
483
+ error: string;
484
+ }
485
+ export type ApiError = ErrorUnknown | ErrorKeyEmpty | ErrorIncorrectKey | ErrorWrongType | ErrorWrongFields | ErrorTooManyRequests | ErrorIncorrectId | ErrorIncorrectIdEntityRelation | ErrorIpBlocked | ErrorApiDisabled | ErrorKeyOwnerInFederalJail | ErrorKeyChangeCooldown | ErrorKeyReadError | ErrorKeyTemporaryDisabled | ErrorDailyReadLimitReached | ErrorLogUnavailable | ErrorAccessLevelTooLow | ErrorBackendError | ErrorApiKeyPaused | ErrorMustMigrateToCrimesV2 | ErrorRaceNotFinished | ErrorIncorrectCategory | ErrorOnlyAvailableInApiV1 | ErrorOnlyAvailableInApiV2 | ErrorClosedTemporarily | ErrorInvalidStatRequested | ErrorOnlyCategoryOrStatsAllowed | ErrorMustMigrateToOrganizedCrimesV2 | ErrorIncorrectLogId | ErrorCategorySelectionUnavailableForInteractionLogs;
365
486
  export type UserEquipment = TornItemDetails & {
366
487
  slot: number;
367
488
  };
@@ -7157,7 +7278,12 @@ export declare enum TornApiError {
7157
7278
  INCORRECT_CATEGORY = 21,
7158
7279
  SELECTION_ONLY_AVAILABLE_API_V1 = 22,
7159
7280
  SELECTION_ONLY_AVAILABLE_API_V2 = 23,
7160
- CLOSED_TEMPORARILY = 24
7281
+ CLOSED_TEMPORARILY = 24,
7282
+ INVALID_STAT_REQUESTED = 25,
7283
+ ONLY_CATEGORY_OR_STATS_CAN = 26,
7284
+ MUST_BE_MIGRATED_TO_ORGANIZED = 27,
7285
+ INCORRECT_LOG_ID = 28,
7286
+ CATEGORY_SELECTION_NOT_AVAILABLE_FOR = 29
7161
7287
  }
7162
7288
  export type SectionV1 = keyof SectionsV1Map;
7163
7289
  export type SectionV2 = keyof SectionsV2Map;
package/dist/index.js CHANGED
@@ -33,6 +33,11 @@ export var TornApiError;
33
33
  TornApiError[TornApiError["SELECTION_ONLY_AVAILABLE_API_V1"] = 22] = "SELECTION_ONLY_AVAILABLE_API_V1";
34
34
  TornApiError[TornApiError["SELECTION_ONLY_AVAILABLE_API_V2"] = 23] = "SELECTION_ONLY_AVAILABLE_API_V2";
35
35
  TornApiError[TornApiError["CLOSED_TEMPORARILY"] = 24] = "CLOSED_TEMPORARILY";
36
+ TornApiError[TornApiError["INVALID_STAT_REQUESTED"] = 25] = "INVALID_STAT_REQUESTED";
37
+ TornApiError[TornApiError["ONLY_CATEGORY_OR_STATS_CAN"] = 26] = "ONLY_CATEGORY_OR_STATS_CAN";
38
+ TornApiError[TornApiError["MUST_BE_MIGRATED_TO_ORGANIZED"] = 27] = "MUST_BE_MIGRATED_TO_ORGANIZED";
39
+ TornApiError[TornApiError["INCORRECT_LOG_ID"] = 28] = "INCORRECT_LOG_ID";
40
+ TornApiError[TornApiError["CATEGORY_SELECTION_NOT_AVAILABLE_FOR"] = 29] = "CATEGORY_SELECTION_NOT_AVAILABLE_FOR";
36
41
  })(TornApiError || (TornApiError = {}));
37
42
  export class HTTPClient {
38
43
  canAbort() {
package/dist/index.ts CHANGED
@@ -5327,6 +5327,188 @@ export type SelectionCategoryEnum =
5327
5327
  | PersonalStatsCategoryEnum
5328
5328
  | RacingRaceTypeEnum;
5329
5329
 
5330
+ export interface ErrorUnknown {
5331
+ code: number;
5332
+ error: string;
5333
+ }
5334
+
5335
+ export interface ErrorKeyEmpty {
5336
+ code: 1;
5337
+ error: string;
5338
+ }
5339
+
5340
+ export interface ErrorIncorrectKey {
5341
+ code: 2;
5342
+ error: string;
5343
+ }
5344
+
5345
+ export interface ErrorWrongType {
5346
+ code: 3;
5347
+ error: string;
5348
+ }
5349
+
5350
+ export interface ErrorWrongFields {
5351
+ code: 4;
5352
+ error: string;
5353
+ }
5354
+
5355
+ export interface ErrorTooManyRequests {
5356
+ code: 5;
5357
+ error: string;
5358
+ }
5359
+
5360
+ export interface ErrorIncorrectId {
5361
+ code: 6;
5362
+ error: string;
5363
+ }
5364
+
5365
+ export interface ErrorIncorrectIdEntityRelation {
5366
+ code: 7;
5367
+ error: string;
5368
+ }
5369
+
5370
+ export interface ErrorIpBlocked {
5371
+ code: 8;
5372
+ error: string;
5373
+ }
5374
+
5375
+ export interface ErrorApiDisabled {
5376
+ code: 9;
5377
+ error: string;
5378
+ }
5379
+
5380
+ export interface ErrorKeyOwnerInFederalJail {
5381
+ code: 10;
5382
+ error: string;
5383
+ }
5384
+
5385
+ export interface ErrorKeyChangeCooldown {
5386
+ code: 11;
5387
+ error: string;
5388
+ }
5389
+
5390
+ export interface ErrorKeyReadError {
5391
+ code: 12;
5392
+ error: string;
5393
+ }
5394
+
5395
+ export interface ErrorKeyTemporaryDisabled {
5396
+ code: 13;
5397
+ error: string;
5398
+ }
5399
+
5400
+ export interface ErrorDailyReadLimitReached {
5401
+ code: 14;
5402
+ error: string;
5403
+ }
5404
+
5405
+ export interface ErrorLogUnavailable {
5406
+ code: 15;
5407
+ error: string;
5408
+ }
5409
+
5410
+ export interface ErrorAccessLevelTooLow {
5411
+ code: 16;
5412
+ error: string;
5413
+ }
5414
+
5415
+ export interface ErrorBackendError {
5416
+ code: 17;
5417
+ error: string;
5418
+ }
5419
+
5420
+ export interface ErrorApiKeyPaused {
5421
+ code: 18;
5422
+ error: string;
5423
+ }
5424
+
5425
+ export interface ErrorMustMigrateToCrimesV2 {
5426
+ code: 19;
5427
+ error: string;
5428
+ }
5429
+
5430
+ export interface ErrorRaceNotFinished {
5431
+ code: 20;
5432
+ error: string;
5433
+ }
5434
+
5435
+ export interface ErrorIncorrectCategory {
5436
+ code: 21;
5437
+ error: string;
5438
+ }
5439
+
5440
+ export interface ErrorOnlyAvailableInApiV1 {
5441
+ code: 22;
5442
+ error: string;
5443
+ }
5444
+
5445
+ export interface ErrorOnlyAvailableInApiV2 {
5446
+ code: 23;
5447
+ error: string;
5448
+ }
5449
+
5450
+ export interface ErrorClosedTemporarily {
5451
+ code: 24;
5452
+ error: string;
5453
+ }
5454
+
5455
+ export interface ErrorInvalidStatRequested {
5456
+ code: 25;
5457
+ error: string;
5458
+ }
5459
+
5460
+ export interface ErrorOnlyCategoryOrStatsAllowed {
5461
+ code: 26;
5462
+ error: string;
5463
+ }
5464
+
5465
+ export interface ErrorMustMigrateToOrganizedCrimesV2 {
5466
+ code: 27;
5467
+ error: string;
5468
+ }
5469
+
5470
+ export interface ErrorIncorrectLogId {
5471
+ code: 28;
5472
+ error: string;
5473
+ }
5474
+
5475
+ export interface ErrorCategorySelectionUnavailableForInteractionLogs {
5476
+ code: 29;
5477
+ error: string;
5478
+ }
5479
+
5480
+ export type ApiError =
5481
+ | ErrorUnknown
5482
+ | ErrorKeyEmpty
5483
+ | ErrorIncorrectKey
5484
+ | ErrorWrongType
5485
+ | ErrorWrongFields
5486
+ | ErrorTooManyRequests
5487
+ | ErrorIncorrectId
5488
+ | ErrorIncorrectIdEntityRelation
5489
+ | ErrorIpBlocked
5490
+ | ErrorApiDisabled
5491
+ | ErrorKeyOwnerInFederalJail
5492
+ | ErrorKeyChangeCooldown
5493
+ | ErrorKeyReadError
5494
+ | ErrorKeyTemporaryDisabled
5495
+ | ErrorDailyReadLimitReached
5496
+ | ErrorLogUnavailable
5497
+ | ErrorAccessLevelTooLow
5498
+ | ErrorBackendError
5499
+ | ErrorApiKeyPaused
5500
+ | ErrorMustMigrateToCrimesV2
5501
+ | ErrorRaceNotFinished
5502
+ | ErrorIncorrectCategory
5503
+ | ErrorOnlyAvailableInApiV1
5504
+ | ErrorOnlyAvailableInApiV2
5505
+ | ErrorClosedTemporarily
5506
+ | ErrorInvalidStatRequested
5507
+ | ErrorOnlyCategoryOrStatsAllowed
5508
+ | ErrorMustMigrateToOrganizedCrimesV2
5509
+ | ErrorIncorrectLogId
5510
+ | ErrorCategorySelectionUnavailableForInteractionLogs;
5511
+
5330
5512
  export type UserEquipment = TornItemDetails & {
5331
5513
  slot: number;
5332
5514
  };
@@ -13005,6 +13187,11 @@ export enum TornApiError {
13005
13187
  SELECTION_ONLY_AVAILABLE_API_V1 = 22,
13006
13188
  SELECTION_ONLY_AVAILABLE_API_V2 = 23,
13007
13189
  CLOSED_TEMPORARILY = 24,
13190
+ INVALID_STAT_REQUESTED = 25,
13191
+ ONLY_CATEGORY_OR_STATS_CAN = 26,
13192
+ MUST_BE_MIGRATED_TO_ORGANIZED = 27,
13193
+ INCORRECT_LOG_ID = 28,
13194
+ CATEGORY_SELECTION_NOT_AVAILABLE_FOR = 29,
13008
13195
  }
13009
13196
 
13010
13197
  export type SectionV1 = keyof SectionsV1Map;