tornapi-typescript 3.0.4 → 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. */
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. */
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.4"
6
+ "version": "3.0.5"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -12072,6 +12072,20 @@
12072
12072
  "Hospitalized"
12073
12073
  ]
12074
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
+ },
12075
12089
  "RaceId": {
12076
12090
  "type": "integer",
12077
12091
  "format": "int32"
@@ -20903,12 +20917,36 @@
20903
20917
  },
20904
20918
  "type": "object"
20905
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
+ },
20906
20943
  "FactionCrimeUser": {
20907
20944
  "required": [
20908
20945
  "id",
20909
20946
  "outcome",
20910
20947
  "joined_at",
20911
- "progress"
20948
+ "progress",
20949
+ "item_outcome"
20912
20950
  ],
20913
20951
  "properties": {
20914
20952
  "id": {
@@ -20925,6 +20963,29 @@
20925
20963
  }
20926
20964
  ]
20927
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
+ },
20928
20989
  "joined_at": {
20929
20990
  "description": "The timestamp at which the user joined the slot.",
20930
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.4",
4
+ "version": "3.0.5",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },