tornapi-typescript 0.0.5 → 0.0.6

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
@@ -283,6 +283,13 @@ export type FactionApplicationStatusEnum =
283
283
 
284
284
  export type FactionRankedWarsCategoryEnum = "all" | "ongoing";
285
285
 
286
+ export type FactionCrimeUserOutcome =
287
+ | "Successful"
288
+ | "Failed"
289
+ | "Jailed"
290
+ | "Injured"
291
+ | "Hospitalized";
292
+
286
293
  export type RaceId = number;
287
294
 
288
295
  export type RaceTrackId = number;
@@ -303,6 +310,13 @@ export type ItemUid = number;
303
310
 
304
311
  export type UserId = number;
305
312
 
313
+ export type UserIdNullable = number | null;
314
+
315
+ export type UserIdNullableDeprecated =
316
+ /** This field is replaced with the 'user.id' and will be removed on the 1st of May 2025. */
317
+ | number /** This field is replaced with the 'user.id' and will be removed on the 1st of May 2025. */
318
+ | null;
319
+
306
320
  export type ReviveId = number;
307
321
 
308
322
  export type LogId = number;
@@ -311,6 +325,8 @@ export type LogCategoryId = number;
311
325
 
312
326
  export type FactionId = number;
313
327
 
328
+ export type FactionIdNullable = number | null;
329
+
314
330
  export type FactionCrimeId = number;
315
331
 
316
332
  export type ChainId = number;
