steamworks-js-client-d-ts.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. --- a/client.d.ts 2026-09-18 16:42:37.407700450 +0000
  2. +++ b/client.d.ts 2026-09-18 16:42:37.407700450 +0000
  3. @@ -268,6 +268,11 @@
  4. current: bigint
  5. total: bigint
  6. }
  7. + export interface UserItemVote {
  8. + votedUp: boolean
  9. + votedDown: boolean
  10. + voteSkipped: boolean
  11. + }
  12. export const enum UpdateStatus {
  13. Invalid = 0,
  14. PreparingConfig = 1,
  15. @@ -297,6 +302,18 @@
  16. */
  17. export function unsubscribe(itemId: bigint): Promise<void>
  18. /**
  19. + * Sets the current user's vote (up or down) on a workshop item.
  20. + *
  21. + * {@link https://partner.steamgames.com/doc/api/ISteamUGC#SetUserItemVote}
  22. + */
  23. + export function voteItem(itemId: bigint, voteUp: boolean): Promise<void>
  24. + /**
  25. + * Gets the current user's existing vote (if any) on a workshop item.
  26. + *
  27. + * {@link https://partner.steamgames.com/doc/api/ISteamUGC#GetUserItemVote}
  28. + */
  29. + export function getUserVote(itemId: bigint): Promise<UserItemVote>
  30. + /**
  31. * Gets the current state of a workshop item on this client. States can be combined.
  32. *
  33. * @returns a number with the current item state, e.g. 9