tornapi-typescript 5.6.0 → 5.7.0

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
@@ -29,7 +29,7 @@ export type FactionStatEnum = "medicalitemsused" | "criminaloffences" | "organis
29
29
  export type FactionBranchStateEnum = "war" | "peace";
30
30
  export type RacingRaceTypeEnum = "official" | "custom";
31
31
  export type MarketSpecializedBazaarCategoryEnum = "Alcohol" | "Artifact" | "Booster" | "Candy" | "Car" | "Clothing" | "Collectible" | "Defensive" | "Drug" | "Energy Drink" | "Enhancer" | "Flower" | "Jewelry" | "Material" | "Medical" | "Melee" | "Other" | "Plushie" | "Primary" | "Secondary" | "Special" | "Supply Pack" | "Temporary" | "Tool";
32
- export type FactionPositionAbilityEnum = "Medical Item Usage" | "Booster Item Usage" | "Drug Item Usage" | "Energy Refill Usage" | "Nerve Refill Usage" | "Temporary Item Loaning" | "Weapon & Armor Loaning" | "Item Retrieving" | "Organised Crimes" | "Faction API Access" | "Item Giving" | "Money Giving" | "Points Giving" | "Forum Management" | "Application Management" | "Kick Members" | "Balance Adjustment" | "War Management" | "Upgrade Management" | "Newsletter Sending" | "Announcement Changes" | "Description Changes" | "Utility Item Loaning" | "Consumable Item Usage";
32
+ export type FactionPositionAbilityEnum = "Medical Usage" | "Booster Usage" | "Drug Usage" | "Energy Refill Usage" | "Nerve Refill Usage" | "Temporary Loaning" | "Weapon & Armor Loaning" | "Item Retrieving" | "Organised Crimes" | "Faction API Access" | "Item Giving" | "Money Giving" | "Points Giving" | "Forum Management" | "Application Management" | "Kick Members" | "Balance Adjustment" | "War Management" | "Upgrade Management" | "Newsletter Sending" | "Announcement Changes" | "Description Changes" | "Utility Loaning" | "Consumable Usage" | "Medical Loaning" | "Consumable Loaning" | "Drug Loaning" | "Booster Loaning";
33
33
  export type FactionOrganizedCrimePayoutType = "balance" | "wallet" | "inventory";
34
34
  export type TornRacketType = "Item" | "Points" | "Money";
35
35
  export type FactionNewsCategory = "main" | "attack" | "armoryDeposit" | "armoryAction" | "territoryWar" | "rankedWar" | "territoryGain" | "chain" | "crime" | "membership" | "depositFunds" | "giveFunds";
@@ -497,6 +497,12 @@ export interface UserTradesResponse {
497
497
  trades: UserTrade[];
498
498
  _metadata: RequestMetadataWithLinks;
499
499
  }