@@ -921,6 +937,7 @@ export interface FactionChainReportAttackerAttacks {
921
937
 
922
938
  export interface FactionCrimeUser {
923
939
  id: UserId;
940
+ outcome: FactionCrimeUserOutcome;
924
941
  /** The timestamp at which the user joined the slot. */
925
942
  joined_at: number;
926
943
  /** Current planning progress on the slot. */
@@ -944,23 +961,27 @@ export interface FactionCrimeReward {
944
961
  money: number;
945
962
  items: FactionCrimeRewardItem[];
946
963
  respect: number;
964
+ scope: number;
947
965
  payout: FactionCrimeRewardPayout | null;
948
966
  }
949
967
 
950
968
  export interface FactionCrimeSlot {
951
969
  position: string;
952
970
  item_requirement: {
953
- id?: ItemId;
971
+ id: ItemId;
954
972
  /** Shows if the item is reusable or consumed during the crime. */
955
- is_reusable?: boolean;
973
+ is_reusable: boolean;
956
974
  /** Shows if user has the required item. */
957
- is_available?: boolean;
975
+ is_available: boolean;
958
976
  } | null;
959
- user_id: UserId;
977
+ user_id: UserIdNullableDeprecated;
960
978
  user: FactionCrimeUser | null;
961
- /** This field is replaced with 'crime_pass_rate' field and will be removed on 1st of May 2025. */
979
+ /** This field is replaced with 'checkpoint_pass_rate' field and will be removed on 1st of May 2025. */
962
980
  success_chance: number;
981
+ /** This field is replaced with 'checkpoint_pass_rate' field and will be removed on 1st of May 2025. */
963
982
  crime_pass_rate: number;
983
+ /** Returns CPR for the player who joined the slot. If the slot is empty (availalbe), it shows your CPR for that slot. This value is 0 for expired crimes. */
984
+ checkpoint_pass_rate: number;
964
985
  }
965
986
 
966
987
  export interface FactionCrime {
@@ -1616,7 +1637,7 @@ export interface TornItemWeaponDetails {
1616
1637
  base_stats: TornItemBaseStats;
1617
1638
  category: TornItemWeaponCategoryEnum;
1618
1639
  ammo: {
1619
- "": AmmoId;
1640
+ id: AmmoId;
1620
1641
  name: string;
1621
1642
  magazine_rounds: number;
1622
1643
  rate_of_fire: {
package/dist/openapi.json CHANGED
@@ -4681,6 +4681,16 @@
4681
4681
  "ongoing"
4682
4682
  ]
4683
4683
  },
4684
+ "FactionCrimeUserOutcome": {
4685
+ "type": "string",
4686
+ "enum": [
4687
+ "Successful",
4688
+ "Failed",
4689
+ "Jailed",
4690
+ "Injured",
4691
+ "Hospitalized"
4692
+ ]
4693
+ },
4684
4694
  "RaceId": {
4685
4695
  "type": "integer"
4686
4696
  },
@@ -4711,6 +4721,16 @@
4711
4721
  "UserId": {
4712
4722
  "type": "integer"
4713
4723
  },
4724
+ "UserIdNullable": {
4725
+ "type": "integer",
4726
+ "nullable": true
4727
+ },
4728
+ "UserIdNullableDeprecated": {
4729
+ "description": "This field is replaced with the 'user.id' and will be removed on the 1st of May 2025.",
4730
+ "type": "integer",
4731
+ "nullable": true,
4732
+ "deprecated": true
4733
+ },
4714
4734
  "ReviveId": {
4715
4735
  "type": "integer"
4716
4736
  },
@@ -4723,6 +4743,10 @@
4723
4743
  "FactionId": {
4724
4744
  "type": "integer"
4725
4745
  },
4746
+ "FactionIdNullable": {
4747
+ "type": "integer",
4748
+ "nullable": true
4749
+ },
4726
4750
  "FactionCrimeId": {
4727
4751
  "type": "integer"
4728
4752
  },
@@ -6516,6 +6540,9 @@
6516
6540
  "id": {
6517
6541
  "$ref": "#/components/schemas/UserId"
6518
6542
  },
6543
+ "outcome": {
6544
+ "$ref": "#/components/schemas/FactionCrimeUserOutcome"
6545
+ },
6519
6546
  "joined_at": {
6520
6547
  "description": "The timestamp at which the user joined the slot.",
6521
6548
  "type": "integer"
@@ -6529,11 +6556,16 @@
6529
6556
  "type": "object",
6530
6557
  "required": [
6531
6558
  "id",
6559
+ "outcome",
6532
6560
  "joined_at",
6533
6561
  "progress"
6534
6562
  ]
6535
6563
  },
6536
6564
  "FactionCrimeRewardItem": {
6565
+ "required": [
6566
+ "id",
6567
+ "quantity"
6568
+ ],
6537
6569
  "properties": {
6538
6570
  "id": {
6539
6571
  "$ref": "#/components/schemas/ItemId"
@@ -6542,13 +6574,15 @@
6542
6574
  "type": "integer"
6543
6575
  }
6544
6576
  },
6545
- "type": "object",
6546
- "required": [
6547
- "id",
6548
- "quantity"
6549
- ]
6577
+ "type": "object"
6550
6578
  },
6551
6579
  "FactionCrimeRewardPayout": {
6580
+ "required": [
6581
+ "type",
6582
+ "percentage",
6583
+ "paid_by",
6584
+ "paid_at"
6585
+ ],
6552
6586
  "properties": {
6553
6587
  "type": {
6554
6588
  "$ref": "#/components/schemas/FactionOrganizedCrimePayoutType"
@@ -6564,15 +6598,16 @@
6564
6598
  "type": "integer"
6565
6599
  }
6566
6600
  },
6567
- "type": "object",
6568
- "required": [
6569
- "type",
6570
- "percentage",
6571
- "paid_by",
6572
- "paid_at"
6573
- ]
6601
+ "type": "object"
6574
6602
  },
6575
6603
  "FactionCrimeReward": {
6604
+ "required": [
6605
+ "money",
6606
+ "items",
6607
+ "respect",
6608
+ "scope",
6609
+ "payout"
6610
+ ],
6576
6611
  "properties": {
6577
6612
  "money": {
6578
6613
  "type": "integer"
@@ -6586,6 +6621,9 @@
6586
6621
  "respect": {
6587
6622
  "type": "integer"
6588
6623
  },
6624
+ "scope": {
6625
+ "type": "integer"
6626
+ },
6589
6627
  "payout": {
6590
6628
  "description": "Details about the crime payouts. This field is null if the crime has not been paid via the automatic payouts system.",
6591
6629
  "allOf": [
@@ -6599,21 +6637,29 @@
6599
6637
  ]
6600
6638
  }
6601
6639
  },
6602
- "type": "object",
6603
- "required": [
6604
- "money",
6605
- "items",
6606
- "respect",
6607
- "payout"
6608
- ]
6640
+ "type": "object"
6609
6641
  },
6610
6642
  "FactionCrimeSlot": {
6643
+ "required": [
6644
+ "position",
6645
+ "item_requirement",
6646
+ "user_id",
6647
+ "user",
6648
+ "success_chance",
6649
+ "crime_pass_rate",
6650
+ "checkpoint_pass_rate"
6651
+ ],
6611
6652
  "properties": {
6612
6653
  "position": {
6613
6654
  "type": "string"
6614
6655
  },
6615
6656
  "item_requirement": {
6616
6657
  "description": "Details of item required for the slot, if applicable.",
6658
+ "required": [
6659
+ "id",
6660
+ "is_reusable",
6661
+ "is_available"
6662
+ ],
6617
6663
  "allOf": [
6618
6664
  {
6619
6665
  "properties": {
@@ -6638,7 +6684,7 @@
6638
6684
  ]
6639
6685
  },
6640
6686
  "user_id": {
6641
- "$ref": "#/components/schemas/UserId"
6687
+ "$ref": "#/components/schemas/UserIdNullableDeprecated"
6642
6688
  },
6643
6689
  "user": {
6644
6690
  "description": "Details about the user joined the slot, if any.",
@@ -6653,25 +6699,36 @@
6653
6699
  ]
6654
6700
  },
6655
6701
  "success_chance": {
6656
- "description": "This field is replaced with 'crime_pass_rate' field and will be removed on 1st of May 2025.",
6702
+ "description": "This field is replaced with 'checkpoint_pass_rate' field and will be removed on 1st of May 2025.",
6657
6703
  "type": "integer",
6658
6704
  "deprecated": true
6659
6705
  },
6660
6706
  "crime_pass_rate": {
6707
+ "description": "This field is replaced with 'checkpoint_pass_rate' field and will be removed on 1st of May 2025.",
6708
+ "type": "integer",
6709
+ "deprecated": true
6710
+ },
6711
+ "checkpoint_pass_rate": {
6712
+ "description": "Returns CPR for the player who joined the slot. If the slot is empty (availalbe), it shows your CPR for that slot. This value is 0 for expired crimes.",
6661
6713
  "type": "integer"
6662
6714
  }
6663
6715
  },
6664
- "type": "object",
6665
- "required": [
6666
- "position",
6667
- "item_requirement",
6668
- "user_id",
6669
- "user",
6670
- "success_chance",
6671
- "crime_pass_rate"
6672
- ]
6716
+ "type": "object"
6673
6717
  },
6674
6718
  "FactionCrime": {
6719
+ "required": [
6720
+ "id",
6721
+ "name",
6722
+ "difficulty",
6723
+ "status",
6724
+ "created_at",
6725
+ "planning_at",
6726
+ "ready_at",
6727
+ "expired_at",
6728
+ "executed_at",
6729
+ "slots",
6730
+ "rewards"
6731
+ ],
6675
6732
  "properties": {
6676
6733
  "id": {
6677
6734
  "$ref": "#/components/schemas/FactionCrimeId"
@@ -6727,20 +6784,7 @@
6727
6784
  ]
6728
6785
  }
6729
6786
  },
6730
- "type": "object",
6731
- "required": [
6732
- "id",
6733
- "name",
6734
- "difficulty",
6735
- "status",
6736
- "created_at",
6737
- "planning_at",
6738
- "ready_at",
6739
- "expired_at",
6740
- "executed_at",
6741
- "slots",
6742
- "rewards"
6743
- ]
6787
+ "type": "object"
6744
6788
  },
6745
6789
  "FactionCrimesResponse": {
6746
6790
  "properties": {
@@ -8790,7 +8834,7 @@
8790
8834
  },
8791
8835
  "ammo": {
8792
8836
  "properties": {
8793
- "": {
8837
+ "id": {
8794
8838
  "$ref": "#/components/schemas/AmmoId"
8795
8839
  },
8796
8840
  "name": {
@@ -8818,7 +8862,7 @@
8818
8862
  "type": "object",
8819
8863
  "nullable": true,
8820
8864
  "required": [
8821
- "",
8865
+ "id",
8822
8866
  "name",
8823
8867
  "magazine_rounds",
8824
8868
  "rate_of_fire"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "0.0.5",
4
+ "version": "0.0.6",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },