Server Management (Requires License Link)
- getInfo - Server Info
- getStats - Server Statistics
- getBans - Server Active Bans
- getBanHistory - Server Ban History
- getConfig - Server Config
- getPlayers - Online Players List
- getAdmins - Server Admins
- getLogs - Server Logs
- lookupPlayer - Lookup Player
- requestScreenshot - Request Screenshot
- kick - Kick Player
- getBan - Get Ban Info
- ban - Ban Player
- banOffline - Ban Player Offline
- unban - Unban Player
- unbanLast - Unban Last Players
- unbanAll - Unban All Players
- executeCommand - Execute Console Command
- addAdmin - Add Admin
- removeAdmin - Remove Admin
Cost 2
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.getInfo();
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverGetInfo } from "waveshield/funcs/serverGetInfo.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverGetInfo(waveShield);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverGetInfo failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetV1ServerResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 5
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.getStats({});
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverGetStats } from "waveshield/funcs/serverGetStats.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverGetStats(waveShield, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverGetStats failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetV1ServerStatsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetV1ServerStatsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 5
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.getBans();
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverGetBans } from "waveshield/funcs/serverGetBans.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverGetBans(waveShield);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverGetBans failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetV1ServerBansRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetV1ServerBansResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 5
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.getBanHistory();
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverGetBanHistory } from "waveshield/funcs/serverGetBanHistory.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverGetBanHistory(waveShield);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverGetBanHistory failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetV1ServerBansHistoryRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetV1ServerBansHistoryResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 2
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.getConfig();
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverGetConfig } from "waveshield/funcs/serverGetConfig.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverGetConfig(waveShield);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverGetConfig failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetV1ServerConfigResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 2
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.getPlayers();
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverGetPlayers } from "waveshield/funcs/serverGetPlayers.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverGetPlayers(waveShield);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverGetPlayers failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetV1ServerPlayersResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 2
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.getAdmins();
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverGetAdmins } from "waveshield/funcs/serverGetAdmins.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverGetAdmins(waveShield);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverGetAdmins failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetV1ServerAdminsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 10
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.getLogs();
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverGetLogs } from "waveshield/funcs/serverGetLogs.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverGetLogs(waveShield);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverGetLogs failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetV1ServerLogsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetV1ServerLogsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 15
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.lookupPlayer({
identifier: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverLookupPlayer } from "waveshield/funcs/serverLookupPlayer.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverLookupPlayer(waveShield, {
identifier: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverLookupPlayer failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PostV1ServerLookupRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.PostV1ServerLookupResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 10
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.requestScreenshot({
playerId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverRequestScreenshot } from "waveshield/funcs/serverRequestScreenshot.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverRequestScreenshot(waveShield, {
playerId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverRequestScreenshot failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PostV1ServerScreenshotRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.PostV1ServerScreenshotResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 5
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.kick({
playerId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverKick } from "waveshield/funcs/serverKick.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverKick(waveShield, {
playerId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverKick failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PostV1ServerKickRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.PostV1ServerKickResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 2
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.getBan({
banId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverGetBan } from "waveshield/funcs/serverGetBan.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverGetBan(waveShield, {
banId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverGetBan failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetV1ServerBanRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetV1ServerBanResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 5
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.ban({
playerId: "<id>",
reason: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverBan } from "waveshield/funcs/serverBan.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverBan(waveShield, {
playerId: "<id>",
reason: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverBan failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PostV1ServerBanRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.PostV1ServerBanResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 10
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.banOffline({
reason: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverBanOffline } from "waveshield/funcs/serverBanOffline.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverBanOffline(waveShield, {
reason: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverBanOffline failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PostV1ServerBanOfflineRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.PostV1ServerBanOfflineResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 5
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.unban({
banId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverUnban } from "waveshield/funcs/serverUnban.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverUnban(waveShield, {
banId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverUnban failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PostV1ServerUnbanRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.PostV1ServerUnbanResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 10
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.unbanLast();
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverUnbanLast } from "waveshield/funcs/serverUnbanLast.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverUnbanLast(waveShield);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverUnbanLast failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PostV1ServerUnbanLastRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.PostV1ServerUnbanLastResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 50
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.unbanAll();
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverUnbanAll } from "waveshield/funcs/serverUnbanAll.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverUnbanAll(waveShield);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverUnbanAll failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.PostV1ServerUnbanAllResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 5
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.executeCommand({
command: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverExecuteCommand } from "waveshield/funcs/serverExecuteCommand.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverExecuteCommand(waveShield, {
command: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverExecuteCommand failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PostV1ServerExecRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.PostV1ServerExecResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 5
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.addAdmin({
discordId: "<id>",
permissions: [],
});
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverAddAdmin } from "waveshield/funcs/serverAddAdmin.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverAddAdmin(waveShield, {
discordId: "<id>",
permissions: [],
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverAddAdmin failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PostV1ServerAdminAddRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.PostV1ServerAdminAddResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 5
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.server.removeAdmin({
discordId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { serverRemoveAdmin } from "waveshield/funcs/serverRemoveAdmin.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await serverRemoveAdmin(waveShield, {
discordId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("serverRemoveAdmin failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PostV1ServerAdminRemoveRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.PostV1ServerAdminRemoveResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |