steamworks.js-timmy 0.1.17 → 0.1.18

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.
@@ -0,0 +1,961 @@
1
+ export interface FriendInfo {
2
+ name: string
3
+ nickName?: string
4
+ smallAvatar?: Buffer
5
+ mediumAvatar?: Buffer
6
+ largeAvatar?: Buffer
7
+ id: bigint
8
+ }
9
+
10
+ export declare function init(appId?: number | undefined | null): void
11
+
12
+ export interface PlayerSteamId {
13
+ steamId64: bigint
14
+ steamId32: string
15
+ accountId: number
16
+ }
17
+
18
+ export declare function restartAppIfNecessary(appId: number): boolean
19
+
20
+ export declare function runCallbacks(): void
21
+
22
+ /**
23
+ * Shutdown the Steam client instance
24
+ * PLEASE DON'T USE THIS. Use [`shutdown`] instead.
25
+ */
26
+ export declare function shutdownClient(): void
27
+
28
+ export declare namespace achievement {
29
+ export function activate(achievement: string): boolean
30
+ export function clear(achievement: string): boolean
31
+ export function isActivated(achievement: string): boolean
32
+ export function names(): Array<string>
33
+ }
34
+
35
+ export declare namespace apps {
36
+ export function appBuildId(): number
37
+ export function appInstallDir(appId: number): string
38
+ export function appOwner(): PlayerSteamId
39
+ export function availableGameLanguages(): Array<string>
40
+ export function currentBetaName(): string | null
41
+ export function currentGameLanguage(): string
42
+ export function isAppInstalled(appId: number): boolean
43
+ export function isCybercafe(): boolean
44
+ export function isDlcInstalled(appId: number): boolean
45
+ export function isLowViolence(): boolean
46
+ export function isSubscribed(): boolean
47
+ export function isSubscribedApp(appId: number): boolean
48
+ export function isSubscribedFromFreeWeekend(): boolean
49
+ export function isVacBanned(): boolean
50
+ }
51
+
52
+ export declare namespace auth {
53
+ export class Ticket {
54
+ cancel(): void
55
+ getBytes(): Buffer
56
+ }
57
+ export function getAuthTicketForWebApi(identity: string, timeoutSeconds?: number | undefined | null): Promise<Ticket>
58
+ /**
59
+ * @param ip - The string of IPv4 or IPv6 address. Use as NetworkIdentity of the remote system that will authenticate the ticket.
60
+ * @param timeoutSeconds - The number of seconds to wait for the ticket to be validated. Default value is 10 seconds.
61
+ */
62
+ export function getSessionTicketWithIp(ip: string, timeoutSeconds?: number | undefined | null): Promise<Ticket>
63
+ /**
64
+ * @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
65
+ * @param timeoutSeconds - The number of seconds to wait for the ticket to be validated. Default value is 10 seconds.
66
+ */
67
+ export function getSessionTicketWithSteamId(steamId64: bigint, timeoutSeconds?: number | undefined | null): Promise<Ticket>
68
+ }
69
+
70
+ export declare namespace callback {
71
+ export class Handle {
72
+ disconnect(): void
73
+ }
74
+ export function register<C extends keyof import('./callbacks').CallbackReturns>(steamCallback: C, handler: (value: import('./callbacks').CallbackReturns[C]) => void): Handle
75
+ export const enum SteamCallback {
76
+ PersonaStateChange = 0,
77
+ SteamServersConnected = 1,
78
+ SteamServersDisconnected = 2,
79
+ SteamServerConnectFailure = 3,
80
+ LobbyDataUpdate = 4,
81
+ LobbyChatUpdate = 5,
82
+ P2PSessionRequest = 6,
83
+ P2PSessionConnectFail = 7,
84
+ GameLobbyJoinRequested = 8,
85
+ MicroTxnAuthorizationResponse = 9
86
+ }
87
+ }
88
+
89
+ export declare namespace cloud {
90
+ export function deleteFile(name: string): boolean
91
+ export function fileExists(name: string): boolean
92
+ export interface FileInfo {
93
+ name: string
94
+ size: bigint
95
+ }
96
+ export function isEnabledForAccount(): boolean
97
+ export function isEnabledForApp(): boolean
98
+ export function listFiles(): Array<FileInfo>
99
+ export function readFile(name: string): string
100
+ export function setEnabledForApp(enabled: boolean): void
101
+ export function writeFile(name: string, content: string): boolean
102
+ }
103
+
104
+ export declare namespace friends {
105
+ export function requestUserInformation(steamId: bigint, requireNameOnly: boolean, timeoutSeconds?: number | undefined | null): Promise<FriendInfo>
106
+ }
107
+
108
+ export declare namespace input {
109
+ export class Controller {
110
+ activateActionSet(actionSetHandle: bigint): boolean
111
+ isDigitalActionPressed(actionHandle: bigint): boolean
112
+ getAnalogActionVector(actionHandle: bigint): AnalogActionVector
113
+ getType(): InputType
114
+ getHandle(): bigint
115
+ /** Gets controller's motion sensors */
116
+ getMotionData(): MotionData
117
+ /**
118
+ * Triggers a vibration event
119
+ * It has intensity from 0 (off) to 65535 (max)
120
+ * use something like `setTimeout` to make a timed vibration
121
+ */
122
+ triggerVibration(leftSpeedMicroSecond: number, rightSpeedMicroSecond: number): void
123
+ getAnalogActionOrigins(actionSetHandle: bigint, analogActionHandle: bigint): Array<InputActionOrigins>
124
+ getDigitalActionOrigins(actionSetHandle: bigint, digitalActionHandle: bigint): Array<InputActionOrigins>
125
+ getCurrentActiveActionSet(): bigint
126
+ }
127
+ export interface AnalogActionVector {
128
+ x: number
129
+ y: number
130
+ }
131
+ export function getActionHandle(actionName: string): bigint
132
+ export function getActionSet(actionSetName: string): bigint
133
+ export function getAnalogAction(actionName: string): bigint
134
+ export function getControllers(): Array<Controller>
135
+ export function getDigitalAction(actionName: string): bigint
136
+ export function getFilePathForAction(actionHandle: InputActionOrigins): string
137
+ export function init(): void
138
+ /** The conversion will return 32767 if the value is not found */
139
+ export const enum InputActionOrigins {
140
+ None = 0,
141
+ SteamControllerA = 1,
142
+ SteamControllerB = 2,
143
+ SteamControllerX = 3,
144
+ SteamControllerY = 4,
145
+ SteamControllerLeftBumper = 5,
146
+ SteamControllerRightBumper = 6,
147
+ SteamControllerLeftGrip = 7,
148
+ SteamControllerRightGrip = 8,
149
+ SteamControllerStart = 9,
150
+ SteamControllerBack = 10,
151
+ SteamControllerLeftPadTouch = 11,
152
+ SteamControllerLeftPadSwipe = 12,
153
+ SteamControllerLeftPadClick = 13,
154
+ SteamControllerLeftPadDPadNorth = 14,
155
+ SteamControllerLeftPadDPadSouth = 15,
156
+ SteamControllerLeftPadDPadWest = 16,
157
+ SteamControllerLeftPadDPadEast = 17,
158
+ SteamControllerRightPadTouch = 18,
159
+ SteamControllerRightPadSwipe = 19,
160
+ SteamControllerRightPadClick = 20,
161
+ SteamControllerRightPadDPadNorth = 21,
162
+ SteamControllerRightPadDPadSouth = 22,
163
+ SteamControllerRightPadDPadWest = 23,
164
+ SteamControllerRightPadDPadEast = 24,
165
+ SteamControllerLeftTriggerPull = 25,
166
+ SteamControllerLeftTriggerClick = 26,
167
+ SteamControllerRightTriggerPull = 27,
168
+ SteamControllerRightTriggerClick = 28,
169
+ SteamControllerLeftStickMove = 29,
170
+ SteamControllerLeftStickClick = 30,
171
+ SteamControllerLeftStickDPadNorth = 31,
172
+ SteamControllerLeftStickDPadSouth = 32,
173
+ SteamControllerLeftStickDPadWest = 33,
174
+ SteamControllerLeftStickDPadEast = 34,
175
+ SteamControllerGyroMove = 35,
176
+ SteamControllerGyroPitch = 36,
177
+ SteamControllerGyroYaw = 37,
178
+ SteamControllerGyroRoll = 38,
179
+ SteamControllerReserved0 = 39,
180
+ SteamControllerReserved1 = 40,
181
+ SteamControllerReserved2 = 41,
182
+ SteamControllerReserved3 = 42,
183
+ SteamControllerReserved4 = 43,
184
+ SteamControllerReserved5 = 44,
185
+ SteamControllerReserved6 = 45,
186
+ SteamControllerReserved7 = 46,
187
+ SteamControllerReserved8 = 47,
188
+ SteamControllerReserved9 = 48,
189
+ SteamControllerReserved10 = 49,
190
+ PS4X = 50,
191
+ PS4Circle = 51,
192
+ PS4Triangle = 52,
193
+ PS4Square = 53,
194
+ PS4LeftBumper = 54,
195
+ PS4RightBumper = 55,
196
+ PS4Options = 56,
197
+ PS4Share = 57,
198
+ PS4LeftPadTouch = 58,
199
+ PS4LeftPadSwipe = 59,
200
+ PS4LeftPadClick = 60,
201
+ PS4LeftPadDPadNorth = 61,
202
+ PS4LeftPadDPadSouth = 62,
203
+ PS4LeftPadDPadWest = 63,
204
+ PS4LeftPadDPadEast = 64,
205
+ PS4RightPadTouch = 65,
206
+ PS4RightPadSwipe = 66,
207
+ PS4RightPadClick = 67,
208
+ PS4RightPadDPadNorth = 68,
209
+ PS4RightPadDPadSouth = 69,
210
+ PS4RightPadDPadWest = 70,
211
+ PS4RightPadDPadEast = 71,
212
+ PS4CenterPadTouch = 72,
213
+ PS4CenterPadSwipe = 73,
214
+ PS4CenterPadClick = 74,
215
+ PS4CenterPadDPadNorth = 75,
216
+ PS4CenterPadDPadSouth = 76,
217
+ PS4CenterPadDPadWest = 77,
218
+ PS4CenterPadDPadEast = 78,
219
+ PS4LeftTriggerPull = 79,
220
+ PS4LeftTriggerClick = 80,
221
+ PS4RightTriggerPull = 81,
222
+ PS4RightTriggerClick = 82,
223
+ PS4LeftStickMove = 83,
224
+ PS4LeftStickClick = 84,
225
+ PS4LeftStickDPadNorth = 85,
226
+ PS4LeftStickDPadSouth = 86,
227
+ PS4LeftStickDPadWest = 87,
228
+ PS4LeftStickDPadEast = 88,
229
+ PS4RightStickMove = 89,
230
+ PS4RightStickClick = 90,
231
+ PS4RightStickDPadNorth = 91,
232
+ PS4RightStickDPadSouth = 92,
233
+ PS4RightStickDPadWest = 93,
234
+ PS4RightStickDPadEast = 94,
235
+ PS4DPadNorth = 95,
236
+ PS4DPadSouth = 96,
237
+ PS4DPadWest = 97,
238
+ PS4DPadEast = 98,
239
+ PS4GyroMove = 99,
240
+ PS4GyroPitch = 100,
241
+ PS4GyroYaw = 101,
242
+ PS4GyroRoll = 102,
243
+ PS4DPadMove = 103,
244
+ PS4Reserved1 = 104,
245
+ PS4Reserved2 = 105,
246
+ PS4Reserved3 = 106,
247
+ PS4Reserved4 = 107,
248
+ PS4Reserved5 = 108,
249
+ PS4Reserved6 = 109,
250
+ PS4Reserved7 = 110,
251
+ PS4Reserved8 = 111,
252
+ PS4Reserved9 = 112,
253
+ PS4Reserved10 = 113,
254
+ XBoxOneA = 114,
255
+ XBoxOneB = 115,
256
+ XBoxOneX = 116,
257
+ XBoxOneY = 117,
258
+ XBoxOneLeftBumper = 118,
259
+ XBoxOneRightBumper = 119,
260
+ XBoxOneMenu = 120,
261
+ XBoxOneView = 121,
262
+ XBoxOneLeftTriggerPull = 122,
263
+ XBoxOneLeftTriggerClick = 123,
264
+ XBoxOneRightTriggerPull = 124,
265
+ XBoxOneRightTriggerClick = 125,
266
+ XBoxOneLeftStickMove = 126,
267
+ XBoxOneLeftStickClick = 127,
268
+ XBoxOneLeftStickDPadNorth = 128,
269
+ XBoxOneLeftStickDPadSouth = 129,
270
+ XBoxOneLeftStickDPadWest = 130,
271
+ XBoxOneLeftStickDPadEast = 131,
272
+ XBoxOneRightStickMove = 132,
273
+ XBoxOneRightStickClick = 133,
274
+ XBoxOneRightStickDPadNorth = 134,
275
+ XBoxOneRightStickDPadSouth = 135,
276
+ XBoxOneRightStickDPadWest = 136,
277
+ XBoxOneRightStickDPadEast = 137,
278
+ XBoxOneDPadNorth = 138,
279
+ XBoxOneDPadSouth = 139,
280
+ XBoxOneDPadWest = 140,
281
+ XBoxOneDPadEast = 141,
282
+ XBoxOneDPadMove = 142,
283
+ XBoxOneLeftGripLower = 143,
284
+ XBoxOneLeftGripUpper = 144,
285
+ XBoxOneRightGripLower = 145,
286
+ XBoxOneRightGripUpper = 146,
287
+ XBoxOneShare = 147,
288
+ XBoxOneReserved6 = 148,
289
+ XBoxOneReserved7 = 149,
290
+ XBoxOneReserved8 = 150,
291
+ XBoxOneReserved9 = 151,
292
+ XBoxOneReserved10 = 152,
293
+ XBox360A = 153,
294
+ XBox360B = 154,
295
+ XBox360X = 155,
296
+ XBox360Y = 156,
297
+ XBox360LeftBumper = 157,
298
+ XBox360RightBumper = 158,
299
+ XBox360Start = 159,
300
+ XBox360Back = 160,
301
+ XBox360LeftTriggerPull = 161,
302
+ XBox360LeftTriggerClick = 162,
303
+ XBox360RightTriggerPull = 163,
304
+ XBox360RightTriggerClick = 164,
305
+ XBox360LeftStickMove = 165,
306
+ XBox360LeftStickClick = 166,
307
+ XBox360LeftStickDPadNorth = 167,
308
+ XBox360LeftStickDPadSouth = 168,
309
+ XBox360LeftStickDPadWest = 169,
310
+ XBox360LeftStickDPadEast = 170,
311
+ XBox360RightStickMove = 171,
312
+ XBox360RightStickClick = 172,
313
+ XBox360RightStickDPadNorth = 173,
314
+ XBox360RightStickDPadSouth = 174,
315
+ XBox360RightStickDPadWest = 175,
316
+ XBox360RightStickDPadEast = 176,
317
+ XBox360DPadNorth = 177,
318
+ XBox360DPadSouth = 178,
319
+ XBox360DPadWest = 179,
320
+ XBox360DPadEast = 180,
321
+ XBox360DPadMove = 181,
322
+ XBox360Reserved1 = 182,
323
+ XBox360Reserved2 = 183,
324
+ XBox360Reserved3 = 184,
325
+ XBox360Reserved4 = 185,
326
+ XBox360Reserved5 = 186,
327
+ XBox360Reserved6 = 187,
328
+ XBox360Reserved7 = 188,
329
+ XBox360Reserved8 = 189,
330
+ XBox360Reserved9 = 190,
331
+ XBox360Reserved10 = 191,
332
+ SwitchA = 192,
333
+ SwitchB = 193,
334
+ SwitchX = 194,
335
+ SwitchY = 195,
336
+ SwitchLeftBumper = 196,
337
+ SwitchRightBumper = 197,
338
+ SwitchPlus = 198,
339
+ SwitchMinus = 199,
340
+ SwitchCapture = 200,
341
+ SwitchLeftTriggerPull = 201,
342
+ SwitchLeftTriggerClick = 202,
343
+ SwitchRightTriggerPull = 203,
344
+ SwitchRightTriggerClick = 204,
345
+ SwitchLeftStickMove = 205,
346
+ SwitchLeftStickClick = 206,
347
+ SwitchLeftStickDPadNorth = 207,
348
+ SwitchLeftStickDPadSouth = 208,
349
+ SwitchLeftStickDPadWest = 209,
350
+ SwitchLeftStickDPadEast = 210,
351
+ SwitchRightStickMove = 211,
352
+ SwitchRightStickClick = 212,
353
+ SwitchRightStickDPadNorth = 213,
354
+ SwitchRightStickDPadSouth = 214,
355
+ SwitchRightStickDPadWest = 215,
356
+ SwitchRightStickDPadEast = 216,
357
+ SwitchDPadNorth = 217,
358
+ SwitchDPadSouth = 218,
359
+ SwitchDPadWest = 219,
360
+ SwitchDPadEast = 220,
361
+ SwitchProGyroMove = 221,
362
+ SwitchProGyroPitch = 222,
363
+ SwitchProGyroYaw = 223,
364
+ SwitchProGyroRoll = 224,
365
+ SwitchDPadMove = 225,
366
+ SwitchReserved1 = 226,
367
+ SwitchReserved2 = 227,
368
+ SwitchReserved3 = 228,
369
+ SwitchReserved4 = 229,
370
+ SwitchReserved5 = 230,
371
+ SwitchReserved6 = 231,
372
+ SwitchReserved7 = 232,
373
+ SwitchReserved8 = 233,
374
+ SwitchReserved9 = 234,
375
+ SwitchReserved10 = 235,
376
+ SwitchRightGyroMove = 236,
377
+ SwitchRightGyroPitch = 237,
378
+ SwitchRightGyroYaw = 238,
379
+ SwitchRightGyroRoll = 239,
380
+ SwitchLeftGyroMove = 240,
381
+ SwitchLeftGyroPitch = 241,
382
+ SwitchLeftGyroYaw = 242,
383
+ SwitchLeftGyroRoll = 243,
384
+ SwitchLeftGripLower = 244,
385
+ SwitchLeftGripUpper = 245,
386
+ SwitchRightGripLower = 246,
387
+ SwitchRightGripUpper = 247,
388
+ SwitchJoyConButtonN = 248,
389
+ SwitchJoyConButtonE = 249,
390
+ SwitchJoyConButtonS = 250,
391
+ SwitchJoyConButtonW = 251,
392
+ SwitchReserved15 = 252,
393
+ SwitchReserved16 = 253,
394
+ SwitchReserved17 = 254,
395
+ SwitchReserved18 = 255,
396
+ SwitchReserved19 = 256,
397
+ SwitchReserved20 = 257,
398
+ PS5X = 258,
399
+ PS5Circle = 259,
400
+ PS5Triangle = 260,
401
+ PS5Square = 261,
402
+ PS5LeftBumper = 262,
403
+ PS5RightBumper = 263,
404
+ PS5Option = 264,
405
+ PS5Create = 265,
406
+ PS5Mute = 266,
407
+ PS5LeftPadTouch = 267,
408
+ PS5LeftPadSwipe = 268,
409
+ PS5LeftPadClick = 269,
410
+ PS5LeftPadDPadNorth = 270,
411
+ PS5LeftPadDPadSouth = 271,
412
+ PS5LeftPadDPadWest = 272,
413
+ PS5LeftPadDPadEast = 273,
414
+ PS5RightPadTouch = 274,
415
+ PS5RightPadSwipe = 275,
416
+ PS5RightPadClick = 276,
417
+ PS5RightPadDPadNorth = 277,
418
+ PS5RightPadDPadSouth = 278,
419
+ PS5RightPadDPadWest = 279,
420
+ PS5RightPadDPadEast = 280,
421
+ PS5CenterPadTouch = 281,
422
+ PS5CenterPadSwipe = 282,
423
+ PS5CenterPadClick = 283,
424
+ PS5CenterPadDPadNorth = 284,
425
+ PS5CenterPadDPadSouth = 285,
426
+ PS5CenterPadDPadWest = 286,
427
+ PS5CenterPadDPadEast = 287,
428
+ PS5LeftTriggerPull = 288,
429
+ PS5LeftTriggerClick = 289,
430
+ PS5RightTriggerPull = 290,
431
+ PS5RightTriggerClick = 291,
432
+ PS5LeftStickMove = 292,
433
+ PS5LeftStickClick = 293,
434
+ PS5LeftStickDPadNorth = 294,
435
+ PS5LeftStickDPadSouth = 295,
436
+ PS5LeftStickDPadWest = 296,
437
+ PS5LeftStickDPadEast = 297,
438
+ PS5RightStickMove = 298,
439
+ PS5RightStickClick = 299,
440
+ PS5RightStickDPadNorth = 300,
441
+ PS5RightStickDPadSouth = 301,
442
+ PS5RightStickDPadWest = 302,
443
+ PS5RightStickDPadEast = 303,
444
+ PS5DPadNorth = 304,
445
+ PS5DPadSouth = 305,
446
+ PS5DPadWest = 306,
447
+ PS5DPadEast = 307,
448
+ PS5GyroMove = 308,
449
+ PS5GyroPitch = 309,
450
+ PS5GyroYaw = 310,
451
+ PS5GyroRoll = 311,
452
+ PS5DPadMove = 312,
453
+ PS5LeftGrip = 313,
454
+ PS5RightGrip = 314,
455
+ PS5LeftFn = 315,
456
+ PS5RightFn = 316,
457
+ PS5Reserved5 = 317,
458
+ PS5Reserved6 = 318,
459
+ PS5Reserved7 = 319,
460
+ PS5Reserved8 = 320,
461
+ PS5Reserved9 = 321,
462
+ PS5Reserved10 = 322,
463
+ PS5Reserved11 = 323,
464
+ PS5Reserved12 = 324,
465
+ PS5Reserved13 = 325,
466
+ PS5Reserved14 = 326,
467
+ PS5Reserved15 = 327,
468
+ PS5Reserved16 = 328,
469
+ PS5Reserved17 = 329,
470
+ PS5Reserved18 = 330,
471
+ PS5Reserved19 = 331,
472
+ PS5Reserved20 = 332,
473
+ SteamDeckA = 333,
474
+ SteamDeckB = 334,
475
+ SteamDeckX = 335,
476
+ SteamDeckY = 336,
477
+ SteamDeckL1 = 337,
478
+ SteamDeckR1 = 338,
479
+ SteamDeckMenu = 339,
480
+ SteamDeckView = 340,
481
+ SteamDeckLeftPadTouch = 341,
482
+ SteamDeckLeftPadSwipe = 342,
483
+ SteamDeckLeftPadClick = 343,
484
+ SteamDeckLeftPadDPadNorth = 344,
485
+ SteamDeckLeftPadDPadSouth = 345,
486
+ SteamDeckLeftPadDPadWest = 346,
487
+ SteamDeckLeftPadDPadEast = 347,
488
+ SteamDeckRightPadTouch = 348,
489
+ SteamDeckRightPadSwipe = 349,
490
+ SteamDeckRightPadClick = 350,
491
+ SteamDeckRightPadDPadNorth = 351,
492
+ SteamDeckRightPadDPadSouth = 352,
493
+ SteamDeckRightPadDPadWest = 353,
494
+ SteamDeckRightPadDPadEast = 354,
495
+ SteamDeckL2SoftPull = 355,
496
+ SteamDeckL2 = 356,
497
+ SteamDeckR2SoftPull = 357,
498
+ SteamDeckR2 = 358,
499
+ SteamDeckLeftStickMove = 359,
500
+ SteamDeckL3 = 360,
501
+ SteamDeckLeftStickDPadNorth = 361,
502
+ SteamDeckLeftStickDPadSouth = 362,
503
+ SteamDeckLeftStickDPadWest = 363,
504
+ SteamDeckLeftStickDPadEast = 364,
505
+ SteamDeckLeftStickTouch = 365,
506
+ SteamDeckRightStickMove = 366,
507
+ SteamDeckR3 = 367,
508
+ SteamDeckRightStickDPadNorth = 368,
509
+ SteamDeckRightStickDPadSouth = 369,
510
+ SteamDeckRightStickDPadWest = 370,
511
+ SteamDeckRightStickDPadEast = 371,
512
+ SteamDeckRightStickTouch = 372,
513
+ SteamDeckL4 = 373,
514
+ SteamDeckR4 = 374,
515
+ SteamDeckL5 = 375,
516
+ SteamDeckR5 = 376,
517
+ SteamDeckDPadMove = 377,
518
+ SteamDeckDPadNorth = 378,
519
+ SteamDeckDPadSouth = 379,
520
+ SteamDeckDPadWest = 380,
521
+ SteamDeckDPadEast = 381,
522
+ SteamDeckGyroMove = 382,
523
+ SteamDeckGyroPitch = 383,
524
+ SteamDeckGyroYaw = 384,
525
+ SteamDeckGyroRoll = 385,
526
+ SteamDeckReserved1 = 386,
527
+ SteamDeckReserved2 = 387,
528
+ SteamDeckReserved3 = 388,
529
+ SteamDeckReserved4 = 389,
530
+ SteamDeckReserved5 = 390,
531
+ SteamDeckReserved6 = 391,
532
+ SteamDeckReserved7 = 392,
533
+ SteamDeckReserved8 = 393,
534
+ SteamDeckReserved9 = 394,
535
+ SteamDeckReserved10 = 395,
536
+ SteamDeckReserved11 = 396,
537
+ SteamDeckReserved12 = 397,
538
+ SteamDeckReserved13 = 398,
539
+ SteamDeckReserved14 = 399,
540
+ SteamDeckReserved15 = 400,
541
+ SteamDeckReserved16 = 401,
542
+ SteamDeckReserved17 = 402,
543
+ SteamDeckReserved18 = 403,
544
+ SteamDeckReserved19 = 404,
545
+ SteamDeckReserved20 = 405,
546
+ HoripadM1 = 406,
547
+ HoripadM2 = 407,
548
+ HoripadL4 = 408,
549
+ HoripadR4 = 409,
550
+ Count = 410,
551
+ MaximumPossibleValue = 32767
552
+ }
553
+ export const enum InputType {
554
+ Unknown = 'Unknown',
555
+ SteamController = 'SteamController',
556
+ XBox360Controller = 'XBox360Controller',
557
+ XBoxOneController = 'XBoxOneController',
558
+ GenericGamepad = 'GenericGamepad',
559
+ PS4Controller = 'PS4Controller',
560
+ AppleMFiController = 'AppleMFiController',
561
+ AndroidController = 'AndroidController',
562
+ SwitchJoyConPair = 'SwitchJoyConPair',
563
+ SwitchJoyConSingle = 'SwitchJoyConSingle',
564
+ SwitchProController = 'SwitchProController',
565
+ MobileTouch = 'MobileTouch',
566
+ PS3Controller = 'PS3Controller',
567
+ PS5Controller = 'PS5Controller',
568
+ SteamDeckController = 'SteamDeckController'
569
+ }
570
+ export interface MotionData {
571
+ /** Absolute Rotation (drift) X axis */
572
+ rotQuatX: number
573
+ /** Absolute Rotation (drift) Y axis */
574
+ rotQuatY: number
575
+ /** Absolute Rotation (drift) Z axis */
576
+ rotQuatZ: number
577
+ /** Absolute Rotation (drift) W axis */
578
+ rotQuatW: number
579
+ /** Positional Acceleration X axis */
580
+ posAccelX: number
581
+ /** Positional Acceleration Y axis */
582
+ posAccelY: number
583
+ /** Positional Acceleration Z axis */
584
+ posAccelZ: number
585
+ /** Rotational Velocity X axis */
586
+ rotVelX: number
587
+ /** Rotational Velocity Y axis */
588
+ rotVelY: number
589
+ /** Rotational Velocity Z axis */
590
+ rotVelZ: number
591
+ }
592
+ export function runFrame(): void
593
+ export function setInputActionManifestFilePath(path: string): boolean
594
+ export function shutdown(): void
595
+ export const enum VibrateSide {
596
+ Left = 0,
597
+ Right = 1
598
+ }
599
+ }
600
+
601
+ export declare namespace localplayer {
602
+ /** @returns the 2 digit ISO 3166-1-alpha-2 format country code which client is running in, e.g. "US" or "UK". */
603
+ export function getIpCountry(): string
604
+ export function getLevel(): number
605
+ export function getName(): string
606
+ export function getSteamId(): PlayerSteamId
607
+ export function setRichPresence(key: string, value?: string | undefined | null): void
608
+ }
609
+
610
+ export declare namespace matchmaking {
611
+ export class Lobby {
612
+ join(): Promise<Lobby>
613
+ leave(): void
614
+ openInviteDialog(): void
615
+ getMemberCount(): bigint
616
+ getMemberLimit(): bigint | null
617
+ getMembers(): Array<PlayerSteamId>
618
+ getOwner(): PlayerSteamId
619
+ setJoinable(joinable: boolean): boolean
620
+ getData(key: string): string | null
621
+ setData(key: string, value: string): boolean
622
+ deleteData(key: string): boolean
623
+ /** Get an object containing all the lobby data */
624
+ getFullData(): Record<string, string>
625
+ /**
626
+ * Merge current lobby data with provided data in a single batch
627
+ * @returns true if all data was set successfully
628
+ */
629
+ mergeFullData(data: Record<string, string>): boolean
630
+ get id(): bigint
631
+ get idAsU64(): bigint
632
+ }
633
+ export function createLobby(lobbyType: LobbyType, maxMembers: number): Promise<Lobby>
634
+ export function getLobbies(): Promise<Array<Lobby>>
635
+ export function joinLobby(lobbyId: bigint): Promise<Lobby>
636
+ export const enum LobbyType {
637
+ Private = 0,
638
+ FriendsOnly = 1,
639
+ Public = 2,
640
+ Invisible = 3
641
+ }
642
+ }
643
+
644
+ export declare namespace networking {
645
+ export function acceptP2PSession(steamId64: bigint): void
646
+ export function isP2PPacketAvailable(): number
647
+ export interface P2PPacket {
648
+ data: Buffer
649
+ size: number
650
+ steamId: PlayerSteamId
651
+ }
652
+ export function readP2PPacket(size: number): P2PPacket
653
+ export function sendP2PPacket(steamId64: bigint, sendType: SendType, data: Buffer): boolean
654
+ /** The method used to send a packet */
655
+ export const enum SendType {
656
+ /**
657
+ * Send the packet directly over udp.
658
+ *
659
+ * Can't be larger than 1200 bytes
660
+ */
661
+ Unreliable = 0,
662
+ /**
663
+ * Like `Unreliable` but doesn't buffer packets
664
+ * sent before the connection has started.
665
+ */
666
+ UnreliableNoDelay = 1,
667
+ /**
668
+ * Reliable packet sending.
669
+ *
670
+ * Can't be larger than 1 megabyte.
671
+ */
672
+ Reliable = 2,
673
+ /**
674
+ * Like `Reliable` but applies the nagle
675
+ * algorithm to packets being sent
676
+ */
677
+ ReliableWithBuffering = 3
678
+ }
679
+ }
680
+
681
+ export declare namespace overlay {
682
+ export function activateDialog(dialog: Dialog): void
683
+ export function activateDialogToUser(dialog: Dialog, steamId64: bigint): void
684
+ export function activateInviteDialog(lobbyId: bigint): void
685
+ export function activateToStore(appId: number, flag: StoreFlag): void
686
+ export function activateToWebPage(url: string): void
687
+ export const enum Dialog {
688
+ Friends = 0,
689
+ Community = 1,
690
+ Players = 2,
691
+ Settings = 3,
692
+ OfficialGameGroup = 4,
693
+ Stats = 5,
694
+ Achievements = 6
695
+ }
696
+ export const enum StoreFlag {
697
+ None = 0,
698
+ AddToCart = 1,
699
+ AddToCartAndShow = 2
700
+ }
701
+ }
702
+
703
+ export declare namespace stats {
704
+ export function getInt(name: string): number | null
705
+ export function resetAll(achievementsToo: boolean): boolean
706
+ export function setInt(name: string, value: number): boolean
707
+ export function store(): boolean
708
+ }
709
+
710
+ export declare namespace utils {
711
+ export const enum FloatingGamepadTextInputMode {
712
+ SingleLine = 0,
713
+ MultipleLines = 1,
714
+ Email = 2,
715
+ Numeric = 3
716
+ }
717
+ export const enum GamepadTextInputLineMode {
718
+ SingleLine = 0,
719
+ MultipleLines = 1
720
+ }
721
+ export const enum GamepadTextInputMode {
722
+ Normal = 0,
723
+ Password = 1
724
+ }
725
+ export function getAppId(): number
726
+ export function getServerRealTime(): number
727
+ export function isSteamRunningOnSteamDeck(): boolean
728
+ /** @returns true if the floating keyboard was shown, otherwise, false */
729
+ export function showFloatingGamepadTextInput(keyboardMode: FloatingGamepadTextInputMode, x: number, y: number, width: number, height: number): Promise<boolean>
730
+ /** @returns the entered text, or null if cancelled or could not show the input */
731
+ export function showGamepadTextInput(inputMode: GamepadTextInputMode, inputLineMode: GamepadTextInputLineMode, description: string, maxCharacters: number, existingText?: string | undefined | null): Promise<string | null>
732
+ }
733
+
734
+ export declare namespace workshop {
735
+ export interface AppIDs {
736
+ creator?: number
737
+ consumer?: number
738
+ }
739
+ export function createItem(appId?: number | undefined | null): Promise<UgcResult>
740
+ export function deleteItem(itemId: bigint): Promise<void>
741
+ /**
742
+ * Download or update a workshop item.
743
+ *
744
+ * @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.
745
+ * @returns true or false
746
+ *
747
+ * {@link https://partner.steamgames.com/doc/api/ISteamUGC#DownloadItem}
748
+ */
749
+ export function download(itemId: bigint, highPriority: boolean): boolean
750
+ /**
751
+ * Get info about a pending download of a workshop item.
752
+ *
753
+ * @returns an object with the properties {current, total}
754
+ *
755
+ * {@link https://partner.steamgames.com/doc/api/ISteamUGC#GetItemDownloadInfo}
756
+ */
757
+ export function downloadInfo(itemId: bigint): DownloadInfo | null
758
+ export interface DownloadInfo {
759
+ current: bigint
760
+ total: bigint
761
+ }
762
+ export function getAllItems(page: number, queryType: UGCQueryType, itemType: UGCType, creatorAppId: number, consumerAppId: number, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopPaginatedResult>
763
+ export function getItem(item: bigint, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopItem | null>
764
+ export function getItems(items: Array<bigint>, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopItemsResult>
765
+ /**
766
+ * Get all subscribed workshop items.
767
+ * @returns an array of subscribed workshop item ids
768
+ */
769
+ export function getSubscribedItems(): Array<bigint>
770
+ export function getUserItems(page: number, accountId: number, listType: UserListType, itemType: UGCType, sortOrder: UserListOrder, appIds: AppIDs, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopPaginatedResult>
771
+ /**
772
+ * Gets info about currently installed content on the disc for workshop item.
773
+ *
774
+ * @returns an object with the the properties {folder, size_on_disk, timestamp}
775
+ *
776
+ * {@link https://partner.steamgames.com/doc/api/ISteamUGC#GetItemInstallInfo}
777
+ */
778
+ export function installInfo(itemId: bigint): InstallInfo | null
779
+ export interface InstallInfo {
780
+ folder: string
781
+ sizeOnDisk: bigint
782
+ timestamp: number
783
+ }
784
+ /**
785
+ * Gets the current state of a workshop item on this client. States can be combined.
786
+ *
787
+ * @returns a number with the current item state, e.g. 9
788
+ * 9 = 1 (The current user is subscribed to this item) + 8 (The item needs an update)
789
+ *
790
+ * {@link https://partner.steamgames.com/doc/api/ISteamUGC#GetItemState}
791
+ * {@link https://partner.steamgames.com/doc/api/ISteamUGC#EItemState}
792
+ */
793
+ export function state(itemId: bigint): number
794
+ /**
795
+ * Subscribe to a workshop item. It will be downloaded and installed as soon as possible.
796
+ *
797
+ * {@link https://partner.steamgames.com/doc/api/ISteamUGC#SubscribeItem}
798
+ */
799
+ export function subscribe(itemId: bigint): Promise<void>
800
+ export const enum UgcItemVisibility {
801
+ Public = 0,
802
+ FriendsOnly = 1,
803
+ Private = 2,
804
+ Unlisted = 3
805
+ }
806
+ export const enum UGCQueryType {
807
+ RankedByVote = 0,
808
+ RankedByPublicationDate = 1,
809
+ AcceptedForGameRankedByAcceptanceDate = 2,
810
+ RankedByTrend = 3,
811
+ FavoritedByFriendsRankedByPublicationDate = 4,
812
+ CreatedByFriendsRankedByPublicationDate = 5,
813
+ RankedByNumTimesReported = 6,
814
+ CreatedByFollowedUsersRankedByPublicationDate = 7,
815
+ NotYetRated = 8,
816
+ RankedByTotalVotesAsc = 9,
817
+ RankedByVotesUp = 10,
818
+ RankedByTextSearch = 11,
819
+ RankedByTotalUniqueSubscriptions = 12,
820
+ RankedByPlaytimeTrend = 13,
821
+ RankedByTotalPlaytime = 14,
822
+ RankedByAveragePlaytimeTrend = 15,
823
+ RankedByLifetimeAveragePlaytime = 16,
824
+ RankedByPlaytimeSessionsTrend = 17,
825
+ RankedByLifetimePlaytimeSessions = 18,
826
+ RankedByLastUpdatedDate = 19
827
+ }
828
+ export interface UgcResult {
829
+ itemId: bigint
830
+ needsToAcceptAgreement: boolean
831
+ }
832
+ export const enum UGCType {
833
+ Items = 0,
834
+ ItemsMtx = 1,
835
+ ItemsReadyToUse = 2,
836
+ Collections = 3,
837
+ Artwork = 4,
838
+ Videos = 5,
839
+ Screenshots = 6,
840
+ AllGuides = 7,
841
+ WebGuides = 8,
842
+ IntegratedGuides = 9,
843
+ UsableInGame = 10,
844
+ ControllerBindings = 11,
845
+ GameManagedItems = 12,
846
+ All = 13
847
+ }
848
+ export interface UgcUpdate {
849
+ title?: string
850
+ description?: string
851
+ changeNote?: string
852
+ previewPath?: string
853
+ contentPath?: string
854
+ tags?: Array<string>
855
+ visibility?: UgcItemVisibility
856
+ }
857
+ /**
858
+ * Unsubscribe from a workshop item. This will result in the item being removed after the game quits.
859
+ *
860
+ * {@link https://partner.steamgames.com/doc/api/ISteamUGC#UnsubscribeItem}
861
+ */
862
+ export function unsubscribe(itemId: bigint): Promise<void>
863
+ export function updateItem(itemId: bigint, updateDetails: UgcUpdate, appId?: number | undefined | null): Promise<UgcResult>
864
+ 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
865
+ export interface UpdateProgress {
866
+ status: UpdateStatus
867
+ progress: bigint
868
+ total: bigint
869
+ }
870
+ export const enum UpdateStatus {
871
+ Invalid = 0,
872
+ PreparingConfig = 1,
873
+ PreparingContent = 2,
874
+ UploadingContent = 3,
875
+ UploadingPreviewFile = 4,
876
+ CommittingChanges = 5
877
+ }
878
+ export const enum UserListOrder {
879
+ CreationOrderAsc = 0,
880
+ CreationOrderDesc = 1,
881
+ TitleAsc = 2,
882
+ LastUpdatedDesc = 3,
883
+ SubscriptionDateDesc = 4,
884
+ VoteScoreDesc = 5,
885
+ ForModeration = 6
886
+ }
887
+ export const enum UserListType {
888
+ Published = 0,
889
+ VotedOn = 1,
890
+ VotedUp = 2,
891
+ VotedDown = 3,
892
+ Favorited = 4,
893
+ Subscribed = 5,
894
+ UsedOrPlayed = 6,
895
+ Followed = 7
896
+ }
897
+ export interface WorkshopItem {
898
+ publishedFileId: bigint
899
+ creatorAppId?: number
900
+ consumerAppId?: number
901
+ title: string
902
+ description: string
903
+ owner: PlayerSteamId
904
+ /** Time created in unix epoch seconds format */
905
+ timeCreated: number
906
+ /** Time updated in unix epoch seconds format */
907
+ timeUpdated: number
908
+ /** Time when the user added the published item to their list (not always applicable), provided in Unix epoch format (time since Jan 1st, 1970). */
909
+ timeAddedToUserList: number
910
+ visibility: UgcItemVisibility
911
+ banned: boolean
912
+ acceptedForUse: boolean
913
+ tags: Array<string>
914
+ tagsTruncated: boolean
915
+ url: string
916
+ numUpvotes: number
917
+ numDownvotes: number
918
+ numChildren: number
919
+ previewUrl?: string
920
+ statistics: WorkshopItemStatistic
921
+ }
922
+ export interface WorkshopItemQueryConfig {
923
+ cachedResponseMaxAge?: number
924
+ includeMetadata?: boolean
925
+ includeLongDescription?: boolean
926
+ includeAdditionalPreviews?: boolean
927
+ onlyIds?: boolean
928
+ onlyTotal?: boolean
929
+ language?: string
930
+ matchAnyTag?: boolean
931
+ requiredTags?: Array<string>
932
+ excludedTags?: Array<string>
933
+ searchText?: string
934
+ rankedByTrendDays?: number
935
+ }
936
+ export interface WorkshopItemsResult {
937
+ items: Array<WorkshopItem | undefined | null>
938
+ wasCached: boolean
939
+ }
940
+ export interface WorkshopItemStatistic {
941
+ numSubscriptions?: bigint
942
+ numFavorites?: bigint
943
+ numFollowers?: bigint
944
+ numUniqueSubscriptions?: bigint
945
+ numUniqueFavorites?: bigint
946
+ numUniqueFollowers?: bigint
947
+ numUniqueWebsiteViews?: bigint
948
+ reportScore?: bigint
949
+ numSecondsPlayed?: bigint
950
+ numPlaytimeSessions?: bigint
951
+ numComments?: bigint
952
+ numSecondsPlayedDuringTimePeriod?: bigint
953
+ numPlaytimeSessionsDuringTimePeriod?: bigint
954
+ }
955
+ export interface WorkshopPaginatedResult {
956
+ items: Array<WorkshopItem | undefined | null>
957
+ returnedResults: number
958
+ totalResults: number
959
+ wasCached: boolean
960
+ }
961
+ }