steamworks.js-timmy 0.1.12 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/client.d.ts CHANGED
@@ -1,3 +1,12 @@
1
+ export interface FriendInfo {
2
+ name: string
3
+ nickName?: string
4
+ smallAvatar?: Buffer
5
+ mediumAvatar?: Buffer
6
+ largeAvatar?: Buffer
7
+ id: bigint
8
+ }
9
+
1
10
  export declare function init(appId?: number | undefined | null): void
2
11
 
3
12
  export interface PlayerSteamId {
@@ -10,6 +19,12 @@ export declare function restartAppIfNecessary(appId: number): boolean
10
19
 
11
20
  export declare function runCallbacks(): void
12
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
+
13
28
  export declare namespace achievement {
14
29
  export function activate(achievement: string): boolean
15
30
  export function clear(achievement: string): boolean
@@ -86,9 +101,13 @@ export declare namespace cloud {
86
101
  export function writeFile(name: string, content: string): boolean
87
102
  }
88
103
 
104
+ export declare namespace friends {
105
+ export function requestUserInformation(steamId: bigint, requireNameOnly: boolean, timeoutSeconds?: number | undefined | null): Promise<FriendInfo>
106
+ }
107
+
89
108
  export declare namespace input {
90
109
  export class Controller {
91
- activateActionSet(actionSetHandle: bigint): void
110
+ activateActionSet(actionSetHandle: bigint): boolean
92
111
  isDigitalActionPressed(actionHandle: bigint): boolean
93
112
  getAnalogActionVector(actionHandle: bigint): AnalogActionVector
94
113
  getType(): InputType
@@ -105,7 +124,6 @@ export declare namespace input {
105
124
  getDigitalActionOrigins(actionSetHandle: bigint, digitalActionHandle: bigint): Array<InputActionOrigins>
106
125
  getCurrentActiveActionSet(): bigint
107
126
  }
108
- export function activateActionSetAll(actionSetHandle: bigint): void
109
127
  export interface AnalogActionVector {
110
128
  x: number
111
129
  y: number
@@ -1,3 +1,12 @@
1
+ export interface FriendInfo {
2
+ name: string
3
+ nickName?: string
4
+ smallAvatar?: Buffer
5
+ mediumAvatar?: Buffer
6
+ largeAvatar?: Buffer
7
+ id: bigint
8
+ }
9
+
1
10
  export declare function init(appId?: number | undefined | null): void
2
11
 
3
12
  export interface PlayerSteamId {
@@ -10,6 +19,12 @@ export declare function restartAppIfNecessary(appId: number): boolean
10
19
 
11
20
  export declare function runCallbacks(): void
12
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
+
13
28
  export declare namespace achievement {
14
29
  export function activate(achievement: string): boolean
15
30
  export function clear(achievement: string): boolean
@@ -86,9 +101,13 @@ export declare namespace cloud {
86
101
  export function writeFile(name: string, content: string): boolean
87
102
  }
88
103
 
104
+ export declare namespace friends {
105
+ export function requestUserInformation(steamId: bigint, requireNameOnly: boolean, timeoutSeconds?: number | undefined | null): Promise<FriendInfo>
106
+ }
107
+
89
108
  export declare namespace input {
90
109
  export class Controller {
91
- activateActionSet(actionSetHandle: bigint): void
110
+ activateActionSet(actionSetHandle: bigint): boolean
92
111
  isDigitalActionPressed(actionHandle: bigint): boolean
93
112
  getAnalogActionVector(actionHandle: bigint): AnalogActionVector
94
113
  getType(): InputType
@@ -105,7 +124,6 @@ export declare namespace input {
105
124
  getDigitalActionOrigins(actionSetHandle: bigint, digitalActionHandle: bigint): Array<InputActionOrigins>
106
125
  getCurrentActiveActionSet(): bigint
107
126
  }
108
- export function activateActionSetAll(actionSetHandle: bigint): void
109
127
  export interface AnalogActionVector {
110
128
  x: number
111
129
  y: number
@@ -1,4 +1,5 @@
1
1
  export function init(appId?: number): Omit<Client, "init" | "runCallbacks">;
2
+ export function shutdown(): void;
2
3
  export function restartAppIfNecessary(appId: number): boolean;
3
4
  export function electronEnableSteamOverlay(disableEachFrameInvalidation?: boolean): void;
4
5
  export type Client = typeof import("./client.d");
@@ -36,6 +36,15 @@ module.exports.init = (appId) => {
36
36
  return api
37
37
  }
38
38
 
39
+ /**
40
+ * @description Shuts down the steam client
41
+ */
42
+ module.exports.shutdown = () => {
43
+ clearInterval(runCallbacksInterval)
44
+ nativeBinding.shutdownClient()
45
+ runCallbacksInterval = undefined
46
+ }
47
+
39
48
  /**
40
49
  * @param {number} appId - App ID of the game to load
41
50
  * {@link https://partner.steamgames.com/doc/api/steam_api#SteamAPI_RestartAppIfNecessary}
@@ -1,3 +1,12 @@
1
+ export interface FriendInfo {
2
+ name: string
3
+ nickName?: string
4
+ smallAvatar?: Buffer
5
+ mediumAvatar?: Buffer
6
+ largeAvatar?: Buffer
7
+ id: bigint
8
+ }
9
+
1
10
  export declare function init(appId?: number | undefined | null): void
2
11
 
3
12
  export interface PlayerSteamId {
@@ -10,6 +19,12 @@ export declare function restartAppIfNecessary(appId: number): boolean
10
19
 
11
20
  export declare function runCallbacks(): void
12
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
+
13
28
  export declare namespace achievement {
14
29
  export function activate(achievement: string): boolean
15
30
  export function clear(achievement: string): boolean
@@ -86,9 +101,13 @@ export declare namespace cloud {
86
101
  export function writeFile(name: string, content: string): boolean
87
102
  }
88
103
 
104
+ export declare namespace friends {
105
+ export function requestUserInformation(steamId: bigint, requireNameOnly: boolean, timeoutSeconds?: number | undefined | null): Promise<FriendInfo>
106
+ }
107
+
89
108
  export declare namespace input {
90
109
  export class Controller {
91
- activateActionSet(actionSetHandle: bigint): void
110
+ activateActionSet(actionSetHandle: bigint): boolean
92
111
  isDigitalActionPressed(actionHandle: bigint): boolean
93
112
  getAnalogActionVector(actionHandle: bigint): AnalogActionVector
94
113
  getType(): InputType
@@ -105,7 +124,6 @@ export declare namespace input {
105
124
  getDigitalActionOrigins(actionSetHandle: bigint, digitalActionHandle: bigint): Array<InputActionOrigins>
106
125
  getCurrentActiveActionSet(): bigint
107
126
  }
108
- export function activateActionSetAll(actionSetHandle: bigint): void
109
127
  export interface AnalogActionVector {
110
128
  x: number
111
129
  y: number
@@ -1,4 +1,5 @@
1
1
  export function init(appId?: number): Omit<Client, "init" | "runCallbacks">;
2
+ export function shutdown(): void;
2
3
  export function restartAppIfNecessary(appId: number): boolean;
3
4
  export function electronEnableSteamOverlay(disableEachFrameInvalidation?: boolean): void;
4
5
  export type Client = typeof import("./client.d");
package/dist/osx/index.js CHANGED
@@ -36,6 +36,15 @@ module.exports.init = (appId) => {
36
36
  return api
37
37
  }
38
38
 
39
+ /**
40
+ * @description Shuts down the steam client
41
+ */
42
+ module.exports.shutdown = () => {
43
+ clearInterval(runCallbacksInterval)
44
+ nativeBinding.shutdownClient()
45
+ runCallbacksInterval = undefined
46
+ }
47
+
39
48
  /**
40
49
  * @param {number} appId - App ID of the game to load
41
50
  * {@link https://partner.steamgames.com/doc/api/steam_api#SteamAPI_RestartAppIfNecessary}
@@ -1,3 +1,12 @@
1
+ export interface FriendInfo {
2
+ name: string
3
+ nickName?: string
4
+ smallAvatar?: Buffer
5
+ mediumAvatar?: Buffer
6
+ largeAvatar?: Buffer
7
+ id: bigint
8
+ }
9
+
1
10
  export declare function init(appId?: number | undefined | null): void
2
11
 
3
12
  export interface PlayerSteamId {
@@ -10,6 +19,12 @@ export declare function restartAppIfNecessary(appId: number): boolean
10
19
 
11
20
  export declare function runCallbacks(): void
12
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
+
13
28
  export declare namespace achievement {
14
29
  export function activate(achievement: string): boolean
15
30
  export function clear(achievement: string): boolean
@@ -86,9 +101,13 @@ export declare namespace cloud {
86
101
  export function writeFile(name: string, content: string): boolean
87
102
  }
88
103
 
104
+ export declare namespace friends {
105
+ export function requestUserInformation(steamId: bigint, requireNameOnly: boolean, timeoutSeconds?: number | undefined | null): Promise<FriendInfo>
106
+ }
107
+
89
108
  export declare namespace input {
90
109
  export class Controller {
91
- activateActionSet(actionSetHandle: bigint): void
110
+ activateActionSet(actionSetHandle: bigint): boolean
92
111
  isDigitalActionPressed(actionHandle: bigint): boolean
93
112
  getAnalogActionVector(actionHandle: bigint): AnalogActionVector
94
113
  getType(): InputType
@@ -105,7 +124,6 @@ export declare namespace input {
105
124
  getDigitalActionOrigins(actionSetHandle: bigint, digitalActionHandle: bigint): Array<InputActionOrigins>
106
125
  getCurrentActiveActionSet(): bigint
107
126
  }
108
- export function activateActionSetAll(actionSetHandle: bigint): void
109
127
  export interface AnalogActionVector {
110
128
  x: number
111
129
  y: number
@@ -1,4 +1,5 @@
1
1
  export function init(appId?: number): Omit<Client, "init" | "runCallbacks">;
2
+ export function shutdown(): void;
2
3
  export function restartAppIfNecessary(appId: number): boolean;
3
4
  export function electronEnableSteamOverlay(disableEachFrameInvalidation?: boolean): void;
4
5
  export type Client = typeof import("./client.d");
@@ -36,6 +36,15 @@ module.exports.init = (appId) => {
36
36
  return api
37
37
  }
38
38
 
39
+ /**
40
+ * @description Shuts down the steam client
41
+ */
42
+ module.exports.shutdown = () => {
43
+ clearInterval(runCallbacksInterval)
44
+ nativeBinding.shutdownClient()
45
+ runCallbacksInterval = undefined
46
+ }
47
+
39
48
  /**
40
49
  * @param {number} appId - App ID of the game to load
41
50
  * {@link https://partner.steamgames.com/doc/api/steam_api#SteamAPI_RestartAppIfNecessary}
package/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export function init(appId?: number): Omit<Client, "init" | "runCallbacks">;
2
+ export function shutdown(): void;
2
3
  export function restartAppIfNecessary(appId: number): boolean;
3
4
  export function electronEnableSteamOverlay(disableEachFrameInvalidation?: boolean): void;
4
5
  export type Client = typeof import("./client.d");
package/index.js CHANGED
@@ -36,6 +36,15 @@ module.exports.init = (appId) => {
36
36
  return api
37
37
  }
38
38
 
39
+ /**
40
+ * @description Shuts down the steam client
41
+ */
42
+ module.exports.shutdown = () => {
43
+ clearInterval(runCallbacksInterval)
44
+ nativeBinding.shutdownClient()
45
+ runCallbacksInterval = undefined
46
+ }
47
+
39
48
  /**
40
49
  * @param {number} appId - App ID of the game to load
41
50
  * {@link https://partner.steamgames.com/doc/api/steam_api#SteamAPI_RestartAppIfNecessary}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamworks.js-timmy",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "napi": {