tornapi-typescript 0.2.7 → 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;
@@ -6026,8 +6036,8 @@ export interface UserPersonalStatsFullPublic {
6026
6036
  export type UserPersonalStatsResponse =
6027
6037
  | UserPersonalStatsFull
6028
6038
  | UserPersonalStatsFullPublic
6029
- | UserPersonalStatsCategory
6030
6039
  | UserPersonalStatsPopular
6040
+ | UserPersonalStatsCategory
6031
6041
  | UserPersonalStatsHistoric;
6032
6042
 
6033
6043
  export type PersonalStatsCategoryEnum =
@@ -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;
@@ -7468,6 +7583,11 @@ export interface AttackLog {
7468
7583
  id: UserId;
7469
7584
  name: string;
7470
7585
  } | null;
7586
+ /** This field only exists if the attacker is stealthed and they used a temporary item. */
7587
+ attacker_item?: {
7588
+ id: ItemId;
7589
+ name: string;
7590
+ };
7471
7591
  }
7472
7592
 
7473
7593
  export interface AttackLogResponse {
@@ -7596,8 +7716,8 @@ export interface TornFactionTreeResponse {
7596
7716
  }
7597
7717
 
7598
7718
  /**
7599
- * 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'.
7600
- * * 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'.
7601
7721
  */
7602
7722
  export type TornSelectionName = string;
7603
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.1"
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
  },
@@ -5910,55 +6132,10 @@
5910
6132
  "operationId": "37f1828422f3080da21f9eb4aa576686",
5911
6133
  "parameters": [
5912
6134
  {
5913
- "$ref": "#/components/parameters/ApiOffset"
5914
- },
5915
- {
5916
- "$ref": "#/components/parameters/ApiLimit250Default20"
5917
- },
5918
- {
5919
- "$ref": "#/components/parameters/ApiTimestamp"
5920
- },
5921
- {
5922
- "$ref": "#/components/parameters/ApiComment"
5923
- },
5924
- {
5925
- "$ref": "#/components/parameters/ApiKeyPublic"
5926
- }
5927
- ],
5928
- "responses": {
5929
- "200": {
5930
- "description": "Successful operation",
5931
- "content": {
5932
- "application/json": {
5933
- "schema": {
5934
- "$ref": "#/components/schemas/TornTerritoriesResponse"
5935
- }
5936
- }
5937
- }
5938
- }
5939
- },
5940
- "security": [
5941
- {
5942
- "api_key": []
5943
- }
5944
- ],
5945
- "x-stability": "Unstable"
5946
- }
5947
- },
5948
- "/torn/{territoryIds}/territory": {
5949
- "get": {
5950
- "tags": [
5951
- "Torn"
5952
- ],
5953
- "summary": "Get territory details",
5954
- "description": "Requires public access key. <br>",
5955
- "operationId": "4e528387ddb78befed57cb4c84151399",
5956
- "parameters": [
5957
- {
5958
- "name": "territoryIds",
5959
- "in": "path",
5960
- "description": "Territory id or a list of territory ids (comma separated)",
5961
- "required": true,
6135
+ "name": "ids",
6136
+ "in": "query",
6137
+ "description": "Specific territory id or a list of territory ids (comma separated)",
6138
+ "required": false,
5962
6139
  "style": "form",
5963
6140
  "explode": false,
5964
6141
  "schema": {
@@ -5968,6 +6145,12 @@
5968
6145
  }
5969
6146
  }
5970
6147
  },
6148
+ {
6149
+ "$ref": "#/components/parameters/ApiOffset"
6150
+ },
6151
+ {
6152
+ "$ref": "#/components/parameters/ApiLimit250Default20"
6153
+ },
5971
6154
  {
5972
6155
  "$ref": "#/components/parameters/ApiTimestamp"
5973
6156
  },
@@ -10865,7 +11048,8 @@
10865
11048
  "enum": [
10866
11049
  "accepted",
10867
11050
  "declined",
10868
- "withdrawn"
11051
+ "withdrawn",
11052
+ "active"
10869
11053
  ]
10870
11054
  },
10871
11055
  "FactionRankedWarsCategoryEnum": {
@@ -10896,6 +11080,10 @@
10896
11080
  "type": "integer",
10897
11081
  "format": "int32"
10898
11082
  },
11083
+ "DirtyBombId": {
11084
+ "type": "integer",
11085
+ "format": "int32"
11086
+ },
10899
11087
  "RaceTrackId": {
10900
11088
  "type": "integer",
10901
11089
  "format": "int32"
@@ -10928,6 +11116,10 @@
10928
11116
  "type": "integer",
10929
11117
  "format": "int32"
10930
11118
  },
11119
+ "RaidWarId": {
11120
+ "type": "integer",
11121
+ "format": "int32"
11122
+ },
10931
11123
  "ItemUid": {
10932
11124
  "type": "integer",
10933
11125
  "format": "int64"
@@ -11103,10 +11295,20 @@
11103
11295
  "Unknown"
11104
11296
  ]
11105
11297
  },
