tornapi-typescript 0.1.1 → 0.1.2

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
@@ -55,6 +55,30 @@ export type FactionStatEnum =
55
55
 
56
56
  export type FactionBranchStateEnum = "war" | "peace";
57
57
 
58
+ export type FactionPositionAbilityEnum =
59
+ | "Medical Item Usage"
60
+ | "Booster Item Usage"
61
+ | "Drug Item Usage"
62
+ | "Energy Refill Usage"
63
+ | "Nerve Refill Usage"
64
+ | "Temporary Item Loaning"
65
+ | "Weapon & Armor Loaning"
66
+ | "Item Retrieving"
67
+ | "Organised Crimes"
68
+ | "Faction API Access"
69
+ | "Item Giving"
70
+ | "Money Giving"
71
+ | "Points Giving"
72
+ | "Forum Management"
73
+ | "Application Management"
74
+ | "Kick Members"
75
+ | "Balance Adjustment"
76
+ | "War Management"
77
+ | "Upgrade Management"
78
+ | "Newsletter Sending"
79
+ | "Announcement Changes"
80
+ | "Description Changes";
81
+
58
82
  export type FactionOrganizedCrimePayoutType =
59
83
  | "balance"
60
84
  | "wallet"
@@ -670,6 +694,16 @@ export interface TimestampResponse {
670
694
  timestamp: number;
671
695
  }
672
696
 
697
+ export interface FactionPosition {
698
+ name: string;
699
+ is_default: boolean;
700
+ abilities: FactionPositionAbilityEnum[];
701
+ }
702
+
703
+ export interface FactionPositionsResponse {
704
+ positions: FactionPosition[];
705
+ }
706
+
673
707
  export interface FactionUpgradeDetails {
674
708
  id: FactionBranchId;
675
709
  name: string;
package/dist/openapi.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Torn API",
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.",
6
- "version": "1.1.0"
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.2.0"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -1986,6 +1986,33 @@
1986
1986
  "x-stability": "Stable"
1987
1987
  }
1988
1988
  },
1989
+ "/faction/positions": {
1990
+ "get": {
1991
+ "tags": [
1992
+ "Faction"
1993
+ ],
1994
+ "summary": "Get your faction's positions details",
1995
+ "description": "Requires minimal access key with faction API access permissions. <br>",
1996
+ "responses": {
1997
+ "200": {
1998
+ "description": "Successful operation",
1999
+ "content": {
2000
+ "application/json": {
2001
+ "schema": {
2002
+ "$ref": "#/components/schemas/FactionPositionsResponse"
2003
+ }
2004
+ }
2005
+ }
2006
+ }
2007
+ },
2008
+ "security": [
2009
+ {
2010
+ "api_key": []
2011
+ }
2012
+ ],
2013
+ "x-stability": "Unstable"
2014
+ }
2015
+ },
1989
2016
  "/faction/rankedwars": {
1990
2017
  "get": {
1991
2018
  "tags": [
@@ -4226,6 +4253,34 @@
4226
4253
  "peace"
4227
4254
  ]
4228
4255
  },
4256
+ "FactionPositionAbilityEnum": {
4257
+ "type": "string",
4258
+ "enum": [
4259
+ "Medical Item Usage",
4260
+ "Booster Item Usage",
4261
+ "Drug Item Usage",
4262
+ "Energy Refill Usage",
4263
+ "Nerve Refill Usage",
4264
+ "Temporary Item Loaning",
4265
+ "Weapon & Armor Loaning",
4266
+ "Item Retrieving",
4267
+ "Organised Crimes",
4268
+ "Faction API Access",
4269
+ "Item Giving",
4270
+ "Money Giving",
4271
+ "Points Giving",
4272
+ "Forum Management",
4273
+ "Application Management",
4274
+ "Kick Members",
4275
+ "Balance Adjustment",
4276
+ "War Management",
4277
+ "Upgrade Management",
4278
+ "Newsletter Sending",
4279
+ "Announcement Changes",
4280
+ "Description Changes",
4281
+ "Organised Crimes"
4282
+ ]
4283
+ },
4229
4284
  "FactionOrganizedCrimePayoutType": {
4230
4285
  "type": "string",
4231
4286
  "enum": [
@@ -5430,6 +5485,42 @@
5430
5485
  },
5431
5486
  "type": "object"
5432
5487
  },
5488
+ "FactionPosition": {
5489
+ "required": [
5490
+ "name",
5491
+ "is_default",
5492
+ "abilities"
5493
+ ],
5494
+ "properties": {
5495
+ "name": {
5496
+ "type": "string"
5497
+ },
5498
+ "is_default": {
5499
+ "type": "boolean"
5500
+ },
5501
+ "abilities": {
5502
+ "type": "array",
5503
+ "items": {
5504
+ "$ref": "#/components/schemas/FactionPositionAbilityEnum"
5505
+ }
5506
+ }
5507
+ },
5508
+ "type": "object"
5509
+ },
5510
+ "FactionPositionsResponse": {
5511
+ "required": [
5512
+ "positions"
5513
+ ],
5514
+ "properties": {
5515
+ "positions": {
5516
+ "type": "array",
5517
+ "items": {
5518
+ "$ref": "#/components/schemas/FactionPosition"
5519
+ }
5520
+ }
5521
+ },
5522
+ "type": "object"
5523
+ },
5433
5524
  "FactionUpgradeDetails": {
5434
5525
  "required": [
5435
5526
  "id",
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },
8
8
  "devDependencies": {
9
9
  "@scalar/openapi-types": "^0.2.0",
10
- "@types/node": "^22.14.0",
10
+ "@types/node": "^22.14.1",
11
11
  "prettier": "^3.5.3",
12
12
  "typeconv": "^2.3.1",
13
13
  "typescript": "^5.8.3"