500
+ export interface UserCasinoResponse {
501
+ casino: {
502
+ tokens: number;
503
+ streak: number;
504
+ };
505
+ }
500
506
  export interface UserInventoryItem {
501
507
  id: ItemId;
502
508
  amount: number;
@@ -3464,7 +3470,7 @@ export interface TornBountiesResponse {
3464
3470
  bounties_timestamp: number;
3465
3471
  /** The minimum amount of time needed before the cache timestamp can change. */
3466
3472
  bounties_delay?: number;
3467
- _metadata: RequestMetadataWithLinks;
3473
+ _metadata: RequestMetadataWithLinksAndTotal;
3468
3474
  }
3469
3475
  export interface TornItemAmmo {
3470
3476
  id: AmmoId;
@@ -6870,6 +6876,10 @@ export interface UserV2 extends BaseSchema {
6870
6876
  response: UserCalendarResponse;
6871
6877
  params: "timestamp";
6872
6878
  };
6879
+ casino: {
6880
+ response: UserCasinoResponse;
6881
+ params: "timestamp";
6882
+ };
6873
6883
  competition: {
6874
6884
  response: UserCompetitionResponse;
6875
6885
  params: "timestamp";
package/dist/index.ts CHANGED
@@ -4397,12 +4397,12 @@ export type MarketSpecializedBazaarCategoryEnum =
4397
4397
  | "Tool";
4398
4398
 
4399
4399
  export type FactionPositionAbilityEnum =
4400
- | "Medical Item Usage"
4401
- | "Booster Item Usage"
4402
- | "Drug Item Usage"
4400
+ | "Medical Usage"
4401
+ | "Booster Usage"
4402
+ | "Drug Usage"
4403
4403
  | "Energy Refill Usage"
4404
4404
  | "Nerve Refill Usage"
4405
- | "Temporary Item Loaning"
4405
+ | "Temporary Loaning"
4406
4406
  | "Weapon & Armor Loaning"
4407
4407
  | "Item Retrieving"
4408
4408
  | "Organised Crimes"
@@ -4419,8 +4419,12 @@ export type FactionPositionAbilityEnum =
4419
4419
  | "Newsletter Sending"
4420
4420
  | "Announcement Changes"
4421
4421
  | "Description Changes"
4422
- | "Utility Item Loaning"
4423
- | "Consumable Item Usage";
4422
+ | "Utility Loaning"
4423
+ | "Consumable Usage"
4424
+ | "Medical Loaning"
4425
+ | "Consumable Loaning"
4426
+ | "Drug Loaning"
4427
+ | "Booster Loaning";
4424
4428
 
4425
4429
  export type FactionOrganizedCrimePayoutType =
4426
4430
  | "balance"
@@ -5557,6 +5561,13 @@ export interface UserTradesResponse {
5557
5561
  _metadata: RequestMetadataWithLinks;
5558
5562
  }
5559
5563
 
5564
+ export interface UserCasinoResponse {
5565
+ casino: {
5566
+ tokens: number;
5567
+ streak: number;
5568
+ };
5569
+ }
5570
+
5560
5571
  export interface UserInventoryItem {
5561
5572
  id: ItemId;
5562
5573
  amount: number;
@@ -9271,7 +9282,7 @@ export interface TornBountiesResponse {
9271
9282
  bounties_timestamp: number;
9272
9283
  /** The minimum amount of time needed before the cache timestamp can change. */
9273
9284
  bounties_delay?: number;
9274
- _metadata: RequestMetadataWithLinks;
9285
+ _metadata: RequestMetadataWithLinksAndTotal;
9275
9286
  }
9276
9287
 
9277
9288
  export interface TornItemAmmo {
@@ -12772,6 +12783,10 @@ export interface UserV2 extends BaseSchema {
12772
12783
  response: UserCalendarResponse;
12773
12784
  params: "timestamp";
12774
12785
  };
12786
+ casino: {
12787
+ response: UserCasinoResponse;
12788
+ params: "timestamp";
12789
+ };
12775
12790
  competition: {
12776
12791
  response: UserCompetitionResponse;
12777
12792
  params: "timestamp";
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": "5.6.0"
6
+ "version": "5.7.0"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -456,6 +456,45 @@
456
456
  "x-stability": "Stable"
457
457
  }
458
458
  },
459
+ "/user/casino": {
460
+ "get": {
461
+ "tags": [
462
+ "User"
463
+ ],
464
+ "summary": "Get your casino streak & tokens",
465
+ "description": "Requires limited access key. <br>Only available to yourself.",
466
+ "operationId": "getMyCasinoStreak",
467
+ "parameters": [
468
+ {
469
+ "$ref": "#/components/parameters/ApiTimestamp"
470
+ },
471
+ {
472
+ "$ref": "#/components/parameters/ApiComment"
473
+ },
474
+ {
475
+ "$ref": "#/components/parameters/ApiKeyLimited"
476
+ }
477
+ ],
478
+ "responses": {
479
+ "200": {
480
+ "description": "Successful operation",
481
+ "content": {
482
+ "application/json": {
483
+ "schema": {
484
+ "$ref": "#/components/schemas/UserCasinoResponse"
485
+ }
486
+ }
487
+ }
488
+ }
489
+ },
490
+ "security": [
491
+ {
492
+ "api_key": []
493
+ }
494
+ ],
495
+ "x-stability": "Unstable"
496
+ }
497
+ },
459
498
  "/user/competition": {
460
499
  "get": {
461
500
  "tags": [
@@ -3786,6 +3825,9 @@
3786
3825
  {
3787
3826
  "$ref": "#/components/schemas/AttacksFullResponse"
3788
3827
  },
3828
+ {
3829
+ "$ref": "#/components/schemas/UserCasinoResponse"
3830
+ },
3789
3831
  {
3790
3832
  "$ref": "#/components/schemas/UserMoneyResponse"
3791
3833
  },
@@ -14429,12 +14471,12 @@
14429
14471
  "FactionPositionAbilityEnum": {
14430
14472
  "type": "string",
14431
14473
  "enum": [
14432
- "Medical Item Usage",
14433
- "Booster Item Usage",
14434
- "Drug Item Usage",
14474
+ "Medical Usage",
14475
+ "Booster Usage",
14476
+ "Drug Usage",
14435
14477
  "Energy Refill Usage",
14436
14478
  "Nerve Refill Usage",
14437
- "Temporary Item Loaning",
14479
+ "Temporary Loaning",
14438
14480
  "Weapon & Armor Loaning",
14439
14481
  "Item Retrieving",
14440
14482
  "Organised Crimes",
@@ -14451,8 +14493,12 @@
14451
14493
  "Newsletter Sending",
14452
14494
  "Announcement Changes",
14453
14495
  "Description Changes",
14454
- "Utility Item Loaning",
14455
- "Consumable Item Usage"
14496
+ "Utility Loaning",
14497
+ "Consumable Usage",
14498
+ "Medical Loaning",
14499
+ "Consumable Loaning",
14500
+ "Drug Loaning",
14501
+ "Booster Loaning"
14456
14502
  ]
14457
14503
  },
14458
14504
  "FactionOrganizedCrimePayoutType": {
@@ -17259,6 +17305,31 @@
17259
17305
  },
17260
17306
  "type": "object"
17261
17307
  },
17308
+ "UserCasinoResponse": {
17309
+ "required": [
17310
+ "casino"
17311
+ ],
17312
+ "properties": {
17313
+ "casino": {
17314
+ "required": [
17315
+ "tokens",
17316
+ "streak"
17317
+ ],
17318
+ "properties": {
17319
+ "tokens": {
17320
+ "type": "integer",
17321
+ "format": "int32"
17322
+ },
17323
+ "streak": {
17324
+ "type": "integer",
17325
+ "format": "int64"
17326
+ }
17327
+ },
17328
+ "type": "object"
17329
+ }
17330
+ },
17331
+ "type": "object"
17332
+ },
17262
17333
  "UserInventoryItem": {
17263
17334
  "required": [
17264
17335
  "id",
@@ -21433,6 +21504,7 @@
21433
21504
  "battlestats",
21434
21505
  "bounties",
21435
21506
  "calendar",
21507
+ "casino",
21436
21508
  "competition",
21437
21509
  "cooldowns",
21438
21510
  "crimes",
@@ -31853,7 +31925,7 @@
31853
31925
  "format": "int32"
31854
31926
  },
31855
31927
  "_metadata": {
31856
- "$ref": "#/components/schemas/RequestMetadataWithLinks"
31928
+ "$ref": "#/components/schemas/RequestMetadataWithLinksAndTotal"
31857
31929
  }
31858
31930
  },
31859
31931
  "type": "object"
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "5.6.0",
4
+ "version": "5.7.0",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },
8
8
  "devDependencies": {
9
9
  "@scalar/openapi-types": "^0.7.0",
10
10
  "@types/node": "^24.12.2",
11
- "prettier": "^3.8.2",
11
+ "prettier": "^3.8.3",
12
12
  "typeconv": "^2.3.1",
13
- "typescript": "^6.0.2"
13
+ "typescript": "^6.0.3"
14
14
  },
15
15
  "main": "./dist/index.js",
16
16
  "types": "./dist/index.d.ts",