11106
- "FactionCrimeStatusEnum": {
11298
+ "FactionWarfareTypeEnum": {
11107
11299
  "type": "string",
11108
11300
  "enum": [
11109
- "Recruiting",
11301
+ "ranked",
11302
+ "territory",
11303
+ "raid",
11304
+ "chain",
11305
+ "db"
11306
+ ]
11307
+ },
11308
+ "FactionCrimeStatusEnum": {
11309
+ "type": "string",
11310
+ "enum": [
11311
+ "Recruiting",
11110
11312
  "Planning",
11111
11313
  "Successful",
11112
11314
  "Failure",
@@ -12475,12 +12677,6 @@
12475
12677
  "type": "integer",
12476
12678
  "format": "int32"
12477
12679
  },
12478
- "sci-fi": {
12479
- "description": "This is replaced with 'sci_fi' field and will be removed on 1st June 2025.",
12480
- "type": "integer",
12481
- "format": "int32",
12482
- "deprecated": true
12483
- },
12484
12680
  "sci_fi": {
12485
12681
  "type": "integer",
12486
12682
  "format": "int32"
@@ -16605,10 +16801,10 @@
16605
16801
  "$ref": "#/components/schemas/UserPersonalStatsFullPublic"
16606
16802
  },
16607
16803
  {
16608
- "$ref": "#/components/schemas/UserPersonalStatsCategory"
16804
+ "$ref": "#/components/schemas/UserPersonalStatsPopular"
16609
16805
  },
16610
16806
  {
16611
- "$ref": "#/components/schemas/UserPersonalStatsPopular"
16807
+ "$ref": "#/components/schemas/UserPersonalStatsCategory"
16612
16808
  },
16613
16809
  {
16614
16810
  "$ref": "#/components/schemas/UserPersonalStatsHistoric"
@@ -16865,6 +17061,322 @@
16865
17061
  "scammingskill"
16866
17062
  ]
16867
17063
  },
17064
+ "FactionRaidReport": {
17065
+ "required": [
17066
+ "id",
17067
+ "start",
17068
+ "end",
17069
+ "aggressor",
17070
+ "defender"
17071
+ ],
17072
+ "properties": {
17073
+ "id": {
17074
+ "$ref": "#/components/schemas/RaidWarId"
17075
+ },
17076
+ "start": {
17077
+ "type": "integer",
17078
+ "format": "int32"
17079
+ },
17080
+ "end": {
17081
+ "type": "integer",
17082
+ "format": "int32"
17083
+ },
17084
+ "aggressor": {
17085
+ "$ref": "#/components/schemas/FactionRaidReportFaction"
17086
+ },
17087
+ "defender": {
17088
+ "$ref": "#/components/schemas/FactionRaidReportFaction"
17089
+ }
17090
+ },
17091
+ "type": "object"
17092
+ },
17093
+ "FactionRaidReportFaction": {
17094
+ "required": [
17095
+ "id",
17096
+ "name",
17097
+ "score",
17098
+ "attackers",
17099
+ "non_attackers"
17100
+ ],
17101
+ "properties": {
17102
+ "id": {
17103
+ "$ref": "#/components/schemas/FactionId"
17104
+ },
17105
+ "name": {
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
+ }
17123
+ }
17124
+ },
17125
+ "type": "object"
17126
+ },
17127
+ "FactionRaidReportAttacker": {
17128
+ "required": [
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
+ },
16868
17380
  "FactionTerritoryWarFinishedFaction": {
16869
17381
  "required": [
16870
17382
  "id",
@@ -17924,10 +18436,6 @@
17924
18436
  "leader_id": {
17925
18437
  "$ref": "#/components/schemas/UserId"
17926
18438
  },
17927
- "co-leader_id": {
17928
- "$ref": "#/components/schemas/UserId",
17929
- "description": "This is replaced with 'co_leader_id' field and will be removed on 1st June 2025."
17930
- },
17931
18439
  "co_leader_id": {
17932
18440
  "$ref": "#/components/schemas/UserId"
17933
18441
  },
@@ -18329,6 +18837,24 @@
18329
18837
  },
18330
18838
  "type": "object"
18331
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
+ },
18332
18858
  "FactionAttacksResponse": {
18333
18859
  "required": [
18334
18860
  "attacks",
@@ -18544,6 +19070,36 @@
18544
19070
  },
18545
19071
  "type": "object"
18546
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
+ },
18547
19103
  "FactionChainsResponse": {
18548
19104
  "required": [
18549
19105
  "chains",
@@ -18614,14 +19170,6 @@
18614
19170
  "$ref": "#/components/schemas/FactionChainReportAttacker"
18615
19171
  }
18616
19172
  },
18617
- "non-attackers": {
18618
- "description": "This is replaced with 'non_attackers' field and will be removed on 1st June 2025.",
18619
- "type": "array",
18620
- "items": {
18621
- "$ref": "#/components/schemas/UserId"
18622
- },
18623
- "deprecated": true
18624
- },
18625
19173
  "non_attackers": {
18626
19174
  "type": "array",
18627
19175
  "items": {
@@ -19250,6 +19798,8 @@
19250
19798
  "news",
19251
19799
  "positions",
19252
19800
  "rackets",
19801
+ "raidreport",
19802
+ "raids",
19253
19803
  "rankedwars",
19254
19804
  "rankedwarreport",
19255
19805
  "reports",
@@ -19263,6 +19813,7 @@
19263
19813
  "territorywars",
19264
19814
  "timestamp",
19265
19815
  "upgrades",
19816
+ "warfare",
19266
19817
  "wars",
19267
19818
  "armor",
19268
19819
  "boosters",
@@ -19380,6 +19931,52 @@
19380
19931
  },
19381
19932
  "type": "object"
19382
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
+ },
19383
19980
  "FactionRankedWarReportResponse": {
19384
19981
  "required": [
19385
19982
  "rankedwarreport"
@@ -21894,6 +22491,22 @@
21894
22491
  "type": "null"
21895
22492
  }
21896
22493
  ]
22494
+ },
22495
+ "attacker_item": {
22496
+ "description": "This field only exists if the attacker is stealthed and they used a temporary item.",
22497
+ "required": [
22498
+ "id",
22499
+ "name"
22500
+ ],
22501
+ "properties": {
22502
+ "id": {
22503
+ "$ref": "#/components/schemas/ItemId"
22504
+ },
22505
+ "name": {
22506
+ "type": "string"
22507
+ }
22508
+ },
22509
+ "type": "object"
21897
22510
  }
21898
22511
  },
21899
22512
  "type": "object"
@@ -22439,7 +23052,7 @@
22439
23052
  "TornSelectionName": {
22440
23053
  "oneOf": [
22441
23054
  {
22442
- "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'.",
22443
23056
  "type": "string",
22444
23057
  "enum": [
22445
23058
  "attacklog",
@@ -22464,7 +23077,6 @@
22464
23077
  "cityshops",
22465
23078
  "companies",
22466
23079
  "competition",
22467
- "dirtybombs",
22468
23080
  "gyms",
22469
23081
  "honors",
22470
23082
  "itemdetails",
@@ -22474,8 +23086,6 @@
22474
23086
  "pawnshop",
22475
23087
  "pokertables",
22476
23088
  "properties",
22477
- "raidreport",
22478
- "raids",
22479
23089
  "rockpaperscissors",
22480
23090
  "searchforcash",
22481
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.7",
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"