@accelbyte/sdk-ams 0.0.0-dev-20240828032938 → 0.0.0-dev-20240828053809
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/dist/FleetClaimResponse-DIDPJOnU.d.cts +2014 -0
- package/dist/FleetClaimResponse-DIDPJOnU.d.ts +2014 -0
- package/dist/all-query-imports.cjs +2382 -0
- package/dist/all-query-imports.d.cts +327 -0
- package/dist/all-query-imports.d.ts +327 -0
- package/dist/all-query-imports.js +711 -0
- package/dist/chunk-DMVQYRRS.js +1574 -0
- package/dist/index.cjs +1871 -0
- package/dist/index.d.cts +1239 -0
- package/dist/index.d.ts +1239 -0
- package/dist/index.js +258 -0
- package/package.json +28 -30
- package/CHANGELOG.md +0 -11
- package/src/Ams.ts +0 -42
- package/src/all-imports.ts +0 -91
- package/src/all-query-imports.ts +0 -19
- package/src/custom/index.ts +0 -6
- package/src/generated-admin/AccountAdminApi.ts +0 -91
- package/src/generated-admin/AmsInfoAdminApi.ts +0 -65
- package/src/generated-admin/AmsQoSAdminApi.ts +0 -65
- package/src/generated-admin/ArtifactsAdminApi.ts +0 -122
- package/src/generated-admin/DevelopmentAdminApi.ts +0 -89
- package/src/generated-admin/FleetsAdminApi.ts +0 -112
- package/src/generated-admin/ImagesAdminApi.ts +0 -111
- package/src/generated-admin/ServersAdminApi.ts +0 -89
- package/src/generated-admin/endpoints/AccountAdmin$.ts +0 -68
- package/src/generated-admin/endpoints/AmsInfoAdmin$.ts +0 -42
- package/src/generated-admin/endpoints/AmsQoSAdmin$.ts +0 -43
- package/src/generated-admin/endpoints/ArtifactsAdmin$.ts +0 -100
- package/src/generated-admin/endpoints/DevelopmentAdmin$.ts +0 -67
- package/src/generated-admin/endpoints/FleetsAdmin$.ts +0 -90
- package/src/generated-admin/endpoints/ImagesAdmin$.ts +0 -89
- package/src/generated-admin/endpoints/ServersAdmin$.ts +0 -66
- package/src/generated-admin/queries/AccountAdmin.query.ts +0 -131
- package/src/generated-admin/queries/AmsInfoAdmin.query.ts +0 -81
- package/src/generated-admin/queries/AmsQoSAdmin.query.ts +0 -77
- package/src/generated-admin/queries/ArtifactsAdmin.query.ts +0 -211
- package/src/generated-admin/queries/DevelopmentAdmin.query.ts +0 -130
- package/src/generated-admin/queries/FleetsAdmin.query.ts +0 -182
- package/src/generated-admin/queries/ImagesAdmin.query.ts +0 -181
- package/src/generated-admin/queries/ServersAdmin.query.ts +0 -139
- package/src/generated-definitions/AccountCreateRequest.ts +0 -10
- package/src/generated-definitions/AccountCreateResponse.ts +0 -11
- package/src/generated-definitions/AccountLimits.ts +0 -16
- package/src/generated-definitions/AccountLinkRequest.ts +0 -10
- package/src/generated-definitions/AccountLinkResponse.ts +0 -11
- package/src/generated-definitions/AccountLinkTokenResponse.ts +0 -10
- package/src/generated-definitions/AccountResponse.ts +0 -11
- package/src/generated-definitions/AmsRegionsResponse.ts +0 -10
- package/src/generated-definitions/ArtifactListResponse.ts +0 -11
- package/src/generated-definitions/ArtifactResponse.ts +0 -24
- package/src/generated-definitions/ArtifactSamplingRule.ts +0 -10
- package/src/generated-definitions/ArtifactTypeSamplingRules.ts +0 -11
- package/src/generated-definitions/ArtifactUrlResponse.ts +0 -10
- package/src/generated-definitions/ArtifactUsageResponse.ts +0 -14
- package/src/generated-definitions/AvailableInstanceTypesResponse.ts +0 -11
- package/src/generated-definitions/DevelopmentServerConfigurationCreateRequest.ts +0 -14
- package/src/generated-definitions/DevelopmentServerConfigurationCreateResponse.ts +0 -10
- package/src/generated-definitions/DevelopmentServerConfigurationGetResponse.ts +0 -14
- package/src/generated-definitions/DevelopmentServerConfigurationListResponse.ts +0 -14
- package/src/generated-definitions/DsHistoryEvent.ts +0 -19
- package/src/generated-definitions/DsHistoryList.ts +0 -12
- package/src/generated-definitions/DsHostConfiguration.ts +0 -10
- package/src/generated-definitions/ErrorResponse.ts +0 -10
- package/src/generated-definitions/FleetArtifactsSampleRules.ts +0 -11
- package/src/generated-definitions/FleetClaimByKeysReq.ts +0 -10
- package/src/generated-definitions/FleetClaimReq.ts +0 -10
- package/src/generated-definitions/FleetClaimResponse.ts +0 -10
- package/src/generated-definitions/FleetCreateResponse.ts +0 -10
- package/src/generated-definitions/FleetGetResponse.ts +0 -25
- package/src/generated-definitions/FleetListItemResponse.ts +0 -20
- package/src/generated-definitions/FleetListResponse.ts +0 -11
- package/src/generated-definitions/FleetParameters.ts +0 -23
- package/src/generated-definitions/FleetRegionalServerCounts.ts +0 -17
- package/src/generated-definitions/FleetServerConnectionInfoResponse.ts +0 -16
- package/src/generated-definitions/FleetServerHistoryEventResponse.ts +0 -19
- package/src/generated-definitions/FleetServerHistoryResponse.ts +0 -11
- package/src/generated-definitions/FleetServerInfoResponse.ts +0 -26
- package/src/generated-definitions/FleetServersResponse.ts +0 -17
- package/src/generated-definitions/ImageDeploymentProfile.ts +0 -17
- package/src/generated-definitions/ImageDetails.ts +0 -25
- package/src/generated-definitions/ImageList.ts +0 -11
- package/src/generated-definitions/ImageListItem.ts +0 -24
- package/src/generated-definitions/ImageStorage.ts +0 -14
- package/src/generated-definitions/ImageUpdate.ts +0 -15
- package/src/generated-definitions/InstanceTypeDescriptionResponse.ts +0 -17
- package/src/generated-definitions/Location.ts +0 -20
- package/src/generated-definitions/PagingInfo.ts +0 -19
- package/src/generated-definitions/PortConfiguration.ts +0 -10
- package/src/generated-definitions/QoSEndpointResponse.ts +0 -11
- package/src/generated-definitions/QoSServer.ts +0 -18
- package/src/generated-definitions/ReferencingFleet.ts +0 -10
- package/src/generated-definitions/RegionConfig.ts +0 -16
- package/src/generated-definitions/Time.ts +0 -10
- package/src/generated-definitions/Timeout.ts +0 -15
- package/src/generated-definitions/UpdateServerRequest.ts +0 -10
- package/src/generated-definitions/Zone.ts +0 -10
- package/src/generated-definitions/ZoneTrans.ts +0 -10
- package/src/generated-public/AccountApi.ts +0 -53
- package/src/generated-public/AmsInfoApi.ts +0 -50
- package/src/generated-public/AuthApi.ts +0 -53
- package/src/generated-public/FleetCommanderApi.ts +0 -50
- package/src/generated-public/FleetsApi.ts +0 -66
- package/src/generated-public/WatchdogsApi.ts +0 -64
- package/src/generated-public/endpoints/Account$.ts +0 -30
- package/src/generated-public/endpoints/AmsInfo$.ts +0 -28
- package/src/generated-public/endpoints/Auth$.ts +0 -31
- package/src/generated-public/endpoints/FleetCommander$.ts +0 -28
- package/src/generated-public/endpoints/Fleets$.ts +0 -43
- package/src/generated-public/endpoints/Watchdogs$.ts +0 -42
- package/src/generated-public/queries/Account.query.ts +0 -52
- package/src/generated-public/queries/AmsInfo.query.ts +0 -52
- package/src/generated-public/queries/Auth.query.ts +0 -52
- package/src/generated-public/queries/FleetCommander.query.ts +0 -52
- package/src/generated-public/queries/Fleets.query.ts +0 -74
- package/src/generated-public/queries/Watchdogs.query.ts +0 -80
- package/src/index.ts +0 -7
- package/src/version.json +0 -7
- package/swaggers/ams.json +0 -3978
- package/swaggers.json +0 -1
- package/tsconfig.json +0 -18
|
@@ -1,42 +0,0 @@
|
|
|
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 { AmsRegionsResponse } from '../../generated-definitions/AmsRegionsResponse.js'
|
|
12
|
-
import { AvailableInstanceTypesResponse } from '../../generated-definitions/AvailableInstanceTypesResponse.js'
|
|
13
|
-
|
|
14
|
-
export class AmsInfoAdmin$ {
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
// prettier-ignore
|
|
17
|
-
constructor(private axiosInstance: AxiosInstance, private namespace: string, private useSchemaValidation = true) {}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA [READ]
|
|
21
|
-
*/
|
|
22
|
-
getRegions(): Promise<Response<AmsRegionsResponse>> {
|
|
23
|
-
const params = {} as AxiosRequestConfig
|
|
24
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/regions'.replace('{namespace}', this.namespace)
|
|
25
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
26
|
-
|
|
27
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, AmsRegionsResponse, 'AmsRegionsResponse')
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA [READ]
|
|
32
|
-
*/
|
|
33
|
-
getSupportedInstances(): Promise<Response<AvailableInstanceTypesResponse>> {
|
|
34
|
-
const params = {} as AxiosRequestConfig
|
|
35
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/supported-instances'.replace('{namespace}', this.namespace)
|
|
36
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
37
|
-
|
|
38
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, AvailableInstanceTypesResponse, 'AvailableInstanceTypesResponse')
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
import { QoSEndpointResponse } from '../../generated-definitions/QoSEndpointResponse.js'
|
|
13
|
-
import { UpdateServerRequest } from '../../generated-definitions/UpdateServerRequest.js'
|
|
14
|
-
|
|
15
|
-
export class AmsQoSAdmin$ {
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
// prettier-ignore
|
|
18
|
-
constructor(private axiosInstance: AxiosInstance, private namespace: string, private useSchemaValidation = true) {}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* ``` Required Permission: ADMIN:NAMESPACE:{namespace}:QOS:SERVER [READ] This endpoint lists all QoS services available in all regions. This endpoint is intended to be called by game client to find out all available regions. After getting a list of QoS on each region, game client is expected to ping each one with UDP connection as described below: 1. Make UDP connection to each QoS's IP:Port 2. Send string "PING" after connection established 3. Wait for string "PONG" response 4. Note the request-response latency for each QoS in each region The game then can use ping latency information to either: 1. Inform the player on these latencies and let player choose preferred region 2. Send the latency list to Matchmaking Service so that player can be matched with other players in nearby regions
|
|
22
|
-
*/
|
|
23
|
-
getQos( queryParams?: {status?: string | null}): Promise<Response<QoSEndpointResponse>> {
|
|
24
|
-
const params = { ...queryParams} as AxiosRequestConfig
|
|
25
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/qos'.replace('{namespace}', this.namespace)
|
|
26
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
27
|
-
|
|
28
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, QoSEndpointResponse, 'QoSEndpointResponse')
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* ``` Required Permission: ADMIN:NAMESPACE:{namespace}:QOS:SERVER [UPDATE] This endpoint updates the registered QoS service's configurable configuration.
|
|
33
|
-
*/
|
|
34
|
-
patchQo_ByRegion(region:string, data: UpdateServerRequest): Promise<Response<unknown>> {
|
|
35
|
-
const params = {} as AxiosRequestConfig
|
|
36
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/qos/{region}'.replace('{namespace}', this.namespace).replace('{region}', region)
|
|
37
|
-
const resultPromise = this.axiosInstance.patch(url, data, {params})
|
|
38
|
-
|
|
39
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z.unknown(), 'z.unknown()')
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
@@ -1,100 +0,0 @@
|
|
|
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
|
-
import { ArtifactListResponse } from '../../generated-definitions/ArtifactListResponse.js'
|
|
13
|
-
import { ArtifactUrlResponse } from '../../generated-definitions/ArtifactUrlResponse.js'
|
|
14
|
-
import { ArtifactUsageResponse } from '../../generated-definitions/ArtifactUsageResponse.js'
|
|
15
|
-
import { FleetArtifactsSampleRules } from '../../generated-definitions/FleetArtifactsSampleRules.js'
|
|
16
|
-
|
|
17
|
-
export class ArtifactsAdmin$ {
|
|
18
|
-
// @ts-ignore
|
|
19
|
-
// prettier-ignore
|
|
20
|
-
constructor(private axiosInstance: AxiosInstance, private namespace: string, private useSchemaValidation = true) {}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA [DELETE]
|
|
24
|
-
*/
|
|
25
|
-
deleteArtifact( queryParams?: {artifactType?: string | null, fleetId?: string | null, uploadedBefore?: string | null}): Promise<Response<unknown>> {
|
|
26
|
-
const params = { ...queryParams} as AxiosRequestConfig
|
|
27
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/artifacts'.replace('{namespace}', this.namespace)
|
|
28
|
-
const resultPromise = this.axiosInstance.delete(url, {params})
|
|
29
|
-
|
|
30
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z.unknown(), 'z.unknown()')
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Get all artifacts matching the provided search criteria. When criteria is not specified the data returned won't have been filtered on those parameters Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:ARTIFACT [READ]
|
|
35
|
-
*/
|
|
36
|
-
getArtifacts( queryParams?: {artifactType?: string | null, count?: number, endDate?: string | null, fleetID?: string | null, imageID?: string | null, maxSize?: number, minSize?: number, offset?: number, region?: string | null, serverId?: string | null, startDate?: string | null, status?: string | null}): Promise<Response<ArtifactListResponse>> {
|
|
37
|
-
const params = {count: 100, ...queryParams} as AxiosRequestConfig
|
|
38
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/artifacts'.replace('{namespace}', this.namespace)
|
|
39
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
40
|
-
|
|
41
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, ArtifactListResponse, 'ArtifactListResponse')
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:ARTIFACT [READ]
|
|
46
|
-
*/
|
|
47
|
-
getArtifactsUsage(): Promise<Response<ArtifactUsageResponse>> {
|
|
48
|
-
const params = {} as AxiosRequestConfig
|
|
49
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/artifacts/usage'.replace('{namespace}', this.namespace)
|
|
50
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
51
|
-
|
|
52
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, ArtifactUsageResponse, 'ArtifactUsageResponse')
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:ARTIFACT [DELETE]
|
|
57
|
-
*/
|
|
58
|
-
deleteArtifact_ByArtifactId(artifactID:string): Promise<Response<unknown>> {
|
|
59
|
-
const params = {} as AxiosRequestConfig
|
|
60
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/artifacts/{artifactID}'.replace('{namespace}', this.namespace).replace('{artifactID}', artifactID)
|
|
61
|
-
const resultPromise = this.axiosInstance.delete(url, {params})
|
|
62
|
-
|
|
63
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z.unknown(), 'z.unknown()')
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:ARTIFACT [READ]
|
|
68
|
-
*/
|
|
69
|
-
getUrl_ByArtifactId(artifactID:string): Promise<Response<ArtifactUrlResponse>> {
|
|
70
|
-
const params = {} as AxiosRequestConfig
|
|
71
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/artifacts/{artifactID}/url'.replace('{namespace}', this.namespace).replace('{artifactID}', artifactID)
|
|
72
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
73
|
-
|
|
74
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, ArtifactUrlResponse, 'ArtifactUrlResponse')
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:ARTIFACT [READ]
|
|
79
|
-
*/
|
|
80
|
-
getArtifactsSamplingRules_ByFleetId(fleetID:string): Promise<Response<FleetArtifactsSampleRules>> {
|
|
81
|
-
const params = {} as AxiosRequestConfig
|
|
82
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/fleets/{fleetID}/artifacts-sampling-rules'.replace('{namespace}', this.namespace).replace('{fleetID}', fleetID)
|
|
83
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
84
|
-
|
|
85
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetArtifactsSampleRules, 'FleetArtifactsSampleRules')
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:ARTIFACT [UPDATE]
|
|
90
|
-
*/
|
|
91
|
-
updateArtifactsSamplingRule_ByFleetId(fleetID:string, data: FleetArtifactsSampleRules): Promise<Response<FleetArtifactsSampleRules>> {
|
|
92
|
-
const params = {} as AxiosRequestConfig
|
|
93
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/fleets/{fleetID}/artifacts-sampling-rules'.replace('{namespace}', this.namespace).replace('{fleetID}', fleetID)
|
|
94
|
-
const resultPromise = this.axiosInstance.put(url, data, {params})
|
|
95
|
-
|
|
96
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetArtifactsSampleRules, 'FleetArtifactsSampleRules')
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
|
|
@@ -1,67 +0,0 @@
|
|
|
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
|
-
import { DevelopmentServerConfigurationCreateRequest } from '../../generated-definitions/DevelopmentServerConfigurationCreateRequest.js'
|
|
13
|
-
import { DevelopmentServerConfigurationCreateResponse } from '../../generated-definitions/DevelopmentServerConfigurationCreateResponse.js'
|
|
14
|
-
import { DevelopmentServerConfigurationGetResponse } from '../../generated-definitions/DevelopmentServerConfigurationGetResponse.js'
|
|
15
|
-
import { DevelopmentServerConfigurationListResponse } from '../../generated-definitions/DevelopmentServerConfigurationListResponse.js'
|
|
16
|
-
|
|
17
|
-
export class DevelopmentAdmin$ {
|
|
18
|
-
// @ts-ignore
|
|
19
|
-
// prettier-ignore
|
|
20
|
-
constructor(private axiosInstance: AxiosInstance, private namespace: string, private useSchemaValidation = true) {}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
|
|
24
|
-
*/
|
|
25
|
-
getDevelopmentServerConfigurations( queryParams?: {count?: number, offset?: number}): Promise<Response<DevelopmentServerConfigurationListResponse>> {
|
|
26
|
-
const params = {count: 100, ...queryParams} as AxiosRequestConfig
|
|
27
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/development/server-configurations'.replace('{namespace}', this.namespace)
|
|
28
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
29
|
-
|
|
30
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, DevelopmentServerConfigurationListResponse, 'DevelopmentServerConfigurationListResponse')
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Configuration name can be up to 128 characters and must conform to ^[.a-zA-Z0-9_-]+$ Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [CREATE]
|
|
35
|
-
*/
|
|
36
|
-
createDevelopmentServerConfiguration(data: DevelopmentServerConfigurationCreateRequest): Promise<Response<DevelopmentServerConfigurationCreateResponse>> {
|
|
37
|
-
const params = {} as AxiosRequestConfig
|
|
38
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/development/server-configurations'.replace('{namespace}', this.namespace)
|
|
39
|
-
const resultPromise = this.axiosInstance.post(url, data, {params})
|
|
40
|
-
|
|
41
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, DevelopmentServerConfigurationCreateResponse, 'DevelopmentServerConfigurationCreateResponse')
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [DELETE]
|
|
46
|
-
*/
|
|
47
|
-
deleteDevelopmentServerConfiguration_ByDevelopmentServerConfigId(developmentServerConfigID:string): Promise<Response<unknown>> {
|
|
48
|
-
const params = {} as AxiosRequestConfig
|
|
49
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/development/server-configurations/{developmentServerConfigID}'.replace('{namespace}', this.namespace).replace('{developmentServerConfigID}', developmentServerConfigID)
|
|
50
|
-
const resultPromise = this.axiosInstance.delete(url, {params})
|
|
51
|
-
|
|
52
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z.unknown(), 'z.unknown()')
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
|
|
57
|
-
*/
|
|
58
|
-
getDevelopmentServerConfiguration_ByDevelopmentServerConfigId(developmentServerConfigID:string): Promise<Response<DevelopmentServerConfigurationGetResponse>> {
|
|
59
|
-
const params = {} as AxiosRequestConfig
|
|
60
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/development/server-configurations/{developmentServerConfigID}'.replace('{namespace}', this.namespace).replace('{developmentServerConfigID}', developmentServerConfigID)
|
|
61
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
62
|
-
|
|
63
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, DevelopmentServerConfigurationGetResponse, 'DevelopmentServerConfigurationGetResponse')
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
@@ -1,90 +0,0 @@
|
|
|
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
|
-
import { FleetCreateResponse } from '../../generated-definitions/FleetCreateResponse.js'
|
|
13
|
-
import { FleetGetResponse } from '../../generated-definitions/FleetGetResponse.js'
|
|
14
|
-
import { FleetListResponse } from '../../generated-definitions/FleetListResponse.js'
|
|
15
|
-
import { FleetParameters } from '../../generated-definitions/FleetParameters.js'
|
|
16
|
-
import { FleetServersResponse } from '../../generated-definitions/FleetServersResponse.js'
|
|
17
|
-
|
|
18
|
-
export class FleetsAdmin$ {
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
// prettier-ignore
|
|
21
|
-
constructor(private axiosInstance: AxiosInstance, private namespace: string, private useSchemaValidation = true) {}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
|
|
25
|
-
*/
|
|
26
|
-
getFleets(): Promise<Response<FleetListResponse>> {
|
|
27
|
-
const params = {} as AxiosRequestConfig
|
|
28
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/fleets'.replace('{namespace}', this.namespace)
|
|
29
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
30
|
-
|
|
31
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetListResponse, 'FleetListResponse')
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Optionally, sampling rules for the fleet can also be specified Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [CREATE]
|
|
36
|
-
*/
|
|
37
|
-
createFleet(data: FleetParameters): Promise<Response<FleetCreateResponse>> {
|
|
38
|
-
const params = {} as AxiosRequestConfig
|
|
39
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/fleets'.replace('{namespace}', this.namespace)
|
|
40
|
-
const resultPromise = this.axiosInstance.post(url, data, {params})
|
|
41
|
-
|
|
42
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetCreateResponse, 'FleetCreateResponse')
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [DELETE]
|
|
47
|
-
*/
|
|
48
|
-
deleteFleet_ByFleetId(fleetID:string): Promise<Response<unknown>> {
|
|
49
|
-
const params = {} as AxiosRequestConfig
|
|
50
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/fleets/{fleetID}'.replace('{namespace}', this.namespace).replace('{fleetID}', fleetID)
|
|
51
|
-
const resultPromise = this.axiosInstance.delete(url, {params})
|
|
52
|
-
|
|
53
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z.unknown(), 'z.unknown()')
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
|
|
58
|
-
*/
|
|
59
|
-
getFleet_ByFleetId(fleetID:string): Promise<Response<FleetGetResponse>> {
|
|
60
|
-
const params = {} as AxiosRequestConfig
|
|
61
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/fleets/{fleetID}'.replace('{namespace}', this.namespace).replace('{fleetID}', fleetID)
|
|
62
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
63
|
-
|
|
64
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetGetResponse, 'FleetGetResponse')
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Optionally, sampling rules for the fleet can also be updated Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [UPDATE]
|
|
69
|
-
*/
|
|
70
|
-
updateFleet_ByFleetId(fleetID:string, data: FleetParameters): Promise<Response<unknown>> {
|
|
71
|
-
const params = {} as AxiosRequestConfig
|
|
72
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/fleets/{fleetID}'.replace('{namespace}', this.namespace).replace('{fleetID}', fleetID)
|
|
73
|
-
const resultPromise = this.axiosInstance.put(url, data, {params})
|
|
74
|
-
|
|
75
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z.unknown(), 'z.unknown()')
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
|
|
80
|
-
*/
|
|
81
|
-
getServers_ByFleetId(fleetID:string, queryParams?: {count?: string | null, offset?: number}): Promise<Response<FleetServersResponse>> {
|
|
82
|
-
const params = { ...queryParams} as AxiosRequestConfig
|
|
83
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/fleets/{fleetID}/servers'.replace('{namespace}', this.namespace).replace('{fleetID}', fleetID)
|
|
84
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
85
|
-
|
|
86
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetServersResponse, 'FleetServersResponse')
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
|
|
@@ -1,89 +0,0 @@
|
|
|
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
|
-
import { ImageDetails } from '../../generated-definitions/ImageDetails.js'
|
|
13
|
-
import { ImageList } from '../../generated-definitions/ImageList.js'
|
|
14
|
-
import { ImageStorage } from '../../generated-definitions/ImageStorage.js'
|
|
15
|
-
import { ImageUpdate } from '../../generated-definitions/ImageUpdate.js'
|
|
16
|
-
|
|
17
|
-
export class ImagesAdmin$ {
|
|
18
|
-
// @ts-ignore
|
|
19
|
-
// prettier-ignore
|
|
20
|
-
constructor(private axiosInstance: AxiosInstance, private namespace: string, private useSchemaValidation = true) {}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Returns images which exist (uploaded, uploading, or building) in the linked account. This route fails if no account is linked Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:IMAGE [READ]
|
|
24
|
-
*/
|
|
25
|
-
getImages(): Promise<Response<ImageList>> {
|
|
26
|
-
const params = {} as AxiosRequestConfig
|
|
27
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/images'.replace('{namespace}', this.namespace)
|
|
28
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
29
|
-
|
|
30
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, ImageList, 'ImageList')
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Returns information regarding the account's usage for images storage including the free tier quota Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:IMAGE [READ]
|
|
35
|
-
*/
|
|
36
|
-
getImagesStorage(): Promise<Response<ImageStorage>> {
|
|
37
|
-
const params = {} as AxiosRequestConfig
|
|
38
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/images-storage'.replace('{namespace}', this.namespace)
|
|
39
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
40
|
-
|
|
41
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, ImageStorage, 'ImageStorage')
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Marks an image for deletion. The image will stop being available for fleets and will eventually be deleted. Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:IMAGE [DELETE]
|
|
46
|
-
*/
|
|
47
|
-
deleteImage_ByImageId(imageID:string): Promise<Response<unknown>> {
|
|
48
|
-
const params = {} as AxiosRequestConfig
|
|
49
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/images/{imageID}'.replace('{namespace}', this.namespace).replace('{imageID}', imageID)
|
|
50
|
-
const resultPromise = this.axiosInstance.delete(url, {params})
|
|
51
|
-
|
|
52
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z.unknown(), 'z.unknown()')
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:IMAGE [READ]
|
|
57
|
-
*/
|
|
58
|
-
getImage_ByImageId(imageID:string): Promise<Response<ImageDetails>> {
|
|
59
|
-
const params = {} as AxiosRequestConfig
|
|
60
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/images/{imageID}'.replace('{namespace}', this.namespace).replace('{imageID}', imageID)
|
|
61
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
62
|
-
|
|
63
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, ImageDetails, 'ImageDetails')
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* This allows editing of the image name, toggling `IsProtected`, or adding & removal of tags Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:IMAGE [UPDATE]
|
|
68
|
-
*/
|
|
69
|
-
patchImage_ByImageId(imageID:string, data: ImageUpdate): Promise<Response<ImageDetails>> {
|
|
70
|
-
const params = {} as AxiosRequestConfig
|
|
71
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/images/{imageID}'.replace('{namespace}', this.namespace).replace('{imageID}', imageID)
|
|
72
|
-
const resultPromise = this.axiosInstance.patch(url, data, {params})
|
|
73
|
-
|
|
74
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, ImageDetails, 'ImageDetails')
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Unmarks an image for deletion. The image will be available for fleets. Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:IMAGE [DELETE]
|
|
79
|
-
*/
|
|
80
|
-
createRestore_ByImageId(imageID:string): Promise<Response<unknown>> {
|
|
81
|
-
const params = {} as AxiosRequestConfig
|
|
82
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/images/{imageID}/restore'.replace('{namespace}', this.namespace).replace('{imageID}', imageID)
|
|
83
|
-
const resultPromise = this.axiosInstance.post(url, null, {params})
|
|
84
|
-
|
|
85
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z.unknown(), 'z.unknown()')
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
@@ -1,66 +0,0 @@
|
|
|
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 { DsHistoryList } from '../../generated-definitions/DsHistoryList.js'
|
|
12
|
-
import { FleetServerConnectionInfoResponse } from '../../generated-definitions/FleetServerConnectionInfoResponse.js'
|
|
13
|
-
import { FleetServerHistoryResponse } from '../../generated-definitions/FleetServerHistoryResponse.js'
|
|
14
|
-
import { FleetServerInfoResponse } from '../../generated-definitions/FleetServerInfoResponse.js'
|
|
15
|
-
|
|
16
|
-
export class ServersAdmin$ {
|
|
17
|
-
// @ts-ignore
|
|
18
|
-
// prettier-ignore
|
|
19
|
-
constructor(private axiosInstance: AxiosInstance, private namespace: string, private useSchemaValidation = true) {}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
|
|
23
|
-
*/
|
|
24
|
-
getServer_ByServerId(serverID:string): Promise<Response<FleetServerInfoResponse>> {
|
|
25
|
-
const params = {} as AxiosRequestConfig
|
|
26
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/servers/{serverID}'.replace('{namespace}', this.namespace).replace('{serverID}', serverID)
|
|
27
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
28
|
-
|
|
29
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetServerInfoResponse, 'FleetServerInfoResponse')
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
|
|
34
|
-
*/
|
|
35
|
-
getHistory_ByServerId(serverID:string): Promise<Response<FleetServerHistoryResponse>> {
|
|
36
|
-
const params = {} as AxiosRequestConfig
|
|
37
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/servers/{serverID}/history'.replace('{namespace}', this.namespace).replace('{serverID}', serverID)
|
|
38
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
39
|
-
|
|
40
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetServerHistoryResponse, 'FleetServerHistoryResponse')
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
|
|
45
|
-
*/
|
|
46
|
-
getServersHistory_ByFleetId(fleetID:string, queryParams?: {count?: number, offset?: number, reason?: string | null, region?: string | null, serverId?: string | null, sortDirection?: string | null, status?: string | null}): Promise<Response<DsHistoryList>> {
|
|
47
|
-
const params = { ...queryParams} as AxiosRequestConfig
|
|
48
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/fleets/{fleetID}/servers/history'.replace('{namespace}', this.namespace).replace('{fleetID}', fleetID)
|
|
49
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
50
|
-
|
|
51
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, DsHistoryList, 'DsHistoryList')
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:DS:LOGS [READ]
|
|
56
|
-
*/
|
|
57
|
-
getConnectioninfo_ByServerId(serverID:string): Promise<Response<FleetServerConnectionInfoResponse>> {
|
|
58
|
-
const params = {} as AxiosRequestConfig
|
|
59
|
-
const url = '/ams/v1/admin/namespaces/{namespace}/servers/{serverID}/connectioninfo'.replace('{namespace}', this.namespace).replace('{serverID}', serverID)
|
|
60
|
-
const resultPromise = this.axiosInstance.get(url, {params})
|
|
61
|
-
|
|
62
|
-
return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetServerConnectionInfoResponse, 'FleetServerConnectionInfoResponse')
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
@@ -1,131 +0,0 @@
|
|
|
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, useMutation, UseMutationOptions, UseMutationResult } from '@tanstack/react-query'
|
|
14
|
-
import { AccountAdminApi } from "../AccountAdminApi.js"
|
|
15
|
-
|
|
16
|
-
import { AccountCreateRequest } from '../../generated-definitions/AccountCreateRequest.js'
|
|
17
|
-
import { AccountCreateResponse } from '../../generated-definitions/AccountCreateResponse.js'
|
|
18
|
-
import { AccountLinkRequest } from '../../generated-definitions/AccountLinkRequest.js'
|
|
19
|
-
import { AccountLinkResponse } from '../../generated-definitions/AccountLinkResponse.js'
|
|
20
|
-
import { AccountLinkTokenResponse } from '../../generated-definitions/AccountLinkTokenResponse.js'
|
|
21
|
-
import { AccountResponse } from '../../generated-definitions/AccountResponse.js'
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export enum Key_AccountAdmin {
|
|
25
|
-
Account = 'Ams.AccountAdmin.Account',
|
|
26
|
-
AccountLink = 'Ams.AccountAdmin.AccountLink',
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export const useAccountAdminApi_GetAccount = (
|
|
33
|
-
sdk: AccelByteSDK,
|
|
34
|
-
input: SdkSetConfigParam ,
|
|
35
|
-
options?: Omit<UseQueryOptions<AccountResponse, AxiosError<ApiError>>, 'queryKey'>,
|
|
36
|
-
callback?: (data: AxiosResponse<AccountResponse>) => void
|
|
37
|
-
): UseQueryResult<AccountResponse, AxiosError<ApiError>> => {
|
|
38
|
-
//
|
|
39
|
-
const queryFn = (
|
|
40
|
-
sdk: AccelByteSDK,
|
|
41
|
-
input: Parameters<typeof useAccountAdminApi_GetAccount>[1]
|
|
42
|
-
) => async () => {
|
|
43
|
-
const response =
|
|
44
|
-
(await AccountAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
45
|
-
getAccount())
|
|
46
|
-
callback && callback(response)
|
|
47
|
-
return response.data
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return useQuery<AccountResponse, AxiosError<ApiError>>({
|
|
51
|
-
queryKey: [Key_AccountAdmin.Account, input],
|
|
52
|
-
queryFn: queryFn(sdk, input),
|
|
53
|
-
...options
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
export const useAccountAdminApi_CreateAccount = (
|
|
60
|
-
sdk: AccelByteSDK,
|
|
61
|
-
options?: Omit<UseMutationOptions<AccountCreateResponse, AxiosError<ApiError>, SdkSetConfigParam & { data: AccountCreateRequest }>, 'mutationKey'>,
|
|
62
|
-
callback?: (data: AccountCreateResponse) => void
|
|
63
|
-
): UseMutationResult<AccountCreateResponse, AxiosError<ApiError>, SdkSetConfigParam & { data: AccountCreateRequest }> => {
|
|
64
|
-
//
|
|
65
|
-
const mutationFn = async (input: SdkSetConfigParam & { data: AccountCreateRequest }) => {
|
|
66
|
-
const response =
|
|
67
|
-
(await AccountAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
68
|
-
createAccount(input.data))
|
|
69
|
-
callback && callback(response.data)
|
|
70
|
-
return response.data
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return useMutation({
|
|
74
|
-
mutationKey: [Key_AccountAdmin.Account],
|
|
75
|
-
mutationFn,
|
|
76
|
-
...options
|
|
77
|
-
})
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
export const useAccountAdminApi_GetAccountLink = (
|
|
83
|
-
sdk: AccelByteSDK,
|
|
84
|
-
input: SdkSetConfigParam ,
|
|
85
|
-
options?: Omit<UseQueryOptions<AccountLinkTokenResponse, AxiosError<ApiError>>, 'queryKey'>,
|
|
86
|
-
callback?: (data: AxiosResponse<AccountLinkTokenResponse>) => void
|
|
87
|
-
): UseQueryResult<AccountLinkTokenResponse, AxiosError<ApiError>> => {
|
|
88
|
-
//
|
|
89
|
-
const queryFn = (
|
|
90
|
-
sdk: AccelByteSDK,
|
|
91
|
-
input: Parameters<typeof useAccountAdminApi_GetAccountLink>[1]
|
|
92
|
-
) => async () => {
|
|
93
|
-
const response =
|
|
94
|
-
(await AccountAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
95
|
-
getAccountLink())
|
|
96
|
-
callback && callback(response)
|
|
97
|
-
return response.data
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return useQuery<AccountLinkTokenResponse, AxiosError<ApiError>>({
|
|
101
|
-
queryKey: [Key_AccountAdmin.AccountLink, input],
|
|
102
|
-
queryFn: queryFn(sdk, input),
|
|
103
|
-
...options
|
|
104
|
-
})
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
export const useAccountAdminApi_CreateAccountLink = (
|
|
110
|
-
sdk: AccelByteSDK,
|
|
111
|
-
options?: Omit<UseMutationOptions<AccountLinkResponse, AxiosError<ApiError>, SdkSetConfigParam & { data: AccountLinkRequest }>, 'mutationKey'>,
|
|
112
|
-
callback?: (data: AccountLinkResponse) => void
|
|
113
|
-
): UseMutationResult<AccountLinkResponse, AxiosError<ApiError>, SdkSetConfigParam & { data: AccountLinkRequest }> => {
|
|
114
|
-
//
|
|
115
|
-
const mutationFn = async (input: SdkSetConfigParam & { data: AccountLinkRequest }) => {
|
|
116
|
-
const response =
|
|
117
|
-
(await AccountAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
118
|
-
createAccountLink(input.data))
|
|
119
|
-
callback && callback(response.data)
|
|
120
|
-
return response.data
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return useMutation({
|
|
124
|
-
mutationKey: [Key_AccountAdmin.AccountLink],
|
|
125
|
-
mutationFn,
|
|
126
|
-
...options
|
|
127
|
-
})
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|