Skip to content

Latest commit

 

History

History
1567 lines (1163 loc) · 115 KB

File metadata and controls

1567 lines (1163 loc) · 115 KB

Server

Overview

Server Management (Requires License Link)

Available Operations

getInfo

Cost 2

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.GetV1ServerResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

getStats

Cost 5

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.GetV1ServerStatsResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

getBans

Cost 5

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.GetV1ServerBansResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

getBanHistory

Cost 5

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.GetV1ServerBansHistoryResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

getConfig

Cost 2

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.GetV1ServerConfigResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

getPlayers

Cost 2

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.GetV1ServerPlayersResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

getAdmins

Cost 2

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.GetV1ServerAdminsResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

getLogs

Cost 10

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.GetV1ServerLogsResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

lookupPlayer

Cost 15

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.PostV1ServerLookupResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

requestScreenshot

Cost 10

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.PostV1ServerScreenshotResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

kick

Cost 5

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.PostV1ServerKickResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

getBan

Cost 2

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.GetV1ServerBanResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

ban

Cost 5

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.PostV1ServerBanResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

banOffline

Cost 10

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.PostV1ServerBanOfflineResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

unban

Cost 5

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.PostV1ServerUnbanResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

unbanLast

Cost 10

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.PostV1ServerUnbanLastResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

unbanAll

Cost 50

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.PostV1ServerUnbanAllResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

executeCommand

Cost 5

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.PostV1ServerExecResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

addAdmin

Cost 5

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.PostV1ServerAdminAddResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

removeAdmin

Cost 5

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<operations.PostV1ServerAdminRemoveResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*