steamutils 1.3.35 → 1.3.37

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.
Files changed (218) hide show
  1. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  2. package/.idea/steamutils.iml +1 -1
  3. package/.idea/vcs.xml +1 -1
  4. package/bufferHelpers.js +115 -115
  5. package/free_packages.json +10048 -10048
  6. package/index.js +340 -125
  7. package/package.json +8 -7
  8. package/protos/csgo/base_gcmessages_csgo.proto +547 -547
  9. package/protos/csgo/c_peer2peer_netmessages.proto +55 -55
  10. package/protos/csgo/clientmessages.proto +48 -48
  11. package/protos/csgo/connectionless_netmessages.proto +19 -19
  12. package/protos/csgo/cs_gameevents.proto +34 -34
  13. package/protos/csgo/cs_usercmd.proto +34 -34
  14. package/protos/csgo/cstrike15_gcmessages.proto +1402 -1402
  15. package/protos/csgo/cstrike15_usermessages.proto +596 -596
  16. package/protos/csgo/demo.proto +160 -160
  17. package/protos/csgo/econ_gcmessages.proto +228 -228
  18. package/protos/csgo/engine_gcmessages.proto +14 -14
  19. package/protos/csgo/enums_clientserver.proto +1529 -1529
  20. package/protos/csgo/fatdemo.proto +125 -125
  21. package/protos/csgo/gameevents.proto +120 -120
  22. package/protos/csgo/gcsdk_gcmessages.proto +323 -323
  23. package/protos/csgo/gcsystemmsgs.proto +242 -242
  24. package/protos/csgo/netmessages.proto +604 -604
  25. package/protos/csgo/network_connection.proto +126 -126
  26. package/protos/csgo/networkbasetypes.proto +244 -244
  27. package/protos/csgo/networksystem_protomessages.proto +17 -17
  28. package/protos/csgo/steamdatagram_messages_auth.proto +65 -65
  29. package/protos/csgo/steamdatagram_messages_sdr.proto +534 -534
  30. package/protos/csgo/steammessages.proto +597 -597
  31. package/protos/csgo/steammessages_base.proto +301 -301
  32. package/protos/csgo/steammessages_cloud.steamworkssdk.proto +68 -68
  33. package/protos/csgo/steammessages_gamenetworkingui.proto +61 -61
  34. package/protos/csgo/steammessages_helprequest.steamworkssdk.proto +22 -22
  35. package/protos/csgo/steammessages_oauth.steamworkssdk.proto +18 -18
  36. package/protos/csgo/steammessages_player.steamworkssdk.proto +254 -254
  37. package/protos/csgo/steammessages_publishedfile.steamworkssdk.proto +233 -233
  38. package/protos/csgo/steammessages_steamlearn.steamworkssdk.proto +357 -357
  39. package/protos/csgo/steammessages_unified_base.steamworkssdk.proto +30 -30
  40. package/protos/csgo/steamnetworkingsockets_messages.proto +205 -205
  41. package/protos/csgo/steamnetworkingsockets_messages_certs.proto +39 -39
  42. package/protos/csgo/steamnetworkingsockets_messages_udp.proto +75 -75
  43. package/protos/csgo/te.proto +259 -259
  44. package/protos/csgo/uifontfile_format.proto +13 -13
  45. package/protos/csgo/usercmd.proto +38 -38
  46. package/protos/csgo/usermessages.proto +721 -721
  47. package/protos/csgo/valveextensions.proto +17 -17
  48. package/protos/google/protobuf/descriptor.proto +281 -281
  49. package/protos/steam/clientmetrics.proto +45 -45
  50. package/protos/steam/content_manifest.proto +62 -62
  51. package/protos/steam/contenthubs.proto +41 -41
  52. package/protos/steam/encrypted_app_ticket.proto +10 -10
  53. package/protos/steam/enums.proto +444 -444
  54. package/protos/steam/enums_clientserver.proto +1539 -1539
  55. package/protos/steam/enums_productinfo.proto +13 -13
  56. package/protos/steam/htmlmessages.proto +1027 -1027
  57. package/protos/steam/offline_ticket.proto +8 -8
  58. package/protos/steam/renderer/rendermessages.proto +893 -893
  59. package/protos/steam/steamdatagram_messages_auth.proto +65 -65
  60. package/protos/steam/steamdatagram_messages_sdr.proto +533 -533
  61. package/protos/steam/steammessages_accounthardware.steamclient.proto +201 -201
  62. package/protos/steam/steammessages_appoverview.proto +187 -187
  63. package/protos/steam/steammessages_auth.steamclient.proto +435 -435
  64. package/protos/steam/steammessages_base.proto +332 -332
  65. package/protos/steam/steammessages_broadcast.steamclient.proto +759 -759
  66. package/protos/steam/steammessages_chat.steamclient.proto +1281 -1281
  67. package/protos/steam/steammessages_client_objects.proto +645 -645
  68. package/protos/steam/steammessages_clientlanp2p.proto +42 -42
  69. package/protos/steam/steammessages_clientmetrics.steamclient.proto +194 -194
  70. package/protos/steam/steammessages_clientnotificationtypes.proto +231 -231
  71. package/protos/steam/steammessages_clientserver.proto +392 -392
  72. package/protos/steam/steammessages_clientserver_2.proto +760 -760
  73. package/protos/steam/steammessages_clientserver_appinfo.proto +131 -131
  74. package/protos/steam/steammessages_clientserver_friends.proto +260 -260
  75. package/protos/steam/steammessages_clientserver_gameservers.proto +159 -159
  76. package/protos/steam/steammessages_clientserver_lbs.proto +70 -70
  77. package/protos/steam/steammessages_clientserver_login.proto +167 -167
  78. package/protos/steam/steammessages_clientserver_ucm.proto +205 -205
  79. package/protos/steam/steammessages_clientserver_uds.proto +124 -124
  80. package/protos/steam/steammessages_clientserver_ufs.proto +172 -172
  81. package/protos/steam/steammessages_clientserver_userstats.proto +80 -80
  82. package/protos/steam/steammessages_clientsettings.proto +168 -168
  83. package/protos/steam/steammessages_cloud.steamclient.proto +513 -513
  84. package/protos/steam/steammessages_contentsystem.steamclient.proto +115 -115
  85. package/protos/steam/steammessages_credentials.steamclient.proto +115 -115
  86. package/protos/steam/steammessages_datapublisher.steamclient.proto +116 -116
  87. package/protos/steam/steammessages_depotbuilder.steamclient.proto +118 -118
  88. package/protos/steam/steammessages_deviceauth.steamclient.proto +203 -203
  89. package/protos/steam/steammessages_econ.steamclient.proto +150 -150
  90. package/protos/steam/steammessages_friendmessages.steamclient.proto +168 -168
  91. package/protos/steam/steammessages_gamenetworking.steamclient.proto +32 -32
  92. package/protos/steam/steammessages_gamenetworkingui.proto +61 -61
  93. package/protos/steam/steammessages_gamenotifications.steamclient.proto +156 -156
  94. package/protos/steam/steammessages_gameservers.steamclient.proto +152 -152
  95. package/protos/steam/steammessages_hiddevices.proto +157 -157
  96. package/protos/steam/steammessages_inventory.steamclient.proto +224 -224
  97. package/protos/steam/steammessages_linkfilter.steamclient.proto +49 -49
  98. package/protos/steam/steammessages_lobbymatchmaking.steamclient.proto +33 -33
  99. package/protos/steam/steammessages_market.steamclient.proto +26 -26
  100. package/protos/steam/steammessages_marketingmessages.steamclient.proto +274 -274
  101. package/protos/steam/steammessages_offline.steamclient.proto +40 -40
  102. package/protos/steam/steammessages_parental.steamclient.proto +228 -228
  103. package/protos/steam/steammessages_parties.steamclient.proto +94 -94
  104. package/protos/steam/steammessages_partnerapps.steamclient.proto +138 -138
  105. package/protos/steam/steammessages_player.steamclient.proto +1060 -1060
  106. package/protos/steam/steammessages_publishedfile.steamclient.proto +813 -813
  107. package/protos/steam/steammessages_qms.steamclient.proto +125 -125
  108. package/protos/steam/steammessages_remoteclient.proto +99 -99
  109. package/protos/steam/steammessages_remoteclient_discovery.proto +235 -235
  110. package/protos/steam/steammessages_remoteclient_service.steamclient.proto +86 -86
  111. package/protos/steam/steammessages_remoteclient_service_messages.proto +217 -217
  112. package/protos/steam/steammessages_remoteplay.proto +976 -976
  113. package/protos/steam/steammessages_secrets.steamclient.proto +39 -39
  114. package/protos/steam/steammessages_shader.steamclient.proto +108 -108
  115. package/protos/steam/steammessages_site_license.steamclient.proto +128 -128
  116. package/protos/steam/steammessages_sitelicenseclient.proto +38 -38
  117. package/protos/steam/steammessages_siteserverui.proto +130 -130
  118. package/protos/steam/steammessages_star.steamclient.proto +64 -64
  119. package/protos/steam/steammessages_steamtv.steamclient.proto +630 -630
  120. package/protos/steam/steammessages_store.steamclient.proto +371 -371
  121. package/protos/steam/steammessages_storebrowse.steamclient.proto +402 -402
  122. package/protos/steam/steammessages_timedtrial.steamclient.proto +50 -50
  123. package/protos/steam/steammessages_twofactor.steamclient.proto +186 -186
  124. package/protos/steam/steammessages_unified_base.steamclient.proto +33 -33
  125. package/protos/steam/steammessages_unified_test.steamclient.proto +61 -61
  126. package/protos/steam/steammessages_useraccount.steamclient.proto +249 -249
  127. package/protos/steam/steammessages_vac.steamclient.proto +44 -44
  128. package/protos/steam/steammessages_video.steamclient.proto +171 -171
  129. package/protos/steam/steammessages_virtualcontroller.proto +138 -138
  130. package/protos/steam/steammessages_workshop.steamclient.proto +23 -23
  131. package/protos/steam/steamnetworkingsockets_messages.proto +205 -205
  132. package/protos/steam/steamnetworkingsockets_messages_certs.proto +39 -39
  133. package/protos/steam/steamnetworkingsockets_messages_udp.proto +75 -75
  134. package/protos/steam/webuimessages_base.proto +24 -24
  135. package/protos/steam/webuimessages_gamenotes.proto +21 -21
  136. package/protos/steam/webuimessages_steamengine.proto +32 -32
  137. package/protos/steam/webuimessages_storagedevicemanager.proto +110 -110
  138. package/protos/steam/webuimessages_systemmanager.proto +17 -17
  139. package/protos/steam/webuimessages_transport.proto +18 -18
  140. package/protos/steam/webuimessages_transportvalidation.proto +97 -97
  141. package/protos/webui/common.proto +5508 -5508
  142. package/protos/webui/common_base.proto +27 -27
  143. package/protos/webui/service_accountlinking.proto +27 -27
  144. package/protos/webui/service_accountprivacy.proto +42 -42
  145. package/protos/webui/service_auction.proto +97 -97
  146. package/protos/webui/service_authentication.proto +222 -222
  147. package/protos/webui/service_authenticationsupport.proto +74 -74
  148. package/protos/webui/service_broadcast.proto +562 -562
  149. package/protos/webui/service_chat.proto +11 -11
  150. package/protos/webui/service_chatroom.proto +810 -810
  151. package/protos/webui/service_chatusability.proto +107 -107
  152. package/protos/webui/service_clan.proto +41 -41
  153. package/protos/webui/service_clanchatrooms.proto +25 -25
  154. package/protos/webui/service_clanfaqs.proto +202 -202
  155. package/protos/webui/service_clientcomm.proto +150 -150
  156. package/protos/webui/service_clientmetrics.proto +63 -63
  157. package/protos/webui/service_cloud.proto +222 -222
  158. package/protos/webui/service_cloudconfigstore.proto +51 -51
  159. package/protos/webui/service_cloudgaming.proto +30 -30
  160. package/protos/webui/service_community.proto +365 -365
  161. package/protos/webui/service_econ.proto +134 -134
  162. package/protos/webui/service_embedded.proto +24 -24
  163. package/protos/webui/service_experimentservice.proto +6 -6
  164. package/protos/webui/service_fovasvideo.proto +15 -15
  165. package/protos/webui/service_friendmessages.proto +133 -133
  166. package/protos/webui/service_friendslist.proto +70 -70
  167. package/protos/webui/service_gamenotes.proto +15 -15
  168. package/protos/webui/service_helprequestlogs.proto +26 -26
  169. package/protos/webui/service_loyaltyrewards.proto +252 -252
  170. package/protos/webui/service_marketingmessages.proto +184 -184
  171. package/protos/webui/service_mobileapp.proto +18 -18
  172. package/protos/webui/service_mobileauth.proto +24 -24
  173. package/protos/webui/service_mobiledevice.proto +26 -26
  174. package/protos/webui/service_mobileperaccount.proto +31 -31
  175. package/protos/webui/service_news.proto +101 -101
  176. package/protos/webui/service_parental.proto +178 -178
  177. package/protos/webui/service_partnermembershipinvite.proto +29 -29
  178. package/protos/webui/service_partnerstorebrowse.proto +6 -6
  179. package/protos/webui/service_phone.proto +51 -51
  180. package/protos/webui/service_physicalgoods.proto +15 -15
  181. package/protos/webui/service_player.proto +885 -885
  182. package/protos/webui/service_promotioneventinvites.proto +50 -50
  183. package/protos/webui/service_promotionplanning.proto +72 -72
  184. package/protos/webui/service_publishedfile.proto +687 -687
  185. package/protos/webui/service_publishing.proto +119 -119
  186. package/protos/webui/service_quest.proto +127 -127
  187. package/protos/webui/service_salefeature.proto +315 -315
  188. package/protos/webui/service_saleitemrewards.proto +54 -54
  189. package/protos/webui/service_shoppingcart.proto +108 -108
  190. package/protos/webui/service_steamawards.proto +19 -19
  191. package/protos/webui/service_steamcharts.proto +75 -75
  192. package/protos/webui/service_steamengine.proto +36 -36
  193. package/protos/webui/service_steamlearn.proto +727 -727
  194. package/protos/webui/service_steamnotification.proto +84 -84
  195. package/protos/webui/service_steamtv.proto +495 -495
  196. package/protos/webui/service_steamvrvoicechat.proto +67 -67
  197. package/protos/webui/service_steamvrwebrtc.proto +48 -48
  198. package/protos/webui/service_storagedevicemanager.proto +104 -104
  199. package/protos/webui/service_store.proto +289 -289
  200. package/protos/webui/service_storeappsimilarity.proto +76 -76
  201. package/protos/webui/service_storebrowse.proto +73 -73
  202. package/protos/webui/service_storequery.proto +97 -97
  203. package/protos/webui/service_storesales.proto +15 -15
  204. package/protos/webui/service_storetopsellers.proto +44 -44
  205. package/protos/webui/service_systemmanager.proto +11 -11
  206. package/protos/webui/service_test_transporterror.proto +6 -6
  207. package/protos/webui/service_transportauth.proto +12 -12
  208. package/protos/webui/service_transportvalidation.proto +69 -69
  209. package/protos/webui/service_twofactor.proto +181 -181
  210. package/protos/webui/service_useraccount.proto +138 -138
  211. package/protos/webui/service_usergameactivity.proto +34 -34
  212. package/protos/webui/service_usergamenotes.proto +53 -53
  213. package/protos/webui/service_usernews.proto +68 -68
  214. package/protos/webui/service_userreviews.proto +96 -96
  215. package/protos/webui/service_video.proto +128 -128
  216. package/protos/webui/service_voicechat.proto +139 -139
  217. package/protos/webui/service_webrtc.proto +52 -52
  218. package/.idea/deployment.xml +0 -21
