@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.
Files changed (112) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +19 -0
  3. package/package.json +55 -0
  4. package/react-query/package.json +5 -0
  5. package/src/Ams.ts +42 -0
  6. package/src/all-imports.ts +91 -0
  7. package/src/all-query-imports.ts +19 -0
  8. package/src/custom/index.ts +6 -0
  9. package/src/generated-admin/AccountAdminApi.ts +91 -0
  10. package/src/generated-admin/AmsInfoAdminApi.ts +65 -0
  11. package/src/generated-admin/AmsQoSAdminApi.ts +65 -0
  12. package/src/generated-admin/ArtifactsAdminApi.ts +122 -0
  13. package/src/generated-admin/DevelopmentAdminApi.ts +89 -0
  14. package/src/generated-admin/FleetsAdminApi.ts +112 -0
  15. package/src/generated-admin/ImagesAdminApi.ts +111 -0
  16. package/src/generated-admin/ServersAdminApi.ts +89 -0
  17. package/src/generated-admin/endpoints/AccountAdmin$.ts +68 -0
  18. package/src/generated-admin/endpoints/AmsInfoAdmin$.ts +42 -0
  19. package/src/generated-admin/endpoints/AmsQoSAdmin$.ts +43 -0
  20. package/src/generated-admin/endpoints/ArtifactsAdmin$.ts +100 -0
  21. package/src/generated-admin/endpoints/DevelopmentAdmin$.ts +67 -0
  22. package/src/generated-admin/endpoints/FleetsAdmin$.ts +90 -0
  23. package/src/generated-admin/endpoints/ImagesAdmin$.ts +89 -0
  24. package/src/generated-admin/endpoints/ServersAdmin$.ts +66 -0
  25. package/src/generated-admin/queries/AccountAdmin.query.ts +131 -0
  26. package/src/generated-admin/queries/AmsInfoAdmin.query.ts +81 -0
  27. package/src/generated-admin/queries/AmsQoSAdmin.query.ts +77 -0
  28. package/src/generated-admin/queries/ArtifactsAdmin.query.ts +211 -0
  29. package/src/generated-admin/queries/DevelopmentAdmin.query.ts +130 -0
  30. package/src/generated-admin/queries/FleetsAdmin.query.ts +182 -0
  31. package/src/generated-admin/queries/ImagesAdmin.query.ts +181 -0
  32. package/src/generated-admin/queries/ServersAdmin.query.ts +139 -0
  33. package/src/generated-definitions/AccountCreateRequest.ts +10 -0
  34. package/src/generated-definitions/AccountCreateResponse.ts +11 -0
  35. package/src/generated-definitions/AccountLimits.ts +16 -0
  36. package/src/generated-definitions/AccountLinkRequest.ts +10 -0
  37. package/src/generated-definitions/AccountLinkResponse.ts +11 -0
  38. package/src/generated-definitions/AccountLinkTokenResponse.ts +10 -0
  39. package/src/generated-definitions/AccountResponse.ts +11 -0
  40. package/src/generated-definitions/AmsRegionsResponse.ts +10 -0
  41. package/src/generated-definitions/ArtifactListResponse.ts +11 -0
  42. package/src/generated-definitions/ArtifactResponse.ts +24 -0
  43. package/src/generated-definitions/ArtifactSamplingRule.ts +10 -0
  44. package/src/generated-definitions/ArtifactTypeSamplingRules.ts +11 -0
  45. package/src/generated-definitions/ArtifactUrlResponse.ts +10 -0
  46. package/src/generated-definitions/ArtifactUsageResponse.ts +14 -0
  47. package/src/generated-definitions/AvailableInstanceTypesResponse.ts +11 -0
  48. package/src/generated-definitions/DevelopmentServerConfigurationCreateRequest.ts +14 -0
  49. package/src/generated-definitions/DevelopmentServerConfigurationCreateResponse.ts +10 -0
  50. package/src/generated-definitions/DevelopmentServerConfigurationGetResponse.ts +14 -0
  51. package/src/generated-definitions/DevelopmentServerConfigurationListResponse.ts +14 -0
  52. package/src/generated-definitions/DsHistoryEvent.ts +19 -0
  53. package/src/generated-definitions/DsHistoryList.ts +12 -0
  54. package/src/generated-definitions/DsHostConfiguration.ts +10 -0
  55. package/src/generated-definitions/ErrorResponse.ts +10 -0
  56. package/src/generated-definitions/FleetArtifactsSampleRules.ts +11 -0
  57. package/src/generated-definitions/FleetClaimByKeysReq.ts +10 -0
  58. package/src/generated-definitions/FleetClaimReq.ts +10 -0
  59. package/src/generated-definitions/FleetClaimResponse.ts +10 -0
  60. package/src/generated-definitions/FleetCreateResponse.ts +10 -0
  61. package/src/generated-definitions/FleetGetResponse.ts +25 -0
  62. package/src/generated-definitions/FleetListItemResponse.ts +20 -0
  63. package/src/generated-definitions/FleetListResponse.ts +11 -0
  64. package/src/generated-definitions/FleetParameters.ts +23 -0
  65. package/src/generated-definitions/FleetRegionalServerCounts.ts +17 -0
  66. package/src/generated-definitions/FleetServerConnectionInfoResponse.ts +16 -0
  67. package/src/generated-definitions/FleetServerHistoryEventResponse.ts +19 -0
  68. package/src/generated-definitions/FleetServerHistoryResponse.ts +11 -0
  69. package/src/generated-definitions/FleetServerInfoResponse.ts +26 -0
  70. package/src/generated-definitions/FleetServersResponse.ts +17 -0
  71. package/src/generated-definitions/ImageDeploymentProfile.ts +17 -0
  72. package/src/generated-definitions/ImageDetails.ts +25 -0
  73. package/src/generated-definitions/ImageList.ts +11 -0
  74. package/src/generated-definitions/ImageListItem.ts +24 -0
  75. package/src/generated-definitions/ImageStorage.ts +14 -0
  76. package/src/generated-definitions/ImageUpdate.ts +15 -0
  77. package/src/generated-definitions/InstanceTypeDescriptionResponse.ts +17 -0
  78. package/src/generated-definitions/Location.ts +20 -0
  79. package/src/generated-definitions/PagingInfo.ts +19 -0
  80. package/src/generated-definitions/PortConfiguration.ts +10 -0
  81. package/src/generated-definitions/QoSEndpointResponse.ts +11 -0
  82. package/src/generated-definitions/QoSServer.ts +18 -0
  83. package/src/generated-definitions/ReferencingFleet.ts +10 -0
  84. package/src/generated-definitions/RegionConfig.ts +16 -0
  85. package/src/generated-definitions/Time.ts +10 -0
  86. package/src/generated-definitions/Timeout.ts +15 -0
  87. package/src/generated-definitions/UpdateServerRequest.ts +10 -0
  88. package/src/generated-definitions/Zone.ts +10 -0
  89. package/src/generated-definitions/ZoneTrans.ts +10 -0
  90. package/src/generated-public/AccountApi.ts +53 -0
  91. package/src/generated-public/AmsInfoApi.ts +50 -0
  92. package/src/generated-public/AuthApi.ts +53 -0
  93. package/src/generated-public/FleetCommanderApi.ts +50 -0
  94. package/src/generated-public/FleetsApi.ts +66 -0
  95. package/src/generated-public/WatchdogsApi.ts +64 -0
  96. package/src/generated-public/endpoints/Account$.ts +30 -0
  97. package/src/generated-public/endpoints/AmsInfo$.ts +28 -0
  98. package/src/generated-public/endpoints/Auth$.ts +31 -0
  99. package/src/generated-public/endpoints/FleetCommander$.ts +28 -0
  100. package/src/generated-public/endpoints/Fleets$.ts +43 -0
  101. package/src/generated-public/endpoints/Watchdogs$.ts +42 -0
  102. package/src/generated-public/queries/Account.query.ts +52 -0
  103. package/src/generated-public/queries/AmsInfo.query.ts +52 -0
  104. package/src/generated-public/queries/Auth.query.ts +52 -0
  105. package/src/generated-public/queries/FleetCommander.query.ts +52 -0
  106. package/src/generated-public/queries/Fleets.query.ts +74 -0
  107. package/src/generated-public/queries/Watchdogs.query.ts +80 -0
  108. package/src/index.ts +7 -0
  109. package/src/version.json +7 -0
  110. package/swaggers/ams.json +3978 -0
  111. package/swaggers.json +1 -0
  112. package/tsconfig.json +18 -0
