steamutils 1.4.79 → 1.4.81
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/SteamClient.js +7 -1
- package/const.js +60 -0
- package/index.js +6 -6
- package/package.json +1 -1
package/SteamClient.js
CHANGED
|
@@ -2258,6 +2258,7 @@ function SteamClient({ username, cookie, clientJsToken, isAutoRequestFreeLicense
|
|
|
2258
2258
|
// console.log("CMsgClientMMSLobbyData", result, result.metadata);
|
|
2259
2259
|
});
|
|
2260
2260
|
}
|
|
2261
|
+
return logged;
|
|
2261
2262
|
}
|
|
2262
2263
|
|
|
2263
2264
|
function partyRegister() {
|
|
@@ -2438,7 +2439,12 @@ function SteamClient({ username, cookie, clientJsToken, isAutoRequestFreeLicense
|
|
|
2438
2439
|
},
|
|
2439
2440
|
}),
|
|
2440
2441
|
);
|
|
2441
|
-
|
|
2442
|
+
|
|
2443
|
+
init().then(function (logged) {
|
|
2444
|
+
if (!logged) {
|
|
2445
|
+
resolve(false);
|
|
2446
|
+
}
|
|
2447
|
+
});
|
|
2442
2448
|
}),
|
|
2443
2449
|
]);
|
|
2444
2450
|
|
package/const.js
CHANGED
|
@@ -456,3 +456,63 @@ export const EAuthTokenPlatformType = {
|
|
|
456
456
|
WebBrowser: 2,
|
|
457
457
|
MobileApp: 3,
|
|
458
458
|
};
|
|
459
|
+
|
|
460
|
+
export const ItemOrigin = {
|
|
461
|
+
Invalid: -1,
|
|
462
|
+
Drop: 0,
|
|
463
|
+
Achievement: 1,
|
|
464
|
+
Purchased: 2,
|
|
465
|
+
Traded: 3,
|
|
466
|
+
Crafted: 4,
|
|
467
|
+
StorePromotion: 5,
|
|
468
|
+
Gifted: 6,
|
|
469
|
+
SupportGranted: 7,
|
|
470
|
+
FoundInCrate: 8,
|
|
471
|
+
Earned: 9,
|
|
472
|
+
ThirdPartyPromotion: 10,
|
|
473
|
+
GiftWrapped: 11,
|
|
474
|
+
HalloweenDrop: 12,
|
|
475
|
+
PackageItem: 13,
|
|
476
|
+
Foreign: 14,
|
|
477
|
+
CDKey: 15,
|
|
478
|
+
CollectionReward: 16,
|
|
479
|
+
PreviewItem: 17,
|
|
480
|
+
SteamWorkshopContribution: 18,
|
|
481
|
+
PeriodicScoreReward: 19,
|
|
482
|
+
Recycling: 20,
|
|
483
|
+
TournamentDrop: 21,
|
|
484
|
+
StockItem: 22,
|
|
485
|
+
QuestReward: 23,
|
|
486
|
+
LevelUpReward: 24,
|
|
487
|
+
Max: 25,
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
export const ItemFlags = {
|
|
491
|
+
CannotTrade: 1,
|
|
492
|
+
CannotCraft: 2,
|
|
493
|
+
CanBeTradedByFreeAccounts: 4,
|
|
494
|
+
NotEcon: 8, //Items that cannot interact in the economy (can’t be traded, gift-wrapped, crafted, etc.)
|
|
495
|
+
PurchasedAfterStoreCraftabilityChanges2012: 16, //Cosmetic items coming from the store are now usable in crafting
|
|
496
|
+
ForceBlueTeam: 32,
|
|
497
|
+
StoreItem: 64,
|
|
498
|
+
Preview: 128,
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
export const ItemQuality = {
|
|
502
|
+
Undefined: -1,
|
|
503
|
+
Normal: 0,
|
|
504
|
+
Genuine: 1,
|
|
505
|
+
Vintage: 2,
|
|
506
|
+
Unusual: 3,
|
|
507
|
+
Unique: 4,
|
|
508
|
+
Community: 5,
|
|
509
|
+
Developer: 6,
|
|
510
|
+
SelfMade: 7,
|
|
511
|
+
Customised: 8,
|
|
512
|
+
Strange: 9,
|
|
513
|
+
Completed: 10,
|
|
514
|
+
Haunted: 11,
|
|
515
|
+
Tournament: 12,
|
|
516
|
+
Favoured: 13,
|
|
517
|
+
Max: 14,
|
|
518
|
+
};
|
package/index.js
CHANGED
|
@@ -1209,7 +1209,9 @@ export default class SteamUser {
|
|
|
1209
1209
|
}
|
|
1210
1210
|
_response = await axios.request(config);
|
|
1211
1211
|
} catch (e) {
|
|
1212
|
-
|
|
1212
|
+
if (e.errno !== -3008) {
|
|
1213
|
+
console.error(e);
|
|
1214
|
+
}
|
|
1213
1215
|
}
|
|
1214
1216
|
|
|
1215
1217
|
if (Array.isArray(_response?.headers?.["set-cookie"])) {
|
|
@@ -7111,11 +7113,9 @@ export default class SteamUser {
|
|
|
7111
7113
|
return result;
|
|
7112
7114
|
}
|
|
7113
7115
|
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
console.error(e);
|
|
7118
|
-
console.error(result);
|
|
7116
|
+
if (!result || result.status === 401) {
|
|
7117
|
+
//Unauthorized
|
|
7118
|
+
return;
|
|
7119
7119
|
}
|
|
7120
7120
|
|
|
7121
7121
|
const data = new SteamProto(SteamProtoType.CPlayer_GetFriendsGameplayInfo_Response).protoDecode(result.data);
|