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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. diff --git a/client.d.ts b/client.d.ts
  2. index a2501ab..5bb674b 100644
  3. --- a/client.d.ts
  4. +++ b/client.d.ts
  5. @@ -268,6 +268,11 @@ export declare namespace workshop {
  6. current: bigint
  7. total: bigint
  8. }
  9. + export interface UserItemVote {
  10. + votedUp: boolean
  11. + votedDown: boolean
  12. + voteSkipped: boolean
  13. + }
  14. export const enum UpdateStatus {
  15. Invalid = 0,
  16. PreparingConfig = 1,
  17. @@ -296,6 +301,30 @@ export declare namespace workshop {
  18. * {@link https://partner.steamgames.com/doc/api/ISteamUGC#UnsubscribeItem}
  19. */
  20. export function unsubscribe(itemId: bigint): Promise<void>
  21. + /**
  22. + * Sets the current user's vote (up or down) on a workshop item.
  23. + *
  24. + * {@link https://partner.steamgames.com/doc/api/ISteamUGC#SetUserItemVote}
  25. + */
  26. + export function voteItem(itemId: bigint, voteUp: boolean): Promise<void>
  27. + /**
  28. + * Adds a workshop item to the current user's favorites list.
  29. + *
  30. + * {@link https://partner.steamgames.com/doc/api/ISteamUGC#AddItemToFavorites}
  31. + */
  32. + export function addFavorite(appId: number, itemId: bigint): Promise<void>
  33. + /**
  34. + * Removes a workshop item from the current user's favorites list.
  35. + *
  36. + * {@link https://partner.steamgames.com/doc/api/ISteamUGC#RemoveItemFromFavorites}
  37. + */
  38. + export function removeFavorite(appId: number, itemId: bigint): Promise<void>
  39. + /**
  40. + * Gets the current user's existing vote (if any) on a workshop item.
  41. + *
  42. + * {@link https://partner.steamgames.com/doc/api/ISteamUGC#GetUserItemVote}
  43. + */
  44. + export function getUserVote(itemId: bigint): Promise<UserItemVote>
  45. /**
  46. * Gets the current state of a workshop item on this client. States can be combined.
  47. *
  48. @@ -336,6 +365,7 @@ export declare namespace workshop {
  49. * @returns an array of subscribed workshop item ids
  50. */
  51. export function getSubscribedItems(): Array<bigint>
  52. + export function deleteItem(itemId: bigint): Promise<void>
  53. export const enum UGCQueryType {
  54. RankedByVote = 0,
  55. RankedByPublicationDate = 1,