tornapi-typescript 4.0.0 → 4.1.1

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
@@ -6,6 +6,7 @@
6
6
  */
7
7
  export type RaceClassEnum = "A" | "B" | "C" | "D" | "E";
8
8
  export type UserDonatorStatusEnum = "Donator" | "Subscriber";
9
+ export type UserMessageTypeEnum = "Company newsletter" | "Faction newsletter" | "Warning" | "User message";
9
10
  export type JobTypeEnum = "Army" | "Casino" | "Education" | "Grocer" | "Law" | "Medical";
10
11
  export type UserMaritalStatusEnum = "Engaged" | "Newlywed" | "Married";
11
12
  export type UserPlaneImageTypeEnum = "private_jet" | "light_aircraft" | "airliner";
@@ -71,6 +72,8 @@ export type TerritoryWarId = number;
71
72
  export type RaidWarId = number;
72
73
  export type ItemUid = number;
73
74
  export type UserId = number;
75
+ export type UserMessageId = number;
76
+ export type UserEventId = string;
74
77
  export type UserIconId = number;
75
78
  export type ReviveId = number;
76
79
  export type LogId = number;
@@ -348,6 +351,34 @@ export interface ReportsResponse {
348
351
  _metadata: RequestMetadataWithLinks;
349
352
  }
350
353
  export type SelectionCategoryEnum = ReportTypeEnum | UserListEnum | PersonalStatsCategoryEnum | RacingRaceTypeEnum;
