@accelbyte/sdk-ams 0.0.0-dev-20240828032938
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/CHANGELOG.md +11 -0
- package/LICENSE +19 -0
- package/package.json +55 -0
- package/react-query/package.json +5 -0
- package/src/Ams.ts +42 -0
- package/src/all-imports.ts +91 -0
- package/src/all-query-imports.ts +19 -0
- package/src/custom/index.ts +6 -0
- package/src/generated-admin/AccountAdminApi.ts +91 -0
- package/src/generated-admin/AmsInfoAdminApi.ts +65 -0
- package/src/generated-admin/AmsQoSAdminApi.ts +65 -0
- package/src/generated-admin/ArtifactsAdminApi.ts +122 -0
- package/src/generated-admin/DevelopmentAdminApi.ts +89 -0
- package/src/generated-admin/FleetsAdminApi.ts +112 -0
- package/src/generated-admin/ImagesAdminApi.ts +111 -0
- package/src/generated-admin/ServersAdminApi.ts +89 -0
- package/src/generated-admin/endpoints/AccountAdmin$.ts +68 -0
- package/src/generated-admin/endpoints/AmsInfoAdmin$.ts +42 -0
- package/src/generated-admin/endpoints/AmsQoSAdmin$.ts +43 -0
- package/src/generated-admin/endpoints/ArtifactsAdmin$.ts +100 -0
- package/src/generated-admin/endpoints/DevelopmentAdmin$.ts +67 -0
- package/src/generated-admin/endpoints/FleetsAdmin$.ts +90 -0
- package/src/generated-admin/endpoints/ImagesAdmin$.ts +89 -0
- package/src/generated-admin/endpoints/ServersAdmin$.ts +66 -0
- package/src/generated-admin/queries/AccountAdmin.query.ts +131 -0
- package/src/generated-admin/queries/AmsInfoAdmin.query.ts +81 -0
- package/src/generated-admin/queries/AmsQoSAdmin.query.ts +77 -0
- package/src/generated-admin/queries/ArtifactsAdmin.query.ts +211 -0
- package/src/generated-admin/queries/DevelopmentAdmin.query.ts +130 -0
- package/src/generated-admin/queries/FleetsAdmin.query.ts +182 -0
- package/src/generated-admin/queries/ImagesAdmin.query.ts +181 -0
- package/src/generated-admin/queries/ServersAdmin.query.ts +139 -0
- package/src/generated-definitions/AccountCreateRequest.ts +10 -0
- package/src/generated-definitions/AccountCreateResponse.ts +11 -0
- package/src/generated-definitions/AccountLimits.ts +16 -0
- package/src/generated-definitions/AccountLinkRequest.ts +10 -0
- package/src/generated-definitions/AccountLinkResponse.ts +11 -0
- package/src/generated-definitions/AccountLinkTokenResponse.ts +10 -0
- package/src/generated-definitions/AccountResponse.ts +11 -0
- package/src/generated-definitions/AmsRegionsResponse.ts +10 -0
- package/src/generated-definitions/ArtifactListResponse.ts +11 -0
- package/src/generated-definitions/ArtifactResponse.ts +24 -0
- package/src/generated-definitions/ArtifactSamplingRule.ts +10 -0
- package/src/generated-definitions/ArtifactTypeSamplingRules.ts +11 -0
- package/src/generated-definitions/ArtifactUrlResponse.ts +10 -0
- package/src/generated-definitions/ArtifactUsageResponse.ts +14 -0
- package/src/generated-definitions/AvailableInstanceTypesResponse.ts +11 -0
- package/src/generated-definitions/DevelopmentServerConfigurationCreateRequest.ts +14 -0
- package/src/generated-definitions/DevelopmentServerConfigurationCreateResponse.ts +10 -0
- package/src/generated-definitions/DevelopmentServerConfigurationGetResponse.ts +14 -0
- package/src/generated-definitions/DevelopmentServerConfigurationListResponse.ts +14 -0
- package/src/generated-definitions/DsHistoryEvent.ts +19 -0
- package/src/generated-definitions/DsHistoryList.ts +12 -0
- package/src/generated-definitions/DsHostConfiguration.ts +10 -0
- package/src/generated-definitions/ErrorResponse.ts +10 -0
- package/src/generated-definitions/FleetArtifactsSampleRules.ts +11 -0
- package/src/generated-definitions/FleetClaimByKeysReq.ts +10 -0
- package/src/generated-definitions/FleetClaimReq.ts +10 -0
- package/src/generated-definitions/FleetClaimResponse.ts +10 -0
- package/src/generated-definitions/FleetCreateResponse.ts +10 -0
- package/src/generated-definitions/FleetGetResponse.ts +25 -0
- package/src/generated-definitions/FleetListItemResponse.ts +20 -0
- package/src/generated-definitions/FleetListResponse.ts +11 -0
- package/src/generated-definitions/FleetParameters.ts +23 -0
- package/src/generated-definitions/FleetRegionalServerCounts.ts +17 -0
- package/src/generated-definitions/FleetServerConnectionInfoResponse.ts +16 -0
- package/src/generated-definitions/FleetServerHistoryEventResponse.ts +19 -0
- package/src/generated-definitions/FleetServerHistoryResponse.ts +11 -0
- package/src/generated-definitions/FleetServerInfoResponse.ts +26 -0
- package/src/generated-definitions/FleetServersResponse.ts +17 -0
- package/src/generated-definitions/ImageDeploymentProfile.ts +17 -0
- package/src/generated-definitions/ImageDetails.ts +25 -0
- package/src/generated-definitions/ImageList.ts +11 -0
- package/src/generated-definitions/ImageListItem.ts +24 -0
- package/src/generated-definitions/ImageStorage.ts +14 -0
- package/src/generated-definitions/ImageUpdate.ts +15 -0
- package/src/generated-definitions/InstanceTypeDescriptionResponse.ts +17 -0
- package/src/generated-definitions/Location.ts +20 -0
- package/src/generated-definitions/PagingInfo.ts +19 -0
- package/src/generated-definitions/PortConfiguration.ts +10 -0
- package/src/generated-definitions/QoSEndpointResponse.ts +11 -0
- package/src/generated-definitions/QoSServer.ts +18 -0
- package/src/generated-definitions/ReferencingFleet.ts +10 -0
- package/src/generated-definitions/RegionConfig.ts +16 -0
- package/src/generated-definitions/Time.ts +10 -0
- package/src/generated-definitions/Timeout.ts +15 -0
- package/src/generated-definitions/UpdateServerRequest.ts +10 -0
- package/src/generated-definitions/Zone.ts +10 -0
- package/src/generated-definitions/ZoneTrans.ts +10 -0
- package/src/generated-public/AccountApi.ts +53 -0
- package/src/generated-public/AmsInfoApi.ts +50 -0
- package/src/generated-public/AuthApi.ts +53 -0
- package/src/generated-public/FleetCommanderApi.ts +50 -0
- package/src/generated-public/FleetsApi.ts +66 -0
- package/src/generated-public/WatchdogsApi.ts +64 -0
- package/src/generated-public/endpoints/Account$.ts +30 -0
- package/src/generated-public/endpoints/AmsInfo$.ts +28 -0
- package/src/generated-public/endpoints/Auth$.ts +31 -0
- package/src/generated-public/endpoints/FleetCommander$.ts +28 -0
- package/src/generated-public/endpoints/Fleets$.ts +43 -0
- package/src/generated-public/endpoints/Watchdogs$.ts +42 -0
- package/src/generated-public/queries/Account.query.ts +52 -0
- package/src/generated-public/queries/AmsInfo.query.ts +52 -0
- package/src/generated-public/queries/Auth.query.ts +52 -0
- package/src/generated-public/queries/FleetCommander.query.ts +52 -0
- package/src/generated-public/queries/Fleets.query.ts +74 -0
- package/src/generated-public/queries/Watchdogs.query.ts +80 -0
- package/src/index.ts +7 -0
- package/src/version.json +7 -0
- package/swaggers/ams.json +3978 -0
- package/swaggers.json +1 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022-2024 AccelByte Inc. All Rights Reserved
|
|
3
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
4
|
+
* and restrictions contact your company contract manager.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO GENERATED
|
|
8
|
+
*/
|
|
9
|
+
/* eslint-disable camelcase */
|
|
10
|
+
// @ts-ignore -> ts-expect-error TS6133
|
|
11
|
+
import { AccelByteSDK, ApiUtils, Network, SdkSetConfigParam } from '@accelbyte/sdk'
|
|
12
|
+
import { AxiosResponse } from 'axios'
|
|
13
|
+
|
|
14
|
+
import { Auth$ } from './endpoints/Auth$.js'
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export function AuthApi(sdk: AccelByteSDK, args?: SdkSetConfigParam) {
|
|
18
|
+
const sdkAssembly = sdk.assembly()
|
|
19
|
+
|
|
20
|
+
const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace
|
|
21
|
+
const requestConfig = ApiUtils.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request)
|
|
22
|
+
const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? []
|
|
23
|
+
const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation
|
|
24
|
+
const axiosInstance = Network.create(requestConfig)
|
|
25
|
+
|
|
26
|
+
for (const interceptor of interceptors) {
|
|
27
|
+
if(interceptor.type === 'request') {
|
|
28
|
+
axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if(interceptor.type === 'response') {
|
|
32
|
+
axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if fleet commander is authorized to talk to AMS with this IAM
|
|
40
|
+
*/
|
|
41
|
+
async function getAuth(): Promise<AxiosResponse<unknown>> {
|
|
42
|
+
const $ = new Auth$(axiosInstance, namespace, useSchemaValidation)
|
|
43
|
+
const resp = await $.getAuth()
|
|
44
|
+
if (resp.error) throw resp.error
|
|
45
|
+
return resp.response
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
getAuth,
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022-2024 AccelByte Inc. All Rights Reserved
|
|
3
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
4
|
+
* and restrictions contact your company contract manager.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO GENERATED
|
|
8
|
+
*/
|
|
9
|
+
/* eslint-disable camelcase */
|
|
10
|
+
// @ts-ignore -> ts-expect-error TS6133
|
|
11
|
+
import { AccelByteSDK, ApiUtils, Network, SdkSetConfigParam } from '@accelbyte/sdk'
|
|
12
|
+
import { AxiosResponse } from 'axios'
|
|
13
|
+
|
|
14
|
+
import { FleetCommander$ } from './endpoints/FleetCommander$.js'
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export function FleetCommanderApi(sdk: AccelByteSDK, args?: SdkSetConfigParam) {
|
|
18
|
+
const sdkAssembly = sdk.assembly()
|
|
19
|
+
|
|
20
|
+
const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace
|
|
21
|
+
const requestConfig = ApiUtils.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request)
|
|
22
|
+
const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? []
|
|
23
|
+
const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation
|
|
24
|
+
const axiosInstance = Network.create(requestConfig)
|
|
25
|
+
|
|
26
|
+
for (const interceptor of interceptors) {
|
|
27
|
+
if(interceptor.type === 'request') {
|
|
28
|
+
axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if(interceptor.type === 'response') {
|
|
32
|
+
axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
async function getVersion(): Promise<AxiosResponse<unknown>> {
|
|
39
|
+
const $ = new FleetCommander$(axiosInstance, namespace, useSchemaValidation)
|
|
40
|
+
const resp = await $.getVersion()
|
|
41
|
+
if (resp.error) throw resp.error
|
|
42
|
+
return resp.response
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
getVersion,
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022-2024 AccelByte Inc. All Rights Reserved
|
|
3
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
4
|
+
* and restrictions contact your company contract manager.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO GENERATED
|
|
8
|
+
*/
|
|
9
|
+
/* eslint-disable camelcase */
|
|
10
|
+
// @ts-ignore -> ts-expect-error TS6133
|
|
11
|
+
import { AccelByteSDK, ApiUtils, Network, SdkSetConfigParam } from '@accelbyte/sdk'
|
|
12
|
+
import { AxiosResponse } from 'axios'
|
|
13
|
+
import { FleetClaimByKeysReq } from '../generated-definitions/FleetClaimByKeysReq.js'
|
|
14
|
+
import { FleetClaimReq } from '../generated-definitions/FleetClaimReq.js'
|
|
15
|
+
import { FleetClaimResponse } from '../generated-definitions/FleetClaimResponse.js'
|
|
16
|
+
import { Fleets$ } from './endpoints/Fleets$.js'
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export function FleetsApi(sdk: AccelByteSDK, args?: SdkSetConfigParam) {
|
|
20
|
+
const sdkAssembly = sdk.assembly()
|
|
21
|
+
|
|
22
|
+
const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace
|
|
23
|
+
const requestConfig = ApiUtils.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request)
|
|
24
|
+
const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? []
|
|
25
|
+
const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation
|
|
26
|
+
const axiosInstance = Network.create(requestConfig)
|
|
27
|
+
|
|
28
|
+
for (const interceptor of interceptors) {
|
|
29
|
+
if(interceptor.type === 'request') {
|
|
30
|
+
axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if(interceptor.type === 'response') {
|
|
34
|
+
axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Claim a dedicated server from fleets with matching claim keys Required Permission: NAMESPACE:{namespace}:AMS:SERVER:CLAIM [UPDATE]
|
|
42
|
+
*/
|
|
43
|
+
async function updateServerClaim(data: FleetClaimByKeysReq): Promise<AxiosResponse<FleetClaimResponse>> {
|
|
44
|
+
const $ = new Fleets$(axiosInstance, namespace, useSchemaValidation)
|
|
45
|
+
const resp = await $.updateServerClaim(data,)
|
|
46
|
+
if (resp.error) throw resp.error
|
|
47
|
+
return resp.response
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Required Permission: NAMESPACE:{namespace}:AMS:SERVER:CLAIM [UPDATE]
|
|
53
|
+
*/
|
|
54
|
+
async function updateClaim_ByFleetId(fleetID:string, data: FleetClaimReq): Promise<AxiosResponse<FleetClaimResponse>> {
|
|
55
|
+
const $ = new Fleets$(axiosInstance, namespace, useSchemaValidation)
|
|
56
|
+
const resp = await $.updateClaim_ByFleetId(fleetID, data,)
|
|
57
|
+
if (resp.error) throw resp.error
|
|
58
|
+
return resp.response
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
updateServerClaim,updateClaim_ByFleetId,
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022-2024 AccelByte Inc. All Rights Reserved
|
|
3
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
4
|
+
* and restrictions contact your company contract manager.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO GENERATED
|
|
8
|
+
*/
|
|
9
|
+
/* eslint-disable camelcase */
|
|
10
|
+
// @ts-ignore -> ts-expect-error TS6133
|
|
11
|
+
import { AccelByteSDK, ApiUtils, Network, SdkSetConfigParam } from '@accelbyte/sdk'
|
|
12
|
+
import { AxiosResponse } from 'axios'
|
|
13
|
+
|
|
14
|
+
import { Watchdogs$ } from './endpoints/Watchdogs$.js'
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export function WatchdogsApi(sdk: AccelByteSDK, args?: SdkSetConfigParam) {
|
|
18
|
+
const sdkAssembly = sdk.assembly()
|
|
19
|
+
|
|
20
|
+
const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace
|
|
21
|
+
const requestConfig = ApiUtils.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request)
|
|
22
|
+
const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? []
|
|
23
|
+
const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation
|
|
24
|
+
const axiosInstance = Network.create(requestConfig)
|
|
25
|
+
|
|
26
|
+
for (const interceptor of interceptors) {
|
|
27
|
+
if(interceptor.type === 'request') {
|
|
28
|
+
axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if(interceptor.type === 'response') {
|
|
32
|
+
axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* This is to support local ds development scenarios Required Permission: NAMESPACE:{namespace}:AMS:LOCALDS [CREATE]
|
|
40
|
+
*/
|
|
41
|
+
async function getConnect_ByWatchdogId(watchdogID:string): Promise<AxiosResponse<unknown>> {
|
|
42
|
+
const $ = new Watchdogs$(axiosInstance, namespace, useSchemaValidation)
|
|
43
|
+
const resp = await $.getConnect_ByWatchdogId(watchdogID, )
|
|
44
|
+
if (resp.error) throw resp.error
|
|
45
|
+
return resp.response
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Required Permission: NAMESPACE:{namespace}:ARMADA:WATCHDOG [CREATE]
|
|
51
|
+
*/
|
|
52
|
+
async function getConnect_ByWatchdogId_ByNS(watchdogID:string): Promise<AxiosResponse<unknown>> {
|
|
53
|
+
const $ = new Watchdogs$(axiosInstance, namespace, useSchemaValidation)
|
|
54
|
+
const resp = await $.getConnect_ByWatchdogId_ByNS(watchdogID, )
|
|
55
|
+
if (resp.error) throw resp.error
|
|
56
|
+
return resp.response
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
getConnect_ByWatchdogId,getConnect_ByWatchdogId_ByNS,
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022-2024 AccelByte Inc. All Rights Reserved
|
|
3
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
4
|
+
* and restrictions contact your company contract manager.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO GENERATED
|
|
8
|
+
*/
|
|
9
|
+
import { Response, Validate } from '@accelbyte/sdk'
|
|
10
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios'
|
|
11
|
+
import { AccountResponse } from '../../generated-definitions/AccountResponse.js'
|
|
12
|
+
|
|
13
|
+
export class Account$ {
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
// prettier-ignore
|
|
16
|
+
constructor(private axiosInstance: AxiosInstance, private namespace: string, private useSchemaValidation = true) {}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Required Permission: NAMESPACE:{namespace}:AMS:ACCOUNT [READ]
|
|
20
|
+
*/
|
|
21
|
+
getAccount(): Promise<Response<AccountResponse>> {
|
|
22
|
+
const params = {} as AxiosRequestConfig
|
|
23
|
+
const url = '/ams/v1/namespaces/{namespace}/account'.replace('{namespace}', this.namespace)
|
|
24
|
+
const resultPromise = this.axiosInstance.get(url, {params})
|
|
25
|
+
|
|
26
|
+
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, AccountResponse, 'AccountResponse')
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022-2024 AccelByte Inc. All Rights Reserved
|
|
3
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
4
|
+
* and restrictions contact your company contract manager.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO GENERATED
|
|
8
|
+
*/
|
|
9
|
+
import { Response, Validate } from '@accelbyte/sdk'
|
|
10
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios'
|
|
11
|
+
import { z } from 'zod'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export class AmsInfo$ {
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
// prettier-ignore
|
|
17
|
+
constructor(private axiosInstance: AxiosInstance, private namespace: string, private useSchemaValidation = true) {}
|
|
18
|
+
|
|
19
|
+
getUploadUrl(): Promise<Response<unknown>> {
|
|
20
|
+
const params = {} as AxiosRequestConfig
|
|
21
|
+
const url = '/ams/v1/upload-url'
|
|
22
|
+
const resultPromise = this.axiosInstance.get(url, {params})
|
|
23
|
+
|
|
24
|
+
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z.unknown(), 'z.unknown()')
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022-2024 AccelByte Inc. All Rights Reserved
|
|
3
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
4
|
+
* and restrictions contact your company contract manager.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO GENERATED
|
|
8
|
+
*/
|
|
9
|
+
import { Response, Validate } from '@accelbyte/sdk'
|
|
10
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios'
|
|
11
|
+
import { z } from 'zod'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export class Auth$ {
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
// prettier-ignore
|
|
17
|
+
constructor(private axiosInstance: AxiosInstance, private namespace: string, private useSchemaValidation = true) {}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Check if fleet commander is authorized to talk to AMS with this IAM
|
|
21
|
+
*/
|
|
22
|
+
getAuth(): Promise<Response<unknown>> {
|
|
23
|
+
const params = {} as AxiosRequestConfig
|
|
24
|
+
const url = '/ams/auth'
|
|
25
|
+
const resultPromise = this.axiosInstance.get(url, {params})
|
|
26
|
+
|
|
27
|
+
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z.unknown(), 'z.unknown()')
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022-2024 AccelByte Inc. All Rights Reserved
|
|
3
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
4
|
+
* and restrictions contact your company contract manager.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO GENERATED
|
|
8
|
+
*/
|
|
9
|
+
import { Response, Validate } from '@accelbyte/sdk'
|
|
10
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios'
|
|
11
|
+
import { z } from 'zod'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export class FleetCommander$ {
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
// prettier-ignore
|
|
17
|
+
constructor(private axiosInstance: AxiosInstance, private namespace: string, private useSchemaValidation = true) {}
|
|
18
|
+
|
|
19
|
+
getVersion(): Promise<Response<unknown>> {
|
|
20
|
+
const params = {} as AxiosRequestConfig
|
|
21
|
+
const url = '/ams/version'
|
|
22
|
+
const resultPromise = this.axiosInstance.get(url, {params})
|
|
23
|
+
|
|
24
|
+
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z.unknown(), 'z.unknown()')
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022-2024 AccelByte Inc. All Rights Reserved
|
|
3
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
4
|
+
* and restrictions contact your company contract manager.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO GENERATED
|
|
8
|
+
*/
|
|
9
|
+
import { Response, Validate } from '@accelbyte/sdk'
|
|
10
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios'
|
|
11
|
+
import { FleetClaimByKeysReq } from '../../generated-definitions/FleetClaimByKeysReq.js'
|
|
12
|
+
import { FleetClaimReq } from '../../generated-definitions/FleetClaimReq.js'
|
|
13
|
+
import { FleetClaimResponse } from '../../generated-definitions/FleetClaimResponse.js'
|
|
14
|
+
|
|
15
|
+
export class Fleets$ {
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
// prettier-ignore
|
|
18
|
+
constructor(private axiosInstance: AxiosInstance, private namespace: string, private useSchemaValidation = true) {}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Claim a dedicated server from fleets with matching claim keys Required Permission: NAMESPACE:{namespace}:AMS:SERVER:CLAIM [UPDATE]
|
|
22
|
+
*/
|
|
23
|
+
updateServerClaim(data: FleetClaimByKeysReq): Promise<Response<FleetClaimResponse>> {
|
|
24
|
+
const params = {} as AxiosRequestConfig
|
|
25
|
+
const url = '/ams/v1/namespaces/{namespace}/servers/claim'.replace('{namespace}', this.namespace)
|
|
26
|
+
const resultPromise = this.axiosInstance.put(url, data, {params})
|
|
27
|
+
|
|
28
|
+
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetClaimResponse, 'FleetClaimResponse')
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Required Permission: NAMESPACE:{namespace}:AMS:SERVER:CLAIM [UPDATE]
|
|
33
|
+
*/
|
|
34
|
+
updateClaim_ByFleetId(fleetID:string, data: FleetClaimReq): Promise<Response<FleetClaimResponse>> {
|
|
35
|
+
const params = {} as AxiosRequestConfig
|
|
36
|
+
const url = '/ams/v1/namespaces/{namespace}/fleets/{fleetID}/claim'.replace('{namespace}', this.namespace).replace('{fleetID}', fleetID)
|
|
37
|
+
const resultPromise = this.axiosInstance.put(url, data, {params})
|
|
38
|
+
|
|
39
|
+
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetClaimResponse, 'FleetClaimResponse')
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022-2024 AccelByte Inc. All Rights Reserved
|
|
3
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
4
|
+
* and restrictions contact your company contract manager.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO GENERATED
|
|
8
|
+
*/
|
|
9
|
+
import { Response, Validate } from '@accelbyte/sdk'
|
|
10
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios'
|
|
11
|
+
import { z } from 'zod'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export class Watchdogs$ {
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
// prettier-ignore
|
|
17
|
+
constructor(private axiosInstance: AxiosInstance, private namespace: string, private useSchemaValidation = true) {}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* This is to support local ds development scenarios Required Permission: NAMESPACE:{namespace}:AMS:LOCALDS [CREATE]
|
|
21
|
+
*/
|
|
22
|
+
getConnect_ByWatchdogId(watchdogID:string): Promise<Response<unknown>> {
|
|
23
|
+
const params = {} as AxiosRequestConfig
|
|
24
|
+
const url = '/ams/v1/namespaces/{namespace}/local/{watchdogID}/connect'.replace('{namespace}', this.namespace).replace('{watchdogID}', watchdogID)
|
|
25
|
+
const resultPromise = this.axiosInstance.get(url, {params})
|
|
26
|
+
|
|
27
|
+
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z.unknown(), 'z.unknown()')
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Required Permission: NAMESPACE:{namespace}:ARMADA:WATCHDOG [CREATE]
|
|
32
|
+
*/
|
|
33
|
+
getConnect_ByWatchdogId_ByNS(watchdogID:string): Promise<Response<unknown>> {
|
|
34
|
+
const params = {} as AxiosRequestConfig
|
|
35
|
+
const url = '/ams/v1/namespaces/{namespace}/watchdogs/{watchdogID}/connect'.replace('{namespace}', this.namespace).replace('{watchdogID}', watchdogID)
|
|
36
|
+
const resultPromise = this.axiosInstance.get(url, {params})
|
|
37
|
+
|
|
38
|
+
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z.unknown(), 'z.unknown()')
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022-2024 AccelByte Inc. All Rights Reserved
|
|
3
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
4
|
+
* and restrictions contact your company contract manager.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO GENERATED
|
|
8
|
+
*/
|
|
9
|
+
/* eslint-disable camelcase */
|
|
10
|
+
import { AccelByteSDK, SdkSetConfigParam, ApiError } from '@accelbyte/sdk'
|
|
11
|
+
import { AxiosError, AxiosResponse } from 'axios'
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
import { useQuery, UseQueryOptions, UseQueryResult } from '@tanstack/react-query'
|
|
14
|
+
import { AccountApi } from "../AccountApi.js"
|
|
15
|
+
|
|
16
|
+
import { AccountResponse } from '../../generated-definitions/AccountResponse.js'
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export enum Key_Account {
|
|
20
|
+
Account = 'Ams.Account.Account',
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export const useAccountApi_GetAccount = (
|
|
27
|
+
sdk: AccelByteSDK,
|
|
28
|
+
input: SdkSetConfigParam ,
|
|
29
|
+
options?: Omit<UseQueryOptions<AccountResponse, AxiosError<ApiError>>, 'queryKey'>,
|
|
30
|
+
callback?: (data: AxiosResponse<AccountResponse>) => void
|
|
31
|
+
): UseQueryResult<AccountResponse, AxiosError<ApiError>> => {
|
|
32
|
+
//
|
|
33
|
+
const queryFn = (
|
|
34
|
+
sdk: AccelByteSDK,
|
|
35
|
+
input: Parameters<typeof useAccountApi_GetAccount>[1]
|
|
36
|
+
) => async () => {
|
|
37
|
+
const response =
|
|
38
|
+
(await AccountApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
39
|
+
getAccount())
|
|
40
|
+
callback && callback(response)
|
|
41
|
+
return response.data
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return useQuery<AccountResponse, AxiosError<ApiError>>({
|
|
45
|
+
queryKey: [Key_Account.Account, input],
|
|
46
|
+
queryFn: queryFn(sdk, input),
|
|
47
|
+
...options
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022-2024 AccelByte Inc. All Rights Reserved
|
|
3
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
4
|
+
* and restrictions contact your company contract manager.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO GENERATED
|
|
8
|
+
*/
|
|
9
|
+
/* eslint-disable camelcase */
|
|
10
|
+
import { AccelByteSDK, SdkSetConfigParam, ApiError } from '@accelbyte/sdk'
|
|
11
|
+
import { AxiosError, AxiosResponse } from 'axios'
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
import { useQuery, UseQueryOptions, UseQueryResult } from '@tanstack/react-query'
|
|
14
|
+
import { AmsInfoApi } from "../AmsInfoApi.js"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export enum Key_AmsInfo {
|
|
20
|
+
UploadUrl = 'Ams.AmsInfo.UploadUrl',
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export const useAmsInfoApi_GetUploadUrl = (
|
|
27
|
+
sdk: AccelByteSDK,
|
|
28
|
+
input: SdkSetConfigParam ,
|
|
29
|
+
options?: Omit<UseQueryOptions<unknown, AxiosError<ApiError>>, 'queryKey'>,
|
|
30
|
+
callback?: (data: AxiosResponse<unknown>) => void
|
|
31
|
+
): UseQueryResult<unknown, AxiosError<ApiError>> => {
|
|
32
|
+
//
|
|
33
|
+
const queryFn = (
|
|
34
|
+
sdk: AccelByteSDK,
|
|
35
|
+
input: Parameters<typeof useAmsInfoApi_GetUploadUrl>[1]
|
|
36
|
+
) => async () => {
|
|
37
|
+
const response =
|
|
38
|
+
(await AmsInfoApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
39
|
+
getUploadUrl())
|
|
40
|
+
callback && callback(response)
|
|
41
|
+
return response.data
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return useQuery<unknown, AxiosError<ApiError>>({
|
|
45
|
+
queryKey: [Key_AmsInfo.UploadUrl, input],
|
|
46
|
+
queryFn: queryFn(sdk, input),
|
|
47
|
+
...options
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022-2024 AccelByte Inc. All Rights Reserved
|
|
3
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
4
|
+
* and restrictions contact your company contract manager.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO GENERATED
|
|
8
|
+
*/
|
|
9
|
+
/* eslint-disable camelcase */
|
|
10
|
+
import { AccelByteSDK, SdkSetConfigParam, ApiError } from '@accelbyte/sdk'
|
|
11
|
+
import { AxiosError, AxiosResponse } from 'axios'
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
import { useQuery, UseQueryOptions, UseQueryResult } from '@tanstack/react-query'
|
|
14
|
+
import { AuthApi } from "../AuthApi.js"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export enum Key_Auth {
|
|
20
|
+
Auth = 'Ams.Auth.Auth',
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export const useAuthApi_GetAuth = (
|
|
27
|
+
sdk: AccelByteSDK,
|
|
28
|
+
input: SdkSetConfigParam ,
|
|
29
|
+
options?: Omit<UseQueryOptions<unknown, AxiosError<ApiError>>, 'queryKey'>,
|
|
30
|
+
callback?: (data: AxiosResponse<unknown>) => void
|
|
31
|
+
): UseQueryResult<unknown, AxiosError<ApiError>> => {
|
|
32
|
+
//
|
|
33
|
+
const queryFn = (
|
|
34
|
+
sdk: AccelByteSDK,
|
|
35
|
+
input: Parameters<typeof useAuthApi_GetAuth>[1]
|
|
36
|
+
) => async () => {
|
|
37
|
+
const response =
|
|
38
|
+
(await AuthApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
39
|
+
getAuth())
|
|
40
|
+
callback && callback(response)
|
|
41
|
+
return response.data
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return useQuery<unknown, AxiosError<ApiError>>({
|
|
45
|
+
queryKey: [Key_Auth.Auth, input],
|
|
46
|
+
queryFn: queryFn(sdk, input),
|
|
47
|
+
...options
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022-2024 AccelByte Inc. All Rights Reserved
|
|
3
|
+
* This is licensed software from AccelByte Inc, for limitations
|
|
4
|
+
* and restrictions contact your company contract manager.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO GENERATED
|
|
8
|
+
*/
|
|
9
|
+
/* eslint-disable camelcase */
|
|
10
|
+
import { AccelByteSDK, SdkSetConfigParam, ApiError } from '@accelbyte/sdk'
|
|
11
|
+
import { AxiosError, AxiosResponse } from 'axios'
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
import { useQuery, UseQueryOptions, UseQueryResult } from '@tanstack/react-query'
|
|
14
|
+
import { FleetCommanderApi } from "../FleetCommanderApi.js"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export enum Key_FleetCommander {
|
|
20
|
+
Version = 'Ams.FleetCommander.Version',
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export const useFleetCommanderApi_GetVersion = (
|
|
27
|
+
sdk: AccelByteSDK,
|
|
28
|
+
input: SdkSetConfigParam ,
|
|
29
|
+
options?: Omit<UseQueryOptions<unknown, AxiosError<ApiError>>, 'queryKey'>,
|
|
30
|
+
callback?: (data: AxiosResponse<unknown>) => void
|
|
31
|
+
): UseQueryResult<unknown, AxiosError<ApiError>> => {
|
|
32
|
+
//
|
|
33
|
+
const queryFn = (
|
|
34
|
+
sdk: AccelByteSDK,
|
|
35
|
+
input: Parameters<typeof useFleetCommanderApi_GetVersion>[1]
|
|
36
|
+
) => async () => {
|
|
37
|
+
const response =
|
|
38
|
+
(await FleetCommanderApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
39
|
+
getVersion())
|
|
40
|
+
callback && callback(response)
|
|
41
|
+
return response.data
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return useQuery<unknown, AxiosError<ApiError>>({
|
|
45
|
+
queryKey: [Key_FleetCommander.Version, input],
|
|
46
|
+
queryFn: queryFn(sdk, input),
|
|
47
|
+
...options
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|