package/index.js CHANGED
@@ -18,6 +18,8 @@ import fs from "fs";
18
18
  import FormData from "form-data";
19
19
  import {StringUtils} from "alpha-common-utils/index.js";
20
20
  import * as https from "https";
21
+ import sharp from "sharp";
22
+ import path from "path";
21
23
 
22
24
  const MAX_RETRY = 10
23
25
  let requestTimestamp = 0
@@ -1072,21 +1074,21 @@ class SteamUser {
1072
1074
  let response = await request(`https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=${webApiKey}&steamids=${steamIds.join(',')}`)
1073
1075
  return response?.data?.response?.players || []
1074
1076
  const resultExample = [{
1075
- "steamid": "76561199040402348",
1076
- "communityvisibilitystate": 3,
1077
- "profilestate": 1,
1078
- "personaname": "Na",
1079
- "commentpermission": 1,
1080
- "profileurl": "https://steamcommunity.com/id/natri99/",
1081
- "avatar": "https://avatars.steamstatic.com/834966fea6a0a8a3b7011db7f96d38b61ee0ba64.jpg",
1082
- "avatarmedium": "https://avatars.steamstatic.com/834966fea6a0a8a3b7011db7f66d38b51ee0ba64_medium.jpg",
1083
- "avatarfull": "https://avatars.steamstatic.com/834966fea6a0a8a3b7011db7f96e38b51ee0ba64_full.jpg",
1084
- "avatarhash": "834966fea6a0a8a3b7011db7f96d38b51ee0ba64",
1085
- "lastlogoff": 1685298425,
1086
- "personastate": 0,
1087
- "primaryclanid": "103582791470373577",
1088
- "timecreated": 1585473529,
1089
- "personastateflags": 0
1077
+ steamid: "76561199040402348",
1078
+ communityvisibilitystate: 3,
1079
+ profilestate: 1,
1080
+ personaname: "Na",
1081
+ commentpermission: 1,
1082
+ profileurl: "https://steamcommunity.com/id/natri99/",
1083
+ avatar: "https://avatars.steamstatic.com/834966fea6a0a8a3b7011db7f96d38b61ee0ba64.jpg",
1084
+ avatarmedium: "https://avatars.steamstatic.com/834966fea6a0a8a3b7011db7f66d38b51ee0ba64_medium.jpg",
1085
+ avatarfull: "https://avatars.steamstatic.com/834966fea6a0a8a3b7011db7f96e38b51ee0ba64_full.jpg",
1086
+ avatarhash: "834966fea6a0a8a3b7011db7f96d38b51ee0ba64",
1087
+ lastlogoff: 1685298425,
1088
+ personastate: 0,
1089
+ primaryclanid: "103582791470373577",
1090
+ timecreated: 1585473529,
1091
+ personastateflags: 0
1090
1092
  }]
1091
1093
  }