@@ -0,0 +1,67 @@
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
+
@@ -0,0 +1,90 @@
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
+
@@ -0,0 +1,89 @@
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&#39;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 &amp; 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
+
@@ -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
+ 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
+
@@ -0,0 +1,131 @@
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
+
@@ -0,0 +1,81 @@
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 { AmsInfoAdminApi } from "../AmsInfoAdminApi.js"
15
+
16
+ import { AmsRegionsResponse } from '../../generated-definitions/AmsRegionsResponse.js'
17
+ import { AvailableInstanceTypesResponse } from '../../generated-definitions/AvailableInstanceTypesResponse.js'
18
+
19
+
20
+ export enum Key_AmsInfoAdmin {
21
+ Regions = 'Ams.AmsInfoAdmin.Regions',
22
+ SupportedInstances = 'Ams.AmsInfoAdmin.SupportedInstances',
23
+
24
+ }
25
+
26
+
27
+
28
+ export const useAmsInfoAdminApi_GetRegions = (
29
+ sdk: AccelByteSDK,
30
+ input: SdkSetConfigParam ,
31
+ options?: Omit<UseQueryOptions<AmsRegionsResponse, AxiosError<ApiError>>, 'queryKey'>,
32
+ callback?: (data: AxiosResponse<AmsRegionsResponse>) => void
33
+ ): UseQueryResult<AmsRegionsResponse, AxiosError<ApiError>> => {
34
+ //
35
+ const queryFn = (
36
+ sdk: AccelByteSDK,
37
+ input: Parameters<typeof useAmsInfoAdminApi_GetRegions>[1]
38
+ ) => async () => {
39
+ const response =
40
+ (await AmsInfoAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
41
+ getRegions())
42
+ callback && callback(response)
43
+ return response.data
44
+ }
45
+
46
+ return useQuery<AmsRegionsResponse, AxiosError<ApiError>>({
47
+ queryKey: [Key_AmsInfoAdmin.Regions, input],
48
+ queryFn: queryFn(sdk, input),
49
+ ...options
50
+ })
51
+ }
52
+
53
+
54
+
55
+ export const useAmsInfoAdminApi_GetSupportedInstances = (
56
+ sdk: AccelByteSDK,
57
+ input: SdkSetConfigParam ,
58
+ options?: Omit<UseQueryOptions<AvailableInstanceTypesResponse, AxiosError<ApiError>>, 'queryKey'>,
59
+ callback?: (data: AxiosResponse<AvailableInstanceTypesResponse>) => void
60
+ ): UseQueryResult<AvailableInstanceTypesResponse, AxiosError<ApiError>> => {
61
+ //
62
+ const queryFn = (
63
+ sdk: AccelByteSDK,
64
+ input: Parameters<typeof useAmsInfoAdminApi_GetSupportedInstances>[1]
65
+ ) => async () => {
66
+ const response =
67
+ (await AmsInfoAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
68
+ getSupportedInstances())
69
+ callback && callback(response)
70
+ return response.data
71
+ }
72
+
73
+ return useQuery<AvailableInstanceTypesResponse, AxiosError<ApiError>>({
74
+ queryKey: [Key_AmsInfoAdmin.SupportedInstances, input],
75
+ queryFn: queryFn(sdk, input),
76
+ ...options
77
+ })
78
+ }
79
+
80
+
81
+
@@ -0,0 +1,77 @@
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 { AmsQoSAdminApi } from "../AmsQoSAdminApi.js"
15
+
16
+ import { QoSEndpointResponse } from '../../generated-definitions/QoSEndpointResponse.js'
17
+ import { UpdateServerRequest } from '../../generated-definitions/UpdateServerRequest.js'
18
+
19
+
20
+ export enum Key_AmsQoSAdmin {
21
+ Qos = 'Ams.AmsQoSAdmin.Qos',
22
+ Qo_ByRegion = 'Ams.AmsQoSAdmin.Qo_ByRegion',
23
+
24
+ }
25
+
26
+
27
+
28
+ export const useAmsQoSAdminApi_GetQos = (
29
+ sdk: AccelByteSDK,
30
+ input: SdkSetConfigParam & { queryParams?: {status?: string | null} },
31
+ options?: Omit<UseQueryOptions<QoSEndpointResponse, AxiosError<ApiError>>, 'queryKey'>,
32
+ callback?: (data: AxiosResponse<QoSEndpointResponse>) => void
33
+ ): UseQueryResult<QoSEndpointResponse, AxiosError<ApiError>> => {
34
+ //
35
+ const queryFn = (
36
+ sdk: AccelByteSDK,
37
+ input: Parameters<typeof useAmsQoSAdminApi_GetQos>[1]
38
+ ) => async () => {
39
+ const response =
40
+ (await AmsQoSAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
41
+ getQos(input.queryParams))
42
+ callback && callback(response)
43
+ return response.data
44
+ }
45
+
46
+ return useQuery<QoSEndpointResponse, AxiosError<ApiError>>({
47
+ queryKey: [Key_AmsQoSAdmin.Qos, input],
48
+ queryFn: queryFn(sdk, input),
49
+ ...options
50
+ })
51
+ }
52
+
53
+
54
+
55
+ export const useAmsQoSAdminApi_PatchQo_ByRegion = (
56
+ sdk: AccelByteSDK,
57
+ options?: Omit<UseMutationOptions<unknown, AxiosError<ApiError>, SdkSetConfigParam & { region:string, data: UpdateServerRequest }>, 'mutationKey'>,
58
+ callback?: (data: unknown) => void
59
+ ): UseMutationResult<unknown, AxiosError<ApiError>, SdkSetConfigParam & { region:string, data: UpdateServerRequest }> => {
60
+ //
61
+ const mutationFn = async (input: SdkSetConfigParam & { region:string, data: UpdateServerRequest }) => {
62
+ const response =
63
+ (await AmsQoSAdminApi(sdk, { coreConfig: input.coreConfig, axiosConfig: input.axiosConfig }).
64
+ patchQo_ByRegion(input.region, input.data))
65
+ callback && callback(response.data)
66
+ return response.data
67
+ }
68
+
69
+ return useMutation({
70
+ mutationKey: [Key_AmsQoSAdmin.Qo_ByRegion],
71
+ mutationFn,
72
+ ...options
73
+ })
74
+ }
75
+
76
+
77
+