tornapi-typescript 0.2.8 → 0.2.9

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
@@ -4505,7 +4505,8 @@ export type RaceCarUpgradeSubCategory =
4505
4505
  export type FactionApplicationStatusEnum =
4506
4506
  | "accepted"
4507
4507
  | "declined"
4508
- | "withdrawn";
4508
+ | "withdrawn"
4509
+ | "active";
4509
4510
 
4510
4511
  export type FactionRankedWarsCategoryEnum = "all" | "ongoing";
4511
4512
 
@@ -4520,6 +4521,8 @@ export type FactionCrimeUserOutcome =
4520
4521
 
4521
4522
  export type RaceId = number;
4522
4523
 
4524
+ export type DirtyBombId = number;
4525
+
4523
4526
  export type RaceTrackId = number;
4524
4527
 
4525
4528
  export type RaceCarId = number;
@@ -4536,6 +4539,8 @@ export type RankedWarId = number;
4536
4539
 
4537
4540
  export type TerritoryWarId = number;
4538
4541
 
4542
+ export type RaidWarId = number;
4543
+
4539
4544
  export type ItemUid = number;
4540
4545
 
4541
4546
  export type UserId = number;
@@ -4608,6 +4613,13 @@ export type ReviveSetting =
4608
4613
  | "No one"
4609
4614
  | "Unknown";
4610
4615
 
4616
+ export type FactionWarfareTypeEnum =
4617
+ | "ranked"
4618
+ | "territory"
4619
+ | "raid"
4620
+ | "chain"
4621
+ | "db";
4622
+
4611
4623
  export type FactionCrimeStatusEnum =
4612
4624
  | "Recruiting"
4613
4625
  | "Planning"