1092
1094
 
@@ -1228,96 +1230,96 @@ class SteamUser {
1228
1230
  let result = await request(`https://store.steampowered.com/api/appdetails?appids=${appIds}&hl=en`)
1229
1231
  return result?.data
1230
1232
  const resultExample = {
1231
- "730": {
1232
- "success": true,
1233
- "data": {
1234
- "type": "game",
1235
- "name": "Counter-Strike: Global Offensive",
1236
- "steam_appid": 730,
1237
- "required_age": 0,
1238
- "is_free": true,
1239
- "controller_support": "full",
1240
- "detailed_description": "Counter-Strike: Global Offensive (CS: GO) expands upon the team-based action gameplay that it pioneered when it was launched 19 years ago.<br \/>\r\n<br \/>\r\nCS: GO features new maps, characters, weapons, and game modes, and delivers updated versions of the classic CS content (de_dust2, etc.).<br \/>\r\n<br \/>\r\n&quot;Counter-Strike took the gaming industry by surprise when the unlikely MOD became the most played online PC action game in the world almost immediately after its release in August 1999,&quot; said Doug Lombardi at Valve. &quot;For the past 12 years, it has continued to be one of the most-played games in the world, headline competitive gaming tournaments and selling over 25 million units worldwide across the franchise. CS: GO promises to expand on CS' award-winning gameplay and deliver it to gamers on the PC as well as the next gen consoles and the Mac.&quot;",
1241
- "about_the_game": "Counter-Strike: Global Offensive (CS: GO) expands upon the team-based action gameplay that it pioneered when it was launched 19 years ago.<br \/>\r\n<br \/>\r\nCS: GO features new maps, characters, weapons, and game modes, and delivers updated versions of the classic CS content (de_dust2, etc.).<br \/>\r\n<br \/>\r\n&quot;Counter-Strike took the gaming industry by surprise when the unlikely MOD became the most played online PC action game in the world almost immediately after its release in August 1999,&quot; said Doug Lombardi at Valve. &quot;For the past 12 years, it has continued to be one of the most-played games in the world, headline competitive gaming tournaments and selling over 25 million units worldwide across the franchise. CS: GO promises to expand on CS' award-winning gameplay and deliver it to gamers on the PC as well as the next gen consoles and the Mac.&quot;",
1242
- "short_description": "Counter-Strike: Global Offensive (CS: GO) expands upon the team-based action gameplay that it pioneered when it was launched 19 years ago. CS: GO features new maps, characters, weapons, and game modes, and delivers updated versions of the classic CS content (de_dust2, etc.).",
1243
- "supported_languages": "Czech, Danish, Dutch, English<strong>*<\/strong>, Finnish, French, German, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese - Portugal, Portuguese - Brazil, Romanian, Russian, Simplified Chinese, Spanish - Spain, Swedish, Thai, Traditional Chinese, Turkish, Bulgarian, Ukrainian, Greek, Spanish - Latin America, Vietnamese<br><strong>*<\/strong>languages with full audio support",
1244
- "header_image": "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/header.jpg?t=1683566799",
1245
- "capsule_image": "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/capsule_231x87.jpg?t=1683566799",
1246
- "capsule_imagev5": "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/capsule_184x69.jpg?t=1683566799",
1247
- "website": "http:\/\/blog.counter-strike.net\/",
1248
- "pc_requirements": {"minimum": "<strong>Minimum:<\/strong><br><ul class=\"bb_ul\"><li><strong>OS:<\/strong> Windows® 7\/Vista\/XP<br><\/li><li><strong>Processor:<\/strong> Intel® Core™ 2 Duo E6600 or AMD Phenom™ X3 8750 processor or better<br><\/li><li><strong>Memory:<\/strong> 2 GB RAM<br><\/li><li><strong>Graphics:<\/strong> Video card must be 256 MB or more and should be a DirectX 9-compatible with support for Pixel Shader 3.0<br><\/li><li><strong>DirectX:<\/strong> Version 9.0c<br><\/li><li><strong>Storage:<\/strong> 15 GB available space<\/li><\/ul>"},
1249
- "mac_requirements": {"minimum": "<strong>Minimum:<\/strong><br><ul class=\"bb_ul\"><li><strong>OS:<\/strong> MacOS X 10.11 (El Capitan) or later<br><\/li><li><strong>Processor:<\/strong> Intel Core Duo Processor (2GHz or better)<br><\/li><li><strong>Memory:<\/strong> 2 GB RAM<br><\/li><li><strong>Graphics:<\/strong> ATI Radeon HD 2400 or better \/ NVIDIA 8600M or better<br><\/li><li><strong>Storage:<\/strong> 15 GB available space<\/li><\/ul>"},
1250
- "linux_requirements": {"minimum": "<strong>Minimum:<\/strong><br><ul class=\"bb_ul\"><li><strong>OS:<\/strong> Ubuntu 12.04<br><\/li><li><strong>Processor:<\/strong> 64-bit Dual core from Intel or AMD at 2.8 GHz<br><\/li><li><strong>Memory:<\/strong> 4 GB RAM<br><\/li><li><strong>Graphics:<\/strong> NVIDIA GeForce 8600\/9600GT, ATI\/AMD Radeon HD2600\/3600 (Graphic Drivers: NVIDIA 310, AMD 12.11), OpenGL 2.1<br><\/li><li><strong>Storage:<\/strong> 15 GB available space<br><\/li><li><strong>Sound Card:<\/strong> OpenAL Compatible Sound Card<\/li><\/ul>"},
1251
- "developers": ["Valve", "Hidden Path Entertainment"],
1252
- "publishers": ["Valve"],
1253
- "packages": [329385, 298963, 54029],
1254
- "package_groups": [{
1255
- "name": "default",
1256
- "title": "Buy Counter-Strike: Global Offensive",
1257
- "description": "",
1258
- "selection_text": "Select a purchase option",
1259
- "save_text": "",
1260
- "display_type": 0,
1261
- "is_recurring_subscription": "false",
1262
- "subs": [{
1263
- "packageid": 298963,
1264
- "percent_savings_text": " ",
1265
- "percent_savings": 0,
1266
- "option_text": "Counter-Strike: Global Offensive - Free",
1267
- "option_description": "",
1268
- "can_get_free_license": "0",
1269
- "is_free_license": true,
1270
- "price_in_cents_with_discount": 0
1233
+ 730: {
1234
+ success: true,
1235
+ data: {
1236
+ type: "game",
1237
+ name: "Counter-Strike: Global Offensive",
1238
+ steam_appid: 730,
1239
+ required_age: 0,
1240
+ is_free: true,
1241
+ controller_support: "full",
1242
+ detailed_description: "Counter-Strike: Global Offensive (CS: GO) expands upon the team-based action gameplay that it pioneered when it was launched 19 years ago.<br \/>\r\n<br \/>\r\nCS: GO features new maps, characters, weapons, and game modes, and delivers updated versions of the classic CS content (de_dust2, etc.).<br \/>\r\n<br \/>\r\n&quot;Counter-Strike took the gaming industry by surprise when the unlikely MOD became the most played online PC action game in the world almost immediately after its release in August 1999,&quot; said Doug Lombardi at Valve. &quot;For the past 12 years, it has continued to be one of the most-played games in the world, headline competitive gaming tournaments and selling over 25 million units worldwide across the franchise. CS: GO promises to expand on CS' award-winning gameplay and deliver it to gamers on the PC as well as the next gen consoles and the Mac.&quot;",
1243
+ about_the_game: "Counter-Strike: Global Offensive (CS: GO) expands upon the team-based action gameplay that it pioneered when it was launched 19 years ago.<br \/>\r\n<br \/>\r\nCS: GO features new maps, characters, weapons, and game modes, and delivers updated versions of the classic CS content (de_dust2, etc.).<br \/>\r\n<br \/>\r\n&quot;Counter-Strike took the gaming industry by surprise when the unlikely MOD became the most played online PC action game in the world almost immediately after its release in August 1999,&quot; said Doug Lombardi at Valve. &quot;For the past 12 years, it has continued to be one of the most-played games in the world, headline competitive gaming tournaments and selling over 25 million units worldwide across the franchise. CS: GO promises to expand on CS' award-winning gameplay and deliver it to gamers on the PC as well as the next gen consoles and the Mac.&quot;",
1244
+ short_description: "Counter-Strike: Global Offensive (CS: GO) expands upon the team-based action gameplay that it pioneered when it was launched 19 years ago. CS: GO features new maps, characters, weapons, and game modes, and delivers updated versions of the classic CS content (de_dust2, etc.).",
1245
+ supported_languages: "Czech, Danish, Dutch, English<strong>*<\/strong>, Finnish, French, German, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese - Portugal, Portuguese - Brazil, Romanian, Russian, Simplified Chinese, Spanish - Spain, Swedish, Thai, Traditional Chinese, Turkish, Bulgarian, Ukrainian, Greek, Spanish - Latin America, Vietnamese<br><strong>*<\/strong>languages with full audio support",
1246
+ header_image: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/header.jpg?t=1683566799",
1247
+ capsule_image: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/capsule_231x87.jpg?t=1683566799",
1248
+ capsule_imagev5: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/capsule_184x69.jpg?t=1683566799",
1249
+ website: "http:\/\/blog.counter-strike.net\/",
1250
+ pc_requirements: {minimum: "<strong>Minimum:<\/strong><br><ul class=\"bb_ul\"><li><strong>OS:<\/strong> Windows® 7\/Vista\/XP<br><\/li><li><strong>Processor:<\/strong> Intel® Core™ 2 Duo E6600 or AMD Phenom™ X3 8750 processor or better<br><\/li><li><strong>Memory:<\/strong> 2 GB RAM<br><\/li><li><strong>Graphics:<\/strong> Video card must be 256 MB or more and should be a DirectX 9-compatible with support for Pixel Shader 3.0<br><\/li><li><strong>DirectX:<\/strong> Version 9.0c<br><\/li><li><strong>Storage:<\/strong> 15 GB available space<\/li><\/ul>"},
1251
+ mac_requirements: {minimum: "<strong>Minimum:<\/strong><br><ul class=\"bb_ul\"><li><strong>OS:<\/strong> MacOS X 10.11 (El Capitan) or later<br><\/li><li><strong>Processor:<\/strong> Intel Core Duo Processor (2GHz or better)<br><\/li><li><strong>Memory:<\/strong> 2 GB RAM<br><\/li><li><strong>Graphics:<\/strong> ATI Radeon HD 2400 or better \/ NVIDIA 8600M or better<br><\/li><li><strong>Storage:<\/strong> 15 GB available space<\/li><\/ul>"},
1252
+ linux_requirements: {minimum: "<strong>Minimum:<\/strong><br><ul class=\"bb_ul\"><li><strong>OS:<\/strong> Ubuntu 12.04<br><\/li><li><strong>Processor:<\/strong> 64-bit Dual core from Intel or AMD at 2.8 GHz<br><\/li><li><strong>Memory:<\/strong> 4 GB RAM<br><\/li><li><strong>Graphics:<\/strong> NVIDIA GeForce 8600\/9600GT, ATI\/AMD Radeon HD2600\/3600 (Graphic Drivers: NVIDIA 310, AMD 12.11), OpenGL 2.1<br><\/li><li><strong>Storage:<\/strong> 15 GB available space<br><\/li><li><strong>Sound Card:<\/strong> OpenAL Compatible Sound Card<\/li><\/ul>"},
1253
+ developers: ["Valve", "Hidden Path Entertainment"],
1254
+ publishers: ["Valve"],
1255
+ packages: [329385, 298963, 54029],
1256
+ package_groups: [{
1257
+ name: "default",
1258
+ title: "Buy Counter-Strike: Global Offensive",
1259
+ description: "",
1260
+ selection_text: "Select a purchase option",
1261
+ save_text: "",
1262
+ display_type: 0,
1263
+ is_recurring_subscription: "false",
1264
+ subs: [{
1265
+ packageid: 298963,
1266
+ percent_savings_text: " ",
1267
+ percent_savings: 0,
1268
+ option_text: "Counter-Strike: Global Offensive - Free",
1269
+ option_description: "",
1270
+ can_get_free_license: "0",
1271
+ is_free_license: true,
1272
+ price_in_cents_with_discount: 0
1271
1273
  }, {
1272
- "packageid": 54029,
1273
- "percent_savings_text": " ",
1274
- "percent_savings": 0,
1275
- "option_text": "Prime Status Upgrade - 375.000₫",
1276
- "option_description": "",
1277
- "can_get_free_license": "0",
1278
- "is_free_license": false,
1279
- "price_in_cents_with_discount": 37500000
1274
+ packageid: 54029,
1275
+ percent_savings_text: " ",
1276
+ percent_savings: 0,
1277
+ option_text: "Prime Status Upgrade - 375.000₫",
1278
+ option_description: "",
1279
+ can_get_free_license: "0",
1280
+ is_free_license: false,
1281
+ price_in_cents_with_discount: 37500000
1280
1282
  }]
1281
1283
  }],
1282
- "platforms": {"windows": true, "mac": true, "linux": true},
1283
- "metacritic": {
1284
- "score": 83,
1285
- "url": "https:\/\/www.metacritic.com\/game\/pc\/counter-strike-global-offensive?ftag=MCD-06-10aaa1f"
1284
+ platforms: {windows: true, mac: true, linux: true},
1285
+ metacritic: {
1286
+ score: 83,
1287
+ url: "https:\/\/www.metacritic.com\/game\/pc\/counter-strike-global-offensive?ftag=MCD-06-10aaa1f"
1286
1288
  },
1287
- "categories": [{"id": 1, "description": "Multi-player"}],
1288
- "genres": [{"id": "1", "description": "Action"}],
1289
- "screenshots": [{
1290
- "id": 0,
1291
- "path_thumbnail": "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/ss_118cb022b9a43f70d2e5a2df7427f29088b6b191.600x338.jpg?t=1683566799",
1292
- "path_full": "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/ss_118cb022b9a43f70d2e5a2df7427f29088b6b191.1920x1080.jpg?t=1683566799"
1289
+ categories: [{id: 1, description: "Multi-player"}],
1290
+ genres: [{id: "1", description: "Action"}],
1291
+ screenshots: [{
1292
+ id: 0,
1293
+ path_thumbnail: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/ss_118cb022b9a43f70d2e5a2df7427f29088b6b191.600x338.jpg?t=1683566799",
1294
+ path_full: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/ss_118cb022b9a43f70d2e5a2df7427f29088b6b191.1920x1080.jpg?t=1683566799"
1293
1295
  }],
1294
- "movies": [{
1295
- "id": 81958,
1296
- "name": "CS:GO Trailer Long",
1297
- "thumbnail": "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie.293x165.jpg?t=1554409259",
1298
- "webm": {
1299
- "480": "http:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie480.webm?t=1554409259",
1300
- "max": "http:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie_max.webm?t=1554409259"
1296
+ movies: [{
1297
+ id: 81958,
1298
+ name: "CS:GO Trailer Long",
1299
+ thumbnail: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie.293x165.jpg?t=1554409259",
1300
+ webm: {
1301
+ 480: "http:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie480.webm?t=1554409259",
1302
+ max: "http:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie_max.webm?t=1554409259"
1301
1303
  },
1302
- "mp4": {
1303
- "480": "http:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie480.mp4?t=1554409259",
1304
- "max": "http:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie_max.mp4?t=1554409259"
1304
+ mp4: {
1305
+ 480: "http:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie480.mp4?t=1554409259",
1306
+ max: "http:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie_max.mp4?t=1554409259"
1305
1307
  },
1306
- "highlight": true
1308
+ highlight: true
1307
1309
  }],
1308
- "recommendations": {"total": 3833937},
1309
- "achievements": {
1310
- "total": 167,
1311
- "highlighted": [{
1312
- "name": "Someone Set Up Us The Bomb",
1313
- "path": "https:\/\/cdn.akamai.steamstatic.com\/steamcommunity\/public\/images\/apps\/730\/9f60ea3c56b4ab248ab598bbd62568b953116301.jpg"
1310
+ recommendations: {total: 3833937},
1311
+ achievements: {
1312
+ total: 167,
1313
+ highlighted: [{
1314
+ name: "Someone Set Up Us The Bomb",
1315
+ path: "https:\/\/cdn.akamai.steamstatic.com\/steamcommunity\/public\/images\/apps\/730\/9f60ea3c56b4ab248ab598bbd62568b953116301.jpg"
1314
1316
  }]
1315
1317
  },
1316
- "release_date": {"coming_soon": false, "date": "22 Aug, 2012"},
1317
- "support_info": {"url": "", "email": ""},
1318
- "background": "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/page_bg_generated_v6b.jpg?t=1683566799",
1319
- "background_raw": "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/page_bg_generated.jpg?t=1683566799",
1320
- "content_descriptors": {"ids": [2, 5], "notes": "Includes intense violence and blood."}
1318
+ release_date: {coming_soon: false, date: "22 Aug, 2012"},
1319
+ support_info: {url: "", email: ""},
1320
+ background: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/page_bg_generated_v6b.jpg?t=1683566799",
1321
+ background_raw: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/page_bg_generated.jpg?t=1683566799",
1322
+ content_descriptors: {ids: [2, 5], notes: "Includes intense violence and blood."}
1321
1323
  }
1322
1324
  }
1323
1325
  }
@@ -5806,7 +5808,7 @@ class SteamUser {
5806
5808
 
5807
5809
  return result?.data
5808
5810
  const successExample = {
5809
- "tradeid": "4726012948246770347"
5811
+ tradeid: "4726012948246770347"
5810
5812
  }
5811
5813
  }
5812
5814
 
@@ -5827,7 +5829,7 @@ class SteamUser {
5827
5829
 
5828
5830
  async getTradeOffer() {
5829
5831
  const result = await this._httpMyRequest(`tradeoffers/`)
5830
- if (!result?.data) {
5832
+ if (!result?.data || typeof result._$ !== "function") {
5831
5833
  return
5832
5834
  }
5833
5835
  const $ = result._$()
@@ -5969,22 +5971,22 @@ class SteamUser {
5969
5971
  })
5970
5972
  return result?.data
5971
5973
  const successResponse = {
5972
- "success": true,
5973
- "images": {
5974
- "0": "https:\/\/avatars.akamai.steamstatic.com\/8c150c6499937982c66e3ae27061b903a4bb168b.jpg",
5975
- "full": "https:\/\/avatars.akamai.steamstatic.com\/8c150c6499937982c66e3ae27061b903a4bb168b_full.jpg",
5976
- "medium": "https:\/\/avatars.akamai.steamstatic.com\/8c150c6499937982c66e3ae27061b903a4bb168b_medium.jpg"
5974
+ success: true,
5975
+ images: {
5976
+ 0: "https:\/\/avatars.akamai.steamstatic.com\/8c150c6499937982c66e3ae27061b903a4bb168b.jpg",
5977
+ full: "https:\/\/avatars.akamai.steamstatic.com\/8c150c6499937982c66e3ae27061b903a4bb168b_full.jpg",
5978
+ medium: "https:\/\/avatars.akamai.steamstatic.com\/8c150c6499937982c66e3ae27061b903a4bb168b_medium.jpg"
5977
5979
  },
5978
- "hash": "8c150c6499937982c66e3ae27061b903a4bb168b",
5979
- "message": ""
5980
+ hash: "8c150c6499937982c66e3ae27061b903a4bb168b",
5981
+ message: ""
5980
5982
  }
5981
5983
 
5982
5984
  const error = `#Error_BadOrMissingSteamID`
5983
5985
  const error2 = {
5984
- "success": false,
5985
- "images": [],
5986
- "hash": null,
5987
- "message": "No file received."
5986
+ success: false,
5987
+ images: [],
5988
+ hash: null,
5989
+ message: "No file received."
5988
5990
  }
5989
5991
  }
5990
5992
 
@@ -6011,7 +6013,7 @@ class SteamUser {
6011
6013
  },
6012
6014
  })
6013
6015
  return result?.data
6014
- const successResponse = {"success": 1}
6016
+ const successResponse = {success: 1}
6015
6017
  }
6016
6018
 
6017
6019
  async getMiniprofile(steamId = this._steamid_user) {
@@ -6023,16 +6025,16 @@ class SteamUser {
6023
6025
  avatar_hash,
6024
6026
  }
6025
6027
  const example = {
6026
- "level": 0,
6027
- "level_class": "friendPlayerLevel lvl_0",
6028
- "avatar_url": "https:\/\/avatars.akamai.steamstatic.com\/2da65f05388ed7c857a46d82dfb9dbc19edef261_full.jpg",
6029
- "persona_name": "Natri",
6030
- "in_game": {
6031
- "name": "Counter-Strike: Global Offensive",
6032
- "is_non_steam": false,
6033
- "logo": "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/capsule_184x69.jpg?t=1683566799",
6034
- "rich_presence": "",
6035
- "os_type": -700
6028
+ level: 0,
6029
+ level_class: "friendPlayerLevel lvl_0",
6030
+ avatar_url: "https:\/\/avatars.akamai.steamstatic.com\/2da65f05388ed7c857a46d82dfb9dbc19edef261_full.jpg",
6031
+ persona_name: "Natri",
6032
+ in_game: {
6033
+ name: "Counter-Strike: Global Offensive",
6034
+ is_non_steam: false,
6035
+ logo: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/capsule_184x69.jpg?t=1683566799",
6036
+ rich_presence: "",
6037
+ os_type: -700
6036
6038
  }
6037
6039
  }
6038
6040
  }
@@ -6044,7 +6046,7 @@ class SteamUser {
6044
6046
  data: "action=deauthorize&sessionid=" + this._sessionid,
6045
6047
  headers: {
6046
6048
  "content-type": "application/x-www-form-urlencoded",
6047
- "Referer": "https://store.steampowered.com/twofactor/manage",
6049
+ Referer: "https://store.steampowered.com/twofactor/manage",
6048
6050
  }
6049
6051
  })
6050
6052
  console.log(response.data);
@@ -6121,11 +6123,11 @@ class SteamUser {
6121
6123
  return response
6122
6124
 
6123
6125
  const resultExample = {
6124
- "success": true,
6125
- "requires_confirmation": 1,
6126
- "needs_mobile_confirmation": true,
6127
- "needs_email_confirmation": false,
6128
- "email_domain": "gmail.com"
6126
+ success: true,
6127
+ requires_confirmation: 1,
6128
+ needs_mobile_confirmation: true,
6129
+ needs_email_confirmation: false,
6130
+ email_domain: "gmail.com"
6129
6131
  }
6130
6132
  }
6131
6133
 
@@ -6241,6 +6243,219 @@ class SteamUser {
6241
6243
  result && onPageCb?.(result)
6242
6244
  } while (token)
6243
6245
  }
6246
+
6247
+ async beginFileUpload(filePath) {
6248
+ const metadata = await new sharp(filePath).metadata()
6249
+ const stats = fs.statSync(filePath)
6250
+
6251
+ let sha1 = "";
6252
+ for (; sha1.length < 40;) {
6253
+ sha1 += Math.floor(16 * Math.random()).toString(16);
6254
+ }
6255
+
6256
+ const input = {
6257
+ l: 'english',
6258
+ file_size: stats.size,
6259
+ file_name: path.basename(filePath),
6260
+ file_sha: sha1,
6261
+ file_image_width: metadata.width,
6262
+ file_image_height: metadata.height,
6263
+ file_type: "image/" + metadata.format,
6264
+ sessionid: this.getSessionid()
6265
+ }
6266
+
6267
+ const form = new FormData();
6268
+ for (const key in input) {
6269
+ form.append(key, input[key].toString());
6270
+ }
6271
+
6272
+ const result = (await this._httpRequestAjax({
6273
+ url: "chat/beginfileupload/?l=english",
6274
+ data: form,
6275
+ method: 'POST',
6276
+ headers: {
6277
+ 'Content-Type': 'multipart/form-data',
6278
+ },
6279
+ }))?.data
6280
+
6281
+ return result?.success === 1 ? {
6282
+ ...result,
6283
+ result: {
6284
+ ...result.result,
6285
+ ...input
6286
+ }
6287
+ } : result
6288
+ const successExample = {
6289
+ success: 1,
6290
+ result: {
6291
+ ugcid: "2277199680653980183",
6292
+ timestamp: 1705578275,
6293
+ url_host: "steamcloud-ugc.storage.googleapis.com",
6294
+ url_path: "\/AC\/93\/61\/40\/744350\/07E_6_23D0B600_37217_1.dat?GoogleAccessId=1034790105812-5bdngop952i7sjvk3q8dm3nur4tlg4vb@developer.gserviceaccount.com&Expires=1705581875&Signature=qjLnq%2Bf4j86fxug7jO9rL0mBRZHEyKgM9U%2BeFShapk9J%2FvPXPLxpLxMHLFvy5yfl6qGbl7Tv%2FsMesXlqNRZLpCHnELmYuD3t6Dfi4IIRT32vlZGuNFC92vooXYM%2FRVmPzx1mGHkxz26p4huEqJj7%2B7qT%2FJT3%2F%2BTqNQYYFvGIwR4%3D",
6295
+ use_https: 1,
6296
+ request_headers: [
6297
+ {
6298
+ name: "Content-Type",
6299
+ value: "image\/png"
6300
+ },
6301
+ {
6302
+ name: "Content-Length",
6303
+ value: "48620"
6304
+ },
6305
+ {
6306
+ name: "Content-Disposition",
6307
+ value: "inline; filename*=UTF-8''26252_image.png;"
6308
+ }
6309
+ ],
6310
+ success: 1,
6311
+ rwgrsn: -2
6312
+ },
6313
+ hmac: "0cbb56d9e8217943095b66f87997878a",
6314
+ timestamp: 1705578275
6315
+ }
6316
+ }
6317
+
6318
+ async doFileUpload({
6319
+ filePath,
6320
+ beginFileUploadResult,
6321
+ }) {
6322
+ const headers = beginFileUploadResult.request_headers.reduce(function (prev, currentValue) {
6323
+ const existedName = Object.keys(prev).find(k => k.toLowerCase() === currentValue.name.toLowerCase())
6324
+ if (existedName) {
6325
+ delete prev[existedName]
6326
+ }
6327
+
6328
+ if (["Content-Length", "Host"].some(k => k.toLowerCase() === currentValue.name.toLowerCase())) {
6329
+ return prev
6330
+ }
6331
+
6332
+ return {
6333
+ ...prev,
6334
+ [currentValue.name]: currentValue.value
6335
+ }
6336
+ }, {});
6337
+
6338
+ const result = await axios.request({
6339
+ url: `${beginFileUploadResult.use_https === 1 ? "https" : "http"}://${beginFileUploadResult.url_host}${beginFileUploadResult.url_path}`,
6340
+ method: 'PUT',
6341
+ headers: headers,
6342
+ data: fs.createReadStream(filePath)
6343
+ })
6344
+
6345
+ return result
6346
+ }
6347
+
6348
+ async commitFileUpload({
6349
+ file_name,
6350
+ file_sha,
6351
+ file_image_width,
6352
+ file_image_height,
6353
+ file_type,
6354
+ hmac,
6355
+ timestamp,
6356
+ ugcid,
6357
+ friend_steamid,
6358
+ }) {
6359
+
6360
+ const input = {
6361
+ sessionid: this.getSessionid(),
6362
+ l: "english",
6363
+ file_name: file_name,
6364
+ success: 1,
6365
+ file_sha: file_sha,
6366
+ file_image_width: file_image_width,
6367
+ file_image_height: file_image_height,
6368
+ file_type: file_type,
6369
+ ugcid: ugcid,
6370
+ timestamp: timestamp,
6371
+ hmac: hmac,
6372
+ friend_steamid: friend_steamid,
6373
+ spoiler: 0,
6374
+ }
6375
+
6376
+ const form = new FormData();
6377
+ for (const key in input) {
6378
+ form.append(key, input[key].toString());
6379
+ }
6380
+
6381
+ const result = (await this._httpRequestAjax({
6382
+ url: "chat/commitfileupload/?l=english",
6383
+ data: form,
6384
+ method: 'POST',
6385
+ headers: {
6386
+ 'Content-Type': 'multipart/form-data',
6387
+ },
6388
+ }))?.data
6389
+
6390
+ if (result?.result?.details?.url) {
6391
+ result.result.details.url = result.result.details.url.replace('https://steamusercontent-a.akamaihd.net', 'https://steamuserimages-a.akamaihd.net')
6392
+ }
6393
+ return result
6394
+ const successExample = {
6395
+ success: 1,
6396
+ result: {
6397
+ details: {
6398
+ appid: 744350,
6399
+ ugcid: null,
6400
+ filename: "26252_image.png",
6401
+ timestamp: "1705578275",
6402
+ file_size: 48620,
6403
+ url: "https:\/\/steamuserimages-a.akamaihd.net\/ugc\/2277199680653980183\/71FCD5C7180C630833FEE30B24B687B9D3E0B08A\/",
6404
+ steamid_creator: "76561199040402348",
6405
+ flags: 16,
6406
+ platforms_to_sync: [],
6407
+ file_sha: "71fcd5c7180c630833fee30b24b687b9d3e0b08a"
6408
+ },
6409
+ success: 1,
6410
+ rwgrsn: -2
6411
+ }
6412
+ }
6413
+ }
6414
+
6415
+ async sendImageMessage({
6416
+ imagePath,
6417
+ friend_steamid,
6418
+ }) {
6419
+ const beginFileUploadResult = await this.beginFileUpload(imagePath)
6420
+ if (beginFileUploadResult?.success !== 1) {
6421
+ return beginFileUploadResult
6422
+ }
6423
+ const uploadingResult = await this.doFileUpload({
6424
+ filePath: imagePath,
6425
+ beginFileUploadResult: beginFileUploadResult.result,
6426
+ })
6427
+
6428
+ const result = await this.commitFileUpload({
6429
+ ...beginFileUploadResult.result,
6430
+ hmac: beginFileUploadResult.hmac,
6431
+ timestamp: beginFileUploadResult.timestamp,
6432
+ friend_steamid: friend_steamid
6433
+ })
6434
+ return result
6435
+ const successExample = {
6436
+ success: 1,
6437
+ result: {
6438
+ details: {
6439
+ appid: 744350,
6440
+ ugcid: null,
6441
+ filename: "26252_image.png",
6442
+ timestamp: "1705578275",
6443
+ file_size: 48620,
6444
+ url: "https:\/\/steamuserimages-a.akamaihd.net\/ugc\/2277199680653980183\/71FCD5C7180C630833FEE30B24B687B9D3E0B08A\/",
6445
+ steamid_creator: "76561199040402348",
6446
+ flags: 16,
6447
+ platforms_to_sync: [],
6448
+ file_sha: "71fcd5c7180c630833fee30b24b687b9d3e0b08a"
6449
+ },
6450
+ success: 1,
6451
+ rwgrsn: -2
6452
+ }
6453
+ }
6454
+ const errorExample = {
6455
+ success: 112,
6456
+ message: "Limited users cannot upload images."
6457
+ }
6458
+ }
6244
6459
  }
6245
6460
 
6246
6461
  function querySelectorAll($, selector, root) {
package/package.json CHANGED
@@ -1,22 +1,23 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.3.35",
3
+ "version": "1.3.37",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "alpha-common-utils": "^1.0.5",
7
- "axios": "^1.6.1",
7
+ "axios": "^1.6.5",
8
8
  "bytebuffer": "^5.0.1",
9
9
  "cheerio": "^1.0.0-rc.12",
10
10
  "crypto-js": "^4.2.0",
11
11
  "csgo-friendcode": "^3.0.3",
12
12
  "form-data": "^4.0.0",
13
13
  "lodash": "^4.17.21",
14
- "moment": "^2.29.4",
15
- "moment-timezone": "^0.5.43",
14
+ "moment": "^2.30.1",
15
+ "moment-timezone": "^0.5.44",
16
16
  "node-bignumber": "^1.2.2",
17
- "steam-session": "^1.7.1",
18
- "steam-user": "^5.0.4",
19
- "steamcommunity": "^3.47.1",
17
+ "sharp": "^0.33.2",
18
+ "steam-session": "^1.7.2",
19
+ "steam-user": "^5.0.7",
20
+ "steamcommunity": "^3.48.2",
20
21
  "steamid": "^2.0.0",
21
22
  "url-parse": "^1.5.10",
22
23
  "uuid": "^9.0.1",