354
+ export interface UserNewEventsResponse {
355
+ events: UserEvent[];
356
+ }
357
+ export interface UserEventsResponse {
358
+ events: UserEvent[];
359
+ _metadata: RequestMetadataWithLinks;
360
+ }
361
+ export interface UserEvent {
362
+ id: UserEventId;
363
+ timestamp: number;
364
+ event: string;
365
+ }
366
+ export interface UserMessagesResponse {
367
+ messages: UserMessage[];
368
+ _metadata: RequestMetadataWithLinks;
369
+ }
370
+ export interface UserNewMessagesResponse {
371
+ messages: UserMessage[];
372
+ }
373
+ export interface UserMessage {
374
+ id: UserMessageId;
375
+ sender: BasicUser;
376
+ timestamp: number;
377
+ topic: string;
378
+ type: UserMessageTypeEnum;
379
+ seen: boolean;
380
+ read: boolean;
381
+ }
351
382
  export interface UserIconPublic {
352
383
  id: UserIconId;
353
384
  title: string;
@@ -916,7 +947,7 @@ export interface UserListResponse {
916
947
  list: UserList[];
917
948
  _metadata: RequestMetadataWithLinks;
918
949
  }
919
- /** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','inventory','messages','missions','networth','newevents','newmessages','notifications','perks','refills','stocks','travel','weaponexp'. */
950
+ /** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','gym','inventory','missions','networth','notifications','perks','refills','stocks','travel','weaponexp'. */
920
951
  export type UserSelectionName = string;
921
952
  export interface UserLookupResponse {
922
953
  selections: UserSelectionName[];
@@ -6286,6 +6317,10 @@ export interface UserV2 extends BaseSchema {
6286
6317
  response: UserEnlistedCarsResponse;
6287
6318
  params: "timestamp";
6288
6319
  };
6320
+ events: {
6321
+ response: UserEventsResponse;
6322
+ params: "striptags" | "limit" | "from" | "to" | "timestamp";
6323
+ };
6289
6324
  faction: {
6290
6325
  response: UserFactionResponse;
6291
6326
  params: "timestamp";
@@ -6344,7 +6379,7 @@ export interface UserV2 extends BaseSchema {
6344
6379
  };
6345
6380
  list: {
6346
6381
  response: UserListResponse;
6347
- params: "cat" | "limit" | "offset" | "sort" | "timestamp";
6382
+ params: "cat" | "striptags" | "limit" | "offset" | "sort" | "timestamp";
6348
6383
  };
6349
6384
  log: {
6350
6385
  response: UserLogsResponse;
@@ -6358,10 +6393,22 @@ export interface UserV2 extends BaseSchema {
6358
6393
  response: UserMeritsResponse;
6359
6394
  params: "timestamp";
6360
6395
  };
6396
+ messages: {
6397
+ response: UserMessagesResponse;
6398
+ params: "limit" | "from" | "to" | "sort" | "timestamp";
6399
+ };
6361
6400
  money: {
6362
6401
  response: UserMoneyResponse;
6363
6402
  params: "timestamp";
6364
6403
  };
6404
+ newevents: {
6405
+ response: UserNewEventsResponse;
6406
+ params: "striptags" | "timestamp";
6407
+ };
6408
+ newmessages: {
6409
+ response: UserNewMessagesResponse;
6410
+ params: "timestamp";
6411
+ };
6365
6412
  organizedcrime: {
6366
6413
  response: UserOrganizedCrimeResponse;
6367
6414
  params: "timestamp";
package/dist/index.ts CHANGED
@@ -11,6 +11,12 @@ export type RaceClassEnum = "A" | "B" | "C" | "D" | "E";
11
11
 
12
12
  export type UserDonatorStatusEnum = "Donator" | "Subscriber";
13
13
 
14
+ export type UserMessageTypeEnum =
15
+ | "Company newsletter"
16
+ | "Faction newsletter"
17
+ | "Warning"
18
+ | "User message";
19
+
14
20
  export type JobTypeEnum =
15
21
  | "Army"
16
22
  | "Casino"
@@ -4736,6 +4742,10 @@ export type ItemUid = number;
4736
4742
 
4737
4743
  export type UserId = number;
4738
4744
 
4745
+ export type UserMessageId = number;
4746
+
4747
+ export type UserEventId = string;
4748
+
4739
4749
  export type UserIconId = number;
4740
4750
 
4741
4751
  export type ReviveId = number;
@@ -5277,6 +5287,40 @@ export type SelectionCategoryEnum =
5277
5287
  | PersonalStatsCategoryEnum
5278
5288
  | RacingRaceTypeEnum;
5279
5289
 
5290
+ export interface UserNewEventsResponse {
5291
+ events: UserEvent[];
5292
+ }
5293
+
5294
+ export interface UserEventsResponse {
5295
+ events: UserEvent[];
5296
+ _metadata: RequestMetadataWithLinks;
5297
+ }
5298
+
5299
+ export interface UserEvent {
5300
+ id: UserEventId;
5301
+ timestamp: number;
5302
+ event: string;
5303
+ }
5304
+
5305
+ export interface UserMessagesResponse {
5306
+ messages: UserMessage[];
5307
+ _metadata: RequestMetadataWithLinks;
5308
+ }
5309
+
5310
+ export interface UserNewMessagesResponse {
5311
+ messages: UserMessage[];
5312
+ }
5313
+
5314
+ export interface UserMessage {
5315
+ id: UserMessageId;
5316
+ sender: BasicUser;
5317
+ timestamp: number;
5318
+ topic: string;
5319
+ type: UserMessageTypeEnum;
5320
+ seen: boolean;
5321
+ read: boolean;
5322
+ }
5323
+
5280
5324
  export interface UserIconPublic {
5281
5325
  id: UserIconId;
5282
5326
  title: string;
@@ -5958,7 +6002,7 @@ export interface UserListResponse {
5958
6002
  _metadata: RequestMetadataWithLinks;
5959
6003
  }
5960
6004
 
5961
- /** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','inventory','messages','missions','networth','newevents','newmessages','notifications','perks','refills','stocks','travel','weaponexp'. */
6005
+ /** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','gym','inventory','missions','networth','notifications','perks','refills','stocks','travel','weaponexp'. */
5962
6006
  export type UserSelectionName = string;
5963
6007
 
5964
6008
  export interface UserLookupResponse {
@@ -11970,6 +12014,10 @@ export interface UserV2 extends BaseSchema {
11970
12014
  response: UserEnlistedCarsResponse;
11971
12015
  params: "timestamp";
11972
12016
  };
12017
+ events: {
12018
+ response: UserEventsResponse;
12019
+ params: "striptags" | "limit" | "from" | "to" | "timestamp";
12020
+ };
11973
12021
  faction: {
11974
12022
  response: UserFactionResponse;
11975
12023
  params: "timestamp";
@@ -12034,7 +12082,13 @@ export interface UserV2 extends BaseSchema {
12034
12082
  };
12035
12083
  list: {
12036
12084
  response: UserListResponse;
12037
- params: "cat" | "limit" | "offset" | "sort" | "timestamp";
12085
+ params:
12086
+ | "cat"
12087
+ | "striptags"
12088
+ | "limit"
12089
+ | "offset"
12090
+ | "sort"
12091
+ | "timestamp";
12038
12092
  };
12039
12093
  log: {
12040
12094
  response: UserLogsResponse;
@@ -12048,10 +12102,22 @@ export interface UserV2 extends BaseSchema {
12048
12102
  response: UserMeritsResponse;
12049
12103
  params: "timestamp";
12050
12104
  };
12105
+ messages: {
12106
+ response: UserMessagesResponse;
12107
+ params: "limit" | "from" | "to" | "sort" | "timestamp";
12108
+ };
12051
12109
  money: {
12052
12110
  response: UserMoneyResponse;
12053
12111
  params: "timestamp";
12054
12112
  };
12113
+ newevents: {
12114
+ response: UserNewEventsResponse;
12115
+ params: "striptags" | "timestamp";
12116
+ };
12117
+ newmessages: {
12118
+ response: UserNewMessagesResponse;
12119
+ params: "timestamp";
12120
+ };
12055
12121
  organizedcrime: {
12056
12122
  response: UserOrganizedCrimeResponse;
12057
12123
  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": "4.0.0"
6
+ "version": "4.1.1"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -557,7 +557,7 @@
557
557
  "tags": [
558
558
  "User"
559
559
  ],
560
- "summary": "Get user enlisted cars",
560
+ "summary": "Get your enlisted cars",
561
561
  "description": "Requires minimal access key. <br>Returns a list of all user enlisted cars.",
562
562
  "operationId": "dc3deee7629610931240be337c47a8ee",
563
563
  "parameters": [
@@ -591,6 +591,57 @@
591
591
  "x-stability": "Stable"
592
592
  }
593
593
  },
594
+ "/user/events": {
595
+ "get": {
596
+ "tags": [
597
+ "User"
598
+ ],
599
+ "summary": "Get your events",
600
+ "description": "Requires limited access key. <br> Unfortunately, the 'sort' parameter is not available for this selection.",
601
+ "operationId": "10a22547e0c48046ade435e0b63dfe55",
602
+ "parameters": [
603
+ {
604
+ "$ref": "#/components/parameters/ApiStripTagsFalse"
605
+ },
606
+ {
607
+ "$ref": "#/components/parameters/ApiLimit100Default20"
608
+ },
609
+ {
610
+ "$ref": "#/components/parameters/ApiFrom"
611
+ },
612
+ {
613
+ "$ref": "#/components/parameters/ApiTo"
614
+ },
615
+ {
616
+ "$ref": "#/components/parameters/ApiTimestamp"
617
+ },
618
+ {
619
+ "$ref": "#/components/parameters/ApiComment"
620
+ },
621
+ {
622
+ "$ref": "#/components/parameters/ApiKeyLimited"
623
+ }
624
+ ],
625
+ "responses": {
626
+ "200": {
627
+ "description": "Successful operation",
628
+ "content": {
629
+ "application/json": {
630
+ "schema": {
631
+ "$ref": "#/components/schemas/UserEventsResponse"
632
+ }
633
+ }
634
+ }
635
+ }
636
+ },
637
+ "security": [
638
+ {
639
+ "api_key": []
640
+ }
641
+ ],
642
+ "x-stability": "Unstable"
643
+ }
644
+ },
594
645
  "/user/faction": {
595
646
  "get": {
596
647
  "tags": [
@@ -1501,6 +1552,9 @@
1501
1552
  "$ref": "#/components/schemas/UserListEnum"
1502
1553
  }
1503
1554
  },
1555
+ {
1556
+ "$ref": "#/components/parameters/ApiStripTagsTrue"
1557
+ },
1504
1558
  {
1505
1559
  "$ref": "#/components/parameters/ApiLimit50"
1506
1560
  },
@@ -1689,6 +1743,57 @@
1689
1743
  "x-stability": "Stable"
1690
1744
  }
1691
1745
  },
1746
+ "/user/messages": {
1747
+ "get": {
1748
+ "tags": [
1749
+ "User"
1750
+ ],
1751
+ "summary": "Get your messages",
1752
+ "description": "Requires limited access key. <br>",
1753
+ "operationId": "20c7b7a3f7395c2afa73597327f401a3",
1754
+ "parameters": [
1755
+ {
1756
+ "$ref": "#/components/parameters/ApiLimit100Default20"
1757
+ },
1758
+ {
1759
+ "$ref": "#/components/parameters/ApiFrom"
1760
+ },
1761
+ {
1762
+ "$ref": "#/components/parameters/ApiTo"
1763
+ },
1764
+ {
1765
+ "$ref": "#/components/parameters/ApiSort"
1766
+ },
1767
+ {
1768
+ "$ref": "#/components/parameters/ApiTimestamp"
1769
+ },
1770
+ {
1771
+ "$ref": "#/components/parameters/ApiComment"
1772
+ },
1773
+ {
1774
+ "$ref": "#/components/parameters/ApiKeyLimited"
1775
+ }
1776
+ ],
1777
+ "responses": {
1778
+ "200": {
1779
+ "description": "Successful operation",
1780
+ "content": {
1781
+ "application/json": {
1782
+ "schema": {
1783
+ "$ref": "#/components/schemas/UserMessagesResponse"
1784
+ }
1785
+ }
1786
+ }
1787
+ }
1788
+ },
1789
+ "security": [
1790
+ {
1791
+ "api_key": []
1792
+ }
1793
+ ],
1794
+ "x-stability": "Unstable"
1795
+ }
1796
+ },
1692
1797
  "/user/money": {
1693
1798
  "get": {
1694
1799
  "tags": [
@@ -1728,6 +1833,87 @@
1728
1833
  "x-stability": "Unstable"
1729
1834
  }
1730
1835
  },
1836
+ "/user/newevents": {
1837
+ "get": {
1838
+ "tags": [
1839
+ "User"
1840
+ ],
1841
+ "summary": "Get your unseen events",
1842
+ "description": "Requires limited access key. <br>",
1843
+ "operationId": "945b8ac03944ca79eb0ae8a640aeab3b",
1844
+ "parameters": [
1845
+ {
1846
+ "$ref": "#/components/parameters/ApiStripTagsFalse"
1847
+ },
1848
+ {
1849
+ "$ref": "#/components/parameters/ApiTimestamp"
1850
+ },
1851
+ {
1852
+ "$ref": "#/components/parameters/ApiComment"
1853
+ },
1854
+ {
1855
+ "$ref": "#/components/parameters/ApiKeyLimited"
1856
+ }
1857
+ ],
1858
+ "responses": {
1859
+ "200": {
1860
+ "description": "Successful operation",
1861
+ "content": {
1862
+ "application/json": {
1863
+ "schema": {
1864
+ "$ref": "#/components/schemas/UserNewEventsResponse"
1865
+ }
1866
+ }
1867
+ }
1868
+ }
1869
+ },
1870
+ "security": [
1871
+ {
1872
+ "api_key": []
1873
+ }
1874
+ ],
1875
+ "x-stability": "Unstable"
1876
+ }
1877
+ },
1878
+ "/user/newmessages": {
1879
+ "get": {
1880
+ "tags": [
1881
+ "User"
1882
+ ],
1883
+ "summary": "Get your unseen messages",
1884
+ "description": "Requires limited access key. <br>",
1885
+ "operationId": "8859066800e0652740bfb17f8ecd15a2",
1886
+ "parameters": [
1887
+ {
1888
+ "$ref": "#/components/parameters/ApiTimestamp"
1889
+ },
1890
+ {
1891
+ "$ref": "#/components/parameters/ApiComment"
1892
+ },
1893
+ {
1894
+ "$ref": "#/components/parameters/ApiKeyLimited"
1895
+ }
1896
+ ],
1897
+ "responses": {
1898
+ "200": {
1899
+ "description": "Successful operation",
1900
+ "content": {
1901
+ "application/json": {
1902
+ "schema": {
1903
+ "$ref": "#/components/schemas/UserNewMessagesResponse"
1904
+ }
1905
+ }
1906
+ }
1907
+ }
1908
+ },
1909
+ "security": [
1910
+ {
1911
+ "api_key": []
1912
+ }
1913
+ ],
1914
+ "x-stability": "Unstable"
1915
+ }
1916
+ },
1731
1917
  "/user/organizedcrime": {
1732
1918
  "get": {
1733
1919
  "tags": [
@@ -2673,6 +2859,20 @@
2673
2859
  ]
2674
2860
  }
2675
2861
  },
2862
+ {
2863
+ "name": "legacy",
2864
+ "in": "query",
2865
+ "description": "Legacy selection names for which you want or expect API v1 response",
2866
+ "required": false,
2867
+ "style": "form",
2868
+ "explode": false,
2869
+ "schema": {
2870
+ "type": "array",
2871
+ "items": {
2872
+ "$ref": "#/components/schemas/UserSelectionName"
2873
+ }
2874
+ }
2875
+ },
2676
2876
  {
2677
2877
  "$ref": "#/components/parameters/ApiLimit"
2678
2878
  },
@@ -2861,6 +3061,18 @@
2861
3061
  {
2862
3062
  "$ref": "#/components/schemas/UserBattleStatsResponse"
2863
3063
  },
3064
+ {
3065
+ "$ref": "#/components/schemas/UserNewEventsResponse"
3066
+ },
3067
+ {
3068
+ "$ref": "#/components/schemas/UserEventsResponse"
3069
+ },
3070
+ {
3071
+ "$ref": "#/components/schemas/UserMessagesResponse"
3072
+ },
3073
+ {
3074
+ "$ref": "#/components/schemas/UserNewMessagesResponse"
3075
+ },
2864
3076
  {
2865
3077
  "$ref": "#/components/schemas/UserLookupResponse"
2866
3078
  },
@@ -5101,6 +5313,20 @@
5101
5313
  ]
5102
5314
  }
5103
5315
  },
5316
+ {
5317
+ "name": "legacy",
5318
+ "in": "query",
5319
+ "description": "Legacy selection names for which you want or expect API v1 response",
5320
+ "required": false,
5321
+ "style": "form",
5322
+ "explode": false,
5323
+ "schema": {
5324
+ "type": "array",
5325
+ "items": {
5326
+ "$ref": "#/components/schemas/FactionSelectionName"
5327
+ }
5328
+ }
5329
+ },
5104
5330
  {
5105
5331
  "$ref": "#/components/parameters/ApiLimit"
5106
5332
  },
@@ -6305,6 +6531,20 @@
6305
6531
  ]
6306
6532
  }
6307
6533
  },
6534
+ {
6535
+ "name": "legacy",
6536
+ "in": "query",
6537
+ "description": "Legacy selection names for which you want or expect API v1 response",
6538
+ "required": false,
6539
+ "style": "form",
6540
+ "explode": false,
6541
+ "schema": {
6542
+ "type": "array",
6543
+ "items": {
6544
+ "$ref": "#/components/schemas/MarketSelectionName"
6545
+ }
6546
+ }
6547
+ },
6308
6548
  {
6309
6549
  "name": "cat",
6310
6550
  "in": "query",
@@ -8303,6 +8543,20 @@
8303
8543
  ]
8304
8544
  }
8305
8545
  },
8546
+ {
8547
+ "name": "legacy",
8548
+ "in": "query",
8549
+ "description": "Legacy selection names for which you want or expect API v1 response",
8550
+ "required": false,
8551
+ "style": "form",
8552
+ "explode": false,
8553
+ "schema": {
8554
+ "type": "array",
8555
+ "items": {
8556
+ "$ref": "#/components/schemas/TornSelectionName"
8557
+ }
8558
+ }
8559
+ },
8306
8560
  {
8307
8561
  "$ref": "#/components/parameters/ApiStripTags"
8308
8562
  },
@@ -8457,6 +8711,15 @@
8457
8711
  "Subscriber"
8458
8712
  ]
