@hagicode/steamworks.js 0.2.0 → 0.2.1

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/README.md CHANGED
@@ -15,7 +15,7 @@ This project is a fork of the upstream [steamworks.js](https://github.com/ceifa/
15
15
  It exists for my own development work, not as a general replacement for upstream. It is shaped around two needs:
16
16
 
17
17
  * **Working well with coding agents.** The repository carries agent guidance (`AGENTS.md`), task-oriented skills for Steam Workshop work (`steamworks-js/` and the `steamworks-workshop-*` folders), and a documentation site built from this README and those skills.
18
- * **Covering the Steamworks features my projects use.** Workshop publishing and updates (additional previews, preview-only and content-only updates, item dependencies, known game versions, per-language titles and descriptions), plus friends, stats and leaderboards, networking sockets/messages/utils, the server browser, timeline, screenshots and Remote Play.
18
+ * **Covering the Steamworks features my projects use.** Steam Workshop (UGC) is the most complete area: creating items of any file type, publishing and updating them (additional previews and videos, preview-only and content-only updates, metadata, key-value tags, content descriptors, known game versions, per-language titles and descriptions), item and app dependencies, and the logged-in user's votes, favorites and playtime tracking. Beyond Workshop it covers friends, stats and leaderboards, networking sockets/messages/utils, the server browser, timeline, screenshots and Remote Play.
19
19
 
20
20
  What that means in practice:
21
21
 
@@ -44,6 +44,27 @@ if (client.achievement.activate('ACHIEVEMENT')) {
44
44
 
45
45
  You can refer to the [declarations file](https://github.com/HagiCode-org/steamworks.js/blob/main/client.d.ts) to check the API support and get more detailed documentation of each function.
46
46
 
47
+ ### What is covered
48
+
49
+ Every namespace below is on the client returned by `init()`. Every function, with its parameters, return value and failure cases, is in the [API reference](https://steamworks.hagicode.com/api/), which is rendered from the JSDoc in `client.d.ts`. Most calls need a running, logged-in Steam client. Anything marked **unverified** has not been run against a live client yet.
50
+
51
+ | Area | Namespaces | Where to read more |
52
+ | --- | --- | --- |
53
+ | Steam Workshop (UGC) | `workshop` | The Workshop sections below, and the agent skills for publishing, updating, querying and client state |
54
+ | Friends and identity | `friends`, `localplayer`, `auth` | [Friends](#friends); the API reference for the rest |
55
+ | Stats, achievements, leaderboards | `stats`, `achievement`, `leaderboard` | [Stats, Achievements and Leaderboards](#stats-achievements-and-leaderboards) |
56
+ | Networking | `networking`, `networkingSockets`, `networkingMessages`, `networkingUtils` | [Networking](#networking-networking-and-the-new-namespaces) |
57
+ | Servers, lobbies, Remote Play | `matchmaking`, `matchmakingServers`, `remotePlay` | [Server Browser, Timeline, Screenshots and Remote Play](#server-browser-timeline-screenshots-and-remote-play); lobbies are in the API reference |
58
+ | Timeline and screenshots | `timeline`, `screenshots` | Same section |
59
+ | App, overlay, input, cloud, utilities | `apps`, `overlay`, `input`, `cloud`, `utils`, `callback` | [Supplemental Functions](#supplemental-functions); the API reference for the rest |
60
+
61
+ What the Workshop namespace can do today:
62
+
63
+ * **Read**: `getItem`, `getItems`, `getAllItems`, `getUserItems`, with additional previews, supported game versions and dependency links on request.
64
+ * **Create and update**: `createItem` (any `WorkshopFileType`), `updateItem` and its preview-only and content-only helpers, with title and description per language, tags, visibility, metadata, key-value tags, content descriptors, screenshots, YouTube videos and game-version ranges.
65
+ * **Dependencies**: required items (`addDependency`, `removeDependency`) and required apps (`addAppDependency`, `removeAppDependency`, `getAppDependencies`).
66
+ * **The logged-in user**: subscribe, download and install info, votes, favorites and playtime tracking.
67
+
47
68
  ### Not in scope: remote_storage publish and screenshots tagging
48
69
 
49
70
  These two parts of the SDK are deliberately not wrapped. This section records the decision and its reasons, so the question is not reopened without new facts. The public API did not change for it: `client.d.ts` has no remote_storage publish function and no screenshots tagging function.
package/client.d.ts CHANGED
@@ -1,7 +1,31 @@
1
+ /**
2
+ * Initializes the Steam client for this process and requests the user's stats. If a client already exists, it is dropped first.
3
+ * Needs the Steam client to be running. Throws an Error carrying Steam's reason when initialization fails.
4
+ * Unverified against a live Steam client: whether a logged-out Steam client initializes.
5
+ * @param appId - The Steam app ID to initialize as. Omit it to use the app ID the SDK resolves on its own (for example from `steam_appid.txt`).
6
+ */
1
7
  export declare function init(appId?: number | undefined | null): void
8
+ /**
9
+ * Checks whether Steam must relaunch this app. Does not need `init()`.
10
+ * Returns true when the app was not started by Steam and has no `steam_appid.txt`. Steam then starts the app through its client, and the app should exit as soon as possible. Returns false when Steam launched the app or `steam_appid.txt` is present.
11
+ * @param appId - The Steam app ID of the game.
12
+ * @returns true if Steam is relaunching the app and it should quit, otherwise false.
13
+ */
2
14
  export declare function restartAppIfNecessary(appId: number): boolean
15
+ /**
16
+ * Dispatches pending Steam callbacks and call results to the handlers registered with `register()` and to pending async calls. Call it regularly, for example once per frame or on a timer, or events are delayed.
17
+ * Does nothing before `init()` or after `shutdown()`.
18
+ */
3
19
  export declare function runCallbacks(): void
20
+ /**
21
+ * Releases the Steam client, which shuts down the Steam API. Safe to call when no client exists.
22
+ * After this call `isConnected()` returns false, and `init()` must run again before other Steam APIs are used.
23
+ */
4
24
  export declare function shutdown(): void
25
+ /**
26
+ * Returns whether a Steam client is held, meaning `init()` succeeded and `shutdown()` has not been called since. Does not check that the Steam client is running or that a user is logged in.
27
+ * @returns true if the client is initialized, otherwise false.
28
+ */
5
29
  export declare function isConnected(): boolean
6
30
  export interface PlayerSteamId {
7
31
  steamId64: bigint
@@ -9,9 +33,30 @@ export interface PlayerSteamId {
9
33
  accountId: number
10
34
  }
11
35
  export declare namespace achievement {
36
+ /**
37
+ * Unlocks an achievement and stores the change to Steam. Needs `init()`, which requests the user's stats.
38
+ * Returns true when Steam accepted both the unlock and the store request. The store finishes asynchronously, and its result arrives through the UserStatsStored callback while `runCallbacks()` runs.
39
+ * @param achievement - The achievement API name as configured in Steamworks.
40
+ * @returns true if the request was accepted, otherwise false (for example an unknown name, or stats that Steam has not received yet).
41
+ */
12
42
  export function activate(achievement: string): boolean
43
+ /**
44
+ * Checks whether the user has unlocked an achievement. Needs `init()`, which requests the user's stats.
45
+ * @param achievement - The achievement API name as configured in Steamworks.
46
+ * @returns true if unlocked, otherwise false. False is also returned when the lookup fails (unknown name, or stats not received yet), so a failed lookup cannot be told apart from a locked achievement.
47
+ */
13
48
  export function isActivated(achievement: string): boolean
49
+ /**
50
+ * Re-locks an achievement and stores the change to Steam. Same requirements as `activate()`.
51
+ * @param achievement - The achievement API name as configured in Steamworks.
52
+ * @returns true if Steam accepted both the clear and the store request, otherwise false.
53
+ */
14
54
  export function clear(achievement: string): boolean
55
+ /**
56
+ * Returns the API names of all achievements defined for the app. Needs `init()`.
57
+ * Fails when Steam returns no list; the binding then panics. Unverified against a live Steam client: how that failure reaches JavaScript.
58
+ * @returns the achievement API names defined for the app.
59
+ */
15
60
  export function names(): Array<string>
16
61
  /**
17
62
  * Fetches the global unlock percentages of every achievement. Resolves once Steam has answered;
@@ -25,19 +70,79 @@ export declare namespace achievement {
25
70
  export function getAchievedPercent(achievement: string): number | null
26
71
  }
27
72
  export declare namespace apps {
73
+ /**
74
+ * Checks whether the user is subscribed to another app, such as a demo or a related game. Per the SDK docs, use it for ownership of an app related to yours, not as a general ownership check.
75
+ * @param appId - The Steam app ID to check.
76
+ * @returns true if the user is subscribed to the app, otherwise false.
77
+ */
28
78
  export function isSubscribedApp(appId: number): boolean
79
+ /**
80
+ * Checks whether the app is installed for the current user. An installed app does not mean the user owns it.
81
+ * @param appId - The Steam app ID to check.
82
+ * @returns true if the app is currently installed, otherwise false.
83
+ */
29
84
  export function isAppInstalled(appId: number): boolean
85
+ /**
86
+ * Checks whether the user owns the DLC and has it installed.
87
+ * @param appId - The Steam app ID of the DLC.
88
+ * @returns true if the DLC is owned and installed, otherwise false.
89
+ */
30
90
  export function isDlcInstalled(appId: number): boolean
91
+ /**
92
+ * Checks whether the user is subscribed through a free weekend.
93
+ * @returns true if so, otherwise false.
94
+ */
31
95
  export function isSubscribedFromFreeWeekend(): boolean
96
+ /**
97
+ * Checks whether the user's account has a VAC ban.
98
+ * @returns true if the account is VAC banned, otherwise false.
99
+ */
32
100
  export function isVacBanned(): boolean
101
+ /**
102
+ * Checks whether the license for the current app is a cyber cafe license.
103
+ * @returns true if it is, otherwise false.
104
+ */
33
105
  export function isCybercafe(): boolean
106
+ /**
107
+ * Checks whether the license for the current app provides low violence depots.
108
+ * @returns true if it does, otherwise false.
109
+ */
34
110
  export function isLowViolence(): boolean
111
+ /**
112
+ * Checks whether the user is subscribed to the current app.
113
+ * @returns true if subscribed, otherwise false.
114
+ */
35
115
  export function isSubscribed(): boolean
116
+ /**
117
+ * Returns the build ID of the current app as Steam reports it.
118
+ * @returns the build ID as a signed 32-bit integer.
119
+ */
36
120
  export function appBuildId(): number
121
+ /**
122
+ * Returns the install folder of an app. Works even when the app is not installed, returning the folder it would use in the default location.
123
+ * @param appId - The Steam app ID to look up.
124
+ * @returns the install folder path.
125
+ */
37
126
  export function appInstallDir(appId: number): string
127
+ /**
128
+ * Returns the original owner of the current app. It differs from the current user only when the app is borrowed.
129
+ * @returns the owner as a PlayerSteamId with `steamId64`, `steamId32` and `accountId` fields.
130
+ */
38
131
  export function appOwner(): PlayerSteamId
132
+ /**
133
+ * Returns the languages the current app supports.
134
+ * @returns the language names as Steam reports them, or an empty array when none are listed.
135
+ */
39
136
  export function availableGameLanguages(): Array<string>
137
+ /**
138
+ * Returns the language the user has set for the current game. If the user has not set one, Steam returns the language of the Steam UI.
139
+ * @returns the language name as Steam reports it.
140
+ */
40
141
  export function currentGameLanguage(): string
142
+ /**
143
+ * Returns the beta branch the user is on for the current app.
144
+ * @returns the beta branch name, or `null` when the user is on the default branch.
145
+ */
41
146
  export function currentBetaName(): string | null
42
147
  /** @returns the command line the game was launched with, or an empty string */
43
148
  export function launchCommandLine(): string
@@ -55,9 +160,21 @@ export declare namespace auth {
55
160
  * @param timeoutSeconds - The number of seconds to wait for the ticket to be validated. Default value is 10 seconds.
56
161
  */
57
162
  export function getSessionTicketWithIp(ip: string, timeoutSeconds?: number | undefined | null): Promise<Ticket>
163
+ /**
164
+ * Requests an auth session ticket for a Steam Web API service and waits for Steam to validate it. Needs `init()`.
165
+ * Rejects with Steam's error on failure, or with "Steam didn't validated the ticket in time." when Steam does not answer within the timeout. The ticket is cancelled in both cases. Call `cancel()` on the returned Ticket once the remote side no longer needs it.
166
+ * @param identity - The identity string of the Web API service that will validate the ticket.
167
+ * @param timeoutSeconds - Seconds to wait for Steam before rejecting. Defaults to 10.
168
+ * @returns a Ticket holding the ticket bytes, readable with `getBytes()`.
169
+ */
58
170
  export function getAuthTicketForWebApi(identity: string, timeoutSeconds?: number | undefined | null): Promise<Ticket>
59
171
  export class Ticket {
172
+ /** Cancels the auth ticket with Steam so it can no longer be used. Call it only while the Steam client is initialized. */
60
173
  cancel(): void
174
+ /**
175
+ * Returns a copy of the ticket bytes. Does not call Steam.
176
+ * @returns the ticket as a Buffer, to send to the service that validates it.
177
+ */
61
178
  getBytes(): Buffer
62
179
  }
63
180
  }
@@ -87,19 +204,66 @@ export declare namespace callback {
87
204
  AuthSessionTicketResponse = 21,
88
205
  ValidateAuthTicketResponse = 22
89
206
  }
207
+ /**
208
+ * Registers a handler for a Steam callback. Needs `init()`.
209
+ * The handler receives each callback payload as a JSON-compatible value on the JavaScript event loop. Steam events are dispatched only while `runCallbacks()` runs.
210
+ * @param steamCallback - The callback kind to listen for.
211
+ * @param handler - Called with each payload of that callback.
212
+ * @returns a Handle; call `disconnect()` on it to stop the handler.
213
+ */
90
214
  export function register<C extends keyof import('./callbacks').CallbackReturns>(steamCallback: C, handler: (value: import('./callbacks').CallbackReturns[C]) => void): Handle
91
215
  export class Handle {
216
+ /** Stops the handler registered for this Handle from being called. Calling it again does nothing. */
92
217
  disconnect(): void
93
218
  }
94
219
  }
95
220
  export declare namespace cloud {
221
+ /**
222
+ * Checks whether Steam Cloud is enabled for the user's account. This is separate from the app setting (`isEnabledForApp()`).
223
+ * @returns true if enabled for the account, otherwise false.
224
+ */
96
225
  export function isEnabledForAccount(): boolean
226
+ /**
227
+ * Checks whether Steam Cloud is enabled for the current app. This is separate from the account setting (`isEnabledForAccount()`).
228
+ * @returns true if enabled for the app, otherwise false.
229
+ */
97
230
  export function isEnabledForApp(): boolean
231
+ /**
232
+ * Turns Steam Cloud on or off for the current app. It does not change the account setting. Returns nothing, and the binding does not report whether Steam applied the change.
233
+ * @param enabled - true to enable Steam Cloud for the app, false to disable it.
234
+ */
98
235
  export function setEnabledForApp(enabled: boolean): void
236
+ /**
237
+ * Reads a Steam Cloud file as UTF-8 text. Needs `init()`.
238
+ * Rejects with "Failed to read file" when the file cannot be read or its bytes are not valid UTF-8. Unverified against a live Steam client: a missing file is read as empty text on this code path.
239
+ * @param name - The cloud file name.
240
+ * @returns the file content as a string.
241
+ */
99
242
  export function readFile(name: string): string
243
+ /**
244
+ * Writes text to a Steam Cloud file as UTF-8, replacing its previous content. Needs `init()`.
245
+ * The write is committed when the write stream closes, which happens before this call returns.
246
+ * @param name - The cloud file name.
247
+ * @param content - Text to write, encoded as UTF-8.
248
+ * @returns true if the content was accepted by the write stream, false if writing failed. The commit result is not reported. Unverified against a live Steam client whether a failed commit is visible.
249
+ */
100
250
  export function writeFile(name: string, content: string): boolean
251
+ /**
252
+ * Deletes a Steam Cloud file both locally and in the cloud. Needs `init()`.
253
+ * @param name - The cloud file name.
254
+ * @returns true if a file was deleted, false if none was.
255
+ */
101
256
  export function deleteFile(name: string): boolean
257
+ /**
258
+ * Checks whether a Steam Cloud file exists. Needs `init()`.
259
+ * @param name - The cloud file name.
260
+ * @returns true if the file exists, otherwise false.
261
+ */
102
262
  export function fileExists(name: string): boolean
263
+ /**
264
+ * Lists the Steam Cloud files of the current app. Needs `init()`.
265
+ * @returns an array of entries with `name` and `size` fields, where size is the file size in bytes as a BigInt. The array is empty when there are no files.
266
+ */
103
267
  export function listFiles(): Array<FileInfo>
104
268
  /** The platforms a cloud file syncs to. */
105
269
  export const enum SyncPlatform {
@@ -156,9 +320,20 @@ export declare namespace friends {
156
320
  export function getFriends(flags: number): Array<FriendInfo>
157
321
  /** Players the local user has recently played with. */
158
322
  export function getCoplayFriends(): Array<FriendInfo>
323
+ /**
324
+ * Returns the online state of a friend as the local Steam client knows it.
325
+ * Requires a running Steam client.
326
+ * @param steamId64 - SteamID64 of the friend, as a BigInt
327
+ * @returns the friend's `FriendState`
328
+ */
159
329
  export function getFriendState(steamId64: bigint): FriendState
160
330
  /** @returns the AppID of the game the friend is playing, or `null` when they are not in a game */
161
331
  export function getFriendGamePlayed(steamId64: bigint): number | null
332
+ /**
333
+ * Returns the most recent co-play record between the local user and a friend.
334
+ * @param steamId64 - SteamID64 of the friend, as a BigInt
335
+ * @returns `appId` of the game played together (`0` when there is none) and `time`, the seconds since they last played together
336
+ */
162
337
  export function getFriendCoplayInfo(steamId64: bigint): CoplayInfo
163
338
  /** @returns the small (32x32) avatar as RGBA pixels, or `null` when it has not been loaded */
164
339
  export function getSmallAvatar(steamId64: bigint): Buffer | null
@@ -197,11 +372,36 @@ export declare namespace input {
197
372
  x: number
198
373
  y: number
199
374
  }
375
+ /**
376
+ * Initializes Steam Input. Call it before reading controllers or action data.
377
+ * Steam Input is updated from the Steam callback loop (`SteamAPI_RunCallbacks()`), not by a separate per-frame call.
378
+ * Requires a running Steam client.
379
+ */
200
380
  export function init(): void
381
+ /**
382
+ * Lists the controllers Steam Input currently sees as connected.
383
+ * @returns a `Controller` for each connected controller, or an empty array when none are connected
384
+ */
201
385
  export function getControllers(): Array<Controller>
386
+ /**
387
+ * Looks up the handle of an action set defined in the game's Steam Input configuration.
388
+ * @param actionSetName - name of the action set, as it is defined in the Steam Input configuration
389
+ * @returns the action set handle as a BigInt. Unverified against a live Steam client: a name that is not found is expected to return `0`.
390
+ */
202
391
  export function getActionSet(actionSetName: string): bigint
392
+ /**
393
+ * Looks up the handle of a digital action defined in the game's Steam Input configuration.
394
+ * @param actionName - name of the digital action, as it is defined in the Steam Input configuration
395
+ * @returns the action handle as a BigInt. Unverified against a live Steam client: a name that is not found is expected to return `0`.
396
+ */
203
397
  export function getDigitalAction(actionName: string): bigint
398
+ /**
399
+ * Looks up the handle of an analog action defined in the game's Steam Input configuration.
400
+ * @param actionName - name of the analog action, as it is defined in the Steam Input configuration
401
+ * @returns the action handle as a BigInt. Unverified against a live Steam client: a name that is not found is expected to return `0`.
402
+ */
204
403
  export function getAnalogAction(actionName: string): bigint
404
+ /** Shuts down Steam Input. Call `init` again before using controllers or actions after this. */
205
405
  export function shutdown(): void
206
406
  export interface DigitalActionData {
207
407
  /** `true` while the digital action is pressed. */
@@ -231,10 +431,32 @@ export declare namespace input {
231
431
  /** @returns the glyph image path of an action origin */
232
432
  export function getGlyphForActionOrigin(origin: number): string
233
433
  export class Controller {
434
+ /**
435
+ * Switches this controller to an action set. The call is cheap and can be repeated safely.
436
+ * @param actionSetHandle - action set handle from `getActionSet`
437
+ */
234
438
  activateActionSet(actionSetHandle: bigint): void
439
+ /**
440
+ * Checks whether a digital action is pressed on this controller.
441
+ * @param actionHandle - digital action handle from `getDigitalAction`
442
+ * @returns `true` while the action is pressed, otherwise `false`
443
+ */
235
444
  isDigitalActionPressed(actionHandle: bigint): boolean
445
+ /**
446
+ * Reads the current vector of an analog action on this controller.
447
+ * @param actionHandle - analog action handle from `getAnalogAction`
448
+ * @returns `x` and `y` as reported by Steam Input. Unverified against a live Steam client: the value ranges are not checked here.
449
+ */
236
450
  getAnalogActionVector(actionHandle: bigint): AnalogActionVector
451
+ /**
452
+ * Identifies the type of this controller.
453
+ * @returns the controller's `InputType`, `Unknown` when Steam cannot identify it
454
+ */
237
455
  getType(): InputType
456
+ /**
457
+ * Returns the Steam Input handle of this controller.
458
+ * @returns the handle as a BigInt, the value used by controller-scoped Steam Input calls
459
+ */
238
460
  getHandle(): bigint
239
461
  }
240
462
  }
@@ -309,11 +531,28 @@ export declare namespace leaderboard {
309
531
  }
310
532
  }
311
533
  export declare namespace localplayer {
534
+ /**
535
+ * Returns the SteamID of the logged-in local user. Requires a running, logged-in Steam client.
536
+ * @returns `steamId64` as a BigInt, `steamId32` as a string, and `accountId`
537
+ */
312
538
  export function getSteamId(): PlayerSteamId
539
+ /**
540
+ * Returns the Steam display name of the local user. Requires a running Steam client.
541
+ * @returns the persona name
542
+ */
313
543
  export function getName(): string
544
+ /**
545
+ * Returns the Steam level of the local user. Requires a running Steam client.
546
+ * @returns the Steam level
547
+ */
314
548
  export function getLevel(): number
315
549
  /** @returns the 2 digit ISO 3166-1-alpha-2 format country code which client is running in, e.g. "US" or "UK". */
316
550
  export function getIpCountry(): string
551
+ /**
552
+ * Sets one Rich Presence value for the local user, visible to friends.
553
+ * @param key - Rich Presence key
554
+ * @param value - value to set; `null` or omitted removes the key
555
+ */
317
556
  export function setRichPresence(key: string, value?: string | undefined | null): void
318
557
  }
319
558
  export declare namespace matchmaking {
@@ -323,21 +562,79 @@ export declare namespace matchmaking {
323
562
  Public = 2,
324
563
  Invisible = 3
325
564
  }
565
+ /**
566
+ * Creates a new lobby and makes the local user its owner.
567
+ * @param lobbyType - visibility of the lobby
568
+ * @param maxMembers - maximum number of members; Steam rejects values above 250
569
+ * @returns the new `Lobby`; rejects with Steam's error text when creation fails
570
+ */
326
571
  export function createLobby(lobbyType: LobbyType, maxMembers: number): Promise<Lobby>
572
+ /**
573
+ * Joins a lobby by its ID.
574
+ * @param lobbyId - lobby ID as a BigInt
575
+ * @returns the joined `Lobby`; rejects with `Failed to join lobby` when Steam refuses the join
576
+ */
327
577
  export function joinLobby(lobbyId: bigint): Promise<Lobby>
578
+ /**
579
+ * Requests the lobby list from Steam. The list follows the filters Steam applies by default. Unverified against a live Steam client.
580
+ * @returns a `Lobby` for each lobby in the result; rejects with an error when the request fails
581
+ */
328
582
  export function getLobbies(): Promise<Array<Lobby>>
329
583
  export class Lobby {
330
584
  id: bigint
585
+ /**
586
+ * Joins this lobby.
587
+ * @returns a `Lobby` for the joined lobby; rejects with `Failed to join lobby` when Steam refuses the join
588
+ */
331
589
  join(): Promise<Lobby>
590
+ /** Leaves this lobby. */
332
591
  leave(): void
592
+ /** Opens the Steam invite dialog for this lobby. */
333
593
  openInviteDialog(): void
594
+ /**
595
+ * Returns the number of members currently in this lobby.
596
+ * @returns the member count
597
+ */
334
598
  getMemberCount(): bigint
599
+ /**
600
+ * Returns the maximum number of members this lobby allows.
601
+ * @returns the member limit, or `null` when Steam has no metadata for the lobby
602
+ */
335
603
  getMemberLimit(): bigint | null
604
+ /**
605
+ * Returns the members of this lobby.
606
+ * @returns a `PlayerSteamId` for each member, empty when there are none
607
+ */
336
608
  getMembers(): Array<PlayerSteamId>
609
+ /**
610
+ * Returns the owner of this lobby.
611
+ * @returns the owner's `PlayerSteamId`
612
+ */
337
613
  getOwner(): PlayerSteamId
614
+ /**
615
+ * Sets whether new users may join this lobby. Only the lobby owner can change this.
616
+ * @param joinable - `true` to allow joining, `false` to block it
617
+ * @returns `true` when Steam accepted the change
618
+ */
338
619
  setJoinable(joinable: boolean): boolean
620
+ /**
621
+ * Reads one metadata value of this lobby.
622
+ * @param key - metadata key
623
+ * @returns the value, or `null` when the key is not set
624
+ */
339
625
  getData(key: string): string | null
626
+ /**
627
+ * Sets one metadata value of this lobby. Only the lobby owner can set lobby data.
628
+ * @param key - metadata key
629
+ * @param value - value to store
630
+ * @returns `true` when Steam accepted the change
631
+ */
340
632
  setData(key: string, value: string): boolean
633
+ /**
634
+ * Deletes one metadata value of this lobby. Only the lobby owner can delete lobby data.
635
+ * @param key - metadata key to delete
636
+ * @returns `true` when Steam accepted the change
637
+ */
341
638
  deleteData(key: string): boolean
342
639
  /** Get an object containing all the lobby data */
343
640
  getFullData(): Record<string, string>
@@ -451,10 +748,38 @@ export declare namespace networking {
451
748
  */
452
749
  ReliableWithBuffering = 3
453
750
  }
751
+ /**
752
+ * Sends a packet to another user over Steam peer-to-peer networking.
753
+ * @param steamId64 - recipient SteamID64 as a BigInt
754
+ * @param sendType - delivery mode; each mode has its own size limit
755
+ * @param data - packet payload
756
+ * @returns `true` when Steam queued the packet
757
+ */
454
758
  export function sendP2PPacket(steamId64: bigint, sendType: SendType, data: Buffer): boolean
759
+ /**
760
+ * Checks whether a packet is waiting to be read on channel 0.
761
+ * @returns the size in bytes of the next packet, or `0` when none is waiting
762
+ */
455
763
  export function isP2PPacketAvailable(): number
764
+ /**
765
+ * Reads the next waiting packet on channel 0.
766
+ * @param size - size of the receive buffer in bytes
767
+ * @returns `data` (the buffer), `size` (bytes read) and `steamId` of the sender; rejects with `No packet available` when none is waiting
768
+ */
456
769
  export function readP2PPacket(size: number): P2PPacket
770
+ /**
771
+ * Accepts a peer-to-peer session request from a user. Call it in response to a session request from that user.
772
+ * @param steamId64 - SteamID64 of the user as a BigInt
773
+ */
457
774
  export function acceptP2PSession(steamId64: bigint): void
775
+ /**
776
+ * Sends a packet to another user on a specific channel. Each channel is an independent stream.
777
+ * @param steamId64 - recipient SteamID64 as a BigInt
778
+ * @param sendType - delivery mode; each mode has its own size limit
779
+ * @param data - packet payload
780
+ * @param channel - channel number
781
+ * @returns `true` when Steam queued the packet
782
+ */
458
783
  export function sendP2PPacketOnChannel(steamId64: bigint, sendType: SendType, data: Buffer, channel: number): boolean
459
784
  /** @returns the size of the next packet on the channel, or 0 when none is waiting */
460
785
  export function isP2PPacketAvailableOnChannel(channel: number): number
@@ -747,23 +1072,55 @@ export declare namespace networkingUtils {
747
1072
  }
748
1073
  export declare namespace overlay {
749
1074
  export const enum Dialog {
1075
+ /** Friends list dialog. */
750
1076
  Friends = 0,
1077
+ /** Steam Community dialog. */
751
1078
  Community = 1,
1079
+ /** Recent players dialog. */
752
1080
  Players = 2,
1081
+ /** Steam settings dialog. */
753
1082
  Settings = 3,
1083
+ /** Official group of the game. */
754
1084
  OfficialGameGroup = 4,
1085
+ /** Game statistics dialog. */
755
1086
  Stats = 5,
1087
+ /** Achievements dialog. */
756
1088
  Achievements = 6
757
1089
  }
758
1090
  export const enum StoreFlag {
1091
+ /** Open the store page without adding the app to the cart. */
759
1092
  None = 0,
1093
+ /** Add the app to the cart without showing the cart. */
760
1094
  AddToCart = 1,
1095
+ /** Add the app to the cart and show the cart. */
761
1096
  AddToCartAndShow = 2
762
1097
  }
1098
+ /**
1099
+ * Opens a Steam overlay dialog. Unverified against a live Steam client: nothing is shown when the overlay is disabled.
1100
+ * @param dialog - dialog to open
1101
+ */
763
1102
  export function activateDialog(dialog: Dialog): void
1103
+ /**
1104
+ * Opens a Steam overlay dialog for a specific user. Unverified against a live Steam client.
1105
+ * @param dialog - dialog to open
1106
+ * @param steamId64 - SteamID64 of the user as a BigInt
1107
+ */
764
1108
  export function activateDialogToUser(dialog: Dialog, steamId64: bigint): void
1109
+ /**
1110
+ * Opens the Steam invite dialog for a lobby.
1111
+ * @param lobbyId - lobby ID as a BigInt
1112
+ */
765
1113
  export function activateInviteDialog(lobbyId: bigint): void
1114
+ /**
1115
+ * Opens a web page in the Steam overlay browser. Unverified against a live Steam client.
1116
+ * @param url - absolute URL to open
1117
+ */
766
1118
  export function activateToWebPage(url: string): void
1119
+ /**
1120
+ * Opens the Steam store page of an app in the overlay.
1121
+ * @param appId - AppID of the app to show
1122
+ * @param flag - whether to add the app to the cart, and whether to show the cart
1123
+ */
767
1124
  export function activateToStore(appId: number, flag: StoreFlag): void
768
1125
  }
769
1126
  export declare namespace remotePlay {
@@ -802,6 +1159,10 @@ export declare namespace remotePlay {
802
1159
  export declare namespace screenshots {
803
1160
  /** Turns the Steam screenshot hotkey into a `ScreenshotRequested` callback, so the game takes the screenshot itself. */
804
1161
  export function hookScreenshots(hook: boolean): void
1162
+ /**
1163
+ * Checks whether the screenshot hotkey is currently hooked by the game (see `hookScreenshots`).
1164
+ * @returns `true` when hooked, otherwise `false`
1165
+ */
805
1166
  export function isScreenshotsHooked(): boolean
806
1167
  /** Triggers a screenshot, the same as the player pressing the screenshot hotkey. */
807
1168
  export function triggerScreenshot(): void
@@ -812,9 +1173,29 @@ export declare namespace screenshots {
812
1173
  export function addScreenshotToLibrary(filename: string, thumbnailFilename: string | undefined | null, width: number, height: number): number
813
1174
  }
814
1175
  export declare namespace stats {
1176
+ /**
1177
+ * Reads an integer stat of the local user from the locally loaded stats. Unverified against a live Steam client: the stats must be loaded first.
1178
+ * @param name - stat name as defined in the Steamworks site
1179
+ * @returns the stat value, or `null` when the stat is missing or not loaded
1180
+ */
815
1181
  export function getInt(name: string): number | null
1182
+ /**
1183
+ * Sets an integer stat of the local user. The value is not sent to Steam until `store()` is called.
1184
+ * @param name - stat name as defined in the Steamworks site
1185
+ * @param value - 32-bit signed integer
1186
+ * @returns `true` when Steam accepted the change, otherwise `false`
1187
+ */
816
1188
  export function setInt(name: string, value: number): boolean
1189
+ /**
1190
+ * Sends the pending stat and achievement changes of the local user to Steam. The request is asynchronous, so `true` only means Steam accepted it.
1191
+ * @returns `true` when Steam accepted the request, otherwise `false`
1192
+ */
817
1193
  export function store(): boolean
1194
+ /**
1195
+ * Resets all stats of the local user. This cannot be undone from this binding.
1196
+ * @param achievementsToo - `true` also clears the user's achievements
1197
+ * @returns `true` when Steam accepted the reset, otherwise `false`
1198
+ */
818
1199
  export function resetAll(achievementsToo: boolean): boolean
819
1200
  /** @returns the float stat value, or `null` when the stat is not defined */
820
1201
  export function getFloat(name: string): number | null
@@ -851,8 +1232,20 @@ export declare namespace timeline {
851
1232
  export function addEvent(icon: string, title: string, description: string, priority: number, startOffsetSeconds: number, durationSeconds: number, clipPriority: TimelineEventClipPriority): void
852
1233
  }
853
1234
  export declare namespace utils {
1235
+ /**
1236
+ * Returns the AppID of the running game.
1237
+ * @returns the AppID
1238
+ */
854
1239
  export function getAppId(): number
1240
+ /**
1241
+ * Returns the current time on the Steam servers.
1242
+ * @returns seconds since 1970-01-01 UTC
1243
+ */
855
1244
  export function getServerRealTime(): number
1245
+ /**
1246
+ * Checks whether Steam is running on a Steam Deck.
1247
+ * @returns `true` on a Steam Deck, otherwise `false`
1248
+ */
856
1249
  export function isSteamRunningOnSteamDeck(): boolean
857
1250
  export const enum GamepadTextInputMode {
858
1251
  Normal = 0,
@@ -881,7 +1274,9 @@ export declare namespace utils {
881
1274
  }
882
1275
  export declare namespace workshop {
883
1276
  export interface UgcResult {
1277
+ /** The Workshop item id the update or creation applies to. */
884
1278
  itemId: bigint
1279
+ /** True when Steam reports that the account still has to accept the Workshop legal agreement. */
885
1280
  needsToAcceptAgreement: boolean
886
1281
  }
887
1282
  export const enum UgcItemVisibility {
@@ -928,17 +1323,25 @@ export declare namespace workshop {
928
1323
  add?: Array<WorkshopContentDescriptor>
929
1324
  }
930
1325
  export interface UgcUpdate {
1326
+ /** New title of the item, in the language given by `language`. */
931
1327
  title?: string
1328
+ /** New description of the item, in the language given by `language`. */
932
1329
  description?: string
1330
+ /** Note shown in the item's change history for this update. */
933
1331
  changeNote?: string
1332
+ /** Absolute path of an image file that replaces the main preview. */
934
1333
  previewPath?: string
935
1334
  /** Image files appended to the item's additional previews (screenshots). */
936
1335
  additionalPreviewPaths?: Array<string>
937
1336
  /** 0-based indexes of additional previews to remove, as listed in `additionalPreviews`. */
938
1337
  removeAdditionalPreviewIndexes?: Array<number>
1338
+ /** Absolute path of a folder whose files become the item's content. */
939
1339
  contentPath?: string
1340
+ /** Tags for the item. When given, they replace the item's tag list. */
940
1341
  tags?: Array<string>
1342
+ /** Who can see the item: Public, FriendsOnly, Private or Unlisted. */
941
1343
  visibility?: UgcItemVisibility
1344
+ /** Steam language code (for example `english` or `schinese`) that `title` and `description` are written in. Left out, the README says it is treated as `english`. */
942
1345
  language?: string
943
1346
  /**
944
1347
  * Oldest game version (Steam branch, e.g. `open_beta`) the item is valid for.
@@ -987,6 +1390,24 @@ export declare namespace workshop {
987
1390
  * @param fileType - the Workshop file type; omitted keeps `Community`
988
1391
  */
989
1392
  export function createItem(appId?: number | undefined | null, fileType?: WorkshopFileType | undefined | null): Promise<UgcResult>
1393
+ /**
1394
+ * Updates an existing Workshop item on Steam. Every field of `updateDetails` is optional: a field
1395
+ * that is left out keeps the item's current value, so a call with only `previewPath` changes only
1396
+ * the preview. The fields are checked first, and a bad YouTube video id or a string with a NUL byte
1397
+ * rejects with the entry named, before anything is sent.
1398
+ *
1399
+ * Once submitted, the change is applied to the item on Steam and cannot be cancelled. A running,
1400
+ * logged-in Steam client is needed.
1401
+ *
1402
+ * Resolves with the item id and `needsToAcceptAgreement`. Rejects when the update cannot be started,
1403
+ * when Steam returns an error, or when no completion arrives; in that last case the outcome is
1404
+ * unknown, so read the item before retrying.
1405
+ *
1406
+ * @param itemId - the Workshop item to update (its published file id)
1407
+ * @param updateDetails - the fields to change; see `UgcUpdate`
1408
+ * @param appId - defaults to the app id the client was initialized with
1409
+ * @returns the item id and whether the account still has to accept the Workshop legal agreement
1410
+ */
990
1411
  export function updateItem(itemId: bigint, updateDetails: UgcUpdate, appId?: number | undefined | null): Promise<UgcResult>
991
1412
  /**
992
1413
  * Replace only the main preview image of a Workshop item.
@@ -1012,6 +1433,29 @@ export declare namespace workshop {
1012
1433
  * @param changeNote - optional change note shown in the item's change history
1013
1434
  */
1014
1435
  export function updateItemContent(itemId: bigint, contentPath: string, appId?: number | undefined | null, changeNote?: string | undefined | null): Promise<UgcResult>
1436
+ /**
1437
+ * Updates an existing Workshop item on Steam, like `updateItem`, but reports the outcome through
1438
+ * callbacks instead of a promise. The call returns at once; the work continues in the background.
1439
+ * Its fields are checked the same way as in `updateItem`.
1440
+ *
1441
+ * `successCallback` receives the `UgcResult`. `errorCallback` receives every failure, both the
1442
+ * check that runs before anything is sent and the errors Steam reports later. Nothing is thrown.
1443
+ *
1444
+ * `progressCallback` receives an `UpdateProgress` right away and then every
1445
+ * `progressCallbackIntervalMs`, until the status is `Invalid` or `CommittingChanges`. The units of
1446
+ * `progress` and `total` are unverified against a live Steam client.
1447
+ *
1448
+ * Once submitted, the change is applied to the item on Steam and cannot be cancelled. A running,
1449
+ * logged-in Steam client is needed.
1450
+ *
1451
+ * @param itemId - the Workshop item to update (its published file id)
1452
+ * @param updateDetails - the fields to change; see `UgcUpdate`
1453
+ * @param appId - defaults to the app id the client was initialized with
1454
+ * @param successCallback - called with the `UgcResult` when Steam completes the update
1455
+ * @param errorCallback - called with an `Error` when the update is refused or fails
1456
+ * @param progressCallback - optional; called with the `UpdateProgress` while the update runs
1457
+ * @param progressCallbackIntervalMs - milliseconds between progress reports; defaults to 1000
1458
+ */
1015
1459
  export function updateItemWithCallback(itemId: bigint, updateDetails: UgcUpdate, appId: number | undefined | null, successCallback: (data: UgcResult) => void, errorCallback: (err: any) => void, progressCallback?: (data: UpdateProgress) => void, progressCallbackIntervalMs?: number | undefined | null): void
1016
1460
  /**
1017
1461
  * Subscribe to a workshop item. It will be downloaded and installed as soon as possible.
@@ -1065,6 +1509,19 @@ export declare namespace workshop {
1065
1509
  * @returns an array of subscribed workshop item ids
1066
1510
  */
1067
1511
  export function getSubscribedItems(): Array<bigint>
1512
+ /**
1513
+ * Permanently deletes a Workshop item on Steam. The item is removed from the Workshop; the deletion
1514
+ * cannot be cancelled once it has been sent. A running, logged-in Steam client is needed.
1515
+ *
1516
+ * The code does not check ownership first; Steam decides whether the account may delete the item.
1517
+ *
1518
+ * Resolves with no value once Steam confirms the deletion. Rejects when Steam returns an error, or
1519
+ * when no completion arrives; in that last case the outcome is unknown, so read the item before
1520
+ * retrying.
1521
+ *
1522
+ * @param itemId - the Workshop item to delete (its published file id)
1523
+ * @returns resolves with no value once Steam confirms the deletion
1524
+ */
1068
1525
  export function deleteItem(itemId: bigint): Promise<void>
1069
1526
  /**
1070
1527
  * Marks `childId` as a required item of `parentId`. Resolves with the Steam result code, where `1` is
@@ -1271,11 +1728,17 @@ export declare namespace workshop {
1271
1728
  maxBranch?: string
1272
1729
  }
1273
1730
  export interface WorkshopItem {
1731
+ /** The Workshop item's published file id. */
1274
1732
  publishedFileId: bigint
1733
+ /** The app id that created the item. */
1275
1734
  creatorAppId?: number
1735
+ /** The app id that uses the item. */
1276
1736
  consumerAppId?: number
1737
+ /** The item's title. */
1277
1738
  title: string
1739
+ /** The item's description. */
1278
1740
  description: string
1741
+ /** The Steam account that owns the item. */
1279
1742
  owner: PlayerSteamId
1280
1743
  /** Time created in unix epoch seconds format */
1281
1744
  timeCreated: number
@@ -1283,17 +1746,28 @@ export declare namespace workshop {
1283
1746
  timeUpdated: number
1284
1747
  /** Time when the user added the published item to their list (not always applicable), provided in Unix epoch format (time since Jan 1st, 1970). */
1285
1748
  timeAddedToUserList: number
1749
+ /** Who can see the item: Public, FriendsOnly, Private or Unlisted. */
1286
1750
  visibility: UgcItemVisibility
1751
+ /** Whether Steam has banned the item. */
1287
1752
  banned: boolean
1753
+ /** Whether Steam has accepted the item for use. */
1288
1754
  acceptedForUse: boolean
1755
+ /** The item's tags. */
1289
1756
  tags: Array<string>
1757
+ /** Whether Steam cut the tag list short. */
1290
1758
  tagsTruncated: boolean
1291
1759
  url: string
1760
+ /** Number of upvotes the item has. */
1292
1761
  numUpvotes: number
1762
+ /** Number of downvotes the item has. */
1293
1763
  numDownvotes: number
1764
+ /** Number of required items the item has. */
1294
1765
  numChildren: number
1766
+ /** URL of the item's main preview image, when Steam returns one. */
1295
1767
  previewUrl?: string
1768
+ /** Counts for the item, such as subscriptions and favorites. */
1296
1769
  statistics: WorkshopItemStatistic
1770
+ /** Ids of the item's required items. Present only with `returnChildren`. */
1297
1771
  children?: Array<bigint>
1298
1772
  /** Additional preview media (images, videos, etc.) for the workshop item */
1299
1773
  additionalPreviews?: Array<AdditionalPreview>
@@ -1301,36 +1775,120 @@ export declare namespace workshop {
1301
1775
  supportedGameVersions: Array<SupportedGameVersion>
1302
1776
  }
1303
1777
  export interface WorkshopPaginatedResult {
1778
+ /** The entries of this page; `null` where Steam returned no record. */
1304
1779
  items: Array<WorkshopItem | undefined | null>
1780
+ /** The number of entries Steam returned on this page. */
1305
1781
  returnedResults: number
1782
+ /** The number of matches across all pages. */
1306
1783
  totalResults: number
1784
+ /** Whether the answer came from Steam's cache. */
1307
1785
  wasCached: boolean
1308
1786
  }
1309
1787
  export interface WorkshopItemsResult {
1788
+ /** One entry per record Steam returned; `null` where Steam returned no record. */
1310
1789
  items: Array<WorkshopItem | undefined | null>
1790
+ /** Whether the answer came from Steam's cache. */
1311
1791
  wasCached: boolean
1312
1792
  }
1313
1793
  export interface WorkshopItemQueryConfig {
1794
+ /** Oldest cached answer Steam may return, in seconds. */
1314
1795
  cachedResponseMaxAge?: number
1796
+ /** Return the item's developer metadata. */
1315
1797
  includeMetadata?: boolean
1798
+ /** Return the long description of the item. */
1316
1799
  includeLongDescription?: boolean
1800
+ /** Fill `additionalPreviews` on each returned item. */
1317
1801
  includeAdditionalPreviews?: boolean
1802
+ /** Return only the item ids, not the item details. */
1318
1803
  onlyIds?: boolean
1804
+ /** Return only the total number of matches. */
1319
1805
  onlyTotal?: boolean
1806
+ /** Steam language code for the returned title and description, such as `schinese`. */
1320
1807
  language?: string
1808
+ /** Match items that have any of the required tags, instead of all of them. */
1321
1809
  matchAnyTag?: boolean
1810
+ /** Tags an item must have. */
1322
1811
  requiredTags?: Array<string>
1812
+ /** Tags an item must not have. */
1323
1813
  excludedTags?: Array<string>
1814
+ /** Full-text search string. */
1324
1815
  searchText?: string
1816
+ /** Number of days considered when ranking items by trend. */
1325
1817
  rankedByTrendDays?: number
1818
+ /** Fill `children` with the ids of each item's required items. */
1326
1819
  returnChildren?: boolean
1327
1820
  }
1328
1821
  export interface AppIDs {
1329
1822
  creator?: number
1330
1823
  consumer?: number
1331
1824
  }
1825
+ /**
1826
+ * Gets one Workshop item by its published file id. The query runs through the Steam client, so a
1827
+ * running Steam client is needed. Whether a logged-in account is also required is unverified
1828
+ * against a live Steam client.
1829
+ *
1830
+ * Resolves with the item, or with `null` when the query returns no record for the id. The optional
1831
+ * `children` field is filled only with `returnChildren`, and `additionalPreviews` only with
1832
+ * `includeAdditionalPreviews`. Rejects when the query cannot be created or Steam returns an error.
1833
+ *
1834
+ * @param item - the Workshop item to read (its published file id)
1835
+ * @param queryConfig - optional query options; see `WorkshopItemQueryConfig`. Omitted, no options are set.
1836
+ * @returns the item, or `null` when the query returned no record for the id
1837
+ */
1332
1838
  export function getItem(item: bigint, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopItem | null>
1839
+ /**
1840
+ * Gets several Workshop items in one query. The query runs through the Steam client, so a running
1841
+ * Steam client is needed. Whether a logged-in account is also required is unverified against a
1842
+ * live Steam client.
1843
+ *
1844
+ * Resolves with `items` and `wasCached`. `items` has one entry per record Steam returned, and an
1845
+ * entry is `null` where Steam returned no record. The entries are not matched back to the input
1846
+ * ids, so use each item's `publishedFileId` to match them. Rejects when the query cannot be created
1847
+ * or Steam returns an error.
1848
+ *
1849
+ * @param items - the published file ids to read
1850
+ * @param queryConfig - optional query options; see `WorkshopItemQueryConfig`. Omitted, no options are set.
1851
+ * @returns `items`, and `wasCached` for whether the answer came from Steam's cache
1852
+ */
1333
1853
  export function getItems(items: Array<bigint>, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopItemsResult>
1854
+ /**
1855
+ * Queries one page of all Workshop items that match the given type, ranking and app ids. The query
1856
+ * runs through the Steam client, so a running Steam client is needed. Whether a logged-in account
1857
+ * is also required is unverified against a live Steam client.
1858
+ *
1859
+ * Resolves with `items` for this page, `returnedResults` (the number of entries on this page),
1860
+ * `totalResults` (the matches across all pages) and `wasCached`. Entries are `null` where Steam
1861
+ * returned no record. To read everything, keep requesting pages while the collected count is below
1862
+ * `totalResults` and the last page returned items. The page size is set by Steam; the README and
1863
+ * the skill give 50 per page, unverified against a live Steam client. Rejects when the query cannot
1864
+ * be created or Steam returns an error.
1865
+ *
1866
+ * @param page - the page to read, passed to Steam as given; the first page index is unverified against a live Steam client
1867
+ * @param queryType - the ranking and filter of the query, a `UGCQueryType` value such as `RankedByPublicationDate`
1868
+ * @param itemType - the kind of item to list, a `UGCType` value such as `Items`
1869
+ * @param creatorAppId - the app id that created the items
1870
+ * @param consumerAppId - the app id that uses the items; Steam filters by both app ids
1871
+ * @param queryConfig - optional query options; see `WorkshopItemQueryConfig`. Omitted, no options are set.
1872
+ * @returns the page of items with `returnedResults`, `totalResults` and `wasCached`
1873
+ */
1334
1874
  export function getAllItems(page: number, queryType: UGCQueryType, itemType: UGCType, creatorAppId: number, consumerAppId: number, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopPaginatedResult>
1875
+ /**
1876
+ * Queries one page of the Workshop items related to one user, such as their published, subscribed or
1877
+ * favorited items. The query runs through the Steam client, so a running Steam client is needed.
1878
+ * Whether a logged-in account is also required is unverified against a live Steam client.
1879
+ *
1880
+ * Resolves with the same fields as `getAllItems`: `items` for this page, `returnedResults`,
1881
+ * `totalResults` and `wasCached`. Entries are `null` where Steam returned no record. Paging works as
1882
+ * described for `getAllItems`. Rejects when the query cannot be created or Steam returns an error.
1883
+ *
1884
+ * @param page - the page to read, passed to Steam as given; the first page index is unverified against a live Steam client
1885
+ * @param accountId - the 32-bit account id of the user (the lower 32 bits of their SteamID64)
1886
+ * @param listType - which list to read, a `UserListType` value such as `Published` or `Subscribed`
1887
+ * @param itemType - the kind of item to list, a `UGCType` value such as `Items`
1888
+ * @param sortOrder - the order of the list, a `UserListOrder` value such as `LastUpdatedDesc`
1889
+ * @param appIds - the `creator` and `consumer` app ids; a missing one is sent as `0`, and what Steam does with `0` is unverified
1890
+ * @param queryConfig - optional query options; see `WorkshopItemQueryConfig`. Omitted, no options are set.
1891
+ * @returns the page of items with `returnedResults`, `totalResults` and `wasCached`
1892
+ */
1335
1893
  export function getUserItems(page: number, accountId: number, listType: UserListType, itemType: UGCType, sortOrder: UserListOrder, appIds: AppIDs, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopPaginatedResult>
1336
1894
  }
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "bugs": {
15
15
  "url": "https://github.com/HagiCode-org/steamworks.js/issues"
16
16
  },
17
- "version": "0.2.0",
17
+ "version": "0.2.1",
18
18
  "main": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "napi": {