steamworks.js-timmy 0.1.12 → 0.1.13

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,11 @@
1
+ export interface FriendInfo {
2
+ name: string
3
+ nickName?: string
4
+ smallAvatar?: Buffer
5
+ mediumAvatar?: Buffer
6
+ largeAvatar?: Buffer
7
+ }
8
+
1
9
  export declare function init(appId?: number | undefined | null): void
2
10
 
3
11
  export interface PlayerSteamId {
@@ -10,6 +18,12 @@ export declare function restartAppIfNecessary(appId: number): boolean
10
18
 
11
19
  export declare function runCallbacks(): void
12
20
 
21
+ /**
22
+ * Shutdown the Steam client instance
23
+ * PLEASE DON'T USE THIS. Use [`shutdown`] instead.
24
+ */
25
+ export declare function shutdownClient(): void
26
+
13
27
  export declare namespace achievement {
14
28
  export function activate(achievement: string): boolean
15
29
  export function clear(achievement: string): boolean
@@ -86,9 +100,13 @@ export declare namespace cloud {
86
100
  export function writeFile(name: string, content: string): boolean
87
101
  }
88
102
 
103
+ export declare namespace friends {
104
+ export function requestUserInformation(steamId: bigint, requireNameOnly: boolean, timeoutSeconds?: number | undefined | null): Promise<FriendInfo>
105
+ }
106
+
89
107
  export declare namespace input {
90
108
  export class Controller {
91
- activateActionSet(actionSetHandle: bigint): void
109
+ activateActionSet(actionSetHandle: bigint): boolean
92
110
  isDigitalActionPressed(actionHandle: bigint): boolean
93
111
  getAnalogActionVector(actionHandle: bigint): AnalogActionVector
94
112
  getType(): InputType
@@ -105,7 +123,6 @@ export declare namespace input {
105
123
  getDigitalActionOrigins(actionSetHandle: bigint, digitalActionHandle: bigint): Array<InputActionOrigins>
106
124
  getCurrentActiveActionSet(): bigint
107
125
  }
108
- export function activateActionSetAll(actionSetHandle: bigint): void
109
126
  export interface AnalogActionVector {
110
127
  x: number
111
128
  y: number
@@ -1,3 +1,11 @@
1
+ export interface FriendInfo {
2
+ name: string
3
+ nickName?: string
4
+ smallAvatar?: Buffer
5
+ mediumAvatar?: Buffer
6
+ largeAvatar?: Buffer
7
+ }
8
+
1
9
  export declare function init(appId?: number | undefined | null): void
2
10
 
3
11
  export interface PlayerSteamId {
@@ -10,6 +18,12 @@ export declare function restartAppIfNecessary(appId: number): boolean
10
18
 
11
19
  export declare function runCallbacks(): void
12
20
 
21
+ /**
22
+ * Shutdown the Steam client instance
23
+ * PLEASE DON'T USE THIS. Use [`shutdown`] instead.
24
+ */
25
+ export declare function shutdownClient(): void
26
+
13
27
  export declare namespace achievement {
14
28
  export function activate(achievement: string): boolean
15
29
  export function clear(achievement: string): boolean
@@ -86,9 +100,13 @@ export declare namespace cloud {
86
100
  export function writeFile(name: string, content: string): boolean
87
101
  }
88
102
 
103
+ export declare namespace friends {
104
+ export function requestUserInformation(steamId: bigint, requireNameOnly: boolean, timeoutSeconds?: number | undefined | null): Promise<FriendInfo>
105
+ }
106
+
89
107
  export declare namespace input {
90
108
  export class Controller {
91
- activateActionSet(actionSetHandle: bigint): void
109
+ activateActionSet(actionSetHandle: bigint): boolean
92
110
  isDigitalActionPressed(actionHandle: bigint): boolean
93
111
  getAnalogActionVector(actionHandle: bigint): AnalogActionVector
94
112
  getType(): InputType
@@ -105,7 +123,6 @@ export declare namespace input {
105
123
  getDigitalActionOrigins(actionSetHandle: bigint, digitalActionHandle: bigint): Array<InputActionOrigins>
106
124
  getCurrentActiveActionSet(): bigint
107
125
  }
108
- export function activateActionSetAll(actionSetHandle: bigint): void
109
126
  export interface AnalogActionVector {
110
127
  x: number
111
128
  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,11 @@
1
+ export interface FriendInfo {
2
+ name: string
3
+ nickName?: string
4
+ smallAvatar?: Buffer
5
+ mediumAvatar?: Buffer
6
+ largeAvatar?: Buffer
7
+ }
8
+
1
9
  export declare function init(appId?: number | undefined | null): void
2
10
 
3
11
  export interface PlayerSteamId {
@@ -10,6 +18,12 @@ export declare function restartAppIfNecessary(appId: number): boolean
10
18
 
11
19
  export declare function runCallbacks(): void
12
20
 
21
+ /**
22
+ * Shutdown the Steam client instance
23
+ * PLEASE DON'T USE THIS. Use [`shutdown`] instead.
24
+ */
25
+ export declare function shutdownClient(): void
26
+
13
27
  export declare namespace achievement {
14
28
  export function activate(achievement: string): boolean
15
29
  export function clear(achievement: string): boolean
@@ -86,9 +100,13 @@ export declare namespace cloud {
86
100
  export function writeFile(name: string, content: string): boolean
87
101
  }
88
102
 
103
+ export declare namespace friends {
104
+ export function requestUserInformation(steamId: bigint, requireNameOnly: boolean, timeoutSeconds?: number | undefined | null): Promise<FriendInfo>
105
+ }
106
+
89
107
  export declare namespace input {
90
108
  export class Controller {
91
- activateActionSet(actionSetHandle: bigint): void
109
+ activateActionSet(actionSetHandle: bigint): boolean
92
110
  isDigitalActionPressed(actionHandle: bigint): boolean
93
111
  getAnalogActionVector(actionHandle: bigint): AnalogActionVector
94
112
  getType(): InputType
@@ -105,7 +123,6 @@ export declare namespace input {
105
123
  getDigitalActionOrigins(actionSetHandle: bigint, digitalActionHandle: bigint): Array<InputActionOrigins>
106
124
  getCurrentActiveActionSet(): bigint
107
125
  }
108
- export function activateActionSetAll(actionSetHandle: bigint): void
109
126
  export interface AnalogActionVector {
110
127
  x: number
111
128
  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,11 @@
1
+ export interface FriendInfo {
2
+ name: string
3
+ nickName?: string
4
+ smallAvatar?: Buffer
5
+ mediumAvatar?: Buffer
6
+ largeAvatar?: Buffer
7
+ }
8
+
1
9
  export declare function init(appId?: number | undefined | null): void
2
10
 
3
11
  export interface PlayerSteamId {
@@ -10,6 +18,12 @@ export declare function restartAppIfNecessary(appId: number): boolean
10
18
 
11
19
  export declare function runCallbacks(): void
12
20
 
21
+ /**
22
+ * Shutdown the Steam client instance
23
+ * PLEASE DON'T USE THIS. Use [`shutdown`] instead.
24
+ */
25
+ export declare function shutdownClient(): void
26
+
13
27
  export declare namespace achievement {
14
28
  export function activate(achievement: string): boolean
15
29
  export function clear(achievement: string): boolean
@@ -86,9 +100,13 @@ export declare namespace cloud {
86
100
  export function writeFile(name: string, content: string): boolean
87
101
  }
88
102
 
103
+ export declare namespace friends {
104
+ export function requestUserInformation(steamId: bigint, requireNameOnly: boolean, timeoutSeconds?: number | undefined | null): Promise<FriendInfo>
105
+ }
106
+
89
107
  export declare namespace input {
90
108
  export class Controller {
91
- activateActionSet(actionSetHandle: bigint): void
109
+ activateActionSet(actionSetHandle: bigint): boolean
92
110
  isDigitalActionPressed(actionHandle: bigint): boolean
93
111
  getAnalogActionVector(actionHandle: bigint): AnalogActionVector
94
112
  getType(): InputType
@@ -105,7 +123,6 @@ export declare namespace input {
105
123
  getDigitalActionOrigins(actionSetHandle: bigint, digitalActionHandle: bigint): Array<InputActionOrigins>
106
124
  getCurrentActiveActionSet(): bigint
107
125
  }
108
- export function activateActionSetAll(actionSetHandle: bigint): void
109
126
  export interface AnalogActionVector {
110
127
  x: number
111
128
  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.13",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "napi": {