@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,211 @@
|
|
|
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 { ArtifactsAdminApi } from "../ArtifactsAdminApi.js"
|
|
15
|
+
|
|
16
|
+
import { ArtifactListResponse } from '../../generated-definitions/ArtifactListResponse.js'
|
|
17
|
+
import { ArtifactUrlResponse } from '../../generated-definitions/ArtifactUrlResponse.js'
|
|
18
|
+
import { ArtifactUsageResponse } from '../../generated-definitions/ArtifactUsageResponse.js'
|
|
19
|
+
import { FleetArtifactsSampleRules } from '../../generated-definitions/FleetArtifactsSampleRules.js'
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export enum Key_ArtifactsAdmin {
|
|
23
|
+
Artifact = 'Ams.ArtifactsAdmin.Artifact',
|
|
24
|
+
Artifacts = 'Ams.ArtifactsAdmin.Artifacts',
|
|
25
|
+
ArtifactsUsage = 'Ams.ArtifactsAdmin.ArtifactsUsage',
|
|
26
|
+
Artifact_ByArtifactId = 'Ams.ArtifactsAdmin.Artifact_ByArtifactId',
|
|
27
|
+
Url_ByArtifactId = 'Ams.ArtifactsAdmin.Url_ByArtifactId',
|
|
28
|
+
ArtifactsSamplingRules_ByFleetId = 'Ams.ArtifactsAdmin.ArtifactsSamplingRules_ByFleetId',
|
|
29
|
+
ArtifactsSamplingRule_ByFleetId = 'Ams.ArtifactsAdmin.ArtifactsSamplingRule_ByFleetId',
|
|
30
|
+
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
export const useArtifactsAdminApi_DeleteArtifact = (
|
|
36
|
+
sdk: AccelByteSDK,
|
|
37
|
+
options?: Omit<UseMutationOptions<unknown, AxiosError<ApiError>, SdkSetConfigParam & { queryParams?: {artifactType?: string | null, fleetId?: string | null, uploadedBefore?: string | null} }>, 'mutationKey'>,
|
|
38
|
+
callback?: (data: unknown) => void
|
|
39
|
+
): UseMutationResult<unknown, AxiosError<ApiError>, SdkSetConfigParam & { queryParams?: {artifactType?: string | null, fleetId?: string | null, uploadedBefore?: string | null} }> => {
|
|
40
|
+
//
|
|
41
|
+
const mutationFn = async (input: SdkSetConfigParam & { queryParams?: {artifactType?: string | null, fleetId?: string | null, uploadedBefore?: string | null} }) => {
|
|
42
|
+
const response =
|
|
43
|
+
(await ArtifactsAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
44
|
+
deleteArtifact(input.queryParams))
|
|
45
|
+
callback && callback(response.data)
|
|
46
|
+
return response.data
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return useMutation({
|
|
50
|
+
mutationKey: [Key_ArtifactsAdmin.Artifact],
|
|
51
|
+
mutationFn,
|
|
52
|
+
...options
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
export const useArtifactsAdminApi_GetArtifacts = (
|
|
59
|
+
sdk: AccelByteSDK,
|
|
60
|
+
input: SdkSetConfigParam & { 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} },
|
|
61
|
+
options?: Omit<UseQueryOptions<ArtifactListResponse, AxiosError<ApiError>>, 'queryKey'>,
|
|
62
|
+
callback?: (data: AxiosResponse<ArtifactListResponse>) => void
|
|
63
|
+
): UseQueryResult<ArtifactListResponse, AxiosError<ApiError>> => {
|
|
64
|
+
//
|
|
65
|
+
const queryFn = (
|
|
66
|
+
sdk: AccelByteSDK,
|
|
67
|
+
input: Parameters<typeof useArtifactsAdminApi_GetArtifacts>[1]
|
|
68
|
+
) => async () => {
|
|
69
|
+
const response =
|
|
70
|
+
(await ArtifactsAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
71
|
+
getArtifacts(input.queryParams))
|
|
72
|
+
callback && callback(response)
|
|
73
|
+
return response.data
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return useQuery<ArtifactListResponse, AxiosError<ApiError>>({
|
|
77
|
+
queryKey: [Key_ArtifactsAdmin.Artifacts, input],
|
|
78
|
+
queryFn: queryFn(sdk, input),
|
|
79
|
+
...options
|
|
80
|
+
})
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
export const useArtifactsAdminApi_GetArtifactsUsage = (
|
|
86
|
+
sdk: AccelByteSDK,
|
|
87
|
+
input: SdkSetConfigParam ,
|
|
88
|
+
options?: Omit<UseQueryOptions<ArtifactUsageResponse, AxiosError<ApiError>>, 'queryKey'>,
|
|
89
|
+
callback?: (data: AxiosResponse<ArtifactUsageResponse>) => void
|
|
90
|
+
): UseQueryResult<ArtifactUsageResponse, AxiosError<ApiError>> => {
|
|
91
|
+
//
|
|
92
|
+
const queryFn = (
|
|
93
|
+
sdk: AccelByteSDK,
|
|
94
|
+
input: Parameters<typeof useArtifactsAdminApi_GetArtifactsUsage>[1]
|
|
95
|
+
) => async () => {
|
|
96
|
+
const response =
|
|
97
|
+
(await ArtifactsAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
98
|
+
getArtifactsUsage())
|
|
99
|
+
callback && callback(response)
|
|
100
|
+
return response.data
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return useQuery<ArtifactUsageResponse, AxiosError<ApiError>>({
|
|
104
|
+
queryKey: [Key_ArtifactsAdmin.ArtifactsUsage, input],
|
|
105
|
+
queryFn: queryFn(sdk, input),
|
|
106
|
+
...options
|
|
107
|
+
})
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
export const useArtifactsAdminApi_DeleteArtifact_ByArtifactId = (
|
|
113
|
+
sdk: AccelByteSDK,
|
|
114
|
+
options?: Omit<UseMutationOptions<unknown, AxiosError<ApiError>, SdkSetConfigParam & { artifactID:string }>, 'mutationKey'>,
|
|
115
|
+
callback?: (data: unknown) => void
|
|
116
|
+
): UseMutationResult<unknown, AxiosError<ApiError>, SdkSetConfigParam & { artifactID:string }> => {
|
|
117
|
+
//
|
|
118
|
+
const mutationFn = async (input: SdkSetConfigParam & { artifactID:string }) => {
|
|
119
|
+
const response =
|
|
120
|
+
(await ArtifactsAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
121
|
+
deleteArtifact_ByArtifactId(input.artifactID))
|
|
122
|
+
callback && callback(response.data)
|
|
123
|
+
return response.data
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return useMutation({
|
|
127
|
+
mutationKey: [Key_ArtifactsAdmin.Artifact_ByArtifactId],
|
|
128
|
+
mutationFn,
|
|
129
|
+
...options
|
|
130
|
+
})
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
export const useArtifactsAdminApi_GetUrl_ByArtifactId = (
|
|
136
|
+
sdk: AccelByteSDK,
|
|
137
|
+
input: SdkSetConfigParam & { artifactID:string },
|
|
138
|
+
options?: Omit<UseQueryOptions<ArtifactUrlResponse, AxiosError<ApiError>>, 'queryKey'>,
|
|
139
|
+
callback?: (data: AxiosResponse<ArtifactUrlResponse>) => void
|
|
140
|
+
): UseQueryResult<ArtifactUrlResponse, AxiosError<ApiError>> => {
|
|
141
|
+
//
|
|
142
|
+
const queryFn = (
|
|
143
|
+
sdk: AccelByteSDK,
|
|
144
|
+
input: Parameters<typeof useArtifactsAdminApi_GetUrl_ByArtifactId>[1]
|
|
145
|
+
) => async () => {
|
|
146
|
+
const response =
|
|
147
|
+
(await ArtifactsAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
148
|
+
getUrl_ByArtifactId(input.artifactID))
|
|
149
|
+
callback && callback(response)
|
|
150
|
+
return response.data
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return useQuery<ArtifactUrlResponse, AxiosError<ApiError>>({
|
|
154
|
+
queryKey: [Key_ArtifactsAdmin.Url_ByArtifactId, input],
|
|
155
|
+
queryFn: queryFn(sdk, input),
|
|
156
|
+
...options
|
|
157
|
+
})
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
export const useArtifactsAdminApi_GetArtifactsSamplingRules_ByFleetId = (
|
|
163
|
+
sdk: AccelByteSDK,
|
|
164
|
+
input: SdkSetConfigParam & { fleetID:string },
|
|
165
|
+
options?: Omit<UseQueryOptions<FleetArtifactsSampleRules, AxiosError<ApiError>>, 'queryKey'>,
|
|
166
|
+
callback?: (data: AxiosResponse<FleetArtifactsSampleRules>) => void
|
|
167
|
+
): UseQueryResult<FleetArtifactsSampleRules, AxiosError<ApiError>> => {
|
|
168
|
+
//
|
|
169
|
+
const queryFn = (
|
|
170
|
+
sdk: AccelByteSDK,
|
|
171
|
+
input: Parameters<typeof useArtifactsAdminApi_GetArtifactsSamplingRules_ByFleetId>[1]
|
|
172
|
+
) => async () => {
|
|
173
|
+
const response =
|
|
174
|
+
(await ArtifactsAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
175
|
+
getArtifactsSamplingRules_ByFleetId(input.fleetID))
|
|
176
|
+
callback && callback(response)
|
|
177
|
+
return response.data
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return useQuery<FleetArtifactsSampleRules, AxiosError<ApiError>>({
|
|
181
|
+
queryKey: [Key_ArtifactsAdmin.ArtifactsSamplingRules_ByFleetId, input],
|
|
182
|
+
queryFn: queryFn(sdk, input),
|
|
183
|
+
...options
|
|
184
|
+
})
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
export const useArtifactsAdminApi_UpdateArtifactsSamplingRule_ByFleetId = (
|
|
190
|
+
sdk: AccelByteSDK,
|
|
191
|
+
options?: Omit<UseMutationOptions<FleetArtifactsSampleRules, AxiosError<ApiError>, SdkSetConfigParam & { fleetID:string, data: FleetArtifactsSampleRules }>, 'mutationKey'>,
|
|
192
|
+
callback?: (data: FleetArtifactsSampleRules) => void
|
|
193
|
+
): UseMutationResult<FleetArtifactsSampleRules, AxiosError<ApiError>, SdkSetConfigParam & { fleetID:string, data: FleetArtifactsSampleRules }> => {
|
|
194
|
+
//
|
|
195
|
+
const mutationFn = async (input: SdkSetConfigParam & { fleetID:string, data: FleetArtifactsSampleRules }) => {
|
|
196
|
+
const response =
|
|
197
|
+
(await ArtifactsAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
198
|
+
updateArtifactsSamplingRule_ByFleetId(input.fleetID, input.data))
|
|
199
|
+
callback && callback(response.data)
|
|
200
|
+
return response.data
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return useMutation({
|
|
204
|
+
mutationKey: [Key_ArtifactsAdmin.ArtifactsSamplingRule_ByFleetId],
|
|
205
|
+
mutationFn,
|
|
206
|
+
...options
|
|
207
|
+
})
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
@@ -0,0 +1,130 @@
|
|
|
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 { DevelopmentAdminApi } from "../DevelopmentAdminApi.js"
|
|
15
|
+
|
|
16
|
+
import { DevelopmentServerConfigurationCreateRequest } from '../../generated-definitions/DevelopmentServerConfigurationCreateRequest.js'
|
|
17
|
+
import { DevelopmentServerConfigurationCreateResponse } from '../../generated-definitions/DevelopmentServerConfigurationCreateResponse.js'
|
|
18
|
+
import { DevelopmentServerConfigurationGetResponse } from '../../generated-definitions/DevelopmentServerConfigurationGetResponse.js'
|
|
19
|
+
import { DevelopmentServerConfigurationListResponse } from '../../generated-definitions/DevelopmentServerConfigurationListResponse.js'
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export enum Key_DevelopmentAdmin {
|
|
23
|
+
DevelopmentServerConfigurations = 'Ams.DevelopmentAdmin.DevelopmentServerConfigurations',
|
|
24
|
+
DevelopmentServerConfiguration = 'Ams.DevelopmentAdmin.DevelopmentServerConfiguration',
|
|
25
|
+
DevelopmentServerConfiguration_ByDevelopmentServerConfigId = 'Ams.DevelopmentAdmin.DevelopmentServerConfiguration_ByDevelopmentServerConfigId',
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export const useDevelopmentAdminApi_GetDevelopmentServerConfigurations = (
|
|
32
|
+
sdk: AccelByteSDK,
|
|
33
|
+
input: SdkSetConfigParam & { queryParams?: {count?: number, offset?: number} },
|
|
34
|
+
options?: Omit<UseQueryOptions<DevelopmentServerConfigurationListResponse, AxiosError<ApiError>>, 'queryKey'>,
|
|
35
|
+
callback?: (data: AxiosResponse<DevelopmentServerConfigurationListResponse>) => void
|
|
36
|
+
): UseQueryResult<DevelopmentServerConfigurationListResponse, AxiosError<ApiError>> => {
|
|
37
|
+
//
|
|
38
|
+
const queryFn = (
|
|
39
|
+
sdk: AccelByteSDK,
|
|
40
|
+
input: Parameters<typeof useDevelopmentAdminApi_GetDevelopmentServerConfigurations>[1]
|
|
41
|
+
) => async () => {
|
|
42
|
+
const response =
|
|
43
|
+
(await DevelopmentAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
44
|
+
getDevelopmentServerConfigurations(input.queryParams))
|
|
45
|
+
callback && callback(response)
|
|
46
|
+
return response.data
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return useQuery<DevelopmentServerConfigurationListResponse, AxiosError<ApiError>>({
|
|
50
|
+
queryKey: [Key_DevelopmentAdmin.DevelopmentServerConfigurations, input],
|
|
51
|
+
queryFn: queryFn(sdk, input),
|
|
52
|
+
...options
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
export const useDevelopmentAdminApi_CreateDevelopmentServerConfiguration = (
|
|
59
|
+
sdk: AccelByteSDK,
|
|
60
|
+
options?: Omit<UseMutationOptions<DevelopmentServerConfigurationCreateResponse, AxiosError<ApiError>, SdkSetConfigParam & { data: DevelopmentServerConfigurationCreateRequest }>, 'mutationKey'>,
|
|
61
|
+
callback?: (data: DevelopmentServerConfigurationCreateResponse) => void
|
|
62
|
+
): UseMutationResult<DevelopmentServerConfigurationCreateResponse, AxiosError<ApiError>, SdkSetConfigParam & { data: DevelopmentServerConfigurationCreateRequest }> => {
|
|
63
|
+
//
|
|
64
|
+
const mutationFn = async (input: SdkSetConfigParam & { data: DevelopmentServerConfigurationCreateRequest }) => {
|
|
65
|
+
const response =
|
|
66
|
+
(await DevelopmentAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
67
|
+
createDevelopmentServerConfiguration(input.data))
|
|
68
|
+
callback && callback(response.data)
|
|
69
|
+
return response.data
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return useMutation({
|
|
73
|
+
mutationKey: [Key_DevelopmentAdmin.DevelopmentServerConfiguration],
|
|
74
|
+
mutationFn,
|
|
75
|
+
...options
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
export const useDevelopmentAdminApi_DeleteDevelopmentServerConfiguration_ByDevelopmentServerConfigId = (
|
|
82
|
+
sdk: AccelByteSDK,
|
|
83
|
+
options?: Omit<UseMutationOptions<unknown, AxiosError<ApiError>, SdkSetConfigParam & { developmentServerConfigID:string }>, 'mutationKey'>,
|
|
84
|
+
callback?: (data: unknown) => void
|
|
85
|
+
): UseMutationResult<unknown, AxiosError<ApiError>, SdkSetConfigParam & { developmentServerConfigID:string }> => {
|
|
86
|
+
//
|
|
87
|
+
const mutationFn = async (input: SdkSetConfigParam & { developmentServerConfigID:string }) => {
|
|
88
|
+
const response =
|
|
89
|
+
(await DevelopmentAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
90
|
+
deleteDevelopmentServerConfiguration_ByDevelopmentServerConfigId(input.developmentServerConfigID))
|
|
91
|
+
callback && callback(response.data)
|
|
92
|
+
return response.data
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return useMutation({
|
|
96
|
+
mutationKey: [Key_DevelopmentAdmin.DevelopmentServerConfiguration_ByDevelopmentServerConfigId],
|
|
97
|
+
mutationFn,
|
|
98
|
+
...options
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
export const useDevelopmentAdminApi_GetDevelopmentServerConfiguration_ByDevelopmentServerConfigId = (
|
|
105
|
+
sdk: AccelByteSDK,
|
|
106
|
+
input: SdkSetConfigParam & { developmentServerConfigID:string },
|
|
107
|
+
options?: Omit<UseQueryOptions<DevelopmentServerConfigurationGetResponse, AxiosError<ApiError>>, 'queryKey'>,
|
|
108
|
+
callback?: (data: AxiosResponse<DevelopmentServerConfigurationGetResponse>) => void
|
|
109
|
+
): UseQueryResult<DevelopmentServerConfigurationGetResponse, AxiosError<ApiError>> => {
|
|
110
|
+
//
|
|
111
|
+
const queryFn = (
|
|
112
|
+
sdk: AccelByteSDK,
|
|
113
|
+
input: Parameters<typeof useDevelopmentAdminApi_GetDevelopmentServerConfiguration_ByDevelopmentServerConfigId>[1]
|
|
114
|
+
) => async () => {
|
|
115
|
+
const response =
|
|
116
|
+
(await DevelopmentAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
117
|
+
getDevelopmentServerConfiguration_ByDevelopmentServerConfigId(input.developmentServerConfigID))
|
|
118
|
+
callback && callback(response)
|
|
119
|
+
return response.data
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return useQuery<DevelopmentServerConfigurationGetResponse, AxiosError<ApiError>>({
|
|
123
|
+
queryKey: [Key_DevelopmentAdmin.DevelopmentServerConfiguration_ByDevelopmentServerConfigId, input],
|
|
124
|
+
queryFn: queryFn(sdk, input),
|
|
125
|
+
...options
|
|
126
|
+
})
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
@@ -0,0 +1,182 @@
|
|
|
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 { FleetsAdminApi } from "../FleetsAdminApi.js"
|
|
15
|
+
|
|
16
|
+
import { FleetCreateResponse } from '../../generated-definitions/FleetCreateResponse.js'
|
|
17
|
+
import { FleetGetResponse } from '../../generated-definitions/FleetGetResponse.js'
|
|
18
|
+
import { FleetListResponse } from '../../generated-definitions/FleetListResponse.js'
|
|
19
|
+
import { FleetParameters } from '../../generated-definitions/FleetParameters.js'
|
|
20
|
+
import { FleetServersResponse } from '../../generated-definitions/FleetServersResponse.js'
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
export enum Key_FleetsAdmin {
|
|
24
|
+
Fleets = 'Ams.FleetsAdmin.Fleets',
|
|
25
|
+
Fleet = 'Ams.FleetsAdmin.Fleet',
|
|
26
|
+
Fleet_ByFleetId = 'Ams.FleetsAdmin.Fleet_ByFleetId',
|
|
27
|
+
Servers_ByFleetId = 'Ams.FleetsAdmin.Servers_ByFleetId',
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
export const useFleetsAdminApi_GetFleets = (
|
|
34
|
+
sdk: AccelByteSDK,
|
|
35
|
+
input: SdkSetConfigParam ,
|
|
36
|
+
options?: Omit<UseQueryOptions<FleetListResponse, AxiosError<ApiError>>, 'queryKey'>,
|
|
37
|
+
callback?: (data: AxiosResponse<FleetListResponse>) => void
|
|
38
|
+
): UseQueryResult<FleetListResponse, AxiosError<ApiError>> => {
|
|
39
|
+
//
|
|
40
|
+
const queryFn = (
|
|
41
|
+
sdk: AccelByteSDK,
|
|
42
|
+
input: Parameters<typeof useFleetsAdminApi_GetFleets>[1]
|
|
43
|
+
) => async () => {
|
|
44
|
+
const response =
|
|
45
|
+
(await FleetsAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
46
|
+
getFleets())
|
|
47
|
+
callback && callback(response)
|
|
48
|
+
return response.data
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return useQuery<FleetListResponse, AxiosError<ApiError>>({
|
|
52
|
+
queryKey: [Key_FleetsAdmin.Fleets, input],
|
|
53
|
+
queryFn: queryFn(sdk, input),
|
|
54
|
+
...options
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
export const useFleetsAdminApi_CreateFleet = (
|
|
61
|
+
sdk: AccelByteSDK,
|
|
62
|
+
options?: Omit<UseMutationOptions<FleetCreateResponse, AxiosError<ApiError>, SdkSetConfigParam & { data: FleetParameters }>, 'mutationKey'>,
|
|
63
|
+
callback?: (data: FleetCreateResponse) => void
|
|
64
|
+
): UseMutationResult<FleetCreateResponse, AxiosError<ApiError>, SdkSetConfigParam & { data: FleetParameters }> => {
|
|
65
|
+
//
|
|
66
|
+
const mutationFn = async (input: SdkSetConfigParam & { data: FleetParameters }) => {
|
|
67
|
+
const response =
|
|
68
|
+
(await FleetsAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
69
|
+
createFleet(input.data))
|
|
70
|
+
callback && callback(response.data)
|
|
71
|
+
return response.data
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return useMutation({
|
|
75
|
+
mutationKey: [Key_FleetsAdmin.Fleet],
|
|
76
|
+
mutationFn,
|
|
77
|
+
...options
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
export const useFleetsAdminApi_DeleteFleet_ByFleetId = (
|
|
84
|
+
sdk: AccelByteSDK,
|
|
85
|
+
options?: Omit<UseMutationOptions<unknown, AxiosError<ApiError>, SdkSetConfigParam & { fleetID:string }>, 'mutationKey'>,
|
|
86
|
+
callback?: (data: unknown) => void
|
|
87
|
+
): UseMutationResult<unknown, AxiosError<ApiError>, SdkSetConfigParam & { fleetID:string }> => {
|
|
88
|
+
//
|
|
89
|
+
const mutationFn = async (input: SdkSetConfigParam & { fleetID:string }) => {
|
|
90
|
+
const response =
|
|
91
|
+
(await FleetsAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
92
|
+
deleteFleet_ByFleetId(input.fleetID))
|
|
93
|
+
callback && callback(response.data)
|
|
94
|
+
return response.data
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return useMutation({
|
|
98
|
+
mutationKey: [Key_FleetsAdmin.Fleet_ByFleetId],
|
|
99
|
+
mutationFn,
|
|
100
|
+
...options
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
export const useFleetsAdminApi_GetFleet_ByFleetId = (
|
|
107
|
+
sdk: AccelByteSDK,
|
|
108
|
+
input: SdkSetConfigParam & { fleetID:string },
|
|
109
|
+
options?: Omit<UseQueryOptions<FleetGetResponse, AxiosError<ApiError>>, 'queryKey'>,
|
|
110
|
+
callback?: (data: AxiosResponse<FleetGetResponse>) => void
|
|
111
|
+
): UseQueryResult<FleetGetResponse, AxiosError<ApiError>> => {
|
|
112
|
+
//
|
|
113
|
+
const queryFn = (
|
|
114
|
+
sdk: AccelByteSDK,
|
|
115
|
+
input: Parameters<typeof useFleetsAdminApi_GetFleet_ByFleetId>[1]
|
|
116
|
+
) => async () => {
|
|
117
|
+
const response =
|
|
118
|
+
(await FleetsAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
119
|
+
getFleet_ByFleetId(input.fleetID))
|
|
120
|
+
callback && callback(response)
|
|
121
|
+
return response.data
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return useQuery<FleetGetResponse, AxiosError<ApiError>>({
|
|
125
|
+
queryKey: [Key_FleetsAdmin.Fleet_ByFleetId, input],
|
|
126
|
+
queryFn: queryFn(sdk, input),
|
|
127
|
+
...options
|
|
128
|
+
})
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
export const useFleetsAdminApi_UpdateFleet_ByFleetId = (
|
|
134
|
+
sdk: AccelByteSDK,
|
|
135
|
+
options?: Omit<UseMutationOptions<unknown, AxiosError<ApiError>, SdkSetConfigParam & { fleetID:string, data: FleetParameters }>, 'mutationKey'>,
|
|
136
|
+
callback?: (data: unknown) => void
|
|
137
|
+
): UseMutationResult<unknown, AxiosError<ApiError>, SdkSetConfigParam & { fleetID:string, data: FleetParameters }> => {
|
|
138
|
+
//
|
|
139
|
+
const mutationFn = async (input: SdkSetConfigParam & { fleetID:string, data: FleetParameters }) => {
|
|
140
|
+
const response =
|
|
141
|
+
(await FleetsAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
142
|
+
updateFleet_ByFleetId(input.fleetID, input.data))
|
|
143
|
+
callback && callback(response.data)
|
|
144
|
+
return response.data
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return useMutation({
|
|
148
|
+
mutationKey: [Key_FleetsAdmin.Fleet_ByFleetId],
|
|
149
|
+
mutationFn,
|
|
150
|
+
...options
|
|
151
|
+
})
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
export const useFleetsAdminApi_GetServers_ByFleetId = (
|
|
157
|
+
sdk: AccelByteSDK,
|
|
158
|
+
input: SdkSetConfigParam & { fleetID:string, queryParams?: {count?: string | null, offset?: number} },
|
|
159
|
+
options?: Omit<UseQueryOptions<FleetServersResponse, AxiosError<ApiError>>, 'queryKey'>,
|
|
160
|
+
callback?: (data: AxiosResponse<FleetServersResponse>) => void
|
|
161
|
+
): UseQueryResult<FleetServersResponse, AxiosError<ApiError>> => {
|
|
162
|
+
//
|
|
163
|
+
const queryFn = (
|
|
164
|
+
sdk: AccelByteSDK,
|
|
165
|
+
input: Parameters<typeof useFleetsAdminApi_GetServers_ByFleetId>[1]
|
|
166
|
+
) => async () => {
|
|
167
|
+
const response =
|
|
168
|
+
(await FleetsAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
|
|
169
|
+
getServers_ByFleetId(input.fleetID, input.queryParams))
|
|
170
|
+
callback && callback(response)
|
|
171
|
+
return response.data
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return useQuery<FleetServersResponse, AxiosError<ApiError>>({
|
|
175
|
+
queryKey: [Key_FleetsAdmin.Servers_ByFleetId, input],
|
|
176
|
+
queryFn: queryFn(sdk, input),
|
|
177
|
+
...options
|
|
178
|
+
})
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|