steamworks.js-timmy 0.1.1 → 0.1.2
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/client.d.ts +217 -202
- package/dist/linux64/index.d.ts +5 -0
- package/dist/linux64/{false → index.js} +52 -52
- package/dist/osx/index.d.ts +5 -0
- package/dist/osx/{false → index.js} +52 -52
- package/dist/win64/index.d.ts +5 -0
- package/dist/win64/{false → index.js} +52 -52
- package/dist/win64/steamworksjs.win32-x64-msvc.node +0 -0
- package/index.d.ts +5 -514
- package/package.json +1 -1
package/client.d.ts
CHANGED
|
@@ -1,51 +1,62 @@
|
|
|
1
1
|
export declare function init(appId?: number | undefined | null): void
|
|
2
|
-
|
|
3
|
-
export declare function runCallbacks(): void
|
|
2
|
+
|
|
4
3
|
export interface PlayerSteamId {
|
|
5
4
|
steamId64: bigint
|
|
6
5
|
steamId32: string
|
|
7
6
|
accountId: number
|
|
8
7
|
}
|
|
8
|
+
|
|
9
|
+
export declare function restartAppIfNecessary(appId: number): boolean
|
|
10
|
+
|
|
11
|
+
export declare function runCallbacks(): void
|
|
12
|
+
|
|
9
13
|
export declare namespace achievement {
|
|
10
14
|
export function activate(achievement: string): boolean
|
|
11
|
-
export function isActivated(achievement: string): boolean
|
|
12
15
|
export function clear(achievement: string): boolean
|
|
16
|
+
export function isActivated(achievement: string): boolean
|
|
13
17
|
export function names(): Array<string>
|
|
14
18
|
}
|
|
19
|
+
|
|
15
20
|
export declare namespace apps {
|
|
16
|
-
export function isSubscribedApp(appId: number): boolean
|
|
17
|
-
export function isAppInstalled(appId: number): boolean
|
|
18
|
-
export function isDlcInstalled(appId: number): boolean
|
|
19
|
-
export function isSubscribedFromFreeWeekend(): boolean
|
|
20
|
-
export function isVacBanned(): boolean
|
|
21
|
-
export function isCybercafe(): boolean
|
|
22
|
-
export function isLowViolence(): boolean
|
|
23
|
-
export function isSubscribed(): boolean
|
|
24
21
|
export function appBuildId(): number
|
|
25
22
|
export function appInstallDir(appId: number): string
|
|
26
23
|
export function appOwner(): PlayerSteamId
|
|
27
24
|
export function availableGameLanguages(): Array<string>
|
|
28
|
-
export function currentGameLanguage(): string
|
|
29
25
|
export function currentBetaName(): string | null
|
|
26
|
+
export function currentGameLanguage(): string
|
|
27
|
+
export function isAppInstalled(appId: number): boolean
|
|
28
|
+
export function isCybercafe(): boolean
|
|
29
|
+
export function isDlcInstalled(appId: number): boolean
|
|
30
|
+
export function isLowViolence(): boolean
|
|
31
|
+
export function isSubscribed(): boolean
|
|
32
|
+
export function isSubscribedApp(appId: number): boolean
|
|
33
|
+
export function isSubscribedFromFreeWeekend(): boolean
|
|
34
|
+
export function isVacBanned(): boolean
|
|
30
35
|
}
|
|
36
|
+
|
|
31
37
|
export declare namespace auth {
|
|
38
|
+
export class Ticket {
|
|
39
|
+
cancel(): void
|
|
40
|
+
getBytes(): Buffer
|
|
41
|
+
}
|
|
42
|
+
export function getAuthTicketForWebApi(identity: string, timeoutSeconds?: number | undefined | null): Promise<Ticket>
|
|
32
43
|
/**
|
|
33
|
-
* @param
|
|
44
|
+
* @param ip - The string of IPv4 or IPv6 address. Use as NetworkIdentity of the remote system that will authenticate the ticket.
|
|
34
45
|
* @param timeoutSeconds - The number of seconds to wait for the ticket to be validated. Default value is 10 seconds.
|
|
35
46
|
*/
|
|
36
|
-
export function
|
|
47
|
+
export function getSessionTicketWithIp(ip: string, timeoutSeconds?: number | undefined | null): Promise<Ticket>
|
|
37
48
|
/**
|
|
38
|
-
* @param
|
|
49
|
+
* @param steamId64 - The user steam id or game server steam id. Use as NetworkIdentity of the remote system that will authenticate the ticket. If it is peer-to-peer then the user steam ID. If it is a game server, then the game server steam ID may be used if it was obtained from a trusted 3rd party
|
|
39
50
|
* @param timeoutSeconds - The number of seconds to wait for the ticket to be validated. Default value is 10 seconds.
|
|
40
51
|
*/
|
|
41
|
-
export function
|
|
42
|
-
export function getAuthTicketForWebApi(identity: string, timeoutSeconds?: number | undefined | null): Promise<Ticket>
|
|
43
|
-
export class Ticket {
|
|
44
|
-
cancel(): void
|
|
45
|
-
getBytes(): Buffer
|
|
46
|
-
}
|
|
52
|
+
export function getSessionTicketWithSteamId(steamId64: bigint, timeoutSeconds?: number | undefined | null): Promise<Ticket>
|
|
47
53
|
}
|
|
54
|
+
|
|
48
55
|
export declare namespace callback {
|
|
56
|
+
export class Handle {
|
|
57
|
+
disconnect(): void
|
|
58
|
+
}
|
|
59
|
+
export function register<C extends keyof import('./callbacks').CallbackReturns>(steamCallback: C, handler: (value: import('./callbacks').CallbackReturns[C]) => void): Handle
|
|
49
60
|
export const enum SteamCallback {
|
|
50
61
|
PersonaStateChange = 0,
|
|
51
62
|
SteamServersConnected = 1,
|
|
@@ -58,26 +69,44 @@ export declare namespace callback {
|
|
|
58
69
|
GameLobbyJoinRequested = 8,
|
|
59
70
|
MicroTxnAuthorizationResponse = 9
|
|
60
71
|
}
|
|
61
|
-
export function register<C extends keyof import('./callbacks').CallbackReturns>(steamCallback: C, handler: (value: import('./callbacks').CallbackReturns[C]) => void): Handle
|
|
62
|
-
export class Handle {
|
|
63
|
-
disconnect(): void
|
|
64
|
-
}
|
|
65
72
|
}
|
|
73
|
+
|
|
66
74
|
export declare namespace cloud {
|
|
67
|
-
export function isEnabledForAccount(): boolean
|
|
68
|
-
export function isEnabledForApp(): boolean
|
|
69
|
-
export function setEnabledForApp(enabled: boolean): void
|
|
70
|
-
export function readFile(name: string): string
|
|
71
|
-
export function writeFile(name: string, content: string): boolean
|
|
72
75
|
export function deleteFile(name: string): boolean
|
|
73
76
|
export function fileExists(name: string): boolean
|
|
74
|
-
export
|
|
75
|
-
export class FileInfo {
|
|
77
|
+
export interface FileInfo {
|
|
76
78
|
name: string
|
|
77
79
|
size: bigint
|
|
78
80
|
}
|
|
81
|
+
export function isEnabledForAccount(): boolean
|
|
82
|
+
export function isEnabledForApp(): boolean
|
|
83
|
+
export function listFiles(): Array<FileInfo>
|
|
84
|
+
export function readFile(name: string): string
|
|
85
|
+
export function setEnabledForApp(enabled: boolean): void
|
|
86
|
+
export function writeFile(name: string, content: string): boolean
|
|
79
87
|
}
|
|
88
|
+
|
|
80
89
|
export declare namespace input {
|
|
90
|
+
export class Controller {
|
|
91
|
+
activateActionSet(actionSetHandle: bigint): void
|
|
92
|
+
isDigitalActionPressed(actionHandle: bigint): boolean
|
|
93
|
+
getAnalogActionVector(actionHandle: bigint): AnalogActionVector
|
|
94
|
+
getType(): InputType
|
|
95
|
+
getHandle(): bigint
|
|
96
|
+
/** Gets controller latest data, best use for low latency if you call this all the time */
|
|
97
|
+
runFrame(): void
|
|
98
|
+
/** Gets controller's motion sensors */
|
|
99
|
+
getMotionData(): MotionData | null
|
|
100
|
+
}
|
|
101
|
+
export interface AnalogActionVector {
|
|
102
|
+
x: number
|
|
103
|
+
y: number
|
|
104
|
+
}
|
|
105
|
+
export function getActionSet(actionSetName: string): bigint
|
|
106
|
+
export function getAnalogAction(actionName: string): bigint
|
|
107
|
+
export function getControllers(): Array<Controller>
|
|
108
|
+
export function getDigitalAction(actionName: string): bigint
|
|
109
|
+
export function init(): void
|
|
81
110
|
export const enum InputType {
|
|
82
111
|
Unknown = 'Unknown',
|
|
83
112
|
SteamController = 'SteamController',
|
|
@@ -117,46 +146,19 @@ export declare namespace input {
|
|
|
117
146
|
/** Rotational Velocity Z axis */
|
|
118
147
|
rotVelZ: number
|
|
119
148
|
}
|
|
120
|
-
export interface AnalogActionVector {
|
|
121
|
-
x: number
|
|
122
|
-
y: number
|
|
123
|
-
}
|
|
124
|
-
export function init(): void
|
|
125
|
-
export function getControllers(): Array<Controller>
|
|
126
|
-
export function getActionSet(actionSetName: string): bigint
|
|
127
|
-
export function getDigitalAction(actionName: string): bigint
|
|
128
|
-
export function getAnalogAction(actionName: string): bigint
|
|
129
149
|
export function shutdown(): void
|
|
130
|
-
export class Controller {
|
|
131
|
-
activateActionSet(actionSetHandle: bigint): void
|
|
132
|
-
isDigitalActionPressed(actionHandle: bigint): boolean
|
|
133
|
-
getAnalogActionVector(actionHandle: bigint): AnalogActionVector
|
|
134
|
-
getType(): InputType
|
|
135
|
-
getHandle(): bigint
|
|
136
|
-
/** Gets controller latest data, best use for low latency if you call this all the time */
|
|
137
|
-
runFrame(): void
|
|
138
|
-
/** Gets controller's motion sensors */
|
|
139
|
-
getMotionData(): MotionData | null
|
|
140
|
-
}
|
|
141
150
|
}
|
|
151
|
+
|
|
142
152
|
export declare namespace localplayer {
|
|
143
|
-
export function getSteamId(): PlayerSteamId
|
|
144
|
-
export function getName(): string
|
|
145
|
-
export function getLevel(): number
|
|
146
153
|
/** @returns the 2 digit ISO 3166-1-alpha-2 format country code which client is running in, e.g. "US" or "UK". */
|
|
147
154
|
export function getIpCountry(): string
|
|
155
|
+
export function getLevel(): number
|
|
156
|
+
export function getName(): string
|
|
157
|
+
export function getSteamId(): PlayerSteamId
|
|
148
158
|
export function setRichPresence(key: string, value?: string | undefined | null): void
|
|
149
159
|
}
|
|
160
|
+
|
|
150
161
|
export declare namespace matchmaking {
|
|
151
|
-
export const enum LobbyType {
|
|
152
|
-
Private = 0,
|
|
153
|
-
FriendsOnly = 1,
|
|
154
|
-
Public = 2,
|
|
155
|
-
Invisible = 3
|
|
156
|
-
}
|
|
157
|
-
export function createLobby(lobbyType: LobbyType, maxMembers: number): Promise<Lobby>
|
|
158
|
-
export function joinLobby(lobbyId: bigint): Promise<Lobby>
|
|
159
|
-
export function getLobbies(): Promise<Array<Lobby>>
|
|
160
162
|
export class Lobby {
|
|
161
163
|
join(): Promise<Lobby>
|
|
162
164
|
leave(): void
|
|
@@ -176,17 +178,30 @@ export declare namespace matchmaking {
|
|
|
176
178
|
* @returns true if all data was set successfully
|
|
177
179
|
*/
|
|
178
180
|
mergeFullData(data: Record<string, string>): boolean
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
181
|
+
get id(): bigint
|
|
182
|
+
get idAsU64(): bigint
|
|
183
|
+
}
|
|
184
|
+
export function createLobby(lobbyType: LobbyType, maxMembers: number): Promise<Lobby>
|
|
185
|
+
export function getLobbies(): Promise<Array<Lobby>>
|
|
186
|
+
export function joinLobby(lobbyId: bigint): Promise<Lobby>
|
|
187
|
+
export const enum LobbyType {
|
|
188
|
+
Private = 0,
|
|
189
|
+
FriendsOnly = 1,
|
|
190
|
+
Public = 2,
|
|
191
|
+
Invisible = 3
|
|
182
192
|
}
|
|
183
193
|
}
|
|
194
|
+
|
|
184
195
|
export declare namespace networking {
|
|
196
|
+
export function acceptP2PSession(steamId64: bigint): void
|
|
197
|
+
export function isP2PPacketAvailable(): number
|
|
185
198
|
export interface P2PPacket {
|
|
186
199
|
data: Buffer
|
|
187
200
|
size: number
|
|
188
201
|
steamId: PlayerSteamId
|
|
189
202
|
}
|
|
203
|
+
export function readP2PPacket(size: number): P2PPacket
|
|
204
|
+
export function sendP2PPacket(steamId64: bigint, sendType: SendType, data: Buffer): boolean
|
|
190
205
|
/** The method used to send a packet */
|
|
191
206
|
export const enum SendType {
|
|
192
207
|
/**
|
|
@@ -212,12 +227,14 @@ export declare namespace networking {
|
|
|
212
227
|
*/
|
|
213
228
|
ReliableWithBuffering = 3
|
|
214
229
|
}
|
|
215
|
-
export function sendP2PPacket(steamId64: bigint, sendType: SendType, data: Buffer): boolean
|
|
216
|
-
export function isP2PPacketAvailable(): number
|
|
217
|
-
export function readP2PPacket(size: number): P2PPacket
|
|
218
|
-
export function acceptP2PSession(steamId64: bigint): void
|
|
219
230
|
}
|
|
231
|
+
|
|
220
232
|
export declare namespace overlay {
|
|
233
|
+
export function activateDialog(dialog: Dialog): void
|
|
234
|
+
export function activateDialogToUser(dialog: Dialog, steamId64: bigint): void
|
|
235
|
+
export function activateInviteDialog(lobbyId: bigint): void
|
|
236
|
+
export function activateToStore(appId: number, flag: StoreFlag): void
|
|
237
|
+
export function activateToWebPage(url: string): void
|
|
221
238
|
export const enum Dialog {
|
|
222
239
|
Friends = 0,
|
|
223
240
|
Community = 1,
|
|
@@ -232,108 +249,76 @@ export declare namespace overlay {
|
|
|
232
249
|
AddToCart = 1,
|
|
233
250
|
AddToCartAndShow = 2
|
|
234
251
|
}
|
|
235
|
-
export function activateDialog(dialog: Dialog): void
|
|
236
|
-
export function activateDialogToUser(dialog: Dialog, steamId64: bigint): void
|
|
237
|
-
export function activateInviteDialog(lobbyId: bigint): void
|
|
238
|
-
export function activateToWebPage(url: string): void
|
|
239
|
-
export function activateToStore(appId: number, flag: StoreFlag): void
|
|
240
252
|
}
|
|
253
|
+
|
|
241
254
|
export declare namespace stats {
|
|
242
255
|
export function getInt(name: string): number | null
|
|
256
|
+
export function resetAll(achievementsToo: boolean): boolean
|
|
243
257
|
export function setInt(name: string, value: number): boolean
|
|
244
258
|
export function store(): boolean
|
|
245
|
-
export function resetAll(achievementsToo: boolean): boolean
|
|
246
259
|
}
|
|
260
|
+
|
|
247
261
|
export declare namespace utils {
|
|
248
|
-
export function getAppId(): number
|
|
249
|
-
export function getServerRealTime(): number
|
|
250
|
-
export function isSteamRunningOnSteamDeck(): boolean
|
|
251
|
-
export const enum GamepadTextInputMode {
|
|
252
|
-
Normal = 0,
|
|
253
|
-
Password = 1
|
|
254
|
-
}
|
|
255
|
-
export const enum GamepadTextInputLineMode {
|
|
256
|
-
SingleLine = 0,
|
|
257
|
-
MultipleLines = 1
|
|
258
|
-
}
|
|
259
|
-
/** @returns the entered text, or null if cancelled or could not show the input */
|
|
260
|
-
export function showGamepadTextInput(inputMode: GamepadTextInputMode, inputLineMode: GamepadTextInputLineMode, description: string, maxCharacters: number, existingText?: string | undefined | null): Promise<string | null>
|
|
261
262
|
export const enum FloatingGamepadTextInputMode {
|
|
262
263
|
SingleLine = 0,
|
|
263
264
|
MultipleLines = 1,
|
|
264
265
|
Email = 2,
|
|
265
266
|
Numeric = 3
|
|
266
267
|
}
|
|
268
|
+
export const enum GamepadTextInputLineMode {
|
|
269
|
+
SingleLine = 0,
|
|
270
|
+
MultipleLines = 1
|
|
271
|
+
}
|
|
272
|
+
export const enum GamepadTextInputMode {
|
|
273
|
+
Normal = 0,
|
|
274
|
+
Password = 1
|
|
275
|
+
}
|
|
276
|
+
export function getAppId(): number
|
|
277
|
+
export function getServerRealTime(): number
|
|
278
|
+
export function isSteamRunningOnSteamDeck(): boolean
|
|
267
279
|
/** @returns true if the floating keyboard was shown, otherwise, false */
|
|
268
280
|
export function showFloatingGamepadTextInput(keyboardMode: FloatingGamepadTextInputMode, x: number, y: number, width: number, height: number): Promise<boolean>
|
|
281
|
+
/** @returns the entered text, or null if cancelled or could not show the input */
|
|
282
|
+
export function showGamepadTextInput(inputMode: GamepadTextInputMode, inputLineMode: GamepadTextInputLineMode, description: string, maxCharacters: number, existingText?: string | undefined | null): Promise<string | null>
|
|
269
283
|
}
|
|
284
|
+
|
|
270
285
|
export declare namespace workshop {
|
|
271
|
-
export interface
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
275
|
-
export const enum UgcItemVisibility {
|
|
276
|
-
Public = 0,
|
|
277
|
-
FriendsOnly = 1,
|
|
278
|
-
Private = 2,
|
|
279
|
-
Unlisted = 3
|
|
280
|
-
}
|
|
281
|
-
export interface UgcUpdate {
|
|
282
|
-
title?: string
|
|
283
|
-
description?: string
|
|
284
|
-
changeNote?: string
|
|
285
|
-
previewPath?: string
|
|
286
|
-
contentPath?: string
|
|
287
|
-
tags?: Array<string>
|
|
288
|
-
visibility?: UgcItemVisibility
|
|
289
|
-
}
|
|
290
|
-
export interface InstallInfo {
|
|
291
|
-
folder: string
|
|
292
|
-
sizeOnDisk: bigint
|
|
293
|
-
timestamp: number
|
|
294
|
-
}
|
|
295
|
-
export interface DownloadInfo {
|
|
296
|
-
current: bigint
|
|
297
|
-
total: bigint
|
|
298
|
-
}
|
|
299
|
-
export const enum UpdateStatus {
|
|
300
|
-
Invalid = 0,
|
|
301
|
-
PreparingConfig = 1,
|
|
302
|
-
PreparingContent = 2,
|
|
303
|
-
UploadingContent = 3,
|
|
304
|
-
UploadingPreviewFile = 4,
|
|
305
|
-
CommittingChanges = 5
|
|
306
|
-
}
|
|
307
|
-
export interface UpdateProgress {
|
|
308
|
-
status: UpdateStatus
|
|
309
|
-
progress: bigint
|
|
310
|
-
total: bigint
|
|
286
|
+
export interface AppIDs {
|
|
287
|
+
creator?: number
|
|
288
|
+
consumer?: number
|
|
311
289
|
}
|
|
312
290
|
export function createItem(appId?: number | undefined | null): Promise<UgcResult>
|
|
313
|
-
export function
|
|
314
|
-
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
|
|
291
|
+
export function deleteItem(itemId: bigint): Promise<void>
|
|
315
292
|
/**
|
|
316
|
-
*
|
|
293
|
+
* Download or update a workshop item.
|
|
317
294
|
*
|
|
318
|
-
*
|
|
319
|
-
|
|
320
|
-
export function subscribe(itemId: bigint): Promise<void>
|
|
321
|
-
/**
|
|
322
|
-
* Unsubscribe from a workshop item. This will result in the item being removed after the game quits.
|
|
295
|
+
* @param highPriority - If high priority is true, start the download in high priority mode, pausing any existing in-progress Steam downloads and immediately begin downloading this workshop item.
|
|
296
|
+
* @returns true or false
|
|
323
297
|
*
|
|
324
|
-
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#
|
|
298
|
+
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#DownloadItem}
|
|
325
299
|
*/
|
|
326
|
-
export function
|
|
300
|
+
export function download(itemId: bigint, highPriority: boolean): boolean
|
|
327
301
|
/**
|
|
328
|
-
*
|
|
302
|
+
* Get info about a pending download of a workshop item.
|
|
329
303
|
*
|
|
330
|
-
* @returns
|
|
331
|
-
* 9 = 1 (The current user is subscribed to this item) + 8 (The item needs an update)
|
|
304
|
+
* @returns an object with the properties {current, total}
|
|
332
305
|
*
|
|
333
|
-
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#
|
|
334
|
-
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#EItemState}
|
|
306
|
+
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#GetItemDownloadInfo}
|
|
335
307
|
*/
|
|
336
|
-
export function
|
|
308
|
+
export function downloadInfo(itemId: bigint): DownloadInfo | null
|
|
309
|
+
export interface DownloadInfo {
|
|
310
|
+
current: bigint
|
|
311
|
+
total: bigint
|
|
312
|
+
}
|
|
313
|
+
export function getAllItems(page: number, queryType: UGCQueryType, itemType: UGCType, creatorAppId: number, consumerAppId: number, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopPaginatedResult>
|
|
314
|
+
export function getItem(item: bigint, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopItem | null>
|
|
315
|
+
export function getItems(items: Array<bigint>, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopItemsResult>
|
|
316
|
+
/**
|
|
317
|
+
* Get all subscribed workshop items.
|
|
318
|
+
* @returns an array of subscribed workshop item ids
|
|
319
|
+
*/
|
|
320
|
+
export function getSubscribedItems(): Array<bigint>
|
|
321
|
+
export function getUserItems(page: number, accountId: number, listType: UserListType, itemType: UGCType, sortOrder: UserListOrder, appIds: AppIDs, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopPaginatedResult>
|
|
337
322
|
/**
|
|
338
323
|
* Gets info about currently installed content on the disc for workshop item.
|
|
339
324
|
*
|
|
@@ -342,29 +327,33 @@ export declare namespace workshop {
|
|
|
342
327
|
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#GetItemInstallInfo}
|
|
343
328
|
*/
|
|
344
329
|
export function installInfo(itemId: bigint): InstallInfo | null
|
|
330
|
+
export interface InstallInfo {
|
|
331
|
+
folder: string
|
|
332
|
+
sizeOnDisk: bigint
|
|
333
|
+
timestamp: number
|
|
334
|
+
}
|
|
345
335
|
/**
|
|
346
|
-
*
|
|
336
|
+
* Gets the current state of a workshop item on this client. States can be combined.
|
|
347
337
|
*
|
|
348
|
-
* @returns
|
|
338
|
+
* @returns a number with the current item state, e.g. 9
|
|
339
|
+
* 9 = 1 (The current user is subscribed to this item) + 8 (The item needs an update)
|
|
349
340
|
*
|
|
350
|
-
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#
|
|
341
|
+
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#GetItemState}
|
|
342
|
+
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#EItemState}
|
|
351
343
|
*/
|
|
352
|
-
export function
|
|
344
|
+
export function state(itemId: bigint): number
|
|
353
345
|
/**
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
* @param highPriority - If high priority is true, start the download in high priority mode, pausing any existing in-progress Steam downloads and immediately begin downloading this workshop item.
|
|
357
|
-
* @returns true or false
|
|
346
|
+
* Subscribe to a workshop item. It will be downloaded and installed as soon as possible.
|
|
358
347
|
*
|
|
359
|
-
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#
|
|
360
|
-
*/
|
|
361
|
-
export function download(itemId: bigint, highPriority: boolean): boolean
|
|
362
|
-
/**
|
|
363
|
-
* Get all subscribed workshop items.
|
|
364
|
-
* @returns an array of subscribed workshop item ids
|
|
348
|
+
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#SubscribeItem}
|
|
365
349
|
*/
|
|
366
|
-
export function
|
|
367
|
-
export
|
|
350
|
+
export function subscribe(itemId: bigint): Promise<void>
|
|
351
|
+
export const enum UgcItemVisibility {
|
|
352
|
+
Public = 0,
|
|
353
|
+
FriendsOnly = 1,
|
|
354
|
+
Private = 2,
|
|
355
|
+
Unlisted = 3
|
|
356
|
+
}
|
|
368
357
|
export const enum UGCQueryType {
|
|
369
358
|
RankedByVote = 0,
|
|
370
359
|
RankedByPublicationDate = 1,
|
|
@@ -387,6 +376,10 @@ export declare namespace workshop {
|
|
|
387
376
|
RankedByLifetimePlaytimeSessions = 18,
|
|
388
377
|
RankedByLastUpdatedDate = 19
|
|
389
378
|
}
|
|
379
|
+
export interface UgcResult {
|
|
380
|
+
itemId: bigint
|
|
381
|
+
needsToAcceptAgreement: boolean
|
|
382
|
+
}
|
|
390
383
|
export const enum UGCType {
|
|
391
384
|
Items = 0,
|
|
392
385
|
ItemsMtx = 1,
|
|
@@ -403,15 +396,35 @@ export declare namespace workshop {
|
|
|
403
396
|
GameManagedItems = 12,
|
|
404
397
|
All = 13
|
|
405
398
|
}
|
|
406
|
-
export
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
399
|
+
export interface UgcUpdate {
|
|
400
|
+
title?: string
|
|
401
|
+
description?: string
|
|
402
|
+
changeNote?: string
|
|
403
|
+
previewPath?: string
|
|
404
|
+
contentPath?: string
|
|
405
|
+
tags?: Array<string>
|
|
406
|
+
visibility?: UgcItemVisibility
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Unsubscribe from a workshop item. This will result in the item being removed after the game quits.
|
|
410
|
+
*
|
|
411
|
+
* {@link https://partner.steamgames.com/doc/api/ISteamUGC#UnsubscribeItem}
|
|
412
|
+
*/
|
|
413
|
+
export function unsubscribe(itemId: bigint): Promise<void>
|
|
414
|
+
export function updateItem(itemId: bigint, updateDetails: UgcUpdate, appId?: number | undefined | null): Promise<UgcResult>
|
|
415
|
+
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
|
|
416
|
+
export interface UpdateProgress {
|
|
417
|
+
status: UpdateStatus
|
|
418
|
+
progress: bigint
|
|
419
|
+
total: bigint
|
|
420
|
+
}
|
|
421
|
+
export const enum UpdateStatus {
|
|
422
|
+
Invalid = 0,
|
|
423
|
+
PreparingConfig = 1,
|
|
424
|
+
PreparingContent = 2,
|
|
425
|
+
UploadingContent = 3,
|
|
426
|
+
UploadingPreviewFile = 4,
|
|
427
|
+
CommittingChanges = 5
|
|
415
428
|
}
|
|
416
429
|
export const enum UserListOrder {
|
|
417
430
|
CreationOrderAsc = 0,
|
|
@@ -422,20 +435,15 @@ export declare namespace workshop {
|
|
|
422
435
|
VoteScoreDesc = 5,
|
|
423
436
|
ForModeration = 6
|
|
424
437
|
}
|
|
425
|
-
export
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
numSecondsPlayed?: bigint
|
|
435
|
-
numPlaytimeSessions?: bigint
|
|
436
|
-
numComments?: bigint
|
|
437
|
-
numSecondsPlayedDuringTimePeriod?: bigint
|
|
438
|
-
numPlaytimeSessionsDuringTimePeriod?: bigint
|
|
438
|
+
export const enum UserListType {
|
|
439
|
+
Published = 0,
|
|
440
|
+
VotedOn = 1,
|
|
441
|
+
VotedUp = 2,
|
|
442
|
+
VotedDown = 3,
|
|
443
|
+
Favorited = 4,
|
|
444
|
+
Subscribed = 5,
|
|
445
|
+
UsedOrPlayed = 6,
|
|
446
|
+
Followed = 7
|
|
439
447
|
}
|
|
440
448
|
export interface WorkshopItem {
|
|
441
449
|
publishedFileId: bigint
|
|
@@ -462,16 +470,6 @@ export declare namespace workshop {
|
|
|
462
470
|
previewUrl?: string
|
|
463
471
|
statistics: WorkshopItemStatistic
|
|
464
472
|
}
|
|
465
|
-
export interface WorkshopPaginatedResult {
|
|
466
|
-
items: Array<WorkshopItem | undefined | null>
|
|
467
|
-
returnedResults: number
|
|
468
|
-
totalResults: number
|
|
469
|
-
wasCached: boolean
|
|
470
|
-
}
|
|
471
|
-
export interface WorkshopItemsResult {
|
|
472
|
-
items: Array<WorkshopItem | undefined | null>
|
|
473
|
-
wasCached: boolean
|
|
474
|
-
}
|
|
475
473
|
export interface WorkshopItemQueryConfig {
|
|
476
474
|
cachedResponseMaxAge?: number
|
|
477
475
|
includeMetadata?: boolean
|
|
@@ -486,12 +484,29 @@ export declare namespace workshop {
|
|
|
486
484
|
searchText?: string
|
|
487
485
|
rankedByTrendDays?: number
|
|
488
486
|
}
|
|
489
|
-
export interface
|
|
490
|
-
|
|
491
|
-
|
|
487
|
+
export interface WorkshopItemsResult {
|
|
488
|
+
items: Array<WorkshopItem | undefined | null>
|
|
489
|
+
wasCached: boolean
|
|
490
|
+
}
|
|
491
|
+
export interface WorkshopItemStatistic {
|
|
492
|
+
numSubscriptions?: bigint
|
|
493
|
+
numFavorites?: bigint
|
|
494
|
+
numFollowers?: bigint
|
|
495
|
+
numUniqueSubscriptions?: bigint
|
|
496
|
+
numUniqueFavorites?: bigint
|
|
497
|
+
numUniqueFollowers?: bigint
|
|
498
|
+
numUniqueWebsiteViews?: bigint
|
|
499
|
+
reportScore?: bigint
|
|
500
|
+
numSecondsPlayed?: bigint
|
|
501
|
+
numPlaytimeSessions?: bigint
|
|
502
|
+
numComments?: bigint
|
|
503
|
+
numSecondsPlayedDuringTimePeriod?: bigint
|
|
504
|
+
numPlaytimeSessionsDuringTimePeriod?: bigint
|
|
505
|
+
}
|
|
506
|
+
export interface WorkshopPaginatedResult {
|
|
507
|
+
items: Array<WorkshopItem | undefined | null>
|
|
508
|
+
returnedResults: number
|
|
509
|
+
totalResults: number
|
|
510
|
+
wasCached: boolean
|
|
492
511
|
}
|
|
493
|
-
export function getItem(item: bigint, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopItem | null>
|
|
494
|
-
export function getItems(items: Array<bigint>, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopItemsResult>
|
|
495
|
-
export function getAllItems(page: number, queryType: UGCQueryType, itemType: UGCType, creatorAppId: number, consumerAppId: number, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopPaginatedResult>
|
|
496
|
-
export function getUserItems(page: number, accountId: number, listType: UserListType, itemType: UGCType, sortOrder: UserListOrder, appIds: AppIDs, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopPaginatedResult>
|
|
497
512
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export function init(appId?: number): Omit<Client, "init" | "runCallbacks">;
|
|
2
|
+
export function restartAppIfNecessary(appId: number): boolean;
|
|
3
|
+
export function electronEnableSteamOverlay(disableEachFrameInvalidation?: boolean): void;
|
|
4
|
+
export type Client = typeof import("./client.d");
|
|
5
|
+
export const SteamCallback: typeof import("./client.d").callback.SteamCallback;
|