tornapi-typescript 3.0.3 → 3.0.5

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
@@ -40,6 +40,8 @@ export type FactionApplicationStatusEnum = "accepted" | "declined" | "withdrawn"
40
40
  export type FactionRankedWarsCategoryEnum = "all" | "ongoing";
41
41
  export type FactionTerritoryWarsCategoryEnum = "finsihed" | "ongoing";
42
42
  export type FactionCrimeUserOutcome = "Successful" | "Failed" | "Jailed" | "Injured" | "Hospitalized";
43
+ export type FactionCrimeUserItemOutcomeEnum = "user" | "faction";
44
+ export type FactionCrimeItemOutcomeEnum = "lost" | "used";
43
45
  export type RaceId = number;
44
46
  export type OrganizedCrimeName = string;
45
47
  export type PropertyTypeId = number;
@@ -1807,9 +1809,17 @@ export interface FactionChainReportAttackerAttacks {
1807
1809
  war: number;
1808
1810
  bonuses: number;
1809
1811
  }
1812
+ export interface FactionCrimeUserItemOutcome {
1813
+ owned_by: FactionCrimeUserItemOutcomeEnum;
1814
+ item_id: ItemId;
1815
+ item_uid: ItemUid;
1816
+ outcome: FactionCrimeItemOutcomeEnum;
1817
+ }
1810
1818
  export interface FactionCrimeUser {
1811
1819
  id: UserId;
1812
1820
  outcome: FactionCrimeUserOutcome | null;
1821
+ outcome_duration?: number | null;
1822
+ item_outcome: FactionCrimeUserItemOutcome | null;
1813
1823
  /** The timestamp at which the user joined the slot. */
1814
1824
  joined_at: number;
1815
1825
  /** Current planning progress on the slot. */
@@ -5957,11 +5967,11 @@ export interface UserV2 extends BaseSchema {
5957
5967
  selections: {
5958
5968
  attacks: {
5959
5969
  response: FactionAttacksResponse;
5960
- params: "limit" | "sort" | "to" | "from" | "timestamp";
5970
+ params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
5961
5971
  };
5962
5972
  attacksfull: {
5963
5973
  response: FactionAttacksFullResponse;
5964
- params: "limit" | "sort" | "to" | "from" | "timestamp";
5974
+ params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
5965
5975
  };
5966
5976
  bounties: {
5967
5977
  response: UserBountiesResponse;
@@ -6057,11 +6067,11 @@ export interface UserV2 extends BaseSchema {
6057
6067
  };
6058
6068
  revives: {
6059
6069
  response: RevivesResponse;
6060
- params: "limit" | "sort" | "to" | "from" | "striptags" | "timestamp";
6070
+ params: "filters" | "limit" | "sort" | "to" | "from" | "striptags" | "timestamp";
6061
6071
  };
6062
6072
  revivesFull: {
6063
6073
  response: RevivesFullResponse;
6064
- params: "limit" | "sort" | "to" | "from" | "striptags" | "timestamp";
6074
+ params: "filters" | "limit" | "sort" | "to" | "from" | "striptags" | "timestamp";
6065
6075
  };
6066
6076
  lookup: {
6067
6077
  response: UserLookupResponse;
@@ -6081,11 +6091,11 @@ export interface FactionV2 extends BaseSchema {
6081
6091
  };
6082
6092
  attacks: {
6083
6093
  response: FactionAttacksResponse;
6084
- params: "limit" | "sort" | "to" | "from" | "timestamp";
6094
+ params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
6085
6095
  };
6086
6096
  attacksfull: {
6087
6097
  response: FactionAttacksFullResponse;
6088
- params: "limit" | "sort" | "to" | "from" | "timestamp";
6098
+ params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
6089
6099
  };
6090
6100
  balance: {
6091
6101
  response: FactionBalanceResponse;
@@ -6161,11 +6171,11 @@ export interface FactionV2 extends BaseSchema {
6161
6171
  };
6162
6172
  revives: {
6163
6173
  response: RevivesResponse;
6164
- params: "limit" | "sort" | "to" | "from" | "striptags" | "timestamp";
6174
+ params: "filters" | "limit" | "sort" | "to" | "from" | "striptags" | "timestamp";
6165
6175
  };
6166
6176
  revivesFull: {
6167
6177
  response: RevivesFullResponse;
6168
- params: "limit" | "sort" | "to" | "from" | "striptags" | "timestamp";
6178
+ params: "filters" | "limit" | "sort" | "to" | "from" | "striptags" | "timestamp";
6169
6179
  };
6170
6180
  search: {
6171
6181
  response: FactionSearchResponse;
package/dist/index.ts CHANGED
@@ -4554,6 +4554,10 @@ export type FactionCrimeUserOutcome =
4554
4554
  | "Injured"
4555
4555
  | "Hospitalized";
4556
4556
 
4557
+ export type FactionCrimeUserItemOutcomeEnum = "user" | "faction";
4558
+
4559
+ export type FactionCrimeItemOutcomeEnum = "lost" | "used";
4560
+
4557
4561
  export type RaceId = number;
4558
4562
 
4559
4563
  export type OrganizedCrimeName = string;
@@ -7059,9 +7063,18 @@ export interface FactionChainReportAttackerAttacks {
7059
7063
  bonuses: number;
7060
7064
  }
7061
7065
 
7066
+ export interface FactionCrimeUserItemOutcome {
7067
+ owned_by: FactionCrimeUserItemOutcomeEnum;
7068
+ item_id: ItemId;
7069
+ item_uid: ItemUid;
7070
+ outcome: FactionCrimeItemOutcomeEnum;
7071
+ }
7072
+
7062
7073
  export interface FactionCrimeUser {
7063
7074
  id: UserId;
7064
7075
  outcome: FactionCrimeUserOutcome | null;
7076
+ outcome_duration?: number | null;
7077
+ item_outcome: FactionCrimeUserItemOutcome | null;
7065
7078
  /** The timestamp at which the user joined the slot. */
7066
7079
  joined_at: number;
7067
7080
  /** Current planning progress on the slot. */
@@ -11417,11 +11430,11 @@ export interface UserV2 extends BaseSchema {
11417
11430
  selections: {
11418
11431
  attacks: {
11419
11432
  response: FactionAttacksResponse;
11420
- params: "limit" | "sort" | "to" | "from" | "timestamp";
11433
+ params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
11421
11434
  };
11422
11435
  attacksfull: {
11423
11436
  response: FactionAttacksFullResponse;
11424
- params: "limit" | "sort" | "to" | "from" | "timestamp";
11437
+ params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
11425
11438
  };
11426
11439
  bounties: {
11427
11440
  response: UserBountiesResponse;
@@ -11524,6 +11537,7 @@ export interface UserV2 extends BaseSchema {
11524
11537
  revives: {
11525
11538
  response: RevivesResponse;
11526
11539
  params:
11540
+ | "filters"
11527
11541
  | "limit"
11528
11542
  | "sort"
11529
11543
  | "to"
@@ -11534,6 +11548,7 @@ export interface UserV2 extends BaseSchema {
11534
11548
  revivesFull: {
11535
11549
  response: RevivesFullResponse;
11536
11550
  params:
11551
+ | "filters"
11537
11552
  | "limit"
11538
11553
  | "sort"
11539
11554
  | "to"
@@ -11559,11 +11574,11 @@ export interface FactionV2 extends BaseSchema {
11559
11574
  };
11560
11575
  attacks: {
11561
11576
  response: FactionAttacksResponse;
11562
- params: "limit" | "sort" | "to" | "from" | "timestamp";
11577
+ params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
11563
11578
  };
11564
11579
  attacksfull: {
11565
11580
  response: FactionAttacksFullResponse;
11566
- params: "limit" | "sort" | "to" | "from" | "timestamp";
11581
+ params: "filters" | "limit" | "sort" | "to" | "from" | "timestamp";
11567
11582
  };
11568
11583
  balance: {
11569
11584
  response: FactionBalanceResponse;
@@ -11654,6 +11669,7 @@ export interface FactionV2 extends BaseSchema {
11654
11669
  revives: {
11655
11670
  response: RevivesResponse;
11656
11671
  params:
11672
+ | "filters"
11657
11673
  | "limit"
11658
11674
  | "sort"
11659
11675
  | "to"
@@ -11664,6 +11680,7 @@ export interface FactionV2 extends BaseSchema {
11664
11680
  revivesFull: {
11665
11681
  response: RevivesFullResponse;
11666
11682
  params:
11683
+ | "filters"
11667
11684
  | "limit"
11668
11685
  | "sort"
11669
11686
  | "to"
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": "3.0.3"
6
+ "version": "3.0.5"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -21,6 +21,19 @@
21
21
  "description": "Requires limited access key. <br>",
22
22
  "operationId": "3acc98a3016974b786cb01e04e1ced04",
23
23
  "parameters": [
24
+ {
25
+ "name": "filters",
26
+ "in": "query",
27
+ "description": "It's possible to use this query parameter to only get incoming or outgoing attacks. If not specified, this selection will return both incoming and outgoing attacks.",
28
+ "required": false,
29
+ "schema": {
30
+ "type": "string",
31
+ "enum": [
32
+ "incoming",
33
+ "outgoing"
34
+ ]
35
+ }
36
+ },
24
37
  {
25
38
  "$ref": "#/components/parameters/ApiLimit100"
26
39
  },
@@ -72,6 +85,19 @@
72
85
  "description": "Requires limited access key. <br>Returns up to 1,000 rows. <br>",
73
86
  "operationId": "e995691fd9845c8b4a91f065ac9c8420",
74
87
  "parameters": [
88
+ {
89
+ "name": "filters",
90
+ "in": "query",
91
+ "description": "It's possible to use this query parameter to only get incoming or outgoing attacks. If not specified, this selection will return both incoming and outgoing attacks.",
92
+ "required": false,
93
+ "schema": {
94
+ "type": "string",
95
+ "enum": [
96
+ "incoming",
97
+ "outgoing"
98
+ ]
99
+ }
100
+ },
75
101
  {
76
102
  "$ref": "#/components/parameters/ApiLimit1000"
77
103
  },
@@ -1589,6 +1615,19 @@
1589
1615
  "description": "Requires limited access key. <br>",
1590
1616
  "operationId": "3c847eb1325040798f37a7492108e094",
1591
1617
  "parameters": [
1618
+ {
1619
+ "name": "filters",
1620
+ "in": "query",
1621
+ "description": "It's possible to use this query parameter to only get incoming or outgoing revives. If not specified, this selection will return both incoming and outgoing revives.",
1622
+ "required": false,
1623
+ "schema": {
1624
+ "type": "string",
1625
+ "enum": [
1626
+ "incoming",
1627
+ "outgoing"
1628
+ ]
1629
+ }
1630
+ },
1592
1631
  {
1593
1632
  "$ref": "#/components/parameters/ApiLimit100Default20"
1594
1633
  },
@@ -1643,6 +1682,19 @@
1643
1682
  "description": "Requires limited access key. <br>",
1644
1683
  "operationId": "8820cd889afde899353037ca5a0f9a07",
1645
1684
  "parameters": [
1685
+ {
1686
+ "name": "filters",
1687
+ "in": "query",
1688
+ "description": "It's possible to use this query parameter to only get incoming or outgoing revives. If not specified, this selection will return both incoming and outgoing revives.",
1689
+ "required": false,
1690
+ "schema": {
1691
+ "type": "string",
1692
+ "enum": [
1693
+ "incoming",
1694
+ "outgoing"
1695
+ ]
1696
+ }
1697
+ },
1646
1698
  {
1647
1699
  "$ref": "#/components/parameters/ApiLimit1000Default20"
1648
1700
  },
@@ -2019,6 +2071,19 @@
2019
2071
  "description": "Requires limited access key with faction API access permissions. <br>",
2020
2072
  "operationId": "cb5b38ba64c389e706526df8bc8af9b6",
2021
2073
  "parameters": [
2074
+ {
2075
+ "name": "filters",
2076
+ "in": "query",
2077
+ "description": "It's possible to use this query parameter to only get incoming or outgoing attacks. If not specified, this selection will return both incoming and outgoing attacks.",
2078
+ "required": false,
2079
+ "schema": {
2080
+ "type": "string",
2081
+ "enum": [
2082
+ "incoming",
2083
+ "outgoing"
2084
+ ]
2085
+ }
2086
+ },
2022
2087
  {
2023
2088
  "$ref": "#/components/parameters/ApiLimit100"
2024
2089
  },
@@ -2070,6 +2135,19 @@
2070
2135
  "description": "Requires limited access key with faction API access permissions. <br>",
2071
2136
  "operationId": "8551280aaaf9819aa94be5c469a523de",
2072
2137
  "parameters": [
2138
+ {
2139
+ "name": "filters",
2140
+ "in": "query",
2141
+ "description": "It's possible to use this query parameter to only get incoming or outgoing attacks. If not specified, this selection will return both incoming and outgoing attacks.",
2142
+ "required": false,
2143
+ "schema": {
2144
+ "type": "string",
2145
+ "enum": [
2146
+ "incoming",
2147
+ "outgoing"
2148
+ ]
2149
+ }
2150
+ },
2073
2151
  {
2074
2152
  "$ref": "#/components/parameters/ApiLimit1000"
2075
2153
  },
@@ -3408,6 +3486,19 @@
3408
3486
  "description": "Requires limited access key with faction API access permissions. <br>",
3409
3487
  "operationId": "486fcda26ed1aa6aba8ec7091080723b",
3410
3488
  "parameters": [
3489
+ {
3490
+ "name": "filters",
3491
+ "in": "query",
3492
+ "description": "It's possible to use this query parameter to only get incoming or outgoing revives. If not specified, this selection will return both incoming and outgoing revives.",
3493
+ "required": false,
3494
+ "schema": {
3495
+ "type": "string",
3496
+ "enum": [
3497
+ "incoming",
3498
+ "outgoing"
3499
+ ]
3500
+ }
3501
+ },
3411
3502
  {
3412
3503
  "$ref": "#/components/parameters/ApiLimit100"
3413
3504
  },
@@ -3462,6 +3553,19 @@
3462
3553
  "description": "Requires limited access key with faction API access permissions. <br>",
3463
3554
  "operationId": "f17a4064779e8de5200238816c233c02",
3464
3555
  "parameters": [
3556
+ {
3557
+ "name": "filters",
3558
+ "in": "query",
3559
+ "description": "It's possible to use this query parameter to only get incoming or outgoing revives. If not specified, this selection will return both incoming and outgoing revives.",
3560
+ "required": false,
3561
+ "schema": {
3562
+ "type": "string",
3563
+ "enum": [
3564
+ "incoming",
3565
+ "outgoing"
3566
+ ]
3567
+ }
3568
+ },
3465
3569
  {
3466
3570
  "$ref": "#/components/parameters/ApiLimit1000"
3467
3571
  },
@@ -11968,6 +12072,20 @@
11968
12072
  "Hospitalized"
11969
12073
  ]
11970
12074
  },
12075
+ "FactionCrimeUserItemOutcomeEnum": {
12076
+ "type": "string",
12077
+ "enum": [
12078
+ "user",
12079
+ "faction"
12080
+ ]
12081
+ },
12082
+ "FactionCrimeItemOutcomeEnum": {
12083
+ "type": "string",
12084
+ "enum": [
12085
+ "lost",
12086
+ "used"
12087
+ ]
12088
+ },
11971
12089
  "RaceId": {
11972
12090
  "type": "integer",
11973
12091
  "format": "int32"
@@ -20799,12 +20917,36 @@
20799
20917
  },
20800
20918
  "type": "object"
20801
20919
  },
20920
+ "FactionCrimeUserItemOutcome": {
20921
+ "required": [
20922
+ "owned_by",
20923
+ "item_id",
20924
+ "item_uid",
20925
+ "outcome"
20926
+ ],
20927
+ "properties": {
20928
+ "owned_by": {
20929
+ "$ref": "#/components/schemas/FactionCrimeUserItemOutcomeEnum"
20930
+ },
20931
+ "item_id": {
20932
+ "$ref": "#/components/schemas/ItemId"
20933
+ },
20934
+ "item_uid": {
20935
+ "$ref": "#/components/schemas/ItemUid"
20936
+ },
20937
+ "outcome": {
20938
+ "$ref": "#/components/schemas/FactionCrimeItemOutcomeEnum"
20939
+ }
20940
+ },
20941
+ "type": "object"
20942
+ },
20802
20943
  "FactionCrimeUser": {
20803
20944
  "required": [
20804
20945
  "id",
20805
20946
  "outcome",
20806
20947
  "joined_at",
20807
- "progress"
20948
+ "progress",
20949
+ "item_outcome"
20808
20950
  ],
20809
20951
  "properties": {
20810
20952
  "id": {
@@ -20821,6 +20963,29 @@
20821
20963
  }
20822
20964
  ]
20823
20965
  },
20966
+ "outcome_duration": {
20967
+ "description": "This field is only populated for crimes completed after 25/07/2025 and only if the outcome is 'Jailed' or 'Hospitalized'.",
20968
+ "oneOf": [
20969
+ {
20970
+ "type": "integer",
20971
+ "format": "int32"
20972
+ },
20973
+ {
20974
+ "type": "null"
20975
+ }
20976
+ ]
20977
+ },
20978
+ "item_outcome": {
20979
+ "description": "This field is only populated for crimes completed after 25/07/2025 and only if the item was used or lost.",
20980
+ "oneOf": [
20981
+ {
20982
+ "$ref": "#/components/schemas/FactionCrimeUserItemOutcome"
20983
+ },
20984
+ {
20985
+ "type": "null"
20986
+ }
20987
+ ]
20988
+ },
20824
20989
  "joined_at": {
20825
20990
  "description": "The timestamp at which the user joined the slot.",
20826
20991
  "type": "integer",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "3.0.3",
4
+ "version": "3.0.5",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },