tornapi-typescript 0.0.4 → 0.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
@@ -178,6 +178,8 @@ export type WeaponBonusEnum =
178
178
  | "Wind-up"
179
179
  | "Wither";
180
180
 
181
+ export type UserListEnum = "Friends" | "Enemies" | "Targets";
182
+
181
183
  export type JobPositionCasinoEnum =
182
184
  | "Gaming Consultant"
183
185
  | "Marketing Manager"
@@ -2938,6 +2940,20 @@ export interface UserOrganizedCrimeResponse {
2938
2940
  organizedCrime: FactionCrime | null;
2939
2941
  }
2940
2942
 
2943
+ export interface UserList {
2944
+ id: UserId;
2945
+ name: string;
2946
+ level: number;
2947
+ faction_id: FactionId & (number | null);
2948
+ last_action: UserLastAction;
2949
+ status: UserStatus;
2950
+ }
2951
+
2952
+ export interface UserListResponse {
2953
+ list: UserList[];
2954
+ _metadata: RequestMetadataWithLinks;
2955
+ }
2956
+
2941
2957
  /** The following selections will fallback to API v1 and may change at any time: 'ammo','bars','basic','battlestats','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','honors','icons','inventory','jobpoints','log','medals','merits','messages','missions','money','networth','newevents','newmessages','notifications','perks','profile','properties','refills','reports','skills','stocks','travel','weaponexp','workstats'. */
2942
2958
  export type UserSelectionName =
2943
2959
  | "attacks"
@@ -2955,6 +2971,7 @@ export type UserSelectionName =
2955
2971
  | "hof"
2956
2972
  | "itemmarket"
2957
2973
  | "jobranks"
2974
+ | "list"
2958
2975
  | "lookup"
2959
2976
  | "organizedcrime"
2960
2977
  | "personalstats"
package/dist/openapi.json CHANGED
@@ -795,6 +795,53 @@
795
795
  ]
796
796
  }
797
797
  },
