Skip to content

Commit 74892fb

Browse files
committed
feat: add SetAutoLoadSessionName
1 parent 3fafd2f commit 74892fb

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

src/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export type {
4040
ServerNotClaimedErrorResponse,
4141
SetAdminPasswordRequest,
4242
SetAdminPasswordResponse,
43+
SetAutoLoadSessionNameRequest,
44+
SetAutoLoadSessionNameResponse,
4345
SetClientPasswordRequest,
4446
SetClientPasswordResponse,
4547
VerifyAuthenticationTokenRequest,

src/v1/SetAutoLoadSessionName.ts

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import type { ApiRequest } from "./common.js";
2+
import { buildApiRequest } from "./common.js";
3+
4+
export type SetAutoLoadSessionNameRequest = ApiRequest<
5+
"SetAutoLoadSessionName",
6+
{
7+
/**
8+
* Name of the session to automatically load on Dedicated Server startup.
9+
*/
10+
sessionName: string;
11+
}
12+
>;
13+
14+
export type SetAutoLoadSessionNameResponse = string;
15+
16+
export const buildSetAutoLoadSessionName = buildApiRequest<
17+
SetAutoLoadSessionNameRequest,
18+
SetAutoLoadSessionNameResponse
19+
>("v1", {
20+
function: "SetAutoLoadSessionName",
21+
});

src/v1/index.ts

+12
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { buildPasswordLogin } from "./PasswordLogin.js";
99
import { buildQueryServerState } from "./QueryServerState.js";
1010
import { buildRenameServer } from "./RenameServer.js";
1111
import { buildSetAdminPassword } from "./SetAdminPassword.js";
12+
import { buildSetAutoLoadSessionName } from "./SetAutoLoadSessionName.js";
1213
import { buildSetClientPassword } from "./SetClientPassword.js";
1314
import { buildVerifyAuthenticationToken } from "./VerifyAuthenticationToken.js";
1415

@@ -98,6 +99,16 @@ export function buildV1(options: InternalClientOptions) {
9899
* Function does not return any data on success.
99100
*/
100101
SetAdminPassword: buildSetAdminPassword(options),
102+
/**
103+
* Updates the name of the session that the Dedicated Server will automatically load on startup.
104+
*
105+
* Does not change currently loaded session.
106+
*
107+
* Requires Admin privileges.
108+
*
109+
* Function does not return any data on success.
110+
*/
111+
SetAutoLoadSessionName: buildSetAutoLoadSessionName(options),
101112
};
102113
}
103114

@@ -113,5 +124,6 @@ export type * from "./PasswordLogin.js";
113124
export type * from "./QueryServerState.js";
114125
export type * from "./RenameServer.js";
115126
export type * from "./SetAdminPassword.js";
127+
export type * from "./SetAutoLoadSessionName.js";
116128
export type * from "./SetClientPassword.js";
117129
export type * from "./VerifyAuthenticationToken.js";

0 commit comments

Comments
 (0)