steamworks.js-timmy 0.1.17 → 0.1.19

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,976 @@
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 const enum KeyboardInputKind {
571
+ /** The text input that will closes on Enter keypress */
572
+ SingleLine = 0,
573
+ /** Text input that will closes on user's demand. */
574
+ MultiLine = 1,
575
+ /** Text input that will make typing email address easier. */
576
+ Email = 2,
577
+ /** Text input that will make typing numeric input easier. */
578
+ Numeric = 3
579
+ }
580
+ export interface MotionData {
581
+ /** Absolute Rotation (drift) X axis */
582
+ rotQuatX: number
583
+ /** Absolute Rotation (drift) Y axis */
584
+ rotQuatY: number
585
+ /** Absolute Rotation (drift) Z axis */
586
+ rotQuatZ: number
587
+ /** Absolute Rotation (drift) W axis */
588
+ rotQuatW: number
589
+ /** Positional Acceleration X axis */
590
+ posAccelX: number
591
+ /** Positional Acceleration Y axis */
592
+ posAccelY: number
593
+ /** Positional Acceleration Z axis */
594
+ posAccelZ: number
595
+ /** Rotational Velocity X axis */
596
+ rotVelX: number
597
+ /** Rotational Velocity Y axis */
598
+ rotVelY: number
599
+ /** Rotational Velocity Z axis */
600
+ rotVelZ: number
601
+ }
602
+ export function runFrame(): void
603
+ export function setInputActionManifestFilePath(path: string): boolean
604
+ export function shutdown(): void
605
+ /**
606
+ * Opens a floating keyboard over the game content and sends OS keyboard keys directly to the game.
607
+ * The text field position is specified in pixels relative the origin of the game window and is used to position the floating keyboard in a way that doesn't cover the text field.
608
+ */
609
+ export function triggerOnScreenKeyboard(keyboardInputKind: KeyboardInputKind, xPosOfTextInput: number, yPosOfTextInput: number, widthOfTextInput: number, heightOfTextInput: number, dismissedCallback?: (arg?: unknown) => unknown | undefined | null): boolean
610
+ export const enum VibrateSide {
611
+ Left = 0,
612
+ Right = 1
613
+ }
614
+ }
615
+
616
+ export declare namespace localplayer {
617
+ /** @returns the 2 digit ISO 3166-1-alpha-2 format country code which client is running in, e.g. "US" or "UK". */
618
+ export function getIpCountry(): string
619
+ export function getLevel(): number
620
+ export function getName(): string
621
+ export function getSteamId(): PlayerSteamId
622
+ export function setRichPresence(key: string, value?: string | undefined | null): void
623
+ }
624
+
625
+ export declare namespace matchmaking {
626
+ export class Lobby {
627
+ join(): Promise<Lobby>
628
+ leave(): void
629
+ openInviteDialog(): void
630
+ getMemberCount(): bigint
631
+ getMemberLimit(): bigint | null
632
+ getMembers(): Array<PlayerSteamId>
633
+ getOwner(): PlayerSteamId
634
+ setJoinable(joinable: boolean): boolean
635
+ getData(key: string): string | null
636
+ setData(key: string, value: string): boolean
637
+ deleteData(key: string): boolean
638
+ /** Get an object containing all the lobby data */
639
+ getFullData(): Record<string, string>
640
+ /**
641
+ * Merge current lobby data with provided data in a single batch
642
+ * @returns true if all data was set successfully
643
+ */
644
+ mergeFullData(data: Record<string, string>): boolean
645
+ get id(): bigint
646
+ get idAsU64(): bigint
647
+ }
648
+ export function createLobby(lobbyType: LobbyType, maxMembers: number): Promise<Lobby>
649
+ export function getLobbies(): Promise<Array<Lobby>>
650
+ export function joinLobby(lobbyId: bigint): Promise<Lobby>
651
+ export const enum LobbyType {
652
+ Private = 0,
653
+ FriendsOnly = 1,
654
+ Public = 2,
655
+ Invisible = 3
656
+ }
657
+ }
658
+
659
+ export declare namespace networking {
660
+ export function acceptP2PSession(steamId64: bigint): void
661
+ export function isP2PPacketAvailable(): number
662
+ export interface P2PPacket {
663
+ data: Buffer
664
+ size: number
665
+ steamId: PlayerSteamId
666
+ }
667
+ export function readP2PPacket(size: number): P2PPacket
668
+ export function sendP2PPacket(steamId64: bigint, sendType: SendType, data: Buffer): boolean
669
+ /** The method used to send a packet */
670
+ export const enum SendType {
671
+ /**
672
+ * Send the packet directly over udp.
673
+ *
674
+ * Can't be larger than 1200 bytes
675
+ */
676
+ Unreliable = 0,
677
+ /**
678
+ * Like `Unreliable` but doesn't buffer packets
679
+ * sent before the connection has started.
680
+ */
681
+ UnreliableNoDelay = 1,
682
+ /**
683
+ * Reliable packet sending.
684
+ *
685
+ * Can't be larger than 1 megabyte.
686
+ */
687
+ Reliable = 2,
688
+ /**
689
+ * Like `Reliable` but applies the nagle
690
+ * algorithm to packets being sent
691
+ */
692
+ ReliableWithBuffering = 3
693
+ }
694
+ }
695
+
696
+ export declare namespace overlay {
697
+ export function activateDialog(dialog: Dialog): void
698
+ export function activateDialogToUser(dialog: Dialog, steamId64: bigint): void
699
+ export function activateInviteDialog(lobbyId: bigint): void
700
+ export function activateToStore(appId: number, flag: StoreFlag): void
701
+ export function activateToWebPage(url: string): void
702
+ export const enum Dialog {
703
+ Friends = 0,
704
+ Community = 1,
705
+ Players = 2,
706
+ Settings = 3,
707
+ OfficialGameGroup = 4,
708
+ Stats = 5,
709
+ Achievements = 6
710
+ }
711
+ export const enum StoreFlag {
712
+ None = 0,
713
+ AddToCart = 1,
714
+ AddToCartAndShow = 2
715
+ }
716
+ }
717
+
718
+ export declare namespace stats {
719
+ export function getInt(name: string): number | null
720
+ export function resetAll(achievementsToo: boolean): boolean
721
+ export function setInt(name: string, value: number): boolean
722
+ export function store(): boolean
723
+ }
724
+
725
+ export declare namespace utils {
726
+ export const enum FloatingGamepadTextInputMode {
727
+ SingleLine = 0,
728
+ MultipleLines = 1,
729
+ Email = 2,
730
+ Numeric = 3
731
+ }
732
+ export const enum GamepadTextInputLineMode {
733
+ SingleLine = 0,
734
+ MultipleLines = 1
735
+ }
736
+ export const enum GamepadTextInputMode {
737
+ Normal = 0,
738
+ Password = 1
739
+ }
740
+ export function getAppId(): number
741
+ export function getServerRealTime(): number
742
+ export function isSteamRunningOnSteamDeck(): boolean
743
+ /** @returns true if the floating keyboard was shown, otherwise, false */
744
+ export function showFloatingGamepadTextInput(keyboardMode: FloatingGamepadTextInputMode, x: number, y: number, width: number, height: number): Promise<boolean>
745
+ /** @returns the entered text, or null if cancelled or could not show the input */
746
+ export function showGamepadTextInput(inputMode: GamepadTextInputMode, inputLineMode: GamepadTextInputLineMode, description: string, maxCharacters: number, existingText?: string | undefined | null): Promise<string | null>
747
+ }
748
+
749
+ export declare namespace workshop {
750
+ export interface AppIDs {
751
+ creator?: number
752
+ consumer?: number
753
+ }
754
+ export function createItem(appId?: number | undefined | null): Promise<UgcResult>
755
+ export function deleteItem(itemId: bigint): Promise<void>
756
+ /**
757
+ * Download or update a workshop item.
758
+ *
759
+ * @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.
760
+ * @returns true or false
761
+ *
762
+ * {@link https://partner.steamgames.com/doc/api/ISteamUGC#DownloadItem}
763
+ */
764
+ export function download(itemId: bigint, highPriority: boolean): boolean
765
+ /**
766
+ * Get info about a pending download of a workshop item.
767
+ *
768
+ * @returns an object with the properties {current, total}
769
+ *
770
+ * {@link https://partner.steamgames.com/doc/api/ISteamUGC#GetItemDownloadInfo}
771
+ */
772
+ export function downloadInfo(itemId: bigint): DownloadInfo | null
773
+ export interface DownloadInfo {
774
+ current: bigint
775
+ total: bigint
776
+ }
777
+ export function getAllItems(page: number, queryType: UGCQueryType, itemType: UGCType, creatorAppId: number, consumerAppId: number, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopPaginatedResult>
778
+ export function getItem(item: bigint, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopItem | null>
779
+ export function getItems(items: Array<bigint>, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopItemsResult>
780
+ /**
781
+ * Get all subscribed workshop items.
782
+ * @returns an array of subscribed workshop item ids
783
+ */
784
+ export function getSubscribedItems(): Array<bigint>
785
+ export function getUserItems(page: number, accountId: number, listType: UserListType, itemType: UGCType, sortOrder: UserListOrder, appIds: AppIDs, queryConfig?: WorkshopItemQueryConfig | undefined | null): Promise<WorkshopPaginatedResult>
786
+ /**
787
+ * Gets info about currently installed content on the disc for workshop item.
788
+ *
789
+ * @returns an object with the the properties {folder, size_on_disk, timestamp}
790
+ *
791
+ * {@link https://partner.steamgames.com/doc/api/ISteamUGC#GetItemInstallInfo}
792
+ */
793
+ export function installInfo(itemId: bigint): InstallInfo | null
794
+ export interface InstallInfo {
795
+ folder: string
796
+ sizeOnDisk: bigint
797
+ timestamp: number
798
+ }
799
+ /**
800
+ * Gets the current state of a workshop item on this client. States can be combined.
801
+ *
802
+ * @returns a number with the current item state, e.g. 9
803
+ * 9 = 1 (The current user is subscribed to this item) + 8 (The item needs an update)
804
+ *
805
+ * {@link https://partner.steamgames.com/doc/api/ISteamUGC#GetItemState}
806
+ * {@link https://partner.steamgames.com/doc/api/ISteamUGC#EItemState}
807
+ */
808
+ export function state(itemId: bigint): number
809
+ /**
810
+ * Subscribe to a workshop item. It will be downloaded and installed as soon as possible.
811
+ *
812
+ * {@link https://partner.steamgames.com/doc/api/ISteamUGC#SubscribeItem}
813
+ */
814
+ export function subscribe(itemId: bigint): Promise<void>
815
+ export const enum UgcItemVisibility {
816
+ Public = 0,
817
+ FriendsOnly = 1,
818
+ Private = 2,
819
+ Unlisted = 3
820
+ }
821
+ export const enum UGCQueryType {
822
+ RankedByVote = 0,
823
+ RankedByPublicationDate = 1,
824
+ AcceptedForGameRankedByAcceptanceDate = 2,
825
+ RankedByTrend = 3,
826
+ FavoritedByFriendsRankedByPublicationDate = 4,
827
+ CreatedByFriendsRankedByPublicationDate = 5,
828
+ RankedByNumTimesReported = 6,
829
+ CreatedByFollowedUsersRankedByPublicationDate = 7,
830
+ NotYetRated = 8,
831
+ RankedByTotalVotesAsc = 9,
832
+ RankedByVotesUp = 10,
833
+ RankedByTextSearch = 11,
834
+ RankedByTotalUniqueSubscriptions = 12,
835
+ RankedByPlaytimeTrend = 13,
836
+ RankedByTotalPlaytime = 14,
837
+ RankedByAveragePlaytimeTrend = 15,
838
+ RankedByLifetimeAveragePlaytime = 16,
839
+ RankedByPlaytimeSessionsTrend = 17,
840
+ RankedByLifetimePlaytimeSessions = 18,
841
+ RankedByLastUpdatedDate = 19
842
+ }
843
+ export interface UgcResult {
844
+ itemId: bigint
845
+ needsToAcceptAgreement: boolean
846
+ }
847
+ export const enum UGCType {
848
+ Items = 0,
849
+ ItemsMtx = 1,
850
+ ItemsReadyToUse = 2,
851
+ Collections = 3,
852
+ Artwork = 4,
853
+ Videos = 5,
854
+ Screenshots = 6,
855
+ AllGuides = 7,
856
+ WebGuides = 8,
857
+ IntegratedGuides = 9,
858
+ UsableInGame = 10,
859
+ ControllerBindings = 11,
860
+ GameManagedItems = 12,
861
+ All = 13
862
+ }
863
+ export interface UgcUpdate {
864
+ title?: string
865
+ description?: string
866
+ changeNote?: string
867
+ previewPath?: string
868
+ contentPath?: string
869
+ tags?: Array<string>
870
+ visibility?: UgcItemVisibility
871
+ }
872
+ /**
873
+ * Unsubscribe from a workshop item. This will result in the item being removed after the game quits.
874
+ *
875
+ * {@link https://partner.steamgames.com/doc/api/ISteamUGC#UnsubscribeItem}
876
+ */
877
+ export function unsubscribe(itemId: bigint): Promise<void>
878
+ export function updateItem(itemId: bigint, updateDetails: UgcUpdate, appId?: number | undefined | null): Promise<UgcResult>
879
+ 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
880
+ export interface UpdateProgress {
881
+ status: UpdateStatus
882
+ progress: bigint
883
+ total: bigint
884
+ }
885
+ export const enum UpdateStatus {
886
+ Invalid = 0,
887
+ PreparingConfig = 1,
888
+ PreparingContent = 2,
889
+ UploadingContent = 3,
890
+ UploadingPreviewFile = 4,
891
+ CommittingChanges = 5
892
+ }
893
+ export const enum UserListOrder {
894
+ CreationOrderAsc = 0,
895
+ CreationOrderDesc = 1,
896
+ TitleAsc = 2,
897
+ LastUpdatedDesc = 3,
898
+ SubscriptionDateDesc = 4,
899
+ VoteScoreDesc = 5,
900
+ ForModeration = 6
901
+ }
902
+ export const enum UserListType {
903
+ Published = 0,
904
+ VotedOn = 1,
905
+ VotedUp = 2,
906
+ VotedDown = 3,
907
+ Favorited = 4,
908
+ Subscribed = 5,
909
+ UsedOrPlayed = 6,
910
+ Followed = 7
911
+ }
912
+ export interface WorkshopItem {
913
+ publishedFileId: bigint
914
+ creatorAppId?: number
915
+ consumerAppId?: number
916
+ title: string
917
+ description: string
918
+ owner: PlayerSteamId
919
+ /** Time created in unix epoch seconds format */
920
+ timeCreated: number
921
+ /** Time updated in unix epoch seconds format */
922
+ timeUpdated: number
923
+ /** Time when the user added the published item to their list (not always applicable), provided in Unix epoch format (time since Jan 1st, 1970). */
924
+ timeAddedToUserList: number
925
+ visibility: UgcItemVisibility
926
+ banned: boolean
927
+ acceptedForUse: boolean
928
+ tags: Array<string>
929
+ tagsTruncated: boolean
930
+ url: string
931
+ numUpvotes: number
932
+ numDownvotes: number
933
+ numChildren: number
934
+ previewUrl?: string
935
+ statistics: WorkshopItemStatistic
936
+ }
937
+ export interface WorkshopItemQueryConfig {
938
+ cachedResponseMaxAge?: number
939
+ includeMetadata?: boolean
940
+ includeLongDescription?: boolean
941
+ includeAdditionalPreviews?: boolean
942
+ onlyIds?: boolean
943
+ onlyTotal?: boolean
944
+ language?: string
945
+ matchAnyTag?: boolean
946
+ requiredTags?: Array<string>
947
+ excludedTags?: Array<string>
948
+ searchText?: string
949
+ rankedByTrendDays?: number
950
+ }
951
+ export interface WorkshopItemsResult {
952
+ items: Array<WorkshopItem | undefined | null>
953
+ wasCached: boolean
954
+ }
955
+ export interface WorkshopItemStatistic {
956
+ numSubscriptions?: bigint
957
+ numFavorites?: bigint
958
+ numFollowers?: bigint
959
+ numUniqueSubscriptions?: bigint
960
+ numUniqueFavorites?: bigint
961
+ numUniqueFollowers?: bigint
962
+ numUniqueWebsiteViews?: bigint
963
+ reportScore?: bigint
964
+ numSecondsPlayed?: bigint
965
+ numPlaytimeSessions?: bigint
966
+ numComments?: bigint
967
+ numSecondsPlayedDuringTimePeriod?: bigint
968
+ numPlaytimeSessionsDuringTimePeriod?: bigint
969
+ }
970
+ export interface WorkshopPaginatedResult {
971
+ items: Array<WorkshopItem | undefined | null>
972
+ returnedResults: number
973
+ totalResults: number
974
+ wasCached: boolean
975
+ }
976
+ }