@@ -5030,8 +5042,6 @@ export interface UserCrimeDetailsBootlegging {
5030
5042
  horror: number;
5031
5043
  romance: number;
5032
5044
  thriller: number;
5033
- /** This is replaced with 'sci_fi' field and will be removed on 1st June 2025. */
5034
- "sci-fi"?: number;
5035
5045
  sci_fi: number;
5036
5046
  total: number;
5037
5047
  earnings: number;
@@ -6274,6 +6284,92 @@ export type PersonalStatsStatName =
6274
6284
  | "forgeryskill"
6275
6285
  | "scammingskill";
6276
6286
 
6287
+ export interface FactionRaidReport {
6288
+ id: RaidWarId;
6289
+ start: number;
6290
+ end: number;
6291
+ aggressor: FactionRaidReportFaction;
6292
+ defender: FactionRaidReportFaction;
6293
+ }
6294
+
6295
+ export interface FactionRaidReportFaction {
6296
+ id: FactionId;
6297
+ name: string;
6298
+ score: number;
6299
+ attackers: FactionRaidReportAttacker[];
6300
+ non_attackers: FactionRaidReportUser[];
6301
+ }
6302
+
6303
+ export interface FactionRaidReportAttacker {
6304
+ user: FactionRaidReportUser;
6305
+ attacks: number;
6306
+ damage: number;
6307
+ }
6308
+
6309
+ export interface FactionRaidReportUser {
6310
+ id: UserId;
6311
+ name: string;
6312
+ }
6313
+
6314
+ export interface FactionRaidWarReportResponse {
6315
+ raidreport: FactionRaidReport[];
6316
+ }
6317
+
6318
+ export interface FactionWarfareDirtyBomb {
6319
+ id: DirtyBombId;
6320
+ planted_at: number;
6321
+ detonated_at: number;
6322
+ faction: FactionWarfareDirtyBombTargetFaction;
6323
+ user: FactionWarfareDirtyBombPlanter | null;
6324
+ }
6325
+
6326
+ export interface FactionWarfareDirtyBombTargetFaction {
6327
+ id: FactionId;
6328
+ name: string;
6329
+ respect_lost: number;
6330
+ }
6331
+
6332
+ export interface FactionWarfareDirtyBombPlanter {
6333
+ id: UserId;
6334
+ name: string;
6335
+ }
6336
+
6337
+ export interface FactionRaidWarfare {
6338
+ id: RaidWarId;
6339
+ start: number;
6340
+ end: number | null;
6341
+ aggressor: FactionRaidWarfareFaction;
6342
+ defender: FactionRaidWarfareFaction;
6343
+ }
6344
+
6345
+ /** The field 'chain' exists only if the field 'end' is NOT populated in FactionRaidWarfare schema. */
6346
+ export interface FactionRaidWarfareFaction {
6347
+ id: FactionId;
6348
+ name: string;
6349
+ score: number;
6350
+ chain?: number;
6351
+ }
6352
+
6353
+ export interface FactionTerritoryWarfare {
6354
+ id: TerritoryWarId;
6355
+ territory: FactionTerritoryEnum;
6356
+ start: number;
6357
+ end: number;
6358
+ target: number;
6359
+ aggressor: FactionTerritoryWarFaction;
6360
+ defender: FactionTerritoryWarFaction;
6361
+ result: string;
6362
+ }
6363
+
6364
+ /** The fields 'chain' and 'players_on_wall' exist only for wars with the result 'in_progress'. */
6365
+ export interface FactionTerritoryWarFaction {
6366
+ id: FactionId;
6367
+ name: string;
6368
+ score: number;
6369
+ chain?: number;
6370
+ players_on_wall?: any[];
6371
+ }
6372
+
6277
6373
  export interface FactionTerritoryWarFinishedFaction {
6278
6374
  id: FactionId;
6279
6375
  name: string;
@@ -6542,7 +6638,6 @@ export interface FactionBasic {
6542
6638
  tag: string;
6543
6639
  tag_image: string;
6544
6640
  leader_id: UserId;
6545
- "co-leader_id"?: UserId;
6546
6641
  co_leader_id: UserId;
6547
6642
  respect: number;
6548
6643
  days_old: number;
@@ -6644,6 +6739,11 @@ export interface FactionNewsResponse {
6644
6739
  _metadata: RequestMetadataWithLinks;
6645
6740
  }
6646
6741
 
6742
+ export interface FactionRaidsResponse {
6743
+ raids: FactionRaidWarfare[];
6744
+ _metadata: RequestMetadataWithLinks;
6745
+ }
6746
+
6647
6747
  export interface FactionAttacksResponse {
6648
6748
  attacks: Attack[];
6649
6749
  _metadata: RequestMetadataWithLinks;
@@ -6702,6 +6802,13 @@ export interface FactionChain {
6702
6802
  end: number;
6703
6803
  }
6704
6804
 
6805
+ export interface FactionChainWarfare extends FactionChain {
6806
+ faction: {
6807
+ id: FactionId;
6808
+ name: string;
6809
+ };
6810
+ }
6811
+
6705
6812
  export interface FactionChainsResponse {
6706
6813
  chains: FactionChain[];
6707
6814
  _metadata: RequestMetadataWithLinks;
@@ -6719,8 +6826,6 @@ export interface FactionChainReport {
6719
6826
  details: FactionChainReportDetails;
6720
6827
  bonuses: FactionChainReportBonus[];
6721
6828
  attackers: FactionChainReportAttacker[];
6722
- /** This is replaced with 'non_attackers' field and will be removed on 1st June 2025. */
6723
- "non-attackers"?: UserId[];
6724
6829
  non_attackers: UserId[];
6725
6830
  }
6726
6831
 
@@ -6895,6 +7000,16 @@ export interface FactionRankedWarResponse {
6895
7000
  _metadata: RequestMetadataWithLinks;
6896
7001
  }
6897
7002
 
7003
+ export interface FactionWarfareResponse {
7004
+ warfare:
7005
+ | FactionRankedWarDetails[]
7006
+ | FactionTerritoryWarfare[]
7007
+ | FactionChainWarfare[]
7008
+ | FactionRaidWarfare[]
7009
+ | FactionWarfareDirtyBomb[];
7010
+ _metadata: RequestMetadataWithLinks;
7011
+ }
7012
+
6898
7013
  export interface FactionRankedWarReportResponse {
6899
7014
  rankedwarreport: {
6900
7015
  id: RankedWarId;
@@ -7601,8 +7716,8 @@ export interface TornFactionTreeResponse {
7601
7716
  }
7602
7717
 
7603
7718
  /**
7604
- * The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','dirtybombs','gyms','honors','itemdetails','itemstats','medals','organisedcrimes','pawnshop','pokertables','properties','raidreport','raids','rockpaperscissors','searchforcash','shoplifting','stats','stocks'.
7605
- * * The following selections are not available in API v2: 'chainreport', 'rackets', 'rankedwarreport', 'rankedwars', 'territorynames', 'territorywarreport', 'territorywars'.
7719
+ * The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','gyms','honors','itemdetails','itemstats','medals','organisedcrimes','pawnshop','pokertables','properties','rockpaperscissors','searchforcash','shoplifting','stats','stocks'.
7720
+ * * The following selections are not available in API v2: 'dirtybombs','raidreport','raids', 'chainreport', 'rackets', 'rankedwarreport', 'rankedwars', 'territorynames', 'territorywarreport', 'territorywars'.
7606
7721
  */
7607
7722
  export type TornSelectionName = string;
7608
7723
 
package/dist/openapi.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Torn API",
5
5
  "description": "\n * The development of Torn's API v2 is still ongoing.\n * If selections remain unaltered, they will default to the API v1 version.\n * Unlike API v1, API v2 accepts both selections and IDs as path and query parameters.\n * If any discrepancies or errors are found, please submit a [bug report](https://www.torn.com/forums.php#/p=forums&f=19&b=0&a=0) on the Torn Forums.\n * In case you're using bots to check for changes on openapi.json file, make sure to specificy a custom user-agent header - CloudFlare sometimes prevents requests from default user-agents.",
6
- "version": "1.8.3"
6
+ "version": "1.9.0"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -2721,19 +2721,165 @@
2721
2721
  "x-stability": "Unstable"
2722
2722
  }
2723
2723
  },
2724
+ "/faction/{raidWarId}/raidreport": {
2725
+ "get": {
2726
+ "tags": [
2727
+ "Faction"
2728
+ ],
2729
+ "summary": "Get raid war details",
2730
+ "description": "Requires public access key. <br> ",
2731
+ "operationId": "9a48477c16e86235efce00a11d56510f",
2732
+ "parameters": [
2733
+ {
2734
+ "name": "raidWarId",
2735
+ "in": "path",
2736
+ "description": "Raid war id",
2737
+ "required": true,
2738
+ "schema": {
2739
+ "$ref": "#/components/schemas/RaidWarId"
2740
+ }
2741
+ },
2742
+ {
2743
+ "$ref": "#/components/parameters/ApiTimestamp"
2744
+ },
2745
+ {
2746
+ "$ref": "#/components/parameters/ApiComment"
2747
+ },
2748
+ {
2749
+ "$ref": "#/components/parameters/ApiKeyPublic"
2750
+ }
2751
+ ],
2752
+ "responses": {
2753
+ "200": {
2754
+ "description": "Successful operation",
2755
+ "content": {
2756
+ "application/json": {
2757
+ "schema": {
2758
+ "$ref": "#/components/schemas/FactionRaidWarReportResponse"
2759
+ }
2760
+ }
2761
+ }
2762
+ }
2763
+ },
2764
+ "security": [
2765
+ {
2766
+ "api_key": []
2767
+ }
2768
+ ],
2769
+ "x-stability": "Unstable"
2770
+ }
2771
+ },
2772
+ "/faction/raids": {
2773
+ "get": {
2774
+ "tags": [
2775
+ "Faction"
2776
+ ],
2777
+ "summary": "Get raids history for your faction",
2778
+ "description": "Requires public access key. <br>",
2779
+ "operationId": "6a2b0604d0ebe31933f93facfa69f171",
2780
+ "parameters": [
2781
+ {
2782
+ "$ref": "#/components/parameters/ApiFrom"
2783
+ },
2784
+ {
2785
+ "$ref": "#/components/parameters/ApiTo"
2786
+ },
2787
+ {
2788
+ "$ref": "#/components/parameters/ApiSortDesc"
2789
+ },
2790
+ {
2791
+ "$ref": "#/components/parameters/ApiTimestamp"
2792
+ },
2793
+ {
2794
+ "$ref": "#/components/parameters/ApiComment"
2795
+ },
2796
+ {
2797
+ "$ref": "#/components/parameters/ApiKeyPublic"
2798
+ }
2799
+ ],
2800
+ "responses": {
2801
+ "200": {
2802
+ "description": "Successful operation",
2803
+ "content": {
2804
+ "application/json": {
2805
+ "schema": {
2806
+ "$ref": "#/components/schemas/FactionRaidsResponse"
2807
+ }
2808
+ }
2809
+ }
2810
+ }
2811
+ },
2812
+ "security": [
2813
+ {
2814
+ "api_key": []
2815
+ }
2816
+ ],
2817
+ "x-stability": "Unstable"
2818
+ }
2819
+ },
2820
+ "/faction/{id}/raids": {
2821
+ "get": {
2822
+ "tags": [
2823
+ "Faction"
2824
+ ],
2825
+ "summary": "Get a faction's raids history",
2826
+ "description": "Requires public access key. <br> ",
2827
+ "operationId": "67622543dbbc4857f1ea575be5af7fcd",
2828
+ "parameters": [
2829
+ {
2830
+ "name": "id",
2831
+ "in": "path",
2832
+ "description": "Faction id",
2833
+ "required": true,
2834
+ "schema": {
2835
+ "$ref": "#/components/schemas/FactionId"
2836
+ }
2837
+ },
2838
+ {
2839
+ "$ref": "#/components/parameters/ApiTimestamp"
2840
+ },
2841
+ {
2842
+ "$ref": "#/components/parameters/ApiComment"
2843
+ },
2844
+ {
2845
+ "$ref": "#/components/parameters/ApiKeyPublic"
2846
+ }
2847
+ ],
2848
+ "responses": {
2849
+ "200": {
2850
+ "description": "Successful operation",
2851
+ "content": {
2852
+ "application/json": {
2853
+ "schema": {
2854
+ "$ref": "#/components/schemas/FactionRaidsResponse"
2855
+ }
2856
+ }
2857
+ }
2858
+ }
2859
+ },
2860
+ "security": [
2861
+ {
2862
+ "api_key": []
2863
+ }
2864
+ ],
2865
+ "x-stability": "Unstable"
2866
+ }
2867
+ },
2724
2868
  "/faction/rankedwars": {
2725
2869
  "get": {
2726
2870
  "tags": [
2727
2871
  "Faction"
2728
2872
  ],
2729
- "summary": "Get ranked wars list",
2730
- "description": "Requires public access key. <br> When category 'all' is chosen, you can use 'from', 'to' & 'sort' query parameters.<br>When category 'ongoing' is chosen, all currently active ranked wars are returned.<br>When no category is chosen, this selection will return ranked war history of your own faction (if any).",
2873
+ "summary": "Get ranked wars history for your faction",
2874
+ "description": "Requires public access key. <br>",
2731
2875
  "operationId": "4f5d624a86e2d389a7a738b6b3ce8c9e",
2732
2876
  "parameters": [
2733
2877
  {
2734
2878
  "name": "cat",
2735
2879
  "in": "query",
2880
+ "description": "This parameter is deprecated. The ranked wars list can now instead be fetched via 'faction' -> 'warfare' endpoint. This functionality will be removed on 1st of September 2025.",
2736
2881
  "required": false,
2882
+ "deprecated": true,
2737
2883
  "schema": {
2738
2884
  "$ref": "#/components/schemas/FactionRankedWarsCategoryEnum"
2739
2885
  }
@@ -3271,14 +3417,16 @@
3271
3417
  "tags": [
3272
3418
  "Faction"
3273
3419
  ],
3274
- "summary": "Get territory wars list",
3275
- "description": "Requires public access key. <br> When category 'finished' is chosen, you can use 'from', 'to' & 'sort' query parameters.<br>When category 'ongoing' is chosen, all currently active territory wars are returned.<br>When no category is chosen, this selection will return territory war history of your own faction (if any).",
3420
+ "summary": "Get territory wars history for your faction",
3421
+ "description": "Requires public access key. <br>",
3276
3422
  "operationId": "0258963246159d1e3e54547c32aac7c8",
3277
3423
  "parameters": [
3278
3424
  {
3279
3425
  "name": "cat",
3280
3426
  "in": "query",
3427
+ "description": "This parameter is deprecated. The territory wars list can now instead be fetched via 'faction' -> 'warfare' endpoint. This functionality will be removed on 1st of September 2025.",
3281
3428
  "required": false,
3429
+ "deprecated": true,
3282
3430
  "schema": {
3283
3431
  "$ref": "#/components/schemas/FactionTerritoryWarsCategoryEnum"
3284
3432
  }
@@ -3460,6 +3608,65 @@
3460
3608
  "x-stability": "Unstable"
3461
3609
  }
3462
3610
  },
3611
+ "/faction/warfare": {
3612
+ "get": {
3613
+ "tags": [
3614
+ "Faction"
3615
+ ],
3616
+ "summary": "Get faction warfare",
3617
+ "description": "Requires public access key. <br>The response depends on the selected category.",
3618
+ "operationId": "ae7f06db4618d3e7927fd700cfa58f16",
3619
+ "parameters": [
3620
+ {
3621
+ "name": "cat",
3622
+ "in": "query",
3623
+ "required": true,
3624
+ "schema": {
3625
+ "$ref": "#/components/schemas/FactionWarfareTypeEnum"
3626
+ }
3627
+ },
3628
+ {
3629
+ "$ref": "#/components/parameters/ApiLimit100"
3630
+ },
3631
+ {
3632
+ "$ref": "#/components/parameters/ApiSort"
3633
+ },
3634
+ {
3635
+ "$ref": "#/components/parameters/ApiFrom"
3636
+ },
3637
+ {
3638
+ "$ref": "#/components/parameters/ApiTo"
3639
+ },
3640
+ {
3641
+ "$ref": "#/components/parameters/ApiTimestamp"
3642
+ },
3643
+ {
3644
+ "$ref": "#/components/parameters/ApiComment"
3645
+ },
3646
+ {
3647
+ "$ref": "#/components/parameters/ApiKeyPublic"
3648
+ }
3649
+ ],
3650
+ "responses": {
3651
+ "200": {
3652
+ "description": "Successful operation",
3653
+ "content": {
3654
+ "application/json": {
3655
+ "schema": {
3656
+ "$ref": "#/components/schemas/FactionWarfareResponse"
3657
+ }
3658
+ }
3659
+ }
3660
+ }
3661
+ },
3662
+ "security": [
3663
+ {
3664
+ "api_key": []
3665
+ }
3666
+ ],
3667
+ "x-stability": "Stable"
3668
+ }
3669
+ },
3463
3670
  "/faction/wars": {
3464
3671
  "get": {
3465
3672
  "tags": [
@@ -3668,6 +3875,9 @@
3668
3875
  },
3669
3876
  {
3670
3877
  "$ref": "#/components/schemas/TerritoryWarId"
3878
+ },
3879
+ {
3880
+ "$ref": "#/components/schemas/RaidWarId"
3671
3881
  }
3672
3882
  ]
3673
3883
  }
@@ -3717,6 +3927,9 @@
3717
3927
  {
3718
3928
  "$ref": "#/components/schemas/ReportTypeEnum"
3719
3929
  },
3930
+ {
3931
+ "$ref": "#/components/schemas/FactionWarfareTypeEnum"
3932
+ },
3720
3933
  {
3721
3934
  "$ref": "#/components/schemas/FactionTerritoryWarsCategoryEnum"
3722
3935
  }
@@ -3785,6 +3998,9 @@
3785
3998
  {
3786
3999
  "$ref": "#/components/schemas/FactionBalanceResponse"
3787
4000
  },
4001
+ {
4002
+ "$ref": "#/components/schemas/FactionRaidWarReportResponse"
4003
+ },
3788
4004
  {
3789
4005
  "$ref": "#/components/schemas/FactionTerritoriesOwnershipResponse"
3790
4006
  },
@@ -3815,6 +4031,12 @@
3815
4031
  {
3816
4032
  "$ref": "#/components/schemas/FactionCrimeResponse"
3817
4033
  },
4034
+ {
4035
+ "$ref": "#/components/schemas/FactionRaidsResponse"
4036
+ },
4037
+ {
4038
+ "$ref": "#/components/schemas/FactionWarfareResponse"
4039
+ },
3818
4040
  {
3819
4041
  "$ref": "#/components/schemas/FactionRankedWarReportResponse"
3820
4042
  },
@@ -10826,7 +11048,8 @@
10826
11048
  "enum": [
10827
11049
  "accepted",
10828
11050
  "declined",
10829
- "withdrawn"
11051
+ "withdrawn",
11052
+ "active"
10830
11053
  ]
10831
11054
  },
10832
11055
  "FactionRankedWarsCategoryEnum": {
@@ -10857,6 +11080,10 @@
10857
11080
  "type": "integer",
10858
11081
  "format": "int32"
10859
11082
  },
11083
+ "DirtyBombId": {
11084
+ "type": "integer",
11085
+ "format": "int32"
11086
+ },
10860
11087
  "RaceTrackId": {
10861
11088
  "type": "integer",
10862
11089
  "format": "int32"
@@ -10889,6 +11116,10 @@
10889
11116
  "type": "integer",
10890
11117
  "format": "int32"
10891
11118
  },
11119
+ "RaidWarId": {
11120
+ "type": "integer",
11121
+ "format": "int32"
11122
+ },
10892
11123
  "ItemUid": {
10893
11124
  "type": "integer",
10894
11125
  "format": "int64"
@@ -11064,6 +11295,16 @@
11064
11295
  "Unknown"
11065
11296
  ]
11066
11297
  },
11298
+ "FactionWarfareTypeEnum": {
11299
+ "type": "string",
11300
+ "enum": [
11301
+ "ranked",
11302
+ "territory",
11303
+ "raid",
11304
+ "chain",
11305
+ "db"
11306
+ ]
11307
+ },
11067
11308
  "FactionCrimeStatusEnum": {
11068
11309
  "type": "string",
11069
11310
  "enum": [
@@ -12436,12 +12677,6 @@
12436
12677
  "type": "integer",
12437
12678
  "format": "int32"
12438
12679
  },
12439
- "sci-fi": {
12440
- "description": "This is replaced with 'sci_fi' field and will be removed on 1st June 2025.",
12441
- "type": "integer",
12442
- "format": "int32",
12443
- "deprecated": true
12444
- },
12445
12680
  "sci_fi": {
12446
12681
  "type": "integer",
12447
12682
  "format": "int32"
@@ -16826,51 +17061,367 @@
16826
17061
  "scammingskill"
16827
17062
  ]
16828
17063
  },
16829
- "FactionTerritoryWarFinishedFaction": {
17064
+ "FactionRaidReport": {
16830
17065
  "required": [
16831
17066
  "id",
16832
- "name",
16833
- "score",
16834
- "is_aggressor"
17067
+ "start",
17068
+ "end",
17069
+ "aggressor",
17070
+ "defender"
16835
17071
  ],
16836
17072
  "properties": {
16837
17073
  "id": {
16838
- "$ref": "#/components/schemas/FactionId"
17074
+ "$ref": "#/components/schemas/RaidWarId"
16839
17075
  },
16840
- "name": {
16841
- "type": "string"
17076
+ "start": {
17077
+ "type": "integer",
17078
+ "format": "int32"
16842
17079
  },
16843
- "score": {
17080
+ "end": {
16844
17081
  "type": "integer",
16845
17082
  "format": "int32"
16846
17083
  },
16847
- "is_aggressor": {
16848
- "type": "boolean"
17084
+ "aggressor": {
17085
+ "$ref": "#/components/schemas/FactionRaidReportFaction"
17086
+ },
17087
+ "defender": {
17088
+ "$ref": "#/components/schemas/FactionRaidReportFaction"
16849
17089
  }
16850
17090
  },
16851
17091
  "type": "object"
16852
17092
  },
16853
- "FactionSearchLeader": {
17093
+ "FactionRaidReportFaction": {
16854
17094
  "required": [
16855
17095
  "id",
16856
- "name"
17096
+ "name",
17097
+ "score",
17098
+ "attackers",
17099
+ "non_attackers"
16857
17100
  ],
16858
17101
  "properties": {
16859
17102
  "id": {
16860
- "$ref": "#/components/schemas/UserId"
17103
+ "$ref": "#/components/schemas/FactionId"
16861
17104
  },
16862
17105
  "name": {
16863
17106
  "type": "string"
17107
+ },
17108
+ "score": {
17109
+ "type": "number",
17110
+ "format": "float"
17111
+ },
17112
+ "attackers": {
17113
+ "type": "array",
17114
+ "items": {
17115
+ "$ref": "#/components/schemas/FactionRaidReportAttacker"
17116
+ }
17117
+ },
17118
+ "non_attackers": {
17119
+ "type": "array",
17120
+ "items": {
17121
+ "$ref": "#/components/schemas/FactionRaidReportUser"
17122
+ }
16864
17123
  }
16865
17124
  },
16866
17125
  "type": "object"
16867
17126
  },
16868
- "FactionSearch": {
17127
+ "FactionRaidReportAttacker": {
16869
17128
  "required": [
16870
- "id",
16871
- "name",
16872
- "respect",
16873
- "members",
17129
+ "user",
17130
+ "attacks",
17131
+ "damage"
17132
+ ],
17133
+ "properties": {
17134
+ "user": {
17135
+ "$ref": "#/components/schemas/FactionRaidReportUser"
17136
+ },
17137
+ "attacks": {
17138
+ "type": "integer",
17139
+ "format": "int32"
17140
+ },
17141
+ "damage": {
17142
+ "type": "number",
17143
+ "format": "float"
17144
+ }
17145
+ },
17146
+ "type": "object"
17147
+ },
17148
+ "FactionRaidReportUser": {
17149
+ "required": [
17150
+ "id",
17151
+ "name"
17152
+ ],
17153
+ "properties": {
17154
+ "id": {
17155
+ "$ref": "#/components/schemas/UserId"
17156
+ },
17157
+ "name": {
17158
+ "type": "string"
17159
+ }
17160
+ },
17161
+ "type": "object"
17162
+ },
17163
+ "FactionRaidWarReportResponse": {
17164
+ "required": [
17165
+ "raidreport"
17166
+ ],
17167
+ "properties": {
17168
+ "raidreport": {
17169
+ "type": "array",
17170
+ "items": {
17171
+ "$ref": "#/components/schemas/FactionRaidReport"
17172
+ }
17173
+ }
17174
+ },
17175
+ "type": "object"
17176
+ },
17177
+ "FactionWarfareDirtyBomb": {
17178
+ "required": [
17179
+ "id",
17180
+ "planted_at",
17181
+ "detonated_at",
17182
+ "faction",
17183
+ "user"
17184
+ ],
17185
+ "properties": {
17186
+ "id": {
17187
+ "$ref": "#/components/schemas/DirtyBombId"
17188
+ },
17189
+ "planted_at": {
17190
+ "type": "integer",
17191
+ "format": "int32"
17192
+ },
17193
+ "detonated_at": {
17194
+ "type": "integer",
17195
+ "format": "int32"
17196
+ },
17197
+ "faction": {
17198
+ "$ref": "#/components/schemas/FactionWarfareDirtyBombTargetFaction"
17199
+ },
17200
+ "user": {
17201
+ "oneOf": [
17202
+ {
17203
+ "$ref": "#/components/schemas/FactionWarfareDirtyBombPlanter"
17204
+ },
17205
+ {
17206
+ "type": "null"
17207
+ }
17208
+ ]
17209
+ }
17210
+ },
17211
+ "type": "object"
17212
+ },
17213
+ "FactionWarfareDirtyBombTargetFaction": {
17214
+ "required": [
17215
+ "id",
17216
+ "name",
17217
+ "respect_lost"
17218
+ ],
17219
+ "properties": {
17220
+ "id": {
17221
+ "$ref": "#/components/schemas/FactionId"
17222
+ },
17223
+ "name": {
17224
+ "type": "string"
17225
+ },
17226
+ "respect_lost": {
17227
+ "type": "integer",
17228
+ "format": "int32"
17229
+ }
17230
+ },
17231
+ "type": "object"
17232
+ },
17233
+ "FactionWarfareDirtyBombPlanter": {
17234
+ "required": [
17235
+ "id",
17236
+ "name"
17237
+ ],
17238
+ "properties": {
17239
+ "id": {
17240
+ "$ref": "#/components/schemas/UserId"
17241
+ },
17242
+ "name": {
17243
+ "type": "string"
17244
+ }
17245
+ },
17246
+ "type": "object"
17247
+ },
17248
+ "FactionRaidWarfare": {
17249
+ "required": [
17250
+ "id",
17251
+ "start",
17252
+ "end",
17253
+ "aggressor",
17254
+ "defender"
17255
+ ],
17256
+ "properties": {
17257
+ "id": {
17258
+ "$ref": "#/components/schemas/RaidWarId"
17259
+ },
17260
+ "start": {
17261
+ "type": "integer",
17262
+ "format": "int32"
17263
+ },
17264
+ "end": {
17265
+ "oneOf": [
17266
+ {
17267
+ "type": "integer",
17268
+ "format": "int32"
17269
+ },
17270
+ {
17271
+ "type": "null"
17272
+ }
17273
+ ]
17274
+ },
17275
+ "aggressor": {
17276
+ "$ref": "#/components/schemas/FactionRaidWarfareFaction"
17277
+ },
17278
+ "defender": {
17279
+ "$ref": "#/components/schemas/FactionRaidWarfareFaction"
17280
+ }
17281
+ },
17282
+ "type": "object"
17283
+ },
17284
+ "FactionRaidWarfareFaction": {
17285
+ "description": "The field 'chain' exists only if the field 'end' is NOT populated in FactionRaidWarfare schema.",
17286
+ "required": [
17287
+ "id",
17288
+ "name",
17289
+ "score"
17290
+ ],
17291
+ "properties": {
17292
+ "id": {
17293
+ "$ref": "#/components/schemas/FactionId"
17294
+ },
17295
+ "name": {
17296
+ "type": "string"
17297
+ },
17298
+ "score": {
17299
+ "type": "number",
17300
+ "format": "float"
17301
+ },
17302
+ "chain": {
17303
+ "type": "integer",
17304
+ "format": "int32"
17305
+ }
17306
+ },
17307
+ "type": "object"
17308
+ },
17309
+ "FactionTerritoryWarfare": {
17310
+ "required": [
17311
+ "id",
17312
+ "territory",
17313
+ "start",
17314
+ "end",
17315
+ "target",
17316
+ "aggressor",
17317
+ "defender",
17318
+ "result"
17319
+ ],
17320
+ "properties": {
17321
+ "id": {
17322
+ "$ref": "#/components/schemas/TerritoryWarId"
17323
+ },
17324
+ "territory": {
17325
+ "$ref": "#/components/schemas/FactionTerritoryEnum"
17326
+ },
17327
+ "start": {
17328
+ "type": "integer",
17329
+ "format": "int32"
17330
+ },
17331
+ "end": {
17332
+ "type": "integer",
17333
+ "format": "int32"
17334
+ },
17335
+ "target": {
17336
+ "type": "integer",
17337
+ "format": "int32"
17338
+ },
17339
+ "aggressor": {
17340
+ "$ref": "#/components/schemas/FactionTerritoryWarFaction"
17341
+ },
17342
+ "defender": {
17343
+ "$ref": "#/components/schemas/FactionTerritoryWarFaction"
17344
+ },
17345
+ "result": {
17346
+ "type": "string"
17347
+ }
17348
+ },
17349
+ "type": "object"
17350
+ },
17351
+ "FactionTerritoryWarFaction": {
17352
+ "description": "The fields 'chain' and 'players_on_wall' exist only for wars with the result 'in_progress'.",
17353
+ "required": [
17354
+ "id",
17355
+ "name",
17356
+ "score"
17357
+ ],
17358
+ "properties": {
17359
+ "id": {
17360
+ "$ref": "#/components/schemas/FactionId"
17361
+ },
17362
+ "name": {
17363
+ "type": "string"
17364
+ },
17365
+ "score": {
17366
+ "type": "integer",
17367
+ "format": "int32"
17368
+ },
17369
+ "chain": {
17370
+ "type": "integer",
17371
+ "format": "int32"
17372
+ },
17373
+ "players_on_wall": {
17374
+ "type": "array",
17375
+ "items": {}
17376
+ }
17377
+ },
17378
+ "type": "object"
17379
+ },
17380
+ "FactionTerritoryWarFinishedFaction": {
17381
+ "required": [
17382
+ "id",
17383
+ "name",
17384
+ "score",
17385
+ "is_aggressor"
17386
+ ],
17387
+ "properties": {
17388
+ "id": {
17389
+ "$ref": "#/components/schemas/FactionId"
17390
+ },
17391
+ "name": {
17392
+ "type": "string"
17393
+ },
17394
+ "score": {
17395
+ "type": "integer",
17396
+ "format": "int32"
17397
+ },
17398
+ "is_aggressor": {
17399
+ "type": "boolean"
17400
+ }
17401
+ },
17402
+ "type": "object"
17403
+ },
17404
+ "FactionSearchLeader": {
17405
+ "required": [
17406
+ "id",
17407
+ "name"
17408
+ ],
17409
+ "properties": {
17410
+ "id": {
17411
+ "$ref": "#/components/schemas/UserId"
17412
+ },
17413
+ "name": {
17414
+ "type": "string"
17415
+ }
17416
+ },
17417
+ "type": "object"
17418
+ },
17419
+ "FactionSearch": {
17420
+ "required": [
17421
+ "id",
17422
+ "name",
17423
+ "respect",
17424
+ "members",
16874
17425
  "leader",
16875
17426
  "co_leader",
16876
17427
  "image",
@@ -17885,10 +18436,6 @@
17885
18436
  "leader_id": {
17886
18437
  "$ref": "#/components/schemas/UserId"
17887
18438
  },
17888
- "co-leader_id": {
17889
- "$ref": "#/components/schemas/UserId",
17890
- "description": "This is replaced with 'co_leader_id' field and will be removed on 1st June 2025."
17891
- },
17892
18439
  "co_leader_id": {
17893
18440
  "$ref": "#/components/schemas/UserId"
17894
18441
  },
@@ -18290,6 +18837,24 @@
18290
18837
  },
18291
18838
  "type": "object"
18292
18839
  },
18840
+ "FactionRaidsResponse": {
18841
+ "required": [
18842
+ "raids",
18843
+ "_metadata"
18844
+ ],
18845
+ "properties": {
18846
+ "raids": {
18847
+ "type": "array",
18848
+ "items": {
18849
+ "$ref": "#/components/schemas/FactionRaidWarfare"
18850
+ }
18851
+ },
18852
+ "_metadata": {
18853
+ "$ref": "#/components/schemas/RequestMetadataWithLinks"
18854
+ }
18855
+ },
18856
+ "type": "object"
18857
+ },
18293
18858
  "FactionAttacksResponse": {
18294
18859
  "required": [
18295
18860
  "attacks",
@@ -18505,6 +19070,36 @@
18505
19070
  },
18506
19071
  "type": "object"
18507
19072
  },
19073
+ "FactionChainWarfare": {
19074
+ "allOf": [
19075
+ {
19076
+ "$ref": "#/components/schemas/FactionChain"
19077
+ },
19078
+ {
19079
+ "required": [
19080
+ "faction"
19081
+ ],
19082
+ "properties": {
19083
+ "faction": {
19084
+ "required": [
19085
+ "id",
19086
+ "name"
19087
+ ],
19088
+ "properties": {
19089
+ "id": {
19090
+ "$ref": "#/components/schemas/FactionId"
19091
+ },
19092
+ "name": {
19093
+ "type": "string"
19094
+ }
19095
+ },
19096
+ "type": "object"
19097
+ }
19098
+ },
19099
+ "type": "object"
19100
+ }
19101
+ ]
19102
+ },
18508
19103
  "FactionChainsResponse": {
18509
19104
  "required": [
18510
19105
  "chains",
@@ -18575,14 +19170,6 @@
18575
19170
  "$ref": "#/components/schemas/FactionChainReportAttacker"
18576
19171
  }
18577
19172
  },
18578
- "non-attackers": {
18579
- "description": "This is replaced with 'non_attackers' field and will be removed on 1st June 2025.",
18580
- "type": "array",
18581
- "items": {
18582
- "$ref": "#/components/schemas/UserId"
18583
- },
18584
- "deprecated": true
18585
- },
18586
19173
  "non_attackers": {
18587
19174
  "type": "array",
18588
19175
  "items": {
@@ -19211,6 +19798,8 @@
19211
19798
  "news",
19212
19799
  "positions",
19213
19800
  "rackets",
19801
+ "raidreport",
19802
+ "raids",
19214
19803
  "rankedwars",
19215
19804
  "rankedwarreport",
19216
19805
  "reports",
@@ -19224,6 +19813,7 @@
19224
19813
  "territorywars",
19225
19814
  "timestamp",
19226
19815
  "upgrades",
19816
+ "warfare",
19227
19817
  "wars",
19228
19818
  "armor",
19229
19819
  "boosters",
@@ -19341,6 +19931,52 @@
19341
19931
  },
19342
19932
  "type": "object"
19343
19933
  },
19934
+ "FactionWarfareResponse": {
19935
+ "required": [
19936
+ "warfare",
19937
+ "_metadata"
19938
+ ],
19939
+ "properties": {
19940
+ "warfare": {
19941
+ "oneOf": [
19942
+ {
19943
+ "type": "array",
19944
+ "items": {
19945
+ "$ref": "#/components/schemas/FactionRankedWarDetails"
19946
+ }
19947
+ },
19948
+ {
19949
+ "type": "array",
19950
+ "items": {
19951
+ "$ref": "#/components/schemas/FactionTerritoryWarfare"
19952
+ }
19953
+ },
19954
+ {
19955
+ "type": "array",
19956
+ "items": {
19957
+ "$ref": "#/components/schemas/FactionChainWarfare"
19958
+ }
19959
+ },
19960
+ {
19961
+ "type": "array",
19962
+ "items": {
19963
+ "$ref": "#/components/schemas/FactionRaidWarfare"
19964
+ }
19965
+ },
19966
+ {
19967
+ "type": "array",
19968
+ "items": {
19969
+ "$ref": "#/components/schemas/FactionWarfareDirtyBomb"
19970
+ }
19971
+ }
19972
+ ]
19973
+ },
19974
+ "_metadata": {
19975
+ "$ref": "#/components/schemas/RequestMetadataWithLinks"
19976
+ }
19977
+ },
19978
+ "type": "object"
19979
+ },
19344
19980
  "FactionRankedWarReportResponse": {
19345
19981
  "required": [
19346
19982
  "rankedwarreport"
@@ -22416,7 +23052,7 @@
22416
23052
  "TornSelectionName": {
22417
23053
  "oneOf": [
22418
23054
  {
22419
- "description": "The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','dirtybombs','gyms','honors','itemdetails','itemstats','medals','organisedcrimes','pawnshop','pokertables','properties','raidreport','raids','rockpaperscissors','searchforcash','shoplifting','stats','stocks'.\n * The following selections are not available in API v2: 'chainreport', 'rackets', 'rankedwarreport', 'rankedwars', 'territorynames', 'territorywarreport', 'territorywars'.",
23055
+ "description": "The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','gyms','honors','itemdetails','itemstats','medals','organisedcrimes','pawnshop','pokertables','properties','rockpaperscissors','searchforcash','shoplifting','stats','stocks'.\n * The following selections are not available in API v2: 'dirtybombs','raidreport','raids', 'chainreport', 'rackets', 'rankedwarreport', 'rankedwars', 'territorynames', 'territorywarreport', 'territorywars'.",
22420
23056
  "type": "string",
22421
23057
  "enum": [
22422
23058
  "attacklog",
@@ -22441,7 +23077,6 @@
22441
23077
  "cityshops",
22442
23078
  "companies",
22443
23079
  "competition",
22444
- "dirtybombs",
22445
23080
  "gyms",
22446
23081
  "honors",
22447
23082
  "itemdetails",
@@ -22451,8 +23086,6 @@
22451
23086
  "pawnshop",
22452
23087
  "pokertables",
22453
23088
  "properties",
22454
- "raidreport",
22455
- "raids",
22456
23089
  "rockpaperscissors",
22457
23090
  "searchforcash",
22458
23091
  "shoplifting",
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "0.2.8",
4
+ "version": "0.2.9",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },
8
8
  "devDependencies": {
9
9
  "@scalar/openapi-types": "^0.3.1",
10
- "@types/node": "^22.15.21",
10
+ "@types/node": "^22.15.29",
11
11
  "prettier": "^3.5.3",
12
12
  "typeconv": "^2.3.1",
13
13
  "typescript": "^5.8.3"