steamutils 1.5.37 → 1.5.38
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/index.js +21 -0
- package/package.json +1 -1
package/index.js
CHANGED
@@ -7215,6 +7215,27 @@ export default class SteamUser {
|
|
7215
7215
|
];
|
7216
7216
|
}
|
7217
7217
|
|
7218
|
+
/**
|
7219
|
+
* @typedef {Object} RedeemPointsResponse
|
7220
|
+
* @property {number[]} bundle_community_item_ids - Array of community item IDs in the bundle. May be empty.
|
7221
|
+
* @property {number} communityitemid - The redeemed community item ID.
|
7222
|
+
*/
|
7223
|
+
|
7224
|
+
/**
|
7225
|
+
* Redeems Steam Points for a specified reward definition.
|
7226
|
+
*
|
7227
|
+
* @async
|
7228
|
+
* @param {string} accessToken - The user's Steam OAuth access token.
|
7229
|
+
* @param {number|string} definitionId - The definition ID for the reward to redeem.
|
7230
|
+
* @returns {Promise<?RedeemPointsResponse>} A promise that resolves to the redemption response object,
|
7231
|
+
* or null/undefined if unsuccessful.
|
7232
|
+
*
|
7233
|
+
* @example
|
7234
|
+
* {
|
7235
|
+
* bundle_community_item_ids: [],
|
7236
|
+
* communityitemid: 34336330688
|
7237
|
+
* }
|
7238
|
+
*/
|
7218
7239
|
async redeemPoints(accessToken, definitionId) {
|
7219
7240
|
if (!definitionId) {
|
7220
7241
|
return;
|