steamworks.js-timmy 0.1.1 → 0.1.3

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