@rebornteam/reborn-api 2.5.1 → 2.6.4
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/.openapi-generator/FILES +20 -4
- package/README.md +32 -12
- package/api.ts +1372 -357
- package/base.ts +2 -2
- package/common.ts +2 -2
- package/configuration.ts +2 -2
- package/dist/api.d.ts +795 -176
- package/dist/api.js +954 -268
- package/dist/base.d.ts +2 -2
- package/dist/base.js +2 -2
- package/dist/common.d.ts +2 -2
- package/dist/common.js +2 -2
- package/dist/configuration.d.ts +2 -2
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +795 -176
- package/dist/esm/api.js +917 -243
- package/dist/esm/base.d.ts +2 -2
- package/dist/esm/base.js +2 -2
- package/dist/esm/common.d.ts +2 -2
- package/dist/esm/common.js +2 -2
- package/dist/esm/configuration.d.ts +2 -2
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/docs/AdminApplyPunishmentRequest.md +33 -0
- package/docs/AdminApplyPunishmentResponse.md +21 -0
- package/docs/AdminApplyPunishmentResult.md +33 -0
- package/docs/AdminClientCredentialResponse.md +2 -0
- package/docs/AdminClientCredentialsApi.md +17 -17
- package/docs/AdminConnectionsApi.md +70 -4
- package/docs/AdminCreatePunishmentDraftRequest.md +31 -0
- package/docs/AdminDashboardApi.md +2 -2
- package/docs/AdminIpSearchResult.md +23 -0
- package/docs/AdminPagedConnectionResponse.md +29 -0
- package/docs/AdminPagedPlayerResponse.md +29 -0
- package/docs/AdminPagedPunishmentResponse.md +29 -0
- package/docs/AdminPlayerDetailResponse.md +37 -0
- package/docs/AdminPlayerSearchResult.md +23 -0
- package/docs/AdminPlayerSummary.md +35 -0
- package/docs/AdminPlayersApi.md +122 -0
- package/docs/AdminPunishmentDraftResponse.md +21 -0
- package/docs/AdminPunishmentEvaluation.md +39 -0
- package/docs/AdminPunishmentListItem.md +42 -0
- package/docs/AdminPunishmentSearchResponse.md +25 -0
- package/docs/AdminPunishmentTarget.md +23 -0
- package/docs/AdminPunishmentsApi.md +248 -0
- package/docs/AdminUsernameHistoryEntry.md +23 -0
- package/docs/ClientCredentialRequest.md +2 -0
- package/docs/ConnectionApi.md +1 -1
- package/docs/DefaultApi.md +105 -0
- package/docs/PlayerApi.md +5 -5
- package/docs/PunishmentApi.md +8 -114
- package/docs/PunishmentGetPunishmentResponse.md +5 -3
- package/index.ts +2 -2
- package/package.json +2 -2
- package/docs/ApplyPunishmentRequest.md +0 -31
- package/docs/ApplyPunishmentResponse.md +0 -33
- package/docs/CreatePunishmentDraftRequest.md +0 -29
- package/docs/PunishmentDraftResponse.md +0 -39
package/dist/esm/api.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Reborn API
|
|
5
|
-
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **
|
|
5
|
+
* The Reborn API serves as the central backend for the platform, orchestrating secure communication between game clients and data services. This API supports two authentication methods: - **OAuth 2.0 Client Credentials**: For programmatic API access - **Discord SSO Bearer Token**: For admin endpoints requiring Discord authentication
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.6.4
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -26,6 +26,20 @@ import globalAxios from 'axios';
|
|
|
26
26
|
import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
27
27
|
// @ts-ignore
|
|
28
28
|
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from './base';
|
|
29
|
+
export const AdminApplyPunishmentRequestTypeEnum = {
|
|
30
|
+
Ban: 'BAN',
|
|
31
|
+
Mute: 'MUTE',
|
|
32
|
+
Warning: 'WARNING'
|
|
33
|
+
};
|
|
34
|
+
export const AdminCreatePunishmentDraftRequestTypeEnum = {
|
|
35
|
+
Ban: 'BAN',
|
|
36
|
+
Mute: 'MUTE',
|
|
37
|
+
Warning: 'WARNING'
|
|
38
|
+
};
|
|
39
|
+
export const AdminPunishmentSearchResponseKindEnum = {
|
|
40
|
+
Player: 'player',
|
|
41
|
+
Ip: 'ip'
|
|
42
|
+
};
|
|
29
43
|
/**
|
|
30
44
|
* AdminClientCredentialsApi - axios parameter creator
|
|
31
45
|
*/
|
|
@@ -52,7 +66,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
|
|
|
52
66
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
53
67
|
const localVarHeaderParameter = {};
|
|
54
68
|
const localVarQueryParameter = {};
|
|
55
|
-
// authentication
|
|
69
|
+
// authentication DiscordAuth required
|
|
56
70
|
// http bearer authentication required
|
|
57
71
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
58
72
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -84,7 +98,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
|
|
|
84
98
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
85
99
|
const localVarHeaderParameter = {};
|
|
86
100
|
const localVarQueryParameter = {};
|
|
87
|
-
// authentication
|
|
101
|
+
// authentication DiscordAuth required
|
|
88
102
|
// http bearer authentication required
|
|
89
103
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
90
104
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -115,7 +129,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
|
|
|
115
129
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
116
130
|
const localVarHeaderParameter = {};
|
|
117
131
|
const localVarQueryParameter = {};
|
|
118
|
-
// authentication
|
|
132
|
+
// authentication DiscordAuth required
|
|
119
133
|
// http bearer authentication required
|
|
120
134
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
121
135
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -146,7 +160,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
|
|
|
146
160
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
147
161
|
const localVarHeaderParameter = {};
|
|
148
162
|
const localVarQueryParameter = {};
|
|
149
|
-
// authentication
|
|
163
|
+
// authentication DiscordAuth required
|
|
150
164
|
// http bearer authentication required
|
|
151
165
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
152
166
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
@@ -179,7 +193,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
|
|
|
179
193
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
180
194
|
const localVarHeaderParameter = {};
|
|
181
195
|
const localVarQueryParameter = {};
|
|
182
|
-
// authentication
|
|
196
|
+
// authentication DiscordAuth required
|
|
183
197
|
// http bearer authentication required
|
|
184
198
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
185
199
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -211,7 +225,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
|
|
|
211
225
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
212
226
|
const localVarHeaderParameter = {};
|
|
213
227
|
const localVarQueryParameter = {};
|
|
214
|
-
// authentication
|
|
228
|
+
// authentication DiscordAuth required
|
|
215
229
|
// http bearer authentication required
|
|
216
230
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
217
231
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
@@ -247,7 +261,7 @@ export const AdminClientCredentialsApiAxiosParamCreator = function (configuratio
|
|
|
247
261
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
248
262
|
const localVarHeaderParameter = {};
|
|
249
263
|
const localVarQueryParameter = {};
|
|
250
|
-
// authentication
|
|
264
|
+
// authentication DiscordAuth required
|
|
251
265
|
// http bearer authentication required
|
|
252
266
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
253
267
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -561,7 +575,7 @@ export const AdminConnectionsApiAxiosParamCreator = function (configuration) {
|
|
|
561
575
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
562
576
|
const localVarHeaderParameter = {};
|
|
563
577
|
const localVarQueryParameter = {};
|
|
564
|
-
// authentication
|
|
578
|
+
// authentication DiscordAuth required
|
|
565
579
|
// http bearer authentication required
|
|
566
580
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
567
581
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -575,6 +589,55 @@ export const AdminConnectionsApiAxiosParamCreator = function (configuration) {
|
|
|
575
589
|
options: localVarRequestOptions,
|
|
576
590
|
};
|
|
577
591
|
}),
|
|
592
|
+
/**
|
|
593
|
+
* Returns a paginated list of all connections with a total count. Supports filtering by IP address, UUID, and VPN status.
|
|
594
|
+
* @summary List all connections (paginated)
|
|
595
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
596
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
597
|
+
* @param {boolean | null} [isVpn] Filter by VPN status
|
|
598
|
+
* @param {number | null} [page] Page number (1-indexed)
|
|
599
|
+
* @param {number | null} [limit] Page size
|
|
600
|
+
* @param {*} [options] Override http request option.
|
|
601
|
+
* @throws {RequiredError}
|
|
602
|
+
*/
|
|
603
|
+
listAllConnections: (ipAddress_1, uuid_1, isVpn_1, page_1, limit_1, ...args_1) => __awaiter(this, [ipAddress_1, uuid_1, isVpn_1, page_1, limit_1, ...args_1], void 0, function* (ipAddress, uuid, isVpn, page, limit, options = {}) {
|
|
604
|
+
const localVarPath = `/admin/connection`;
|
|
605
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
606
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
607
|
+
let baseOptions;
|
|
608
|
+
if (configuration) {
|
|
609
|
+
baseOptions = configuration.baseOptions;
|
|
610
|
+
}
|
|
611
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
612
|
+
const localVarHeaderParameter = {};
|
|
613
|
+
const localVarQueryParameter = {};
|
|
614
|
+
// authentication DiscordAuth required
|
|
615
|
+
// http bearer authentication required
|
|
616
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
617
|
+
if (ipAddress !== undefined) {
|
|
618
|
+
localVarQueryParameter['ipAddress'] = ipAddress;
|
|
619
|
+
}
|
|
620
|
+
if (uuid !== undefined) {
|
|
621
|
+
localVarQueryParameter['uuid'] = uuid;
|
|
622
|
+
}
|
|
623
|
+
if (isVpn !== undefined) {
|
|
624
|
+
localVarQueryParameter['isVpn'] = isVpn;
|
|
625
|
+
}
|
|
626
|
+
if (page !== undefined) {
|
|
627
|
+
localVarQueryParameter['page'] = page;
|
|
628
|
+
}
|
|
629
|
+
if (limit !== undefined) {
|
|
630
|
+
localVarQueryParameter['limit'] = limit;
|
|
631
|
+
}
|
|
632
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
633
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
634
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
635
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
636
|
+
return {
|
|
637
|
+
url: toPathString(localVarUrlObj),
|
|
638
|
+
options: localVarRequestOptions,
|
|
639
|
+
};
|
|
640
|
+
}),
|
|
578
641
|
/**
|
|
579
642
|
* Returns a list of recent connections with VPN detection status, bypass information, and associated player data. Optionally filter by epoch timestamp (seconds since Unix epoch).
|
|
580
643
|
* @summary List recent connections
|
|
@@ -599,7 +662,7 @@ export const AdminConnectionsApiAxiosParamCreator = function (configuration) {
|
|
|
599
662
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
600
663
|
const localVarHeaderParameter = {};
|
|
601
664
|
const localVarQueryParameter = {};
|
|
602
|
-
// authentication
|
|
665
|
+
// authentication DiscordAuth required
|
|
603
666
|
// http bearer authentication required
|
|
604
667
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
605
668
|
if (createdAfter !== undefined) {
|
|
@@ -656,6 +719,26 @@ export const AdminConnectionsApiFp = function (configuration) {
|
|
|
656
719
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
657
720
|
});
|
|
658
721
|
},
|
|
722
|
+
/**
|
|
723
|
+
* Returns a paginated list of all connections with a total count. Supports filtering by IP address, UUID, and VPN status.
|
|
724
|
+
* @summary List all connections (paginated)
|
|
725
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
726
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
727
|
+
* @param {boolean | null} [isVpn] Filter by VPN status
|
|
728
|
+
* @param {number | null} [page] Page number (1-indexed)
|
|
729
|
+
* @param {number | null} [limit] Page size
|
|
730
|
+
* @param {*} [options] Override http request option.
|
|
731
|
+
* @throws {RequiredError}
|
|
732
|
+
*/
|
|
733
|
+
listAllConnections(ipAddress, uuid, isVpn, page, limit, options) {
|
|
734
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
735
|
+
var _a, _b, _c;
|
|
736
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listAllConnections(ipAddress, uuid, isVpn, page, limit, options);
|
|
737
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
738
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminConnectionsApi.listAllConnections']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
739
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
740
|
+
});
|
|
741
|
+
},
|
|
659
742
|
/**
|
|
660
743
|
* Returns a list of recent connections with VPN detection status, bypass information, and associated player data. Optionally filter by epoch timestamp (seconds since Unix epoch).
|
|
661
744
|
* @summary List recent connections
|
|
@@ -696,6 +779,20 @@ export const AdminConnectionsApiFactory = function (configuration, basePath, axi
|
|
|
696
779
|
createBypass(createBypassRequest, options) {
|
|
697
780
|
return localVarFp.createBypass(createBypassRequest, options).then((request) => request(axios, basePath));
|
|
698
781
|
},
|
|
782
|
+
/**
|
|
783
|
+
* Returns a paginated list of all connections with a total count. Supports filtering by IP address, UUID, and VPN status.
|
|
784
|
+
* @summary List all connections (paginated)
|
|
785
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
786
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
787
|
+
* @param {boolean | null} [isVpn] Filter by VPN status
|
|
788
|
+
* @param {number | null} [page] Page number (1-indexed)
|
|
789
|
+
* @param {number | null} [limit] Page size
|
|
790
|
+
* @param {*} [options] Override http request option.
|
|
791
|
+
* @throws {RequiredError}
|
|
792
|
+
*/
|
|
793
|
+
listAllConnections(ipAddress, uuid, isVpn, page, limit, options) {
|
|
794
|
+
return localVarFp.listAllConnections(ipAddress, uuid, isVpn, page, limit, options).then((request) => request(axios, basePath));
|
|
795
|
+
},
|
|
699
796
|
/**
|
|
700
797
|
* Returns a list of recent connections with VPN detection status, bypass information, and associated player data. Optionally filter by epoch timestamp (seconds since Unix epoch).
|
|
701
798
|
* @summary List recent connections
|
|
@@ -728,6 +825,20 @@ export class AdminConnectionsApi extends BaseAPI {
|
|
|
728
825
|
createBypass(createBypassRequest, options) {
|
|
729
826
|
return AdminConnectionsApiFp(this.configuration).createBypass(createBypassRequest, options).then((request) => request(this.axios, this.basePath));
|
|
730
827
|
}
|
|
828
|
+
/**
|
|
829
|
+
* Returns a paginated list of all connections with a total count. Supports filtering by IP address, UUID, and VPN status.
|
|
830
|
+
* @summary List all connections (paginated)
|
|
831
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
832
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
833
|
+
* @param {boolean | null} [isVpn] Filter by VPN status
|
|
834
|
+
* @param {number | null} [page] Page number (1-indexed)
|
|
835
|
+
* @param {number | null} [limit] Page size
|
|
836
|
+
* @param {*} [options] Override http request option.
|
|
837
|
+
* @throws {RequiredError}
|
|
838
|
+
*/
|
|
839
|
+
listAllConnections(ipAddress, uuid, isVpn, page, limit, options) {
|
|
840
|
+
return AdminConnectionsApiFp(this.configuration).listAllConnections(ipAddress, uuid, isVpn, page, limit, options).then((request) => request(this.axios, this.basePath));
|
|
841
|
+
}
|
|
731
842
|
/**
|
|
732
843
|
* Returns a list of recent connections with VPN detection status, bypass information, and associated player data. Optionally filter by epoch timestamp (seconds since Unix epoch).
|
|
733
844
|
* @summary List recent connections
|
|
@@ -767,7 +878,7 @@ export const AdminDashboardApiAxiosParamCreator = function (configuration) {
|
|
|
767
878
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
768
879
|
const localVarHeaderParameter = {};
|
|
769
880
|
const localVarQueryParameter = {};
|
|
770
|
-
// authentication
|
|
881
|
+
// authentication DiscordAuth required
|
|
771
882
|
// http bearer authentication required
|
|
772
883
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
773
884
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
@@ -836,26 +947,22 @@ export class AdminDashboardApi extends BaseAPI {
|
|
|
836
947
|
}
|
|
837
948
|
}
|
|
838
949
|
/**
|
|
839
|
-
*
|
|
950
|
+
* AdminPlayersApi - axios parameter creator
|
|
840
951
|
*/
|
|
841
|
-
export const
|
|
952
|
+
export const AdminPlayersApiAxiosParamCreator = function (configuration) {
|
|
842
953
|
return {
|
|
843
954
|
/**
|
|
844
|
-
*
|
|
845
|
-
* @summary
|
|
846
|
-
* @param {string}
|
|
847
|
-
* @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
|
|
848
|
-
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
955
|
+
* Returns full detail for a single player including all known usernames and punishment scoring.
|
|
956
|
+
* @summary Get player detail
|
|
957
|
+
* @param {string} uuid Player Minecraft UUID
|
|
849
958
|
* @param {*} [options] Override http request option.
|
|
850
959
|
* @throws {RequiredError}
|
|
851
960
|
*/
|
|
852
|
-
|
|
853
|
-
// verify required parameter '
|
|
854
|
-
assertParamExists('
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
const localVarPath = `/v1/connection/get-connection-details/{ip}`
|
|
858
|
-
.replace(`{${"ip"}}`, encodeURIComponent(String(ip)));
|
|
961
|
+
getPlayer: (uuid_1, ...args_1) => __awaiter(this, [uuid_1, ...args_1], void 0, function* (uuid, options = {}) {
|
|
962
|
+
// verify required parameter 'uuid' is not null or undefined
|
|
963
|
+
assertParamExists('getPlayer', 'uuid', uuid);
|
|
964
|
+
const localVarPath = `/admin/player/{uuid}`
|
|
965
|
+
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
|
|
859
966
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
860
967
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
861
968
|
let baseOptions;
|
|
@@ -865,15 +972,9 @@ export const ConnectionApiAxiosParamCreator = function (configuration) {
|
|
|
865
972
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
866
973
|
const localVarHeaderParameter = {};
|
|
867
974
|
const localVarQueryParameter = {};
|
|
868
|
-
// authentication
|
|
975
|
+
// authentication DiscordAuth required
|
|
869
976
|
// http bearer authentication required
|
|
870
977
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
871
|
-
if (forceRecheck !== undefined) {
|
|
872
|
-
localVarQueryParameter['force_recheck'] = forceRecheck;
|
|
873
|
-
}
|
|
874
|
-
if (associateUuid !== undefined) {
|
|
875
|
-
localVarQueryParameter['associate_uuid'] = associateUuid;
|
|
876
|
-
}
|
|
877
978
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
878
979
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
879
980
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -883,88 +984,21 @@ export const ConnectionApiAxiosParamCreator = function (configuration) {
|
|
|
883
984
|
options: localVarRequestOptions,
|
|
884
985
|
};
|
|
885
986
|
}),
|
|
886
|
-
};
|
|
887
|
-
};
|
|
888
|
-
/**
|
|
889
|
-
* ConnectionApi - functional programming interface
|
|
890
|
-
*/
|
|
891
|
-
export const ConnectionApiFp = function (configuration) {
|
|
892
|
-
const localVarAxiosParamCreator = ConnectionApiAxiosParamCreator(configuration);
|
|
893
|
-
return {
|
|
894
|
-
/**
|
|
895
|
-
* Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
|
|
896
|
-
* @summary Check Connection and Detect VPN/Proxy
|
|
897
|
-
* @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
|
|
898
|
-
* @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
|
|
899
|
-
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
900
|
-
* @param {*} [options] Override http request option.
|
|
901
|
-
* @throws {RequiredError}
|
|
902
|
-
*/
|
|
903
|
-
getConnectionDetails(ip, forceRecheck, associateUuid, options) {
|
|
904
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
905
|
-
var _a, _b, _c;
|
|
906
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getConnectionDetails(ip, forceRecheck, associateUuid, options);
|
|
907
|
-
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
908
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ConnectionApi.getConnectionDetails']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
909
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
910
|
-
});
|
|
911
|
-
},
|
|
912
|
-
};
|
|
913
|
-
};
|
|
914
|
-
/**
|
|
915
|
-
* ConnectionApi - factory interface
|
|
916
|
-
*/
|
|
917
|
-
export const ConnectionApiFactory = function (configuration, basePath, axios) {
|
|
918
|
-
const localVarFp = ConnectionApiFp(configuration);
|
|
919
|
-
return {
|
|
920
987
|
/**
|
|
921
|
-
*
|
|
922
|
-
* @summary
|
|
923
|
-
* @param {
|
|
924
|
-
* @param {
|
|
925
|
-
* @param {string | null} [
|
|
926
|
-
* @param {*} [options] Override http request option.
|
|
927
|
-
* @throws {RequiredError}
|
|
928
|
-
*/
|
|
929
|
-
getConnectionDetails(ip, forceRecheck, associateUuid, options) {
|
|
930
|
-
return localVarFp.getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(axios, basePath));
|
|
931
|
-
},
|
|
932
|
-
};
|
|
933
|
-
};
|
|
934
|
-
/**
|
|
935
|
-
* ConnectionApi - object-oriented interface
|
|
936
|
-
*/
|
|
937
|
-
export class ConnectionApi extends BaseAPI {
|
|
938
|
-
/**
|
|
939
|
-
* Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
|
|
940
|
-
* @summary Check Connection and Detect VPN/Proxy
|
|
941
|
-
* @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
|
|
942
|
-
* @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
|
|
943
|
-
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
944
|
-
* @param {*} [options] Override http request option.
|
|
945
|
-
* @throws {RequiredError}
|
|
946
|
-
*/
|
|
947
|
-
getConnectionDetails(ip, forceRecheck, associateUuid, options) {
|
|
948
|
-
return ConnectionApiFp(this.configuration).getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(this.axios, this.basePath));
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
/**
|
|
952
|
-
* PlayerApi - axios parameter creator
|
|
953
|
-
*/
|
|
954
|
-
export const PlayerApiAxiosParamCreator = function (configuration) {
|
|
955
|
-
return {
|
|
956
|
-
/**
|
|
957
|
-
* Retrieves player information by their Minecraft UUID. Returns whether this is the player\'s first join and their first login timestamp. This endpoint is useful for tracking player join history and implementing first-join rewards or tutorials.
|
|
958
|
-
* @summary Get Player Information
|
|
959
|
-
* @param {string} uuid The Minecraft player UUID (with or without dashes)
|
|
988
|
+
* Returns up to 500 players ordered by most recently seen. Optionally filter by UUID or username substring.
|
|
989
|
+
* @summary List players
|
|
990
|
+
* @param {number} page Page number (1-indexed)
|
|
991
|
+
* @param {number} limit Page size
|
|
992
|
+
* @param {string | null} [search] Optional search string matched against UUID or username (case-insensitive substring)
|
|
960
993
|
* @param {*} [options] Override http request option.
|
|
961
994
|
* @throws {RequiredError}
|
|
962
995
|
*/
|
|
963
|
-
|
|
964
|
-
// verify required parameter '
|
|
965
|
-
assertParamExists('
|
|
966
|
-
|
|
967
|
-
|
|
996
|
+
listPlayers: (page_1, limit_1, search_1, ...args_1) => __awaiter(this, [page_1, limit_1, search_1, ...args_1], void 0, function* (page, limit, search, options = {}) {
|
|
997
|
+
// verify required parameter 'page' is not null or undefined
|
|
998
|
+
assertParamExists('listPlayers', 'page', page);
|
|
999
|
+
// verify required parameter 'limit' is not null or undefined
|
|
1000
|
+
assertParamExists('listPlayers', 'limit', limit);
|
|
1001
|
+
const localVarPath = `/admin/player`;
|
|
968
1002
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
969
1003
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
970
1004
|
let baseOptions;
|
|
@@ -974,9 +1008,18 @@ export const PlayerApiAxiosParamCreator = function (configuration) {
|
|
|
974
1008
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
975
1009
|
const localVarHeaderParameter = {};
|
|
976
1010
|
const localVarQueryParameter = {};
|
|
977
|
-
// authentication
|
|
1011
|
+
// authentication DiscordAuth required
|
|
978
1012
|
// http bearer authentication required
|
|
979
1013
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1014
|
+
if (search !== undefined) {
|
|
1015
|
+
localVarQueryParameter['search'] = search;
|
|
1016
|
+
}
|
|
1017
|
+
if (page !== undefined) {
|
|
1018
|
+
localVarQueryParameter['page'] = page;
|
|
1019
|
+
}
|
|
1020
|
+
if (limit !== undefined) {
|
|
1021
|
+
localVarQueryParameter['limit'] = limit;
|
|
1022
|
+
}
|
|
980
1023
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
981
1024
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
982
1025
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -989,15 +1032,15 @@ export const PlayerApiAxiosParamCreator = function (configuration) {
|
|
|
989
1032
|
};
|
|
990
1033
|
};
|
|
991
1034
|
/**
|
|
992
|
-
*
|
|
1035
|
+
* AdminPlayersApi - functional programming interface
|
|
993
1036
|
*/
|
|
994
|
-
export const
|
|
995
|
-
const localVarAxiosParamCreator =
|
|
1037
|
+
export const AdminPlayersApiFp = function (configuration) {
|
|
1038
|
+
const localVarAxiosParamCreator = AdminPlayersApiAxiosParamCreator(configuration);
|
|
996
1039
|
return {
|
|
997
1040
|
/**
|
|
998
|
-
*
|
|
999
|
-
* @summary Get
|
|
1000
|
-
* @param {string} uuid
|
|
1041
|
+
* Returns full detail for a single player including all known usernames and punishment scoring.
|
|
1042
|
+
* @summary Get player detail
|
|
1043
|
+
* @param {string} uuid Player Minecraft UUID
|
|
1001
1044
|
* @param {*} [options] Override http request option.
|
|
1002
1045
|
* @throws {RequiredError}
|
|
1003
1046
|
*/
|
|
@@ -1006,61 +1049,103 @@ export const PlayerApiFp = function (configuration) {
|
|
|
1006
1049
|
var _a, _b, _c;
|
|
1007
1050
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPlayer(uuid, options);
|
|
1008
1051
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1009
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['
|
|
1052
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminPlayersApi.getPlayer']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1053
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1054
|
+
});
|
|
1055
|
+
},
|
|
1056
|
+
/**
|
|
1057
|
+
* Returns up to 500 players ordered by most recently seen. Optionally filter by UUID or username substring.
|
|
1058
|
+
* @summary List players
|
|
1059
|
+
* @param {number} page Page number (1-indexed)
|
|
1060
|
+
* @param {number} limit Page size
|
|
1061
|
+
* @param {string | null} [search] Optional search string matched against UUID or username (case-insensitive substring)
|
|
1062
|
+
* @param {*} [options] Override http request option.
|
|
1063
|
+
* @throws {RequiredError}
|
|
1064
|
+
*/
|
|
1065
|
+
listPlayers(page, limit, search, options) {
|
|
1066
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1067
|
+
var _a, _b, _c;
|
|
1068
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listPlayers(page, limit, search, options);
|
|
1069
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1070
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminPlayersApi.listPlayers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1010
1071
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1011
1072
|
});
|
|
1012
1073
|
},
|
|
1013
1074
|
};
|
|
1014
1075
|
};
|
|
1015
1076
|
/**
|
|
1016
|
-
*
|
|
1077
|
+
* AdminPlayersApi - factory interface
|
|
1017
1078
|
*/
|
|
1018
|
-
export const
|
|
1019
|
-
const localVarFp =
|
|
1079
|
+
export const AdminPlayersApiFactory = function (configuration, basePath, axios) {
|
|
1080
|
+
const localVarFp = AdminPlayersApiFp(configuration);
|
|
1020
1081
|
return {
|
|
1021
1082
|
/**
|
|
1022
|
-
*
|
|
1023
|
-
* @summary Get
|
|
1024
|
-
* @param {string} uuid
|
|
1083
|
+
* Returns full detail for a single player including all known usernames and punishment scoring.
|
|
1084
|
+
* @summary Get player detail
|
|
1085
|
+
* @param {string} uuid Player Minecraft UUID
|
|
1025
1086
|
* @param {*} [options] Override http request option.
|
|
1026
1087
|
* @throws {RequiredError}
|
|
1027
1088
|
*/
|
|
1028
1089
|
getPlayer(uuid, options) {
|
|
1029
1090
|
return localVarFp.getPlayer(uuid, options).then((request) => request(axios, basePath));
|
|
1030
1091
|
},
|
|
1092
|
+
/**
|
|
1093
|
+
* Returns up to 500 players ordered by most recently seen. Optionally filter by UUID or username substring.
|
|
1094
|
+
* @summary List players
|
|
1095
|
+
* @param {number} page Page number (1-indexed)
|
|
1096
|
+
* @param {number} limit Page size
|
|
1097
|
+
* @param {string | null} [search] Optional search string matched against UUID or username (case-insensitive substring)
|
|
1098
|
+
* @param {*} [options] Override http request option.
|
|
1099
|
+
* @throws {RequiredError}
|
|
1100
|
+
*/
|
|
1101
|
+
listPlayers(page, limit, search, options) {
|
|
1102
|
+
return localVarFp.listPlayers(page, limit, search, options).then((request) => request(axios, basePath));
|
|
1103
|
+
},
|
|
1031
1104
|
};
|
|
1032
1105
|
};
|
|
1033
1106
|
/**
|
|
1034
|
-
*
|
|
1107
|
+
* AdminPlayersApi - object-oriented interface
|
|
1035
1108
|
*/
|
|
1036
|
-
export class
|
|
1109
|
+
export class AdminPlayersApi extends BaseAPI {
|
|
1037
1110
|
/**
|
|
1038
|
-
*
|
|
1039
|
-
* @summary Get
|
|
1040
|
-
* @param {string} uuid
|
|
1111
|
+
* Returns full detail for a single player including all known usernames and punishment scoring.
|
|
1112
|
+
* @summary Get player detail
|
|
1113
|
+
* @param {string} uuid Player Minecraft UUID
|
|
1041
1114
|
* @param {*} [options] Override http request option.
|
|
1042
1115
|
* @throws {RequiredError}
|
|
1043
1116
|
*/
|
|
1044
1117
|
getPlayer(uuid, options) {
|
|
1045
|
-
return
|
|
1118
|
+
return AdminPlayersApiFp(this.configuration).getPlayer(uuid, options).then((request) => request(this.axios, this.basePath));
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* Returns up to 500 players ordered by most recently seen. Optionally filter by UUID or username substring.
|
|
1122
|
+
* @summary List players
|
|
1123
|
+
* @param {number} page Page number (1-indexed)
|
|
1124
|
+
* @param {number} limit Page size
|
|
1125
|
+
* @param {string | null} [search] Optional search string matched against UUID or username (case-insensitive substring)
|
|
1126
|
+
* @param {*} [options] Override http request option.
|
|
1127
|
+
* @throws {RequiredError}
|
|
1128
|
+
*/
|
|
1129
|
+
listPlayers(page, limit, search, options) {
|
|
1130
|
+
return AdminPlayersApiFp(this.configuration).listPlayers(page, limit, search, options).then((request) => request(this.axios, this.basePath));
|
|
1046
1131
|
}
|
|
1047
1132
|
}
|
|
1048
1133
|
/**
|
|
1049
|
-
*
|
|
1134
|
+
* AdminPunishmentsApi - axios parameter creator
|
|
1050
1135
|
*/
|
|
1051
|
-
export const
|
|
1136
|
+
export const AdminPunishmentsApiAxiosParamCreator = function (configuration) {
|
|
1052
1137
|
return {
|
|
1053
1138
|
/**
|
|
1054
|
-
*
|
|
1055
|
-
* @summary Apply
|
|
1056
|
-
* @param {
|
|
1139
|
+
* Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
|
|
1140
|
+
* @summary Apply punishment
|
|
1141
|
+
* @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
|
|
1057
1142
|
* @param {*} [options] Override http request option.
|
|
1058
1143
|
* @throws {RequiredError}
|
|
1059
1144
|
*/
|
|
1060
|
-
applyPunishment: (
|
|
1061
|
-
// verify required parameter '
|
|
1062
|
-
assertParamExists('applyPunishment', '
|
|
1063
|
-
const localVarPath = `/
|
|
1145
|
+
applyPunishment: (adminApplyPunishmentRequest_1, ...args_1) => __awaiter(this, [adminApplyPunishmentRequest_1, ...args_1], void 0, function* (adminApplyPunishmentRequest, options = {}) {
|
|
1146
|
+
// verify required parameter 'adminApplyPunishmentRequest' is not null or undefined
|
|
1147
|
+
assertParamExists('applyPunishment', 'adminApplyPunishmentRequest', adminApplyPunishmentRequest);
|
|
1148
|
+
const localVarPath = `/admin/punishment/apply`;
|
|
1064
1149
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1065
1150
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1066
1151
|
let baseOptions;
|
|
@@ -1070,7 +1155,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1070
1155
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1071
1156
|
const localVarHeaderParameter = {};
|
|
1072
1157
|
const localVarQueryParameter = {};
|
|
1073
|
-
// authentication
|
|
1158
|
+
// authentication DiscordAuth required
|
|
1074
1159
|
// http bearer authentication required
|
|
1075
1160
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1076
1161
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -1078,23 +1163,23 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1078
1163
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1079
1164
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1080
1165
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1081
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
1166
|
+
localVarRequestOptions.data = serializeDataIfNeeded(adminApplyPunishmentRequest, localVarRequestOptions, configuration);
|
|
1082
1167
|
return {
|
|
1083
1168
|
url: toPathString(localVarUrlObj),
|
|
1084
1169
|
options: localVarRequestOptions,
|
|
1085
1170
|
};
|
|
1086
1171
|
}),
|
|
1087
1172
|
/**
|
|
1088
|
-
* Preview
|
|
1089
|
-
* @summary
|
|
1090
|
-
* @param {
|
|
1173
|
+
* Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
|
|
1174
|
+
* @summary Evaluate punishment impact
|
|
1175
|
+
* @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
|
|
1091
1176
|
* @param {*} [options] Override http request option.
|
|
1092
1177
|
* @throws {RequiredError}
|
|
1093
1178
|
*/
|
|
1094
|
-
|
|
1095
|
-
// verify required parameter '
|
|
1096
|
-
assertParamExists('
|
|
1097
|
-
const localVarPath = `/
|
|
1179
|
+
createDraft: (adminCreatePunishmentDraftRequest_1, ...args_1) => __awaiter(this, [adminCreatePunishmentDraftRequest_1, ...args_1], void 0, function* (adminCreatePunishmentDraftRequest, options = {}) {
|
|
1180
|
+
// verify required parameter 'adminCreatePunishmentDraftRequest' is not null or undefined
|
|
1181
|
+
assertParamExists('createDraft', 'adminCreatePunishmentDraftRequest', adminCreatePunishmentDraftRequest);
|
|
1182
|
+
const localVarPath = `/admin/punishment/draft`;
|
|
1098
1183
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1099
1184
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1100
1185
|
let baseOptions;
|
|
@@ -1104,7 +1189,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1104
1189
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1105
1190
|
const localVarHeaderParameter = {};
|
|
1106
1191
|
const localVarQueryParameter = {};
|
|
1107
|
-
// authentication
|
|
1192
|
+
// authentication DiscordAuth required
|
|
1108
1193
|
// http bearer authentication required
|
|
1109
1194
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1110
1195
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -1112,20 +1197,32 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1112
1197
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1113
1198
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1114
1199
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1115
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
1200
|
+
localVarRequestOptions.data = serializeDataIfNeeded(adminCreatePunishmentDraftRequest, localVarRequestOptions, configuration);
|
|
1116
1201
|
return {
|
|
1117
1202
|
url: toPathString(localVarUrlObj),
|
|
1118
1203
|
options: localVarRequestOptions,
|
|
1119
1204
|
};
|
|
1120
1205
|
}),
|
|
1121
1206
|
/**
|
|
1122
|
-
*
|
|
1123
|
-
* @summary
|
|
1207
|
+
* Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
|
|
1208
|
+
* @summary List punishments
|
|
1209
|
+
* @param {number} page Page number (1-indexed)
|
|
1210
|
+
* @param {number} limit Page size
|
|
1211
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
1212
|
+
* @param {string | null} [username] Filter by player username (case-insensitive substring match)
|
|
1213
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
1214
|
+
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
|
|
1215
|
+
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
|
|
1216
|
+
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
|
|
1124
1217
|
* @param {*} [options] Override http request option.
|
|
1125
1218
|
* @throws {RequiredError}
|
|
1126
1219
|
*/
|
|
1127
|
-
|
|
1128
|
-
|
|
1220
|
+
getPunishments: (page_1, limit_1, uuid_1, username_1, ipAddress_1, type_1, issuedAfter_1, issuedBefore_1, ...args_1) => __awaiter(this, [page_1, limit_1, uuid_1, username_1, ipAddress_1, type_1, issuedAfter_1, issuedBefore_1, ...args_1], void 0, function* (page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options = {}) {
|
|
1221
|
+
// verify required parameter 'page' is not null or undefined
|
|
1222
|
+
assertParamExists('getPunishments', 'page', page);
|
|
1223
|
+
// verify required parameter 'limit' is not null or undefined
|
|
1224
|
+
assertParamExists('getPunishments', 'limit', limit);
|
|
1225
|
+
const localVarPath = `/admin/punishment`;
|
|
1129
1226
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1130
1227
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1131
1228
|
let baseOptions;
|
|
@@ -1135,9 +1232,33 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1135
1232
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1136
1233
|
const localVarHeaderParameter = {};
|
|
1137
1234
|
const localVarQueryParameter = {};
|
|
1138
|
-
// authentication
|
|
1235
|
+
// authentication DiscordAuth required
|
|
1139
1236
|
// http bearer authentication required
|
|
1140
1237
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1238
|
+
if (uuid !== undefined) {
|
|
1239
|
+
localVarQueryParameter['uuid'] = uuid;
|
|
1240
|
+
}
|
|
1241
|
+
if (username !== undefined) {
|
|
1242
|
+
localVarQueryParameter['username'] = username;
|
|
1243
|
+
}
|
|
1244
|
+
if (ipAddress !== undefined) {
|
|
1245
|
+
localVarQueryParameter['ipAddress'] = ipAddress;
|
|
1246
|
+
}
|
|
1247
|
+
if (type) {
|
|
1248
|
+
localVarQueryParameter['type'] = type.join(COLLECTION_FORMATS.csv);
|
|
1249
|
+
}
|
|
1250
|
+
if (issuedAfter !== undefined) {
|
|
1251
|
+
localVarQueryParameter['issuedAfter'] = issuedAfter;
|
|
1252
|
+
}
|
|
1253
|
+
if (issuedBefore !== undefined) {
|
|
1254
|
+
localVarQueryParameter['issuedBefore'] = issuedBefore;
|
|
1255
|
+
}
|
|
1256
|
+
if (page !== undefined) {
|
|
1257
|
+
localVarQueryParameter['page'] = page;
|
|
1258
|
+
}
|
|
1259
|
+
if (limit !== undefined) {
|
|
1260
|
+
localVarQueryParameter['limit'] = limit;
|
|
1261
|
+
}
|
|
1141
1262
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1142
1263
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1143
1264
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -1148,16 +1269,641 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1148
1269
|
};
|
|
1149
1270
|
}),
|
|
1150
1271
|
/**
|
|
1151
|
-
*
|
|
1152
|
-
* @summary
|
|
1153
|
-
* @param {string
|
|
1154
|
-
* @param {
|
|
1272
|
+
* Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
|
|
1273
|
+
* @summary Search punishment targets
|
|
1274
|
+
* @param {string} q UUID, username, or partial/full IP address to search for
|
|
1275
|
+
* @param {*} [options] Override http request option.
|
|
1276
|
+
* @throws {RequiredError}
|
|
1277
|
+
*/
|
|
1278
|
+
searchTargets: (q_1, ...args_1) => __awaiter(this, [q_1, ...args_1], void 0, function* (q, options = {}) {
|
|
1279
|
+
// verify required parameter 'q' is not null or undefined
|
|
1280
|
+
assertParamExists('searchTargets', 'q', q);
|
|
1281
|
+
const localVarPath = `/admin/punishment/search`;
|
|
1282
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1283
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1284
|
+
let baseOptions;
|
|
1285
|
+
if (configuration) {
|
|
1286
|
+
baseOptions = configuration.baseOptions;
|
|
1287
|
+
}
|
|
1288
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1289
|
+
const localVarHeaderParameter = {};
|
|
1290
|
+
const localVarQueryParameter = {};
|
|
1291
|
+
// authentication DiscordAuth required
|
|
1292
|
+
// http bearer authentication required
|
|
1293
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1294
|
+
if (q !== undefined) {
|
|
1295
|
+
localVarQueryParameter['q'] = q;
|
|
1296
|
+
}
|
|
1297
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1298
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1299
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1300
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1301
|
+
return {
|
|
1302
|
+
url: toPathString(localVarUrlObj),
|
|
1303
|
+
options: localVarRequestOptions,
|
|
1304
|
+
};
|
|
1305
|
+
}),
|
|
1306
|
+
};
|
|
1307
|
+
};
|
|
1308
|
+
/**
|
|
1309
|
+
* AdminPunishmentsApi - functional programming interface
|
|
1310
|
+
*/
|
|
1311
|
+
export const AdminPunishmentsApiFp = function (configuration) {
|
|
1312
|
+
const localVarAxiosParamCreator = AdminPunishmentsApiAxiosParamCreator(configuration);
|
|
1313
|
+
return {
|
|
1314
|
+
/**
|
|
1315
|
+
* Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
|
|
1316
|
+
* @summary Apply punishment
|
|
1317
|
+
* @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
|
|
1318
|
+
* @param {*} [options] Override http request option.
|
|
1319
|
+
* @throws {RequiredError}
|
|
1320
|
+
*/
|
|
1321
|
+
applyPunishment(adminApplyPunishmentRequest, options) {
|
|
1322
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1323
|
+
var _a, _b, _c;
|
|
1324
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.applyPunishment(adminApplyPunishmentRequest, options);
|
|
1325
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1326
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminPunishmentsApi.applyPunishment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1327
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1328
|
+
});
|
|
1329
|
+
},
|
|
1330
|
+
/**
|
|
1331
|
+
* Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
|
|
1332
|
+
* @summary Evaluate punishment impact
|
|
1333
|
+
* @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
|
|
1334
|
+
* @param {*} [options] Override http request option.
|
|
1335
|
+
* @throws {RequiredError}
|
|
1336
|
+
*/
|
|
1337
|
+
createDraft(adminCreatePunishmentDraftRequest, options) {
|
|
1338
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1339
|
+
var _a, _b, _c;
|
|
1340
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createDraft(adminCreatePunishmentDraftRequest, options);
|
|
1341
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1342
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminPunishmentsApi.createDraft']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1343
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1344
|
+
});
|
|
1345
|
+
},
|
|
1346
|
+
/**
|
|
1347
|
+
* Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
|
|
1348
|
+
* @summary List punishments
|
|
1349
|
+
* @param {number} page Page number (1-indexed)
|
|
1350
|
+
* @param {number} limit Page size
|
|
1351
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
1352
|
+
* @param {string | null} [username] Filter by player username (case-insensitive substring match)
|
|
1353
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
1354
|
+
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
|
|
1355
|
+
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
|
|
1356
|
+
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
|
|
1357
|
+
* @param {*} [options] Override http request option.
|
|
1358
|
+
* @throws {RequiredError}
|
|
1359
|
+
*/
|
|
1360
|
+
getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options) {
|
|
1361
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1362
|
+
var _a, _b, _c;
|
|
1363
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options);
|
|
1364
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1365
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminPunishmentsApi.getPunishments']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1366
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1367
|
+
});
|
|
1368
|
+
},
|
|
1369
|
+
/**
|
|
1370
|
+
* Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
|
|
1371
|
+
* @summary Search punishment targets
|
|
1372
|
+
* @param {string} q UUID, username, or partial/full IP address to search for
|
|
1373
|
+
* @param {*} [options] Override http request option.
|
|
1374
|
+
* @throws {RequiredError}
|
|
1375
|
+
*/
|
|
1376
|
+
searchTargets(q, options) {
|
|
1377
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1378
|
+
var _a, _b, _c;
|
|
1379
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.searchTargets(q, options);
|
|
1380
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1381
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminPunishmentsApi.searchTargets']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1382
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1383
|
+
});
|
|
1384
|
+
},
|
|
1385
|
+
};
|
|
1386
|
+
};
|
|
1387
|
+
/**
|
|
1388
|
+
* AdminPunishmentsApi - factory interface
|
|
1389
|
+
*/
|
|
1390
|
+
export const AdminPunishmentsApiFactory = function (configuration, basePath, axios) {
|
|
1391
|
+
const localVarFp = AdminPunishmentsApiFp(configuration);
|
|
1392
|
+
return {
|
|
1393
|
+
/**
|
|
1394
|
+
* Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
|
|
1395
|
+
* @summary Apply punishment
|
|
1396
|
+
* @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
|
|
1397
|
+
* @param {*} [options] Override http request option.
|
|
1398
|
+
* @throws {RequiredError}
|
|
1399
|
+
*/
|
|
1400
|
+
applyPunishment(adminApplyPunishmentRequest, options) {
|
|
1401
|
+
return localVarFp.applyPunishment(adminApplyPunishmentRequest, options).then((request) => request(axios, basePath));
|
|
1402
|
+
},
|
|
1403
|
+
/**
|
|
1404
|
+
* Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
|
|
1405
|
+
* @summary Evaluate punishment impact
|
|
1406
|
+
* @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
|
|
1407
|
+
* @param {*} [options] Override http request option.
|
|
1408
|
+
* @throws {RequiredError}
|
|
1409
|
+
*/
|
|
1410
|
+
createDraft(adminCreatePunishmentDraftRequest, options) {
|
|
1411
|
+
return localVarFp.createDraft(adminCreatePunishmentDraftRequest, options).then((request) => request(axios, basePath));
|
|
1412
|
+
},
|
|
1413
|
+
/**
|
|
1414
|
+
* Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
|
|
1415
|
+
* @summary List punishments
|
|
1416
|
+
* @param {number} page Page number (1-indexed)
|
|
1417
|
+
* @param {number} limit Page size
|
|
1418
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
1419
|
+
* @param {string | null} [username] Filter by player username (case-insensitive substring match)
|
|
1420
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
1421
|
+
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
|
|
1422
|
+
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
|
|
1423
|
+
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
|
|
1424
|
+
* @param {*} [options] Override http request option.
|
|
1425
|
+
* @throws {RequiredError}
|
|
1426
|
+
*/
|
|
1427
|
+
getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options) {
|
|
1428
|
+
return localVarFp.getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options).then((request) => request(axios, basePath));
|
|
1429
|
+
},
|
|
1430
|
+
/**
|
|
1431
|
+
* Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
|
|
1432
|
+
* @summary Search punishment targets
|
|
1433
|
+
* @param {string} q UUID, username, or partial/full IP address to search for
|
|
1434
|
+
* @param {*} [options] Override http request option.
|
|
1435
|
+
* @throws {RequiredError}
|
|
1436
|
+
*/
|
|
1437
|
+
searchTargets(q, options) {
|
|
1438
|
+
return localVarFp.searchTargets(q, options).then((request) => request(axios, basePath));
|
|
1439
|
+
},
|
|
1440
|
+
};
|
|
1441
|
+
};
|
|
1442
|
+
/**
|
|
1443
|
+
* AdminPunishmentsApi - object-oriented interface
|
|
1444
|
+
*/
|
|
1445
|
+
export class AdminPunishmentsApi extends BaseAPI {
|
|
1446
|
+
/**
|
|
1447
|
+
* Apply a punishment to one or more targets. Player targets are linked via player_punishment; IP targets are linked via connection_punishment. The authenticated user is recorded as the issuer.
|
|
1448
|
+
* @summary Apply punishment
|
|
1449
|
+
* @param {AdminApplyPunishmentRequest} adminApplyPunishmentRequest
|
|
1450
|
+
* @param {*} [options] Override http request option.
|
|
1451
|
+
* @throws {RequiredError}
|
|
1452
|
+
*/
|
|
1453
|
+
applyPunishment(adminApplyPunishmentRequest, options) {
|
|
1454
|
+
return AdminPunishmentsApiFp(this.configuration).applyPunishment(adminApplyPunishmentRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1455
|
+
}
|
|
1456
|
+
/**
|
|
1457
|
+
* Preview the impact of a punishment across one or more targets. Returns current score, points to add, projected new score, and affected players per target. No changes are made.
|
|
1458
|
+
* @summary Evaluate punishment impact
|
|
1459
|
+
* @param {AdminCreatePunishmentDraftRequest} adminCreatePunishmentDraftRequest
|
|
1460
|
+
* @param {*} [options] Override http request option.
|
|
1461
|
+
* @throws {RequiredError}
|
|
1462
|
+
*/
|
|
1463
|
+
createDraft(adminCreatePunishmentDraftRequest, options) {
|
|
1464
|
+
return AdminPunishmentsApiFp(this.configuration).createDraft(adminCreatePunishmentDraftRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1465
|
+
}
|
|
1466
|
+
/**
|
|
1467
|
+
* Returns a paginated list of punishments with optional filtering by player UUID, username, IP address, type, and date range.
|
|
1468
|
+
* @summary List punishments
|
|
1469
|
+
* @param {number} page Page number (1-indexed)
|
|
1470
|
+
* @param {number} limit Page size
|
|
1471
|
+
* @param {string | null} [uuid] Filter by player UUID
|
|
1472
|
+
* @param {string | null} [username] Filter by player username (case-insensitive substring match)
|
|
1473
|
+
* @param {string | null} [ipAddress] Filter by IP address
|
|
1474
|
+
* @param {Array<string> | null} [type] Filter by punishment type (BAN, MUTE, WARNING). Repeatable.
|
|
1475
|
+
* @param {number | null} [issuedAfter] Filter punishments issued after this epoch timestamp (ms)
|
|
1476
|
+
* @param {number | null} [issuedBefore] Filter punishments issued before this epoch timestamp (ms)
|
|
1477
|
+
* @param {*} [options] Override http request option.
|
|
1478
|
+
* @throws {RequiredError}
|
|
1479
|
+
*/
|
|
1480
|
+
getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options) {
|
|
1481
|
+
return AdminPunishmentsApiFp(this.configuration).getPunishments(page, limit, uuid, username, ipAddress, type, issuedAfter, issuedBefore, options).then((request) => request(this.axios, this.basePath));
|
|
1482
|
+
}
|
|
1483
|
+
/**
|
|
1484
|
+
* Search for players by UUID or username, or look up all players associated with an IP address. Used to populate the target table before issuing a punishment.
|
|
1485
|
+
* @summary Search punishment targets
|
|
1486
|
+
* @param {string} q UUID, username, or partial/full IP address to search for
|
|
1487
|
+
* @param {*} [options] Override http request option.
|
|
1488
|
+
* @throws {RequiredError}
|
|
1489
|
+
*/
|
|
1490
|
+
searchTargets(q, options) {
|
|
1491
|
+
return AdminPunishmentsApiFp(this.configuration).searchTargets(q, options).then((request) => request(this.axios, this.basePath));
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
/**
|
|
1495
|
+
* ConnectionApi - axios parameter creator
|
|
1496
|
+
*/
|
|
1497
|
+
export const ConnectionApiAxiosParamCreator = function (configuration) {
|
|
1498
|
+
return {
|
|
1499
|
+
/**
|
|
1500
|
+
* Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
|
|
1501
|
+
* @summary Check Connection and Detect VPN/Proxy
|
|
1502
|
+
* @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
|
|
1503
|
+
* @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
|
|
1504
|
+
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
1505
|
+
* @param {*} [options] Override http request option.
|
|
1506
|
+
* @throws {RequiredError}
|
|
1507
|
+
*/
|
|
1508
|
+
getConnectionDetails: (ip_1, forceRecheck_1, associateUuid_1, ...args_1) => __awaiter(this, [ip_1, forceRecheck_1, associateUuid_1, ...args_1], void 0, function* (ip, forceRecheck, associateUuid, options = {}) {
|
|
1509
|
+
// verify required parameter 'ip' is not null or undefined
|
|
1510
|
+
assertParamExists('getConnectionDetails', 'ip', ip);
|
|
1511
|
+
// verify required parameter 'forceRecheck' is not null or undefined
|
|
1512
|
+
assertParamExists('getConnectionDetails', 'forceRecheck', forceRecheck);
|
|
1513
|
+
const localVarPath = `/v1/connection/get-connection-details/{ip}`
|
|
1514
|
+
.replace(`{${"ip"}}`, encodeURIComponent(String(ip)));
|
|
1515
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1516
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1517
|
+
let baseOptions;
|
|
1518
|
+
if (configuration) {
|
|
1519
|
+
baseOptions = configuration.baseOptions;
|
|
1520
|
+
}
|
|
1521
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1522
|
+
const localVarHeaderParameter = {};
|
|
1523
|
+
const localVarQueryParameter = {};
|
|
1524
|
+
// authentication DiscordAuth required
|
|
1525
|
+
// http bearer authentication required
|
|
1526
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1527
|
+
if (forceRecheck !== undefined) {
|
|
1528
|
+
localVarQueryParameter['force_recheck'] = forceRecheck;
|
|
1529
|
+
}
|
|
1530
|
+
if (associateUuid !== undefined) {
|
|
1531
|
+
localVarQueryParameter['associate_uuid'] = associateUuid;
|
|
1532
|
+
}
|
|
1533
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1534
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1535
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1536
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1537
|
+
return {
|
|
1538
|
+
url: toPathString(localVarUrlObj),
|
|
1539
|
+
options: localVarRequestOptions,
|
|
1540
|
+
};
|
|
1541
|
+
}),
|
|
1542
|
+
};
|
|
1543
|
+
};
|
|
1544
|
+
/**
|
|
1545
|
+
* ConnectionApi - functional programming interface
|
|
1546
|
+
*/
|
|
1547
|
+
export const ConnectionApiFp = function (configuration) {
|
|
1548
|
+
const localVarAxiosParamCreator = ConnectionApiAxiosParamCreator(configuration);
|
|
1549
|
+
return {
|
|
1550
|
+
/**
|
|
1551
|
+
* Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
|
|
1552
|
+
* @summary Check Connection and Detect VPN/Proxy
|
|
1553
|
+
* @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
|
|
1554
|
+
* @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
|
|
1555
|
+
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
1556
|
+
* @param {*} [options] Override http request option.
|
|
1557
|
+
* @throws {RequiredError}
|
|
1558
|
+
*/
|
|
1559
|
+
getConnectionDetails(ip, forceRecheck, associateUuid, options) {
|
|
1560
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1561
|
+
var _a, _b, _c;
|
|
1562
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getConnectionDetails(ip, forceRecheck, associateUuid, options);
|
|
1563
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1564
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ConnectionApi.getConnectionDetails']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1565
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1566
|
+
});
|
|
1567
|
+
},
|
|
1568
|
+
};
|
|
1569
|
+
};
|
|
1570
|
+
/**
|
|
1571
|
+
* ConnectionApi - factory interface
|
|
1572
|
+
*/
|
|
1573
|
+
export const ConnectionApiFactory = function (configuration, basePath, axios) {
|
|
1574
|
+
const localVarFp = ConnectionApiFp(configuration);
|
|
1575
|
+
return {
|
|
1576
|
+
/**
|
|
1577
|
+
* Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
|
|
1578
|
+
* @summary Check Connection and Detect VPN/Proxy
|
|
1579
|
+
* @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
|
|
1580
|
+
* @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
|
|
1581
|
+
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
1582
|
+
* @param {*} [options] Override http request option.
|
|
1583
|
+
* @throws {RequiredError}
|
|
1584
|
+
*/
|
|
1585
|
+
getConnectionDetails(ip, forceRecheck, associateUuid, options) {
|
|
1586
|
+
return localVarFp.getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(axios, basePath));
|
|
1587
|
+
},
|
|
1588
|
+
};
|
|
1589
|
+
};
|
|
1590
|
+
/**
|
|
1591
|
+
* ConnectionApi - object-oriented interface
|
|
1592
|
+
*/
|
|
1593
|
+
export class ConnectionApi extends BaseAPI {
|
|
1594
|
+
/**
|
|
1595
|
+
* Performs comprehensive analysis of an IPv4 address to detect VPN, proxy, or suspicious connections. **Features:** - Multi-provider VPN/proxy detection with aggregated confidence scoring - Approximate geolocation lookup (city and country) - Connection bypass status and expiration tracking - Optional player UUID association for connection history **Use Cases:** - Prevent VPN/proxy usage during player authentication - Track player connection history across sessions - Implement temporary bypass systems for false positives - Monitor suspicious connection patterns **Query Parameters:** - `force_recheck`: Bypass cache and re-run all detection services - `associate_uuid`: Link this IP to a player UUID and return player info **Caching:** Results are cached unless `force_recheck=true` is specified, reducing API costs and improving response times.
|
|
1596
|
+
* @summary Check Connection and Detect VPN/Proxy
|
|
1597
|
+
* @param {string} ip IPv4 address to analyze for VPN/proxy detection and geolocation
|
|
1598
|
+
* @param {boolean} forceRecheck When true, bypasses cached results and re-runs all VPN detection services. Use this when you need the most up-to-date analysis or suspect cached data may be stale. Default: false
|
|
1599
|
+
* @param {string | null} [associateUuid] Minecraft player UUID to associate with this IP address. When provided, the API will: - Link this connection to the player\'s history - Update the player\'s username from Mojang API - Return player information (first join status, first login time) in the response - Track connection history for fraud detection This operation is asynchronous and won\'t block the response.
|
|
1600
|
+
* @param {*} [options] Override http request option.
|
|
1601
|
+
* @throws {RequiredError}
|
|
1602
|
+
*/
|
|
1603
|
+
getConnectionDetails(ip, forceRecheck, associateUuid, options) {
|
|
1604
|
+
return ConnectionApiFp(this.configuration).getConnectionDetails(ip, forceRecheck, associateUuid, options).then((request) => request(this.axios, this.basePath));
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
/**
|
|
1608
|
+
* DefaultApi - axios parameter creator
|
|
1609
|
+
*/
|
|
1610
|
+
export const DefaultApiAxiosParamCreator = function (configuration) {
|
|
1611
|
+
return {
|
|
1612
|
+
/**
|
|
1613
|
+
*
|
|
1614
|
+
* @param {string | null} [code]
|
|
1615
|
+
* @param {string | null} [error]
|
|
1616
|
+
* @param {*} [options] Override http request option.
|
|
1617
|
+
* @throws {RequiredError}
|
|
1618
|
+
*/
|
|
1619
|
+
callback: (code_1, error_1, ...args_1) => __awaiter(this, [code_1, error_1, ...args_1], void 0, function* (code, error, options = {}) {
|
|
1620
|
+
const localVarPath = `/auth/discord/callback`;
|
|
1621
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1622
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1623
|
+
let baseOptions;
|
|
1624
|
+
if (configuration) {
|
|
1625
|
+
baseOptions = configuration.baseOptions;
|
|
1626
|
+
}
|
|
1627
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1628
|
+
const localVarHeaderParameter = {};
|
|
1629
|
+
const localVarQueryParameter = {};
|
|
1630
|
+
// authentication DiscordAuth required
|
|
1631
|
+
// http bearer authentication required
|
|
1632
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1633
|
+
if (code !== undefined) {
|
|
1634
|
+
localVarQueryParameter['code'] = code;
|
|
1635
|
+
}
|
|
1636
|
+
if (error !== undefined) {
|
|
1637
|
+
localVarQueryParameter['error'] = error;
|
|
1638
|
+
}
|
|
1639
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1640
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1641
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1642
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1643
|
+
return {
|
|
1644
|
+
url: toPathString(localVarUrlObj),
|
|
1645
|
+
options: localVarRequestOptions,
|
|
1646
|
+
};
|
|
1647
|
+
}),
|
|
1648
|
+
/**
|
|
1649
|
+
*
|
|
1650
|
+
* @param {*} [options] Override http request option.
|
|
1651
|
+
* @throws {RequiredError}
|
|
1652
|
+
*/
|
|
1653
|
+
initiateLogin: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
1654
|
+
const localVarPath = `/auth/discord`;
|
|
1655
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1656
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1657
|
+
let baseOptions;
|
|
1658
|
+
if (configuration) {
|
|
1659
|
+
baseOptions = configuration.baseOptions;
|
|
1660
|
+
}
|
|
1661
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1662
|
+
const localVarHeaderParameter = {};
|
|
1663
|
+
const localVarQueryParameter = {};
|
|
1664
|
+
// authentication DiscordAuth required
|
|
1665
|
+
// http bearer authentication required
|
|
1666
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1667
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1668
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1669
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1670
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1671
|
+
return {
|
|
1672
|
+
url: toPathString(localVarUrlObj),
|
|
1673
|
+
options: localVarRequestOptions,
|
|
1674
|
+
};
|
|
1675
|
+
}),
|
|
1676
|
+
};
|
|
1677
|
+
};
|
|
1678
|
+
/**
|
|
1679
|
+
* DefaultApi - functional programming interface
|
|
1680
|
+
*/
|
|
1681
|
+
export const DefaultApiFp = function (configuration) {
|
|
1682
|
+
const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration);
|
|
1683
|
+
return {
|
|
1684
|
+
/**
|
|
1685
|
+
*
|
|
1686
|
+
* @param {string | null} [code]
|
|
1687
|
+
* @param {string | null} [error]
|
|
1688
|
+
* @param {*} [options] Override http request option.
|
|
1689
|
+
* @throws {RequiredError}
|
|
1690
|
+
*/
|
|
1691
|
+
callback(code, error, options) {
|
|
1692
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1693
|
+
var _a, _b, _c;
|
|
1694
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.callback(code, error, options);
|
|
1695
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1696
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DefaultApi.callback']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1697
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1698
|
+
});
|
|
1699
|
+
},
|
|
1700
|
+
/**
|
|
1701
|
+
*
|
|
1702
|
+
* @param {*} [options] Override http request option.
|
|
1703
|
+
* @throws {RequiredError}
|
|
1704
|
+
*/
|
|
1705
|
+
initiateLogin(options) {
|
|
1706
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1707
|
+
var _a, _b, _c;
|
|
1708
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.initiateLogin(options);
|
|
1709
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1710
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DefaultApi.initiateLogin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1711
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1712
|
+
});
|
|
1713
|
+
},
|
|
1714
|
+
};
|
|
1715
|
+
};
|
|
1716
|
+
/**
|
|
1717
|
+
* DefaultApi - factory interface
|
|
1718
|
+
*/
|
|
1719
|
+
export const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
1720
|
+
const localVarFp = DefaultApiFp(configuration);
|
|
1721
|
+
return {
|
|
1722
|
+
/**
|
|
1723
|
+
*
|
|
1724
|
+
* @param {string | null} [code]
|
|
1725
|
+
* @param {string | null} [error]
|
|
1726
|
+
* @param {*} [options] Override http request option.
|
|
1727
|
+
* @throws {RequiredError}
|
|
1728
|
+
*/
|
|
1729
|
+
callback(code, error, options) {
|
|
1730
|
+
return localVarFp.callback(code, error, options).then((request) => request(axios, basePath));
|
|
1731
|
+
},
|
|
1732
|
+
/**
|
|
1733
|
+
*
|
|
1734
|
+
* @param {*} [options] Override http request option.
|
|
1735
|
+
* @throws {RequiredError}
|
|
1736
|
+
*/
|
|
1737
|
+
initiateLogin(options) {
|
|
1738
|
+
return localVarFp.initiateLogin(options).then((request) => request(axios, basePath));
|
|
1739
|
+
},
|
|
1740
|
+
};
|
|
1741
|
+
};
|
|
1742
|
+
/**
|
|
1743
|
+
* DefaultApi - object-oriented interface
|
|
1744
|
+
*/
|
|
1745
|
+
export class DefaultApi extends BaseAPI {
|
|
1746
|
+
/**
|
|
1747
|
+
*
|
|
1748
|
+
* @param {string | null} [code]
|
|
1749
|
+
* @param {string | null} [error]
|
|
1750
|
+
* @param {*} [options] Override http request option.
|
|
1751
|
+
* @throws {RequiredError}
|
|
1752
|
+
*/
|
|
1753
|
+
callback(code, error, options) {
|
|
1754
|
+
return DefaultApiFp(this.configuration).callback(code, error, options).then((request) => request(this.axios, this.basePath));
|
|
1755
|
+
}
|
|
1756
|
+
/**
|
|
1757
|
+
*
|
|
1758
|
+
* @param {*} [options] Override http request option.
|
|
1759
|
+
* @throws {RequiredError}
|
|
1760
|
+
*/
|
|
1761
|
+
initiateLogin(options) {
|
|
1762
|
+
return DefaultApiFp(this.configuration).initiateLogin(options).then((request) => request(this.axios, this.basePath));
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
/**
|
|
1766
|
+
* PlayerApi - axios parameter creator
|
|
1767
|
+
*/
|
|
1768
|
+
export const PlayerApiAxiosParamCreator = function (configuration) {
|
|
1769
|
+
return {
|
|
1770
|
+
/**
|
|
1771
|
+
* Retrieves player information by their Minecraft UUID. Returns whether this is the player\'s first join and their first login timestamp. This endpoint is useful for tracking player join history and implementing first-join rewards or tutorials.
|
|
1772
|
+
* @summary Get Player Information
|
|
1773
|
+
* @param {string} uuid The Minecraft player UUID (with or without dashes)
|
|
1774
|
+
* @param {*} [options] Override http request option.
|
|
1775
|
+
* @throws {RequiredError}
|
|
1776
|
+
*/
|
|
1777
|
+
getPlayer1: (uuid_1, ...args_1) => __awaiter(this, [uuid_1, ...args_1], void 0, function* (uuid, options = {}) {
|
|
1778
|
+
// verify required parameter 'uuid' is not null or undefined
|
|
1779
|
+
assertParamExists('getPlayer1', 'uuid', uuid);
|
|
1780
|
+
const localVarPath = `/v1/player/{uuid}`
|
|
1781
|
+
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
|
|
1782
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1783
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1784
|
+
let baseOptions;
|
|
1785
|
+
if (configuration) {
|
|
1786
|
+
baseOptions = configuration.baseOptions;
|
|
1787
|
+
}
|
|
1788
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1789
|
+
const localVarHeaderParameter = {};
|
|
1790
|
+
const localVarQueryParameter = {};
|
|
1791
|
+
// authentication DiscordAuth required
|
|
1792
|
+
// http bearer authentication required
|
|
1793
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1794
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1795
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1796
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1797
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1798
|
+
return {
|
|
1799
|
+
url: toPathString(localVarUrlObj),
|
|
1800
|
+
options: localVarRequestOptions,
|
|
1801
|
+
};
|
|
1802
|
+
}),
|
|
1803
|
+
};
|
|
1804
|
+
};
|
|
1805
|
+
/**
|
|
1806
|
+
* PlayerApi - functional programming interface
|
|
1807
|
+
*/
|
|
1808
|
+
export const PlayerApiFp = function (configuration) {
|
|
1809
|
+
const localVarAxiosParamCreator = PlayerApiAxiosParamCreator(configuration);
|
|
1810
|
+
return {
|
|
1811
|
+
/**
|
|
1812
|
+
* Retrieves player information by their Minecraft UUID. Returns whether this is the player\'s first join and their first login timestamp. This endpoint is useful for tracking player join history and implementing first-join rewards or tutorials.
|
|
1813
|
+
* @summary Get Player Information
|
|
1814
|
+
* @param {string} uuid The Minecraft player UUID (with or without dashes)
|
|
1815
|
+
* @param {*} [options] Override http request option.
|
|
1816
|
+
* @throws {RequiredError}
|
|
1817
|
+
*/
|
|
1818
|
+
getPlayer1(uuid, options) {
|
|
1819
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1820
|
+
var _a, _b, _c;
|
|
1821
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPlayer1(uuid, options);
|
|
1822
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1823
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PlayerApi.getPlayer1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1824
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1825
|
+
});
|
|
1826
|
+
},
|
|
1827
|
+
};
|
|
1828
|
+
};
|
|
1829
|
+
/**
|
|
1830
|
+
* PlayerApi - factory interface
|
|
1831
|
+
*/
|
|
1832
|
+
export const PlayerApiFactory = function (configuration, basePath, axios) {
|
|
1833
|
+
const localVarFp = PlayerApiFp(configuration);
|
|
1834
|
+
return {
|
|
1835
|
+
/**
|
|
1836
|
+
* Retrieves player information by their Minecraft UUID. Returns whether this is the player\'s first join and their first login timestamp. This endpoint is useful for tracking player join history and implementing first-join rewards or tutorials.
|
|
1837
|
+
* @summary Get Player Information
|
|
1838
|
+
* @param {string} uuid The Minecraft player UUID (with or without dashes)
|
|
1839
|
+
* @param {*} [options] Override http request option.
|
|
1840
|
+
* @throws {RequiredError}
|
|
1841
|
+
*/
|
|
1842
|
+
getPlayer1(uuid, options) {
|
|
1843
|
+
return localVarFp.getPlayer1(uuid, options).then((request) => request(axios, basePath));
|
|
1844
|
+
},
|
|
1845
|
+
};
|
|
1846
|
+
};
|
|
1847
|
+
/**
|
|
1848
|
+
* PlayerApi - object-oriented interface
|
|
1849
|
+
*/
|
|
1850
|
+
export class PlayerApi extends BaseAPI {
|
|
1851
|
+
/**
|
|
1852
|
+
* Retrieves player information by their Minecraft UUID. Returns whether this is the player\'s first join and their first login timestamp. This endpoint is useful for tracking player join history and implementing first-join rewards or tutorials.
|
|
1853
|
+
* @summary Get Player Information
|
|
1854
|
+
* @param {string} uuid The Minecraft player UUID (with or without dashes)
|
|
1855
|
+
* @param {*} [options] Override http request option.
|
|
1856
|
+
* @throws {RequiredError}
|
|
1857
|
+
*/
|
|
1858
|
+
getPlayer1(uuid, options) {
|
|
1859
|
+
return PlayerApiFp(this.configuration).getPlayer1(uuid, options).then((request) => request(this.axios, this.basePath));
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
/**
|
|
1863
|
+
* PunishmentApi - axios parameter creator
|
|
1864
|
+
*/
|
|
1865
|
+
export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
1866
|
+
return {
|
|
1867
|
+
/**
|
|
1868
|
+
* Retrieve duration information for each punishment type and severity level (1-10)
|
|
1869
|
+
* @summary Get punishment severities
|
|
1870
|
+
* @param {*} [options] Override http request option.
|
|
1871
|
+
* @throws {RequiredError}
|
|
1872
|
+
*/
|
|
1873
|
+
getPunishmentSeverities: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
1874
|
+
const localVarPath = `/v1/punishment/severities`;
|
|
1875
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1876
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1877
|
+
let baseOptions;
|
|
1878
|
+
if (configuration) {
|
|
1879
|
+
baseOptions = configuration.baseOptions;
|
|
1880
|
+
}
|
|
1881
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1882
|
+
const localVarHeaderParameter = {};
|
|
1883
|
+
const localVarQueryParameter = {};
|
|
1884
|
+
// authentication DiscordAuth required
|
|
1885
|
+
// http bearer authentication required
|
|
1886
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1887
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1888
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1889
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1890
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1891
|
+
return {
|
|
1892
|
+
url: toPathString(localVarUrlObj),
|
|
1893
|
+
options: localVarRequestOptions,
|
|
1894
|
+
};
|
|
1895
|
+
}),
|
|
1896
|
+
/**
|
|
1897
|
+
* Retrieve all active punishments for a player by UUID or username, optionally filtered by type and time
|
|
1898
|
+
* @summary Get punishments by player
|
|
1899
|
+
* @param {string | null} [uuid] Player UUID
|
|
1900
|
+
* @param {string | null} [username] Player username
|
|
1155
1901
|
* @param {Array<string> | null} [type] Filter by punishment types
|
|
1156
1902
|
* @param {number | null} [since] Filter punishments created after this Unix epoch timestamp (milliseconds)
|
|
1157
1903
|
* @param {*} [options] Override http request option.
|
|
1158
1904
|
* @throws {RequiredError}
|
|
1159
1905
|
*/
|
|
1160
|
-
|
|
1906
|
+
getPunishments1: (uuid_1, username_1, type_1, since_1, ...args_1) => __awaiter(this, [uuid_1, username_1, type_1, since_1, ...args_1], void 0, function* (uuid, username, type, since, options = {}) {
|
|
1161
1907
|
const localVarPath = `/v1/punishment`;
|
|
1162
1908
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1163
1909
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -1168,7 +1914,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1168
1914
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1169
1915
|
const localVarHeaderParameter = {};
|
|
1170
1916
|
const localVarQueryParameter = {};
|
|
1171
|
-
// authentication
|
|
1917
|
+
// authentication DiscordAuth required
|
|
1172
1918
|
// http bearer authentication required
|
|
1173
1919
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1174
1920
|
if (uuid !== undefined) {
|
|
@@ -1212,7 +1958,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1212
1958
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1213
1959
|
const localVarHeaderParameter = {};
|
|
1214
1960
|
const localVarQueryParameter = {};
|
|
1215
|
-
// authentication
|
|
1961
|
+
// authentication DiscordAuth required
|
|
1216
1962
|
// http bearer authentication required
|
|
1217
1963
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1218
1964
|
if (ip !== undefined) {
|
|
@@ -1257,7 +2003,7 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1257
2003
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1258
2004
|
const localVarHeaderParameter = {};
|
|
1259
2005
|
const localVarQueryParameter = {};
|
|
1260
|
-
// authentication
|
|
2006
|
+
// authentication DiscordAuth required
|
|
1261
2007
|
// http bearer authentication required
|
|
1262
2008
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1263
2009
|
if (issuedAfter !== undefined) {
|
|
@@ -1304,38 +2050,6 @@ export const PunishmentApiAxiosParamCreator = function (configuration) {
|
|
|
1304
2050
|
export const PunishmentApiFp = function (configuration) {
|
|
1305
2051
|
const localVarAxiosParamCreator = PunishmentApiAxiosParamCreator(configuration);
|
|
1306
2052
|
return {
|
|
1307
|
-
/**
|
|
1308
|
-
* Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
|
|
1309
|
-
* @summary Apply a punishment
|
|
1310
|
-
* @param {ApplyPunishmentRequest} applyPunishmentRequest
|
|
1311
|
-
* @param {*} [options] Override http request option.
|
|
1312
|
-
* @throws {RequiredError}
|
|
1313
|
-
*/
|
|
1314
|
-
applyPunishment(applyPunishmentRequest, options) {
|
|
1315
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1316
|
-
var _a, _b, _c;
|
|
1317
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.applyPunishment(applyPunishmentRequest, options);
|
|
1318
|
-
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1319
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PunishmentApi.applyPunishment']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1320
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1321
|
-
});
|
|
1322
|
-
},
|
|
1323
|
-
/**
|
|
1324
|
-
* Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
|
|
1325
|
-
* @summary Create a punishment draft
|
|
1326
|
-
* @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
|
|
1327
|
-
* @param {*} [options] Override http request option.
|
|
1328
|
-
* @throws {RequiredError}
|
|
1329
|
-
*/
|
|
1330
|
-
createPunishmentDraft(createPunishmentDraftRequest, options) {
|
|
1331
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1332
|
-
var _a, _b, _c;
|
|
1333
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.createPunishmentDraft(createPunishmentDraftRequest, options);
|
|
1334
|
-
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1335
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PunishmentApi.createPunishmentDraft']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1336
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1337
|
-
});
|
|
1338
|
-
},
|
|
1339
2053
|
/**
|
|
1340
2054
|
* Retrieve duration information for each punishment type and severity level (1-10)
|
|
1341
2055
|
* @summary Get punishment severities
|
|
@@ -1361,12 +2075,12 @@ export const PunishmentApiFp = function (configuration) {
|
|
|
1361
2075
|
* @param {*} [options] Override http request option.
|
|
1362
2076
|
* @throws {RequiredError}
|
|
1363
2077
|
*/
|
|
1364
|
-
|
|
2078
|
+
getPunishments1(uuid, username, type, since, options) {
|
|
1365
2079
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1366
2080
|
var _a, _b, _c;
|
|
1367
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
2081
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPunishments1(uuid, username, type, since, options);
|
|
1368
2082
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1369
|
-
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PunishmentApi.
|
|
2083
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PunishmentApi.getPunishments1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1370
2084
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1371
2085
|
});
|
|
1372
2086
|
},
|
|
@@ -1418,26 +2132,6 @@ export const PunishmentApiFp = function (configuration) {
|
|
|
1418
2132
|
export const PunishmentApiFactory = function (configuration, basePath, axios) {
|
|
1419
2133
|
const localVarFp = PunishmentApiFp(configuration);
|
|
1420
2134
|
return {
|
|
1421
|
-
/**
|
|
1422
|
-
* Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
|
|
1423
|
-
* @summary Apply a punishment
|
|
1424
|
-
* @param {ApplyPunishmentRequest} applyPunishmentRequest
|
|
1425
|
-
* @param {*} [options] Override http request option.
|
|
1426
|
-
* @throws {RequiredError}
|
|
1427
|
-
*/
|
|
1428
|
-
applyPunishment(applyPunishmentRequest, options) {
|
|
1429
|
-
return localVarFp.applyPunishment(applyPunishmentRequest, options).then((request) => request(axios, basePath));
|
|
1430
|
-
},
|
|
1431
|
-
/**
|
|
1432
|
-
* Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
|
|
1433
|
-
* @summary Create a punishment draft
|
|
1434
|
-
* @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
|
|
1435
|
-
* @param {*} [options] Override http request option.
|
|
1436
|
-
* @throws {RequiredError}
|
|
1437
|
-
*/
|
|
1438
|
-
createPunishmentDraft(createPunishmentDraftRequest, options) {
|
|
1439
|
-
return localVarFp.createPunishmentDraft(createPunishmentDraftRequest, options).then((request) => request(axios, basePath));
|
|
1440
|
-
},
|
|
1441
2135
|
/**
|
|
1442
2136
|
* Retrieve duration information for each punishment type and severity level (1-10)
|
|
1443
2137
|
* @summary Get punishment severities
|
|
@@ -1457,8 +2151,8 @@ export const PunishmentApiFactory = function (configuration, basePath, axios) {
|
|
|
1457
2151
|
* @param {*} [options] Override http request option.
|
|
1458
2152
|
* @throws {RequiredError}
|
|
1459
2153
|
*/
|
|
1460
|
-
|
|
1461
|
-
return localVarFp.
|
|
2154
|
+
getPunishments1(uuid, username, type, since, options) {
|
|
2155
|
+
return localVarFp.getPunishments1(uuid, username, type, since, options).then((request) => request(axios, basePath));
|
|
1462
2156
|
},
|
|
1463
2157
|
/**
|
|
1464
2158
|
* Retrieve all active punishments associated with an IP address
|
|
@@ -1494,26 +2188,6 @@ export const PunishmentApiFactory = function (configuration, basePath, axios) {
|
|
|
1494
2188
|
* PunishmentApi - object-oriented interface
|
|
1495
2189
|
*/
|
|
1496
2190
|
export class PunishmentApi extends BaseAPI {
|
|
1497
|
-
/**
|
|
1498
|
-
* Create and apply a punishment to a player. Automatically determines if permanent based on current score threshold (≥100%).
|
|
1499
|
-
* @summary Apply a punishment
|
|
1500
|
-
* @param {ApplyPunishmentRequest} applyPunishmentRequest
|
|
1501
|
-
* @param {*} [options] Override http request option.
|
|
1502
|
-
* @throws {RequiredError}
|
|
1503
|
-
*/
|
|
1504
|
-
applyPunishment(applyPunishmentRequest, options) {
|
|
1505
|
-
return PunishmentApiFp(this.configuration).applyPunishment(applyPunishmentRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1506
|
-
}
|
|
1507
|
-
/**
|
|
1508
|
-
* Preview punishment impact before applying. Returns calculated points, current/new thresholds, and whether it will be permanent.
|
|
1509
|
-
* @summary Create a punishment draft
|
|
1510
|
-
* @param {CreatePunishmentDraftRequest} createPunishmentDraftRequest
|
|
1511
|
-
* @param {*} [options] Override http request option.
|
|
1512
|
-
* @throws {RequiredError}
|
|
1513
|
-
*/
|
|
1514
|
-
createPunishmentDraft(createPunishmentDraftRequest, options) {
|
|
1515
|
-
return PunishmentApiFp(this.configuration).createPunishmentDraft(createPunishmentDraftRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1516
|
-
}
|
|
1517
2191
|
/**
|
|
1518
2192
|
* Retrieve duration information for each punishment type and severity level (1-10)
|
|
1519
2193
|
* @summary Get punishment severities
|
|
@@ -1533,8 +2207,8 @@ export class PunishmentApi extends BaseAPI {
|
|
|
1533
2207
|
* @param {*} [options] Override http request option.
|
|
1534
2208
|
* @throws {RequiredError}
|
|
1535
2209
|
*/
|
|
1536
|
-
|
|
1537
|
-
return PunishmentApiFp(this.configuration).
|
|
2210
|
+
getPunishments1(uuid, username, type, since, options) {
|
|
2211
|
+
return PunishmentApiFp(this.configuration).getPunishments1(uuid, username, type, since, options).then((request) => request(this.axios, this.basePath));
|
|
1538
2212
|
}
|
|
1539
2213
|
/**
|
|
1540
2214
|
* Retrieve all active punishments associated with an IP address
|