8459
8713
  },
8714
+ "UserMessageTypeEnum": {
8715
+ "type": "string",
8716
+ "enum": [
8717
+ "Company newsletter",
8718
+ "Faction newsletter",
8719
+ "Warning",
8720
+ "User message"
8721
+ ]
8722
+ },
8460
8723
  "JobTypeEnum": {
8461
8724
  "type": "string",
8462
8725
  "enum": [
@@ -13389,6 +13652,13 @@
13389
13652
  "type": "integer",
13390
13653
  "format": "int32"
13391
13654
  },
13655
+ "UserMessageId": {
13656
+ "type": "integer",
13657
+ "format": "int64"
13658
+ },
13659
+ "UserEventId": {
13660
+ "type": "string"
13661
+ },
13392
13662
  "UserIconId": {
13393
13663
  "type": "integer",
13394
13664
  "format": "int32"
@@ -14921,6 +15191,126 @@
14921
15191
  }
14922
15192
  ]
14923
15193
  },
15194
+ "UserNewEventsResponse": {
15195
+ "required": [
15196
+ "events"
15197
+ ],
15198
+ "properties": {
15199
+ "events": {
15200
+ "type": "array",
15201
+ "items": {
15202
+ "$ref": "#/components/schemas/UserEvent"
15203
+ }
15204
+ }
15205
+ },
15206
+ "type": "object"
15207
+ },
15208
+ "UserEventsResponse": {
15209
+ "required": [
15210
+ "events",
15211
+ "_metadata"
15212
+ ],
15213
+ "properties": {
15214
+ "events": {
15215
+ "type": "array",
15216
+ "items": {
15217
+ "$ref": "#/components/schemas/UserEvent"
15218
+ }
15219
+ },
15220
+ "_metadata": {
15221
+ "$ref": "#/components/schemas/RequestMetadataWithLinks"
15222
+ }
15223
+ },
15224
+ "type": "object"
15225
+ },
15226
+ "UserEvent": {
15227
+ "required": [
15228
+ "id",
15229
+ "timestamp",
15230
+ "event"
15231
+ ],
15232
+ "properties": {
15233
+ "id": {
15234
+ "$ref": "#/components/schemas/UserEventId"
15235
+ },
15236
+ "timestamp": {
15237
+ "type": "integer",
15238
+ "format": "int32"
15239
+ },
15240
+ "event": {
15241
+ "type": "string"
15242
+ }
15243
+ },
15244
+ "type": "object"
15245
+ },
15246
+ "UserMessagesResponse": {
15247
+ "required": [
15248
+ "messages",
15249
+ "_metadata"
15250
+ ],
15251
+ "properties": {
15252
+ "messages": {
15253
+ "type": "array",
15254
+ "items": {
15255
+ "$ref": "#/components/schemas/UserMessage"
15256
+ }
15257
+ },
15258
+ "_metadata": {
15259
+ "$ref": "#/components/schemas/RequestMetadataWithLinks"
15260
+ }
15261
+ },
15262
+ "type": "object"
15263
+ },
15264
+ "UserNewMessagesResponse": {
15265
+ "required": [
15266
+ "messages"
15267
+ ],
15268
+ "properties": {
15269
+ "messages": {
15270
+ "type": "array",
15271
+ "items": {
15272
+ "$ref": "#/components/schemas/UserMessage"
15273
+ }
15274
+ }
15275
+ },
15276
+ "type": "object"
15277
+ },
15278
+ "UserMessage": {
15279
+ "required": [
15280
+ "id",
15281
+ "sender",
15282
+ "timestamp",
15283
+ "topic",
15284
+ "type",
15285
+ "seen",
15286
+ "read"
15287
+ ],
15288
+ "properties": {
15289
+ "id": {
15290
+ "$ref": "#/components/schemas/UserMessageId"
15291
+ },
15292
+ "sender": {
15293
+ "$ref": "#/components/schemas/BasicUser"
15294
+ },
15295
+ "timestamp": {
15296
+ "type": "integer",
15297
+ "format": "int32"
15298
+ },
15299
+ "topic": {
15300
+ "type": "string"
15301
+ },
15302
+ "type": {
15303
+ "$ref": "#/components/schemas/UserMessageTypeEnum"
15304
+ },
15305
+ "seen": {
15306
+ "type": "boolean"
15307
+ },
15308
+ "read": {
15309
+ "type": "boolean"
15310
+ }
15311
+ },
15312
+ "type": "object"
15313
+ },
14924
15314
  "UserIconPublic": {
14925
15315
  "required": [
14926
15316
  "id",
@@ -17687,7 +18077,7 @@
17687
18077
  "UserSelectionName": {
17688
18078
  "oneOf": [
17689
18079
  {
17690
- "description": "The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','inventory','messages','missions','networth','newevents','newmessages','notifications','perks','refills','stocks','travel','weaponexp'.",
18080
+ "description": "The following selections will fallback to API v1 and may change at any time: 'ammo','bars','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','gym','inventory','missions','networth','notifications','perks','refills','stocks','travel','weaponexp'.",
17691
18081
  "type": "string",
17692
18082
  "enum": [
17693
18083
  "attacks",
@@ -17699,6 +18089,7 @@
17699
18089
  "competition",
17700
18090
  "crimes",
17701
18091
  "enlistedcars",
18092
+ "events",
17702
18093
  "faction",
17703
18094
  "factionbalance",
17704
18095
  "forumfeed",
@@ -17718,7 +18109,10 @@
17718
18109
  "lookup",
17719
18110
  "medals",
17720
18111
  "merits",
18112
+ "messages",
17721
18113
  "money",
18114
+ "newevents",
18115
+ "newmessages",
17722
18116
  "organizedcrime",
17723
18117
  "personalstats",
17724
18118
  "profile",
@@ -17741,14 +18135,10 @@
17741
18135
  "display",
17742
18136
  "education",
17743
18137
  "equipment",
17744
- "events",
17745
18138
  "gym",
17746
18139
  "inventory",
17747
- "messages",
17748
18140
  "missions",
17749
18141
  "networth",
17750
- "newevents",
17751
- "newmessages",
17752
18142
  "notifications",
17753
18143
  "perks",
17754
18144
  "refills",
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "4.0.0",
4
+ "version": "4.1.1",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },
8
8
  "devDependencies": {
9
9
  "@scalar/openapi-types": "^0.3.7",
10
- "@types/node": "^22.18.3",
10
+ "@types/node": "^22.18.4",
11
11
  "prettier": "^3.6.2",
12
12
  "typeconv": "^2.3.1",
13
13
  "typescript": "^5.9.2"