798
+ "/user/list": {
799
+ "get": {
800
+ "tags": [
801
+ "User",
802
+ "Unstable"
803
+ ],
804
+ "summary": "Get your friends, enemies or targets list",
805
+ "description": "Requires limited access key. <br>",
806
+ "parameters": [
807
+ {
808
+ "name": "cat",
809
+ "in": "query",
810
+ "description": "Select list type",
811
+ "required": true,
812
+ "schema": {
813
+ "$ref": "#/components/schemas/UserListEnum"
814
+ }
815
+ },
816
+ {
817
+ "$ref": "#/components/parameters/ApiLimit50"
818
+ },
819
+ {
820
+ "$ref": "#/components/parameters/ApiOffsetNoDefault"
821
+ },
822
+ {
823
+ "$ref": "#/components/parameters/ApiSortAsc"
824
+ }
825
+ ],
826
+ "responses": {
827
+ "200": {
828
+ "description": "Successful operation",
829
+ "content": {
830
+ "application/json": {
831
+ "schema": {
832
+ "$ref": "#/components/schemas/UserListResponse"
833
+ }
834
+ }
835
+ }
836
+ }
837
+ },
838
+ "security": [
839
+ {
840
+ "api_key": []
841
+ }
842
+ ]
843
+ }
844
+ },
798
845
  "/user/organizedcrime": {
799
846
  "get": {
800
847
  "tags": [
@@ -1310,6 +1357,9 @@
1310
1357
  {
1311
1358
  "$ref": "#/components/schemas/UserItemMarketResponse"
1312
1359
  },
1360
+ {
1361
+ "$ref": "#/components/schemas/UserListResponse"
1362
+ },
1313
1363
  {
1314
1364
  "$ref": "#/components/schemas/UserPersonalStatsResponse"
1315
1365
  },
@@ -4494,6 +4544,14 @@
4494
4544
  "Wither"
4495
4545
  ]
4496
4546
  },
4547
+ "UserListEnum": {
4548
+ "type": "string",
4549
+ "enum": [
4550
+ "Friends",
4551
+ "Enemies",
4552
+ "Targets"
4553
+ ]
4554
+ },
4497
4555
  "JobPositionCasinoEnum": {
4498
4556
  "type": "string",
4499
4557
  "enum": [
@@ -12848,6 +12906,64 @@
12848
12906
  "organizedCrime"
12849
12907
  ]
12850
12908
  },
12909
+ "UserList": {
12910
+ "properties": {
12911
+ "id": {
12912
+ "$ref": "#/components/schemas/UserId"
12913
+ },
12914
+ "name": {
12915
+ "type": "string"
12916
+ },
12917
+ "level": {
12918
+ "type": "integer"
12919
+ },
12920
+ "faction_id": {
12921
+ "nullable": true,
12922
+ "allOf": [
12923
+ {
12924
+ "$ref": "#/components/schemas/FactionId"
12925
+ },
12926
+ {
12927
+ "type": "integer",
12928
+ "nullable": true
12929
+ }
12930
+ ]
12931
+ },
12932
+ "last_action": {
12933
+ "$ref": "#/components/schemas/UserLastAction"
12934
+ },
12935
+ "status": {
12936
+ "$ref": "#/components/schemas/UserStatus"
12937
+ }
12938
+ },
12939
+ "type": "object",
12940
+ "required": [
12941
+ "id",
12942
+ "name",
12943
+ "level",
12944
+ "faction_id",
12945
+ "last_action",
12946
+ "status"
12947
+ ]
12948
+ },
12949
+ "UserListResponse": {
12950
+ "properties": {
12951
+ "list": {
12952
+ "type": "array",
12953
+ "items": {
12954
+ "$ref": "#/components/schemas/UserList"
12955
+ }
12956
+ },
12957
+ "_metadata": {
12958
+ "$ref": "#/components/schemas/RequestMetadataWithLinks"
12959
+ }
12960
+ },
12961
+ "type": "object",
12962
+ "required": [
12963
+ "list",
12964
+ "_metadata"
12965
+ ]
12966
+ },
12851
12967
  "UserSelectionName": {
12852
12968
  "description": "The following selections will fallback to API v1 and may change at any time: 'ammo','bars','basic','battlestats','bazaar','cooldowns','criminalrecord','discord','display','education','equipment','events','gym','honors','icons','inventory','jobpoints','log','medals','merits','messages','missions','money','networth','newevents','newmessages','notifications','perks','profile','properties','refills','reports','skills','stocks','travel','weaponexp','workstats'.",
12853
12969
  "type": "string",
@@ -12867,6 +12983,7 @@
12867
12983
  "hof",
12868
12984
  "itemmarket",
12869
12985
  "jobranks",
12986
+ "list",
12870
12987
  "lookup",
12871
12988
  "organizedcrime",
12872
12989
  "personalstats",
@@ -12956,6 +13073,17 @@
12956
13073
  "type": "string"
12957
13074
  }
12958
13075
  },
13076
+ "ApiLimit50": {
13077
+ "name": "limit",
13078
+ "in": "query",
13079
+ "required": false,
13080
+ "schema": {
13081
+ "type": "integer",
13082
+ "default": 50,
13083
+ "maximum": 50,
13084
+ "minimum": 1
13085
+ }
13086
+ },
12959
13087
  "ApiLimit100": {
12960
13088
  "name": "limit",
12961
13089
  "in": "query",
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "0.0.4",
4
+ "version": "0.0.5",
5
5
  "scripts": {
6
6
  "generate-types": "tsc && node build/index.js"
7
7
  },
8
8
  "devDependencies": {
9
- "@scalar/openapi-types": "^0.1.7",
10
- "@types/node": "^22.13.1",
11
- "prettier": "^3.5.1",
9
+ "@scalar/openapi-types": "^0.1.9",
10
+ "@types/node": "^22.13.10",
11
+ "prettier": "^3.5.3",
12
12
  "typeconv": "^2.3.1",
13
- "typescript": "^5.7.3"
13
+ "typescript": "^5.8.2"
14
14
  },
15
15
  "types": "./dist/index.d.ts",
16
16
  "files": [