@accelbyte/sdk-ams 0.0.0-dev-20240828032938 → 0.0.0-dev-20240828055251

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 (121) hide show
  1. package/dist/FleetClaimResponse-DIDPJOnU.d.cts +2014 -0
  2. package/dist/FleetClaimResponse-DIDPJOnU.d.ts +2014 -0
  3. package/dist/all-query-imports.cjs +2382 -0
  4. package/dist/all-query-imports.d.cts +327 -0
  5. package/dist/all-query-imports.d.ts +327 -0
  6. package/dist/all-query-imports.js +711 -0
  7. package/dist/chunk-DMVQYRRS.js +1574 -0
  8. package/dist/index.cjs +1871 -0
  9. package/dist/index.d.cts +1239 -0
  10. package/dist/index.d.ts +1239 -0
  11. package/dist/index.js +258 -0
  12. package/package.json +28 -30
  13. package/CHANGELOG.md +0 -11
  14. package/src/Ams.ts +0 -42
  15. package/src/all-imports.ts +0 -91
  16. package/src/all-query-imports.ts +0 -19
  17. package/src/custom/index.ts +0 -6
  18. package/src/generated-admin/AccountAdminApi.ts +0 -91
  19. package/src/generated-admin/AmsInfoAdminApi.ts +0 -65
  20. package/src/generated-admin/AmsQoSAdminApi.ts +0 -65
  21. package/src/generated-admin/ArtifactsAdminApi.ts +0 -122
  22. package/src/generated-admin/DevelopmentAdminApi.ts +0 -89
  23. package/src/generated-admin/FleetsAdminApi.ts +0 -112
  24. package/src/generated-admin/ImagesAdminApi.ts +0 -111
  25. package/src/generated-admin/ServersAdminApi.ts +0 -89
  26. package/src/generated-admin/endpoints/AccountAdmin$.ts +0 -68
  27. package/src/generated-admin/endpoints/AmsInfoAdmin$.ts +0 -42
  28. package/src/generated-admin/endpoints/AmsQoSAdmin$.ts +0 -43
  29. package/src/generated-admin/endpoints/ArtifactsAdmin$.ts +0 -100
  30. package/src/generated-admin/endpoints/DevelopmentAdmin$.ts +0 -67
  31. package/src/generated-admin/endpoints/FleetsAdmin$.ts +0 -90
  32. package/src/generated-admin/endpoints/ImagesAdmin$.ts +0 -89
  33. package/src/generated-admin/endpoints/ServersAdmin$.ts +0 -66
  34. package/src/generated-admin/queries/AccountAdmin.query.ts +0 -131
  35. package/src/generated-admin/queries/AmsInfoAdmin.query.ts +0 -81
  36. package/src/generated-admin/queries/AmsQoSAdmin.query.ts +0 -77
  37. package/src/generated-admin/queries/ArtifactsAdmin.query.ts +0 -211
  38. package/src/generated-admin/queries/DevelopmentAdmin.query.ts +0 -130
  39. package/src/generated-admin/queries/FleetsAdmin.query.ts +0 -182
  40. package/src/generated-admin/queries/ImagesAdmin.query.ts +0 -181
  41. package/src/generated-admin/queries/ServersAdmin.query.ts +0 -139
  42. package/src/generated-definitions/AccountCreateRequest.ts +0 -10
  43. package/src/generated-definitions/AccountCreateResponse.ts +0 -11
  44. package/src/generated-definitions/AccountLimits.ts +0 -16
  45. package/src/generated-definitions/AccountLinkRequest.ts +0 -10
  46. package/src/generated-definitions/AccountLinkResponse.ts +0 -11
  47. package/src/generated-definitions/AccountLinkTokenResponse.ts +0 -10
  48. package/src/generated-definitions/AccountResponse.ts +0 -11
  49. package/src/generated-definitions/AmsRegionsResponse.ts +0 -10
  50. package/src/generated-definitions/ArtifactListResponse.ts +0 -11
  51. package/src/generated-definitions/ArtifactResponse.ts +0 -24
  52. package/src/generated-definitions/ArtifactSamplingRule.ts +0 -10
  53. package/src/generated-definitions/ArtifactTypeSamplingRules.ts +0 -11
  54. package/src/generated-definitions/ArtifactUrlResponse.ts +0 -10
  55. package/src/generated-definitions/ArtifactUsageResponse.ts +0 -14
  56. package/src/generated-definitions/AvailableInstanceTypesResponse.ts +0 -11
  57. package/src/generated-definitions/DevelopmentServerConfigurationCreateRequest.ts +0 -14
  58. package/src/generated-definitions/DevelopmentServerConfigurationCreateResponse.ts +0 -10
  59. package/src/generated-definitions/DevelopmentServerConfigurationGetResponse.ts +0 -14
  60. package/src/generated-definitions/DevelopmentServerConfigurationListResponse.ts +0 -14
  61. package/src/generated-definitions/DsHistoryEvent.ts +0 -19
  62. package/src/generated-definitions/DsHistoryList.ts +0 -12
  63. package/src/generated-definitions/DsHostConfiguration.ts +0 -10
  64. package/src/generated-definitions/ErrorResponse.ts +0 -10
  65. package/src/generated-definitions/FleetArtifactsSampleRules.ts +0 -11
  66. package/src/generated-definitions/FleetClaimByKeysReq.ts +0 -10
  67. package/src/generated-definitions/FleetClaimReq.ts +0 -10
  68. package/src/generated-definitions/FleetClaimResponse.ts +0 -10
  69. package/src/generated-definitions/FleetCreateResponse.ts +0 -10
  70. package/src/generated-definitions/FleetGetResponse.ts +0 -25
  71. package/src/generated-definitions/FleetListItemResponse.ts +0 -20
  72. package/src/generated-definitions/FleetListResponse.ts +0 -11
  73. package/src/generated-definitions/FleetParameters.ts +0 -23
  74. package/src/generated-definitions/FleetRegionalServerCounts.ts +0 -17
  75. package/src/generated-definitions/FleetServerConnectionInfoResponse.ts +0 -16
  76. package/src/generated-definitions/FleetServerHistoryEventResponse.ts +0 -19
  77. package/src/generated-definitions/FleetServerHistoryResponse.ts +0 -11
  78. package/src/generated-definitions/FleetServerInfoResponse.ts +0 -26
  79. package/src/generated-definitions/FleetServersResponse.ts +0 -17
  80. package/src/generated-definitions/ImageDeploymentProfile.ts +0 -17
  81. package/src/generated-definitions/ImageDetails.ts +0 -25
  82. package/src/generated-definitions/ImageList.ts +0 -11
  83. package/src/generated-definitions/ImageListItem.ts +0 -24
  84. package/src/generated-definitions/ImageStorage.ts +0 -14
  85. package/src/generated-definitions/ImageUpdate.ts +0 -15
  86. package/src/generated-definitions/InstanceTypeDescriptionResponse.ts +0 -17
  87. package/src/generated-definitions/Location.ts +0 -20
  88. package/src/generated-definitions/PagingInfo.ts +0 -19
  89. package/src/generated-definitions/PortConfiguration.ts +0 -10
  90. package/src/generated-definitions/QoSEndpointResponse.ts +0 -11
  91. package/src/generated-definitions/QoSServer.ts +0 -18
  92. package/src/generated-definitions/ReferencingFleet.ts +0 -10
  93. package/src/generated-definitions/RegionConfig.ts +0 -16
  94. package/src/generated-definitions/Time.ts +0 -10
  95. package/src/generated-definitions/Timeout.ts +0 -15
  96. package/src/generated-definitions/UpdateServerRequest.ts +0 -10
  97. package/src/generated-definitions/Zone.ts +0 -10
  98. package/src/generated-definitions/ZoneTrans.ts +0 -10
  99. package/src/generated-public/AccountApi.ts +0 -53
  100. package/src/generated-public/AmsInfoApi.ts +0 -50
  101. package/src/generated-public/AuthApi.ts +0 -53
  102. package/src/generated-public/FleetCommanderApi.ts +0 -50
  103. package/src/generated-public/FleetsApi.ts +0 -66
  104. package/src/generated-public/WatchdogsApi.ts +0 -64
  105. package/src/generated-public/endpoints/Account$.ts +0 -30
  106. package/src/generated-public/endpoints/AmsInfo$.ts +0 -28
  107. package/src/generated-public/endpoints/Auth$.ts +0 -31
  108. package/src/generated-public/endpoints/FleetCommander$.ts +0 -28
  109. package/src/generated-public/endpoints/Fleets$.ts +0 -43
  110. package/src/generated-public/endpoints/Watchdogs$.ts +0 -42
  111. package/src/generated-public/queries/Account.query.ts +0 -52
  112. package/src/generated-public/queries/AmsInfo.query.ts +0 -52
  113. package/src/generated-public/queries/Auth.query.ts +0 -52
  114. package/src/generated-public/queries/FleetCommander.query.ts +0 -52
  115. package/src/generated-public/queries/Fleets.query.ts +0 -74
  116. package/src/generated-public/queries/Watchdogs.query.ts +0 -80
  117. package/src/index.ts +0 -7
  118. package/src/version.json +0 -7
  119. package/swaggers/ams.json +0 -3978
  120. package/swaggers.json +0 -1
  121. package/tsconfig.json +0 -18
@@ -0,0 +1,1574 @@
1
+ // src/generated-definitions/AccountLimits.ts
2
+ import { z } from "zod";
3
+ var AccountLimits = z.object({
4
+ allowedNodeClasses: z.array(z.string()).nullish(),
5
+ allowedRegions: z.array(z.string()).nullish(),
6
+ fleetCount: z.number().int().nullish(),
7
+ fleetVmCount: z.number().int().nullish(),
8
+ imageStorageQuotaBytes: z.number().int().nullish()
9
+ });
10
+
11
+ // src/generated-definitions/AccountCreateResponse.ts
12
+ import { z as z2 } from "zod";
13
+ var AccountCreateResponse = z2.object({ Limits: AccountLimits, id: z2.string(), name: z2.string(), namespaces: z2.array(z2.string()) });
14
+
15
+ // src/generated-definitions/AccountLinkResponse.ts
16
+ import { z as z3 } from "zod";
17
+ var AccountLinkResponse = z3.object({ Limits: AccountLimits, id: z3.string(), name: z3.string(), namespaces: z3.array(z3.string()) });
18
+
19
+ // src/generated-definitions/AccountLinkTokenResponse.ts
20
+ import { z as z4 } from "zod";
21
+ var AccountLinkTokenResponse = z4.object({ token: z4.string() });
22
+
23
+ // src/generated-definitions/AccountResponse.ts
24
+ import { z as z5 } from "zod";
25
+ var AccountResponse = z5.object({ Limits: AccountLimits, id: z5.string(), name: z5.string(), namespaces: z5.array(z5.string()) });
26
+
27
+ // src/generated-admin/endpoints/AccountAdmin$.ts
28
+ import { Validate } from "@accelbyte/sdk";
29
+ var AccountAdmin$ = class {
30
+ // @ts-ignore
31
+ // prettier-ignore
32
+ constructor(axiosInstance, namespace, useSchemaValidation = true) {
33
+ this.axiosInstance = axiosInstance;
34
+ this.namespace = namespace;
35
+ this.useSchemaValidation = useSchemaValidation;
36
+ }
37
+ /**
38
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:ACCOUNT [READ]
39
+ */
40
+ getAccount() {
41
+ const params = {};
42
+ const url = "/ams/v1/admin/namespaces/{namespace}/account".replace("{namespace}", this.namespace);
43
+ const resultPromise = this.axiosInstance.get(url, { params });
44
+ return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, AccountResponse, "AccountResponse");
45
+ }
46
+ /**
47
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:ACCOUNT [CREATE]
48
+ */
49
+ createAccount(data) {
50
+ const params = {};
51
+ const url = "/ams/v1/admin/namespaces/{namespace}/account".replace("{namespace}", this.namespace);
52
+ const resultPromise = this.axiosInstance.post(url, data, { params });
53
+ return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, AccountCreateResponse, "AccountCreateResponse");
54
+ }
55
+ /**
56
+ * The link token returned can be used to connect another namespace to the account in which the provided namespace is linked. This route fails if there is no account linked to the specified namespace. Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:ACCOUNT [READ]
57
+ */
58
+ getAccountLink() {
59
+ const params = {};
60
+ const url = "/ams/v1/admin/namespaces/{namespace}/account/link".replace("{namespace}", this.namespace);
61
+ const resultPromise = this.axiosInstance.get(url, { params });
62
+ return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, AccountLinkTokenResponse, "AccountLinkTokenResponse");
63
+ }
64
+ /**
65
+ * This route will attempt to register the account to namespace linkage in AMS and requires a valid account link token. This route fails if an account is already linked AdminAccountLink Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:ACCOUNT [CREATE]
66
+ */
67
+ createAccountLink(data) {
68
+ const params = {};
69
+ const url = "/ams/v1/admin/namespaces/{namespace}/account/link".replace("{namespace}", this.namespace);
70
+ const resultPromise = this.axiosInstance.post(url, data, { params });
71
+ return Validate.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, AccountLinkResponse, "AccountLinkResponse");
72
+ }
73
+ };
74
+
75
+ // src/generated-admin/AccountAdminApi.ts
76
+ import { ApiUtils, Network } from "@accelbyte/sdk";
77
+ function AccountAdminApi(sdk, args) {
78
+ const sdkAssembly = sdk.assembly();
79
+ const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace;
80
+ const requestConfig = ApiUtils.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request);
81
+ const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? [];
82
+ const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation;
83
+ const axiosInstance = Network.create(requestConfig);
84
+ for (const interceptor of interceptors) {
85
+ if (interceptor.type === "request") {
86
+ axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError);
87
+ }
88
+ if (interceptor.type === "response") {
89
+ axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError);
90
+ }
91
+ }
92
+ async function getAccount() {
93
+ const $ = new AccountAdmin$(axiosInstance, namespace, useSchemaValidation);
94
+ const resp = await $.getAccount();
95
+ if (resp.error) throw resp.error;
96
+ return resp.response;
97
+ }
98
+ async function createAccount(data) {
99
+ const $ = new AccountAdmin$(axiosInstance, namespace, useSchemaValidation);
100
+ const resp = await $.createAccount(data);
101
+ if (resp.error) throw resp.error;
102
+ return resp.response;
103
+ }
104
+ async function getAccountLink() {
105
+ const $ = new AccountAdmin$(axiosInstance, namespace, useSchemaValidation);
106
+ const resp = await $.getAccountLink();
107
+ if (resp.error) throw resp.error;
108
+ return resp.response;
109
+ }
110
+ async function createAccountLink(data) {
111
+ const $ = new AccountAdmin$(axiosInstance, namespace, useSchemaValidation);
112
+ const resp = await $.createAccountLink(data);
113
+ if (resp.error) throw resp.error;
114
+ return resp.response;
115
+ }
116
+ return {
117
+ getAccount,
118
+ createAccount,
119
+ getAccountLink,
120
+ createAccountLink
121
+ };
122
+ }
123
+
124
+ // src/generated-definitions/AmsRegionsResponse.ts
125
+ import { z as z6 } from "zod";
126
+ var AmsRegionsResponse = z6.object({ regions: z6.array(z6.string()).nullish() });
127
+
128
+ // src/generated-definitions/InstanceTypeDescriptionResponse.ts
129
+ import { z as z7 } from "zod";
130
+ var InstanceTypeDescriptionResponse = z7.object({
131
+ description: z7.string(),
132
+ id: z7.string(),
133
+ memoryGiB: z7.number(),
134
+ minSpeed: z7.string(),
135
+ name: z7.string(),
136
+ virtualCpu: z7.number().int()
137
+ });
138
+
139
+ // src/generated-definitions/AvailableInstanceTypesResponse.ts
140
+ import { z as z8 } from "zod";
141
+ var AvailableInstanceTypesResponse = z8.object({ availableInstanceTypes: z8.array(InstanceTypeDescriptionResponse) });
142
+
143
+ // src/generated-admin/endpoints/AmsInfoAdmin$.ts
144
+ import { Validate as Validate2 } from "@accelbyte/sdk";
145
+ var AmsInfoAdmin$ = class {
146
+ // @ts-ignore
147
+ // prettier-ignore
148
+ constructor(axiosInstance, namespace, useSchemaValidation = true) {
149
+ this.axiosInstance = axiosInstance;
150
+ this.namespace = namespace;
151
+ this.useSchemaValidation = useSchemaValidation;
152
+ }
153
+ /**
154
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA [READ]
155
+ */
156
+ getRegions() {
157
+ const params = {};
158
+ const url = "/ams/v1/admin/namespaces/{namespace}/regions".replace("{namespace}", this.namespace);
159
+ const resultPromise = this.axiosInstance.get(url, { params });
160
+ return Validate2.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, AmsRegionsResponse, "AmsRegionsResponse");
161
+ }
162
+ /**
163
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA [READ]
164
+ */
165
+ getSupportedInstances() {
166
+ const params = {};
167
+ const url = "/ams/v1/admin/namespaces/{namespace}/supported-instances".replace("{namespace}", this.namespace);
168
+ const resultPromise = this.axiosInstance.get(url, { params });
169
+ return Validate2.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, AvailableInstanceTypesResponse, "AvailableInstanceTypesResponse");
170
+ }
171
+ };
172
+
173
+ // src/generated-admin/AmsInfoAdminApi.ts
174
+ import { ApiUtils as ApiUtils2, Network as Network2 } from "@accelbyte/sdk";
175
+ function AmsInfoAdminApi(sdk, args) {
176
+ const sdkAssembly = sdk.assembly();
177
+ const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace;
178
+ const requestConfig = ApiUtils2.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request);
179
+ const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? [];
180
+ const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation;
181
+ const axiosInstance = Network2.create(requestConfig);
182
+ for (const interceptor of interceptors) {
183
+ if (interceptor.type === "request") {
184
+ axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError);
185
+ }
186
+ if (interceptor.type === "response") {
187
+ axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError);
188
+ }
189
+ }
190
+ async function getRegions() {
191
+ const $ = new AmsInfoAdmin$(axiosInstance, namespace, useSchemaValidation);
192
+ const resp = await $.getRegions();
193
+ if (resp.error) throw resp.error;
194
+ return resp.response;
195
+ }
196
+ async function getSupportedInstances() {
197
+ const $ = new AmsInfoAdmin$(axiosInstance, namespace, useSchemaValidation);
198
+ const resp = await $.getSupportedInstances();
199
+ if (resp.error) throw resp.error;
200
+ return resp.response;
201
+ }
202
+ return {
203
+ getRegions,
204
+ getSupportedInstances
205
+ };
206
+ }
207
+
208
+ // src/generated-definitions/Time.ts
209
+ import { z as z9 } from "zod";
210
+ var Time = z9.any();
211
+
212
+ // src/generated-definitions/QoSServer.ts
213
+ import { z as z10 } from "zod";
214
+ var QoSServer = z10.object({
215
+ alias: z10.string(),
216
+ ip: z10.string(),
217
+ last_update: Time,
218
+ port: z10.number().int(),
219
+ region: z10.string(),
220
+ status: z10.string()
221
+ });
222
+
223
+ // src/generated-definitions/QoSEndpointResponse.ts
224
+ import { z as z11 } from "zod";
225
+ var QoSEndpointResponse = z11.object({ servers: z11.array(QoSServer) });
226
+
227
+ // src/generated-admin/endpoints/AmsQoSAdmin$.ts
228
+ import { Validate as Validate3 } from "@accelbyte/sdk";
229
+ import { z as z12 } from "zod";
230
+ var AmsQoSAdmin$ = class {
231
+ // @ts-ignore
232
+ // prettier-ignore
233
+ constructor(axiosInstance, namespace, useSchemaValidation = true) {
234
+ this.axiosInstance = axiosInstance;
235
+ this.namespace = namespace;
236
+ this.useSchemaValidation = useSchemaValidation;
237
+ }
238
+ /**
239
+ * ``` 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
240
+ */
241
+ getQos(queryParams) {
242
+ const params = { ...queryParams };
243
+ const url = "/ams/v1/admin/namespaces/{namespace}/qos".replace("{namespace}", this.namespace);
244
+ const resultPromise = this.axiosInstance.get(url, { params });
245
+ return Validate3.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, QoSEndpointResponse, "QoSEndpointResponse");
246
+ }
247
+ /**
248
+ * ``` Required Permission: ADMIN:NAMESPACE:{namespace}:QOS:SERVER [UPDATE] This endpoint updates the registered QoS service's configurable configuration.
249
+ */
250
+ patchQo_ByRegion(region, data) {
251
+ const params = {};
252
+ const url = "/ams/v1/admin/namespaces/{namespace}/qos/{region}".replace("{namespace}", this.namespace).replace("{region}", region);
253
+ const resultPromise = this.axiosInstance.patch(url, data, { params });
254
+ return Validate3.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z12.unknown(), "z.unknown()");
255
+ }
256
+ };
257
+
258
+ // src/generated-admin/AmsQoSAdminApi.ts
259
+ import { ApiUtils as ApiUtils3, Network as Network3 } from "@accelbyte/sdk";
260
+ function AmsQoSAdminApi(sdk, args) {
261
+ const sdkAssembly = sdk.assembly();
262
+ const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace;
263
+ const requestConfig = ApiUtils3.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request);
264
+ const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? [];
265
+ const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation;
266
+ const axiosInstance = Network3.create(requestConfig);
267
+ for (const interceptor of interceptors) {
268
+ if (interceptor.type === "request") {
269
+ axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError);
270
+ }
271
+ if (interceptor.type === "response") {
272
+ axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError);
273
+ }
274
+ }
275
+ async function getQos(queryParams) {
276
+ const $ = new AmsQoSAdmin$(axiosInstance, namespace, useSchemaValidation);
277
+ const resp = await $.getQos(queryParams);
278
+ if (resp.error) throw resp.error;
279
+ return resp.response;
280
+ }
281
+ async function patchQo_ByRegion(region, data) {
282
+ const $ = new AmsQoSAdmin$(axiosInstance, namespace, useSchemaValidation);
283
+ const resp = await $.patchQo_ByRegion(region, data);
284
+ if (resp.error) throw resp.error;
285
+ return resp.response;
286
+ }
287
+ return {
288
+ getQos,
289
+ patchQo_ByRegion
290
+ };
291
+ }
292
+
293
+ // src/generated-definitions/ArtifactResponse.ts
294
+ import { z as z13 } from "zod";
295
+ var ArtifactResponse = z13.object({
296
+ artifactType: z13.string(),
297
+ createdOn: Time,
298
+ dsId: z13.string(),
299
+ expiresOn: Time,
300
+ filename: z13.string(),
301
+ fleetId: z13.string(),
302
+ id: z13.string(),
303
+ imageId: z13.string(),
304
+ namespace: z13.string(),
305
+ region: z13.string(),
306
+ sizeBytes: z13.number().int(),
307
+ status: z13.string()
308
+ });
309
+
310
+ // src/generated-definitions/ArtifactListResponse.ts
311
+ import { z as z14 } from "zod";
312
+ var ArtifactListResponse = z14.object({ data: z14.array(ArtifactResponse), totalData: z14.number().int() });
313
+
314
+ // src/generated-definitions/ArtifactUrlResponse.ts
315
+ import { z as z15 } from "zod";
316
+ var ArtifactUrlResponse = z15.object({ url: z15.string() });
317
+
318
+ // src/generated-definitions/ArtifactUsageResponse.ts
319
+ import { z as z16 } from "zod";
320
+ var ArtifactUsageResponse = z16.object({
321
+ quotaBytes: z16.number().int(),
322
+ remainingBytes: z16.number().int(),
323
+ usedBytes: z16.number().int()
324
+ });
325
+
326
+ // src/generated-definitions/ArtifactSamplingRule.ts
327
+ import { z as z17 } from "zod";
328
+ var ArtifactSamplingRule = z17.object({ collect: z17.boolean(), percentage: z17.number().int() });
329
+
330
+ // src/generated-definitions/ArtifactTypeSamplingRules.ts
331
+ import { z as z18 } from "zod";
332
+ var ArtifactTypeSamplingRules = z18.object({ crashed: ArtifactSamplingRule, success: ArtifactSamplingRule });
333
+
334
+ // src/generated-definitions/FleetArtifactsSampleRules.ts
335
+ import { z as z19 } from "zod";
336
+ var FleetArtifactsSampleRules = z19.object({ coredumps: ArtifactTypeSamplingRules, logs: ArtifactTypeSamplingRules });
337
+
338
+ // src/generated-admin/endpoints/ArtifactsAdmin$.ts
339
+ import { Validate as Validate4 } from "@accelbyte/sdk";
340
+ import { z as z20 } from "zod";
341
+ var ArtifactsAdmin$ = class {
342
+ // @ts-ignore
343
+ // prettier-ignore
344
+ constructor(axiosInstance, namespace, useSchemaValidation = true) {
345
+ this.axiosInstance = axiosInstance;
346
+ this.namespace = namespace;
347
+ this.useSchemaValidation = useSchemaValidation;
348
+ }
349
+ /**
350
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA [DELETE]
351
+ */
352
+ deleteArtifact(queryParams) {
353
+ const params = { ...queryParams };
354
+ const url = "/ams/v1/admin/namespaces/{namespace}/artifacts".replace("{namespace}", this.namespace);
355
+ const resultPromise = this.axiosInstance.delete(url, { params });
356
+ return Validate4.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z20.unknown(), "z.unknown()");
357
+ }
358
+ /**
359
+ * 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]
360
+ */
361
+ getArtifacts(queryParams) {
362
+ const params = { count: 100, ...queryParams };
363
+ const url = "/ams/v1/admin/namespaces/{namespace}/artifacts".replace("{namespace}", this.namespace);
364
+ const resultPromise = this.axiosInstance.get(url, { params });
365
+ return Validate4.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, ArtifactListResponse, "ArtifactListResponse");
366
+ }
367
+ /**
368
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:ARTIFACT [READ]
369
+ */
370
+ getArtifactsUsage() {
371
+ const params = {};
372
+ const url = "/ams/v1/admin/namespaces/{namespace}/artifacts/usage".replace("{namespace}", this.namespace);
373
+ const resultPromise = this.axiosInstance.get(url, { params });
374
+ return Validate4.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, ArtifactUsageResponse, "ArtifactUsageResponse");
375
+ }
376
+ /**
377
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:ARTIFACT [DELETE]
378
+ */
379
+ deleteArtifact_ByArtifactId(artifactID) {
380
+ const params = {};
381
+ const url = "/ams/v1/admin/namespaces/{namespace}/artifacts/{artifactID}".replace("{namespace}", this.namespace).replace("{artifactID}", artifactID);
382
+ const resultPromise = this.axiosInstance.delete(url, { params });
383
+ return Validate4.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z20.unknown(), "z.unknown()");
384
+ }
385
+ /**
386
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:ARTIFACT [READ]
387
+ */
388
+ getUrl_ByArtifactId(artifactID) {
389
+ const params = {};
390
+ const url = "/ams/v1/admin/namespaces/{namespace}/artifacts/{artifactID}/url".replace("{namespace}", this.namespace).replace("{artifactID}", artifactID);
391
+ const resultPromise = this.axiosInstance.get(url, { params });
392
+ return Validate4.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, ArtifactUrlResponse, "ArtifactUrlResponse");
393
+ }
394
+ /**
395
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:ARTIFACT [READ]
396
+ */
397
+ getArtifactsSamplingRules_ByFleetId(fleetID) {
398
+ const params = {};
399
+ const url = "/ams/v1/admin/namespaces/{namespace}/fleets/{fleetID}/artifacts-sampling-rules".replace("{namespace}", this.namespace).replace("{fleetID}", fleetID);
400
+ const resultPromise = this.axiosInstance.get(url, { params });
401
+ return Validate4.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetArtifactsSampleRules, "FleetArtifactsSampleRules");
402
+ }
403
+ /**
404
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:ARTIFACT [UPDATE]
405
+ */
406
+ updateArtifactsSamplingRule_ByFleetId(fleetID, data) {
407
+ const params = {};
408
+ const url = "/ams/v1/admin/namespaces/{namespace}/fleets/{fleetID}/artifacts-sampling-rules".replace("{namespace}", this.namespace).replace("{fleetID}", fleetID);
409
+ const resultPromise = this.axiosInstance.put(url, data, { params });
410
+ return Validate4.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetArtifactsSampleRules, "FleetArtifactsSampleRules");
411
+ }
412
+ };
413
+
414
+ // src/generated-admin/ArtifactsAdminApi.ts
415
+ import { ApiUtils as ApiUtils4, Network as Network4 } from "@accelbyte/sdk";
416
+ function ArtifactsAdminApi(sdk, args) {
417
+ const sdkAssembly = sdk.assembly();
418
+ const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace;
419
+ const requestConfig = ApiUtils4.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request);
420
+ const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? [];
421
+ const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation;
422
+ const axiosInstance = Network4.create(requestConfig);
423
+ for (const interceptor of interceptors) {
424
+ if (interceptor.type === "request") {
425
+ axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError);
426
+ }
427
+ if (interceptor.type === "response") {
428
+ axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError);
429
+ }
430
+ }
431
+ async function deleteArtifact(queryParams) {
432
+ const $ = new ArtifactsAdmin$(axiosInstance, namespace, useSchemaValidation);
433
+ const resp = await $.deleteArtifact(queryParams);
434
+ if (resp.error) throw resp.error;
435
+ return resp.response;
436
+ }
437
+ async function getArtifacts(queryParams) {
438
+ const $ = new ArtifactsAdmin$(axiosInstance, namespace, useSchemaValidation);
439
+ const resp = await $.getArtifacts(queryParams);
440
+ if (resp.error) throw resp.error;
441
+ return resp.response;
442
+ }
443
+ async function getArtifactsUsage() {
444
+ const $ = new ArtifactsAdmin$(axiosInstance, namespace, useSchemaValidation);
445
+ const resp = await $.getArtifactsUsage();
446
+ if (resp.error) throw resp.error;
447
+ return resp.response;
448
+ }
449
+ async function deleteArtifact_ByArtifactId(artifactID) {
450
+ const $ = new ArtifactsAdmin$(axiosInstance, namespace, useSchemaValidation);
451
+ const resp = await $.deleteArtifact_ByArtifactId(artifactID);
452
+ if (resp.error) throw resp.error;
453
+ return resp.response;
454
+ }
455
+ async function getUrl_ByArtifactId(artifactID) {
456
+ const $ = new ArtifactsAdmin$(axiosInstance, namespace, useSchemaValidation);
457
+ const resp = await $.getUrl_ByArtifactId(artifactID);
458
+ if (resp.error) throw resp.error;
459
+ return resp.response;
460
+ }
461
+ async function getArtifactsSamplingRules_ByFleetId(fleetID) {
462
+ const $ = new ArtifactsAdmin$(axiosInstance, namespace, useSchemaValidation);
463
+ const resp = await $.getArtifactsSamplingRules_ByFleetId(fleetID);
464
+ if (resp.error) throw resp.error;
465
+ return resp.response;
466
+ }
467
+ async function updateArtifactsSamplingRule_ByFleetId(fleetID, data) {
468
+ const $ = new ArtifactsAdmin$(axiosInstance, namespace, useSchemaValidation);
469
+ const resp = await $.updateArtifactsSamplingRule_ByFleetId(fleetID, data);
470
+ if (resp.error) throw resp.error;
471
+ return resp.response;
472
+ }
473
+ return {
474
+ deleteArtifact,
475
+ getArtifacts,
476
+ getArtifactsUsage,
477
+ deleteArtifact_ByArtifactId,
478
+ getUrl_ByArtifactId,
479
+ getArtifactsSamplingRules_ByFleetId,
480
+ updateArtifactsSamplingRule_ByFleetId
481
+ };
482
+ }
483
+
484
+ // src/generated-definitions/DevelopmentServerConfigurationCreateResponse.ts
485
+ import { z as z21 } from "zod";
486
+ var DevelopmentServerConfigurationCreateResponse = z21.object({ name: z21.string() });
487
+
488
+ // src/generated-definitions/DevelopmentServerConfigurationGetResponse.ts
489
+ import { z as z22 } from "zod";
490
+ var DevelopmentServerConfigurationGetResponse = z22.object({
491
+ commandLineArguments: z22.string(),
492
+ imageId: z22.string(),
493
+ name: z22.string()
494
+ });
495
+
496
+ // src/generated-definitions/DevelopmentServerConfigurationListResponse.ts
497
+ import { z as z23 } from "zod";
498
+ var DevelopmentServerConfigurationListResponse = z23.object({
499
+ data: z23.array(DevelopmentServerConfigurationGetResponse),
500
+ totalData: z23.number().int()
501
+ });
502
+
503
+ // src/generated-admin/endpoints/DevelopmentAdmin$.ts
504
+ import { Validate as Validate5 } from "@accelbyte/sdk";
505
+ import { z as z24 } from "zod";
506
+ var DevelopmentAdmin$ = class {
507
+ // @ts-ignore
508
+ // prettier-ignore
509
+ constructor(axiosInstance, namespace, useSchemaValidation = true) {
510
+ this.axiosInstance = axiosInstance;
511
+ this.namespace = namespace;
512
+ this.useSchemaValidation = useSchemaValidation;
513
+ }
514
+ /**
515
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
516
+ */
517
+ getDevelopmentServerConfigurations(queryParams) {
518
+ const params = { count: 100, ...queryParams };
519
+ const url = "/ams/v1/admin/namespaces/{namespace}/development/server-configurations".replace("{namespace}", this.namespace);
520
+ const resultPromise = this.axiosInstance.get(url, { params });
521
+ return Validate5.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, DevelopmentServerConfigurationListResponse, "DevelopmentServerConfigurationListResponse");
522
+ }
523
+ /**
524
+ * Configuration name can be up to 128 characters and must conform to ^[.a-zA-Z0-9_-]+$ Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [CREATE]
525
+ */
526
+ createDevelopmentServerConfiguration(data) {
527
+ const params = {};
528
+ const url = "/ams/v1/admin/namespaces/{namespace}/development/server-configurations".replace("{namespace}", this.namespace);
529
+ const resultPromise = this.axiosInstance.post(url, data, { params });
530
+ return Validate5.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, DevelopmentServerConfigurationCreateResponse, "DevelopmentServerConfigurationCreateResponse");
531
+ }
532
+ /**
533
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [DELETE]
534
+ */
535
+ deleteDevelopmentServerConfiguration_ByDevelopmentServerConfigId(developmentServerConfigID) {
536
+ const params = {};
537
+ const url = "/ams/v1/admin/namespaces/{namespace}/development/server-configurations/{developmentServerConfigID}".replace("{namespace}", this.namespace).replace("{developmentServerConfigID}", developmentServerConfigID);
538
+ const resultPromise = this.axiosInstance.delete(url, { params });
539
+ return Validate5.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z24.unknown(), "z.unknown()");
540
+ }
541
+ /**
542
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
543
+ */
544
+ getDevelopmentServerConfiguration_ByDevelopmentServerConfigId(developmentServerConfigID) {
545
+ const params = {};
546
+ const url = "/ams/v1/admin/namespaces/{namespace}/development/server-configurations/{developmentServerConfigID}".replace("{namespace}", this.namespace).replace("{developmentServerConfigID}", developmentServerConfigID);
547
+ const resultPromise = this.axiosInstance.get(url, { params });
548
+ return Validate5.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, DevelopmentServerConfigurationGetResponse, "DevelopmentServerConfigurationGetResponse");
549
+ }
550
+ };
551
+
552
+ // src/generated-admin/DevelopmentAdminApi.ts
553
+ import { ApiUtils as ApiUtils5, Network as Network5 } from "@accelbyte/sdk";
554
+ function DevelopmentAdminApi(sdk, args) {
555
+ const sdkAssembly = sdk.assembly();
556
+ const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace;
557
+ const requestConfig = ApiUtils5.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request);
558
+ const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? [];
559
+ const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation;
560
+ const axiosInstance = Network5.create(requestConfig);
561
+ for (const interceptor of interceptors) {
562
+ if (interceptor.type === "request") {
563
+ axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError);
564
+ }
565
+ if (interceptor.type === "response") {
566
+ axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError);
567
+ }
568
+ }
569
+ async function getDevelopmentServerConfigurations(queryParams) {
570
+ const $ = new DevelopmentAdmin$(axiosInstance, namespace, useSchemaValidation);
571
+ const resp = await $.getDevelopmentServerConfigurations(queryParams);
572
+ if (resp.error) throw resp.error;
573
+ return resp.response;
574
+ }
575
+ async function createDevelopmentServerConfiguration(data) {
576
+ const $ = new DevelopmentAdmin$(axiosInstance, namespace, useSchemaValidation);
577
+ const resp = await $.createDevelopmentServerConfiguration(data);
578
+ if (resp.error) throw resp.error;
579
+ return resp.response;
580
+ }
581
+ async function deleteDevelopmentServerConfiguration_ByDevelopmentServerConfigId(developmentServerConfigID) {
582
+ const $ = new DevelopmentAdmin$(axiosInstance, namespace, useSchemaValidation);
583
+ const resp = await $.deleteDevelopmentServerConfiguration_ByDevelopmentServerConfigId(developmentServerConfigID);
584
+ if (resp.error) throw resp.error;
585
+ return resp.response;
586
+ }
587
+ async function getDevelopmentServerConfiguration_ByDevelopmentServerConfigId(developmentServerConfigID) {
588
+ const $ = new DevelopmentAdmin$(axiosInstance, namespace, useSchemaValidation);
589
+ const resp = await $.getDevelopmentServerConfiguration_ByDevelopmentServerConfigId(developmentServerConfigID);
590
+ if (resp.error) throw resp.error;
591
+ return resp.response;
592
+ }
593
+ return {
594
+ getDevelopmentServerConfigurations,
595
+ createDevelopmentServerConfiguration,
596
+ deleteDevelopmentServerConfiguration_ByDevelopmentServerConfigId,
597
+ getDevelopmentServerConfiguration_ByDevelopmentServerConfigId
598
+ };
599
+ }
600
+
601
+ // src/generated-definitions/FleetCreateResponse.ts
602
+ import { z as z25 } from "zod";
603
+ var FleetCreateResponse = z25.object({ id: z25.string() });
604
+
605
+ // src/generated-definitions/DsHostConfiguration.ts
606
+ import { z as z26 } from "zod";
607
+ var DsHostConfiguration = z26.object({ instanceId: z26.string(), instanceType: z26.string(), serversPerVm: z26.number().int() });
608
+
609
+ // src/generated-definitions/PortConfiguration.ts
610
+ import { z as z27 } from "zod";
611
+ var PortConfiguration = z27.object({ name: z27.string(), protocol: z27.string() });
612
+
613
+ // src/generated-definitions/Timeout.ts
614
+ import { z as z28 } from "zod";
615
+ var Timeout = z28.object({
616
+ creation: z28.number().int(),
617
+ drain: z28.number().int(),
618
+ session: z28.number().int(),
619
+ unresponsive: z28.number().int()
620
+ });
621
+
622
+ // src/generated-definitions/ImageDeploymentProfile.ts
623
+ import { z as z29 } from "zod";
624
+ var ImageDeploymentProfile = z29.object({
625
+ commandLine: z29.string(),
626
+ imageId: z29.string(),
627
+ portConfigurations: z29.array(PortConfiguration),
628
+ timeout: Timeout
629
+ });
630
+
631
+ // src/generated-definitions/RegionConfig.ts
632
+ import { z as z30 } from "zod";
633
+ var RegionConfig = z30.object({
634
+ bufferSize: z30.number().int(),
635
+ dynamicBuffer: z30.boolean(),
636
+ maxServerCount: z30.number().int(),
637
+ minServerCount: z30.number().int(),
638
+ region: z30.string()
639
+ });
640
+
641
+ // src/generated-definitions/FleetGetResponse.ts
642
+ import { z as z31 } from "zod";
643
+ var FleetGetResponse = z31.object({
644
+ active: z31.boolean(),
645
+ claimKeys: z31.array(z31.string()),
646
+ dsHostConfiguration: DsHostConfiguration,
647
+ id: z31.string(),
648
+ imageDeploymentProfile: ImageDeploymentProfile,
649
+ isLocal: z31.boolean(),
650
+ name: z31.string(),
651
+ onDemand: z31.boolean(),
652
+ regions: z31.array(RegionConfig),
653
+ samplingRules: FleetArtifactsSampleRules
654
+ });
655
+
656
+ // src/generated-definitions/FleetRegionalServerCounts.ts
657
+ import { z as z32 } from "zod";
658
+ var FleetRegionalServerCounts = z32.object({
659
+ claimedServerCount: z32.number().int(),
660
+ readyServerCount: z32.number().int(),
661
+ region: z32.string(),
662
+ runningVmCount: z32.number().int(),
663
+ targetDsCount: z32.number().int(),
664
+ targetVmCount: z32.number().int()
665
+ });
666
+
667
+ // src/generated-definitions/FleetListItemResponse.ts
668
+ import { z as z33 } from "zod";
669
+ var FleetListItemResponse = z33.object({
670
+ active: z33.boolean(),
671
+ counts: z33.array(FleetRegionalServerCounts),
672
+ id: z33.string(),
673
+ image: z33.string(),
674
+ isLocal: z33.boolean(),
675
+ name: z33.string(),
676
+ onDemand: z33.boolean(),
677
+ regions: z33.array(z33.string())
678
+ });
679
+
680
+ // src/generated-definitions/FleetListResponse.ts
681
+ import { z as z34 } from "zod";
682
+ var FleetListResponse = z34.object({ fleets: z34.array(FleetListItemResponse) });
683
+
684
+ // src/generated-definitions/FleetServerInfoResponse.ts
685
+ import { z as z35 } from "zod";
686
+ var FleetServerInfoResponse = z35.object({
687
+ createdAt: z35.string(),
688
+ fleetId: z35.string(),
689
+ fleetName: z35.string(),
690
+ imageCmd: z35.string(),
691
+ imageId: z35.string(),
692
+ instanceType: z35.string(),
693
+ ipAddress: z35.string(),
694
+ portConfiguration: z35.array(PortConfiguration),
695
+ ports: z35.record(z35.number().int()),
696
+ region: z35.string(),
697
+ serverConfiguration: z35.string(),
698
+ serverId: z35.string(),
699
+ sessionId: z35.string(),
700
+ status: z35.string()
701
+ });
702
+
703
+ // src/generated-definitions/PagingInfo.ts
704
+ import { z as z36 } from "zod";
705
+ var PagingInfo = z36.object({
706
+ currentPage: z36.number().int(),
707
+ hasNext: z36.boolean(),
708
+ hasPages: z36.boolean(),
709
+ hasPrev: z36.boolean(),
710
+ next: z36.string(),
711
+ pageNums: z36.array(z36.number().int()),
712
+ previous: z36.string(),
713
+ total: z36.number().int()
714
+ });
715
+
716
+ // src/generated-definitions/FleetServersResponse.ts
717
+ import { z as z37 } from "zod";
718
+ var FleetServersResponse = z37.object({
719
+ paging: PagingInfo,
720
+ regions: z37.array(FleetRegionalServerCounts),
721
+ servers: z37.array(FleetServerInfoResponse)
722
+ });
723
+
724
+ // src/generated-admin/endpoints/FleetsAdmin$.ts
725
+ import { Validate as Validate6 } from "@accelbyte/sdk";
726
+ import { z as z38 } from "zod";
727
+ var FleetsAdmin$ = class {
728
+ // @ts-ignore
729
+ // prettier-ignore
730
+ constructor(axiosInstance, namespace, useSchemaValidation = true) {
731
+ this.axiosInstance = axiosInstance;
732
+ this.namespace = namespace;
733
+ this.useSchemaValidation = useSchemaValidation;
734
+ }
735
+ /**
736
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
737
+ */
738
+ getFleets() {
739
+ const params = {};
740
+ const url = "/ams/v1/admin/namespaces/{namespace}/fleets".replace("{namespace}", this.namespace);
741
+ const resultPromise = this.axiosInstance.get(url, { params });
742
+ return Validate6.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetListResponse, "FleetListResponse");
743
+ }
744
+ /**
745
+ * Optionally, sampling rules for the fleet can also be specified Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [CREATE]
746
+ */
747
+ createFleet(data) {
748
+ const params = {};
749
+ const url = "/ams/v1/admin/namespaces/{namespace}/fleets".replace("{namespace}", this.namespace);
750
+ const resultPromise = this.axiosInstance.post(url, data, { params });
751
+ return Validate6.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetCreateResponse, "FleetCreateResponse");
752
+ }
753
+ /**
754
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [DELETE]
755
+ */
756
+ deleteFleet_ByFleetId(fleetID) {
757
+ const params = {};
758
+ const url = "/ams/v1/admin/namespaces/{namespace}/fleets/{fleetID}".replace("{namespace}", this.namespace).replace("{fleetID}", fleetID);
759
+ const resultPromise = this.axiosInstance.delete(url, { params });
760
+ return Validate6.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z38.unknown(), "z.unknown()");
761
+ }
762
+ /**
763
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
764
+ */
765
+ getFleet_ByFleetId(fleetID) {
766
+ const params = {};
767
+ const url = "/ams/v1/admin/namespaces/{namespace}/fleets/{fleetID}".replace("{namespace}", this.namespace).replace("{fleetID}", fleetID);
768
+ const resultPromise = this.axiosInstance.get(url, { params });
769
+ return Validate6.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetGetResponse, "FleetGetResponse");
770
+ }
771
+ /**
772
+ * Optionally, sampling rules for the fleet can also be updated Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [UPDATE]
773
+ */
774
+ updateFleet_ByFleetId(fleetID, data) {
775
+ const params = {};
776
+ const url = "/ams/v1/admin/namespaces/{namespace}/fleets/{fleetID}".replace("{namespace}", this.namespace).replace("{fleetID}", fleetID);
777
+ const resultPromise = this.axiosInstance.put(url, data, { params });
778
+ return Validate6.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z38.unknown(), "z.unknown()");
779
+ }
780
+ /**
781
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
782
+ */
783
+ getServers_ByFleetId(fleetID, queryParams) {
784
+ const params = { ...queryParams };
785
+ const url = "/ams/v1/admin/namespaces/{namespace}/fleets/{fleetID}/servers".replace("{namespace}", this.namespace).replace("{fleetID}", fleetID);
786
+ const resultPromise = this.axiosInstance.get(url, { params });
787
+ return Validate6.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetServersResponse, "FleetServersResponse");
788
+ }
789
+ };
790
+
791
+ // src/generated-admin/FleetsAdminApi.ts
792
+ import { ApiUtils as ApiUtils6, Network as Network6 } from "@accelbyte/sdk";
793
+ function FleetsAdminApi(sdk, args) {
794
+ const sdkAssembly = sdk.assembly();
795
+ const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace;
796
+ const requestConfig = ApiUtils6.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request);
797
+ const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? [];
798
+ const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation;
799
+ const axiosInstance = Network6.create(requestConfig);
800
+ for (const interceptor of interceptors) {
801
+ if (interceptor.type === "request") {
802
+ axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError);
803
+ }
804
+ if (interceptor.type === "response") {
805
+ axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError);
806
+ }
807
+ }
808
+ async function getFleets() {
809
+ const $ = new FleetsAdmin$(axiosInstance, namespace, useSchemaValidation);
810
+ const resp = await $.getFleets();
811
+ if (resp.error) throw resp.error;
812
+ return resp.response;
813
+ }
814
+ async function createFleet(data) {
815
+ const $ = new FleetsAdmin$(axiosInstance, namespace, useSchemaValidation);
816
+ const resp = await $.createFleet(data);
817
+ if (resp.error) throw resp.error;
818
+ return resp.response;
819
+ }
820
+ async function deleteFleet_ByFleetId(fleetID) {
821
+ const $ = new FleetsAdmin$(axiosInstance, namespace, useSchemaValidation);
822
+ const resp = await $.deleteFleet_ByFleetId(fleetID);
823
+ if (resp.error) throw resp.error;
824
+ return resp.response;
825
+ }
826
+ async function getFleet_ByFleetId(fleetID) {
827
+ const $ = new FleetsAdmin$(axiosInstance, namespace, useSchemaValidation);
828
+ const resp = await $.getFleet_ByFleetId(fleetID);
829
+ if (resp.error) throw resp.error;
830
+ return resp.response;
831
+ }
832
+ async function updateFleet_ByFleetId(fleetID, data) {
833
+ const $ = new FleetsAdmin$(axiosInstance, namespace, useSchemaValidation);
834
+ const resp = await $.updateFleet_ByFleetId(fleetID, data);
835
+ if (resp.error) throw resp.error;
836
+ return resp.response;
837
+ }
838
+ async function getServers_ByFleetId(fleetID, queryParams) {
839
+ const $ = new FleetsAdmin$(axiosInstance, namespace, useSchemaValidation);
840
+ const resp = await $.getServers_ByFleetId(fleetID, queryParams);
841
+ if (resp.error) throw resp.error;
842
+ return resp.response;
843
+ }
844
+ return {
845
+ getFleets,
846
+ createFleet,
847
+ deleteFleet_ByFleetId,
848
+ getFleet_ByFleetId,
849
+ updateFleet_ByFleetId,
850
+ getServers_ByFleetId
851
+ };
852
+ }
853
+
854
+ // src/generated-definitions/ReferencingFleet.ts
855
+ import { z as z39 } from "zod";
856
+ var ReferencingFleet = z39.object({ environment: z39.string(), fleetId: z39.string(), namespace: z39.string() });
857
+
858
+ // src/generated-definitions/ImageDetails.ts
859
+ import { z as z40 } from "zod";
860
+ var ImageDetails = z40.object({
861
+ createdAt: Time,
862
+ deleteAt: Time,
863
+ executable: z40.string(),
864
+ id: z40.string(),
865
+ isProtected: z40.boolean(),
866
+ name: z40.string(),
867
+ referencingFleets: z40.array(ReferencingFleet),
868
+ sizeInByte: z40.number().int(),
869
+ status: z40.string(),
870
+ tags: z40.array(z40.string()),
871
+ uploadedAt: Time,
872
+ uploadedBy: z40.string()
873
+ });
874
+
875
+ // src/generated-definitions/ImageListItem.ts
876
+ import { z as z41 } from "zod";
877
+ var ImageListItem = z41.object({
878
+ createdAt: Time,
879
+ deleteAt: Time,
880
+ executable: z41.string(),
881
+ id: z41.string(),
882
+ isProtected: z41.boolean(),
883
+ name: z41.string(),
884
+ referencingFleets: z41.number().int(),
885
+ sizeInByte: z41.number().int(),
886
+ status: z41.string(),
887
+ tags: z41.array(z41.string()),
888
+ uploadedAt: Time,
889
+ uploadedBy: z41.string()
890
+ });
891
+
892
+ // src/generated-definitions/ImageList.ts
893
+ import { z as z42 } from "zod";
894
+ var ImageList = z42.object({ images: z42.array(ImageListItem) });
895
+
896
+ // src/generated-definitions/ImageStorage.ts
897
+ import { z as z43 } from "zod";
898
+ var ImageStorage = z43.object({
899
+ currentMarkedForDeletionBytes: z43.number().int(),
900
+ currentUsageBytes: z43.number().int(),
901
+ quotaBytes: z43.number().int()
902
+ });
903
+
904
+ // src/generated-admin/endpoints/ImagesAdmin$.ts
905
+ import { Validate as Validate7 } from "@accelbyte/sdk";
906
+ import { z as z44 } from "zod";
907
+ var ImagesAdmin$ = class {
908
+ // @ts-ignore
909
+ // prettier-ignore
910
+ constructor(axiosInstance, namespace, useSchemaValidation = true) {
911
+ this.axiosInstance = axiosInstance;
912
+ this.namespace = namespace;
913
+ this.useSchemaValidation = useSchemaValidation;
914
+ }
915
+ /**
916
+ * 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]
917
+ */
918
+ getImages() {
919
+ const params = {};
920
+ const url = "/ams/v1/admin/namespaces/{namespace}/images".replace("{namespace}", this.namespace);
921
+ const resultPromise = this.axiosInstance.get(url, { params });
922
+ return Validate7.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, ImageList, "ImageList");
923
+ }
924
+ /**
925
+ * Returns information regarding the account's usage for images storage including the free tier quota Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:IMAGE [READ]
926
+ */
927
+ getImagesStorage() {
928
+ const params = {};
929
+ const url = "/ams/v1/admin/namespaces/{namespace}/images-storage".replace("{namespace}", this.namespace);
930
+ const resultPromise = this.axiosInstance.get(url, { params });
931
+ return Validate7.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, ImageStorage, "ImageStorage");
932
+ }
933
+ /**
934
+ * 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]
935
+ */
936
+ deleteImage_ByImageId(imageID) {
937
+ const params = {};
938
+ const url = "/ams/v1/admin/namespaces/{namespace}/images/{imageID}".replace("{namespace}", this.namespace).replace("{imageID}", imageID);
939
+ const resultPromise = this.axiosInstance.delete(url, { params });
940
+ return Validate7.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z44.unknown(), "z.unknown()");
941
+ }
942
+ /**
943
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:IMAGE [READ]
944
+ */
945
+ getImage_ByImageId(imageID) {
946
+ const params = {};
947
+ const url = "/ams/v1/admin/namespaces/{namespace}/images/{imageID}".replace("{namespace}", this.namespace).replace("{imageID}", imageID);
948
+ const resultPromise = this.axiosInstance.get(url, { params });
949
+ return Validate7.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, ImageDetails, "ImageDetails");
950
+ }
951
+ /**
952
+ * This allows editing of the image name, toggling `IsProtected`, or adding & removal of tags Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:IMAGE [UPDATE]
953
+ */
954
+ patchImage_ByImageId(imageID, data) {
955
+ const params = {};
956
+ const url = "/ams/v1/admin/namespaces/{namespace}/images/{imageID}".replace("{namespace}", this.namespace).replace("{imageID}", imageID);
957
+ const resultPromise = this.axiosInstance.patch(url, data, { params });
958
+ return Validate7.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, ImageDetails, "ImageDetails");
959
+ }
960
+ /**
961
+ * Unmarks an image for deletion. The image will be available for fleets. Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:IMAGE [DELETE]
962
+ */
963
+ createRestore_ByImageId(imageID) {
964
+ const params = {};
965
+ const url = "/ams/v1/admin/namespaces/{namespace}/images/{imageID}/restore".replace("{namespace}", this.namespace).replace("{imageID}", imageID);
966
+ const resultPromise = this.axiosInstance.post(url, null, { params });
967
+ return Validate7.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z44.unknown(), "z.unknown()");
968
+ }
969
+ };
970
+
971
+ // src/generated-admin/ImagesAdminApi.ts
972
+ import { ApiUtils as ApiUtils7, Network as Network7 } from "@accelbyte/sdk";
973
+ function ImagesAdminApi(sdk, args) {
974
+ const sdkAssembly = sdk.assembly();
975
+ const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace;
976
+ const requestConfig = ApiUtils7.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request);
977
+ const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? [];
978
+ const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation;
979
+ const axiosInstance = Network7.create(requestConfig);
980
+ for (const interceptor of interceptors) {
981
+ if (interceptor.type === "request") {
982
+ axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError);
983
+ }
984
+ if (interceptor.type === "response") {
985
+ axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError);
986
+ }
987
+ }
988
+ async function getImages() {
989
+ const $ = new ImagesAdmin$(axiosInstance, namespace, useSchemaValidation);
990
+ const resp = await $.getImages();
991
+ if (resp.error) throw resp.error;
992
+ return resp.response;
993
+ }
994
+ async function getImagesStorage() {
995
+ const $ = new ImagesAdmin$(axiosInstance, namespace, useSchemaValidation);
996
+ const resp = await $.getImagesStorage();
997
+ if (resp.error) throw resp.error;
998
+ return resp.response;
999
+ }
1000
+ async function deleteImage_ByImageId(imageID) {
1001
+ const $ = new ImagesAdmin$(axiosInstance, namespace, useSchemaValidation);
1002
+ const resp = await $.deleteImage_ByImageId(imageID);
1003
+ if (resp.error) throw resp.error;
1004
+ return resp.response;
1005
+ }
1006
+ async function getImage_ByImageId(imageID) {
1007
+ const $ = new ImagesAdmin$(axiosInstance, namespace, useSchemaValidation);
1008
+ const resp = await $.getImage_ByImageId(imageID);
1009
+ if (resp.error) throw resp.error;
1010
+ return resp.response;
1011
+ }
1012
+ async function patchImage_ByImageId(imageID, data) {
1013
+ const $ = new ImagesAdmin$(axiosInstance, namespace, useSchemaValidation);
1014
+ const resp = await $.patchImage_ByImageId(imageID, data);
1015
+ if (resp.error) throw resp.error;
1016
+ return resp.response;
1017
+ }
1018
+ async function createRestore_ByImageId(imageID) {
1019
+ const $ = new ImagesAdmin$(axiosInstance, namespace, useSchemaValidation);
1020
+ const resp = await $.createRestore_ByImageId(imageID);
1021
+ if (resp.error) throw resp.error;
1022
+ return resp.response;
1023
+ }
1024
+ return {
1025
+ getImages,
1026
+ getImagesStorage,
1027
+ deleteImage_ByImageId,
1028
+ getImage_ByImageId,
1029
+ patchImage_ByImageId,
1030
+ createRestore_ByImageId
1031
+ };
1032
+ }
1033
+
1034
+ // src/generated-definitions/DsHistoryEvent.ts
1035
+ import { z as z45 } from "zod";
1036
+ var DsHistoryEvent = z45.object({
1037
+ createdAt: Time,
1038
+ exitCode: z45.number().int(),
1039
+ ipAddress: z45.string(),
1040
+ reason: z45.string(),
1041
+ region: z45.string(),
1042
+ serverId: z45.string(),
1043
+ status: z45.string()
1044
+ });
1045
+
1046
+ // src/generated-definitions/DsHistoryList.ts
1047
+ import { z as z46 } from "zod";
1048
+ var DsHistoryList = z46.object({ events: z46.array(DsHistoryEvent), paging: PagingInfo });
1049
+
1050
+ // src/generated-definitions/FleetServerConnectionInfoResponse.ts
1051
+ import { z as z47 } from "zod";
1052
+ var FleetServerConnectionInfoResponse = z47.object({
1053
+ expiresAt: Time,
1054
+ host: z47.string(),
1055
+ logstreamPort: z47.number().int(),
1056
+ secret: z47.string()
1057
+ });
1058
+
1059
+ // src/generated-definitions/FleetServerHistoryEventResponse.ts
1060
+ import { z as z48 } from "zod";
1061
+ var FleetServerHistoryEventResponse = z48.object({
1062
+ createdAt: Time,
1063
+ exitCode: z48.number().int(),
1064
+ fleetId: z48.string(),
1065
+ newState: z48.string(),
1066
+ oldState: z48.string(),
1067
+ reason: z48.string(),
1068
+ serverId: z48.string()
1069
+ });
1070
+
1071
+ // src/generated-definitions/FleetServerHistoryResponse.ts
1072
+ import { z as z49 } from "zod";
1073
+ var FleetServerHistoryResponse = z49.object({ events: z49.array(FleetServerHistoryEventResponse) });
1074
+
1075
+ // src/generated-admin/endpoints/ServersAdmin$.ts
1076
+ import { Validate as Validate8 } from "@accelbyte/sdk";
1077
+ var ServersAdmin$ = class {
1078
+ // @ts-ignore
1079
+ // prettier-ignore
1080
+ constructor(axiosInstance, namespace, useSchemaValidation = true) {
1081
+ this.axiosInstance = axiosInstance;
1082
+ this.namespace = namespace;
1083
+ this.useSchemaValidation = useSchemaValidation;
1084
+ }
1085
+ /**
1086
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
1087
+ */
1088
+ getServer_ByServerId(serverID) {
1089
+ const params = {};
1090
+ const url = "/ams/v1/admin/namespaces/{namespace}/servers/{serverID}".replace("{namespace}", this.namespace).replace("{serverID}", serverID);
1091
+ const resultPromise = this.axiosInstance.get(url, { params });
1092
+ return Validate8.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetServerInfoResponse, "FleetServerInfoResponse");
1093
+ }
1094
+ /**
1095
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
1096
+ */
1097
+ getHistory_ByServerId(serverID) {
1098
+ const params = {};
1099
+ const url = "/ams/v1/admin/namespaces/{namespace}/servers/{serverID}/history".replace("{namespace}", this.namespace).replace("{serverID}", serverID);
1100
+ const resultPromise = this.axiosInstance.get(url, { params });
1101
+ return Validate8.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetServerHistoryResponse, "FleetServerHistoryResponse");
1102
+ }
1103
+ /**
1104
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:ARMADA:FLEET [READ]
1105
+ */
1106
+ getServersHistory_ByFleetId(fleetID, queryParams) {
1107
+ const params = { ...queryParams };
1108
+ const url = "/ams/v1/admin/namespaces/{namespace}/fleets/{fleetID}/servers/history".replace("{namespace}", this.namespace).replace("{fleetID}", fleetID);
1109
+ const resultPromise = this.axiosInstance.get(url, { params });
1110
+ return Validate8.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, DsHistoryList, "DsHistoryList");
1111
+ }
1112
+ /**
1113
+ * Required Permission: ADMIN:NAMESPACE:{namespace}:AMS:DS:LOGS [READ]
1114
+ */
1115
+ getConnectioninfo_ByServerId(serverID) {
1116
+ const params = {};
1117
+ const url = "/ams/v1/admin/namespaces/{namespace}/servers/{serverID}/connectioninfo".replace("{namespace}", this.namespace).replace("{serverID}", serverID);
1118
+ const resultPromise = this.axiosInstance.get(url, { params });
1119
+ return Validate8.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetServerConnectionInfoResponse, "FleetServerConnectionInfoResponse");
1120
+ }
1121
+ };
1122
+
1123
+ // src/generated-admin/ServersAdminApi.ts
1124
+ import { ApiUtils as ApiUtils8, Network as Network8 } from "@accelbyte/sdk";
1125
+ function ServersAdminApi(sdk, args) {
1126
+ const sdkAssembly = sdk.assembly();
1127
+ const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace;
1128
+ const requestConfig = ApiUtils8.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request);
1129
+ const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? [];
1130
+ const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation;
1131
+ const axiosInstance = Network8.create(requestConfig);
1132
+ for (const interceptor of interceptors) {
1133
+ if (interceptor.type === "request") {
1134
+ axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError);
1135
+ }
1136
+ if (interceptor.type === "response") {
1137
+ axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError);
1138
+ }
1139
+ }
1140
+ async function getServer_ByServerId(serverID) {
1141
+ const $ = new ServersAdmin$(axiosInstance, namespace, useSchemaValidation);
1142
+ const resp = await $.getServer_ByServerId(serverID);
1143
+ if (resp.error) throw resp.error;
1144
+ return resp.response;
1145
+ }
1146
+ async function getHistory_ByServerId(serverID) {
1147
+ const $ = new ServersAdmin$(axiosInstance, namespace, useSchemaValidation);
1148
+ const resp = await $.getHistory_ByServerId(serverID);
1149
+ if (resp.error) throw resp.error;
1150
+ return resp.response;
1151
+ }
1152
+ async function getServersHistory_ByFleetId(fleetID, queryParams) {
1153
+ const $ = new ServersAdmin$(axiosInstance, namespace, useSchemaValidation);
1154
+ const resp = await $.getServersHistory_ByFleetId(fleetID, queryParams);
1155
+ if (resp.error) throw resp.error;
1156
+ return resp.response;
1157
+ }
1158
+ async function getConnectioninfo_ByServerId(serverID) {
1159
+ const $ = new ServersAdmin$(axiosInstance, namespace, useSchemaValidation);
1160
+ const resp = await $.getConnectioninfo_ByServerId(serverID);
1161
+ if (resp.error) throw resp.error;
1162
+ return resp.response;
1163
+ }
1164
+ return {
1165
+ getServer_ByServerId,
1166
+ getHistory_ByServerId,
1167
+ getServersHistory_ByFleetId,
1168
+ getConnectioninfo_ByServerId
1169
+ };
1170
+ }
1171
+
1172
+ // src/generated-public/endpoints/Account$.ts
1173
+ import { Validate as Validate9 } from "@accelbyte/sdk";
1174
+ var Account$ = class {
1175
+ // @ts-ignore
1176
+ // prettier-ignore
1177
+ constructor(axiosInstance, namespace, useSchemaValidation = true) {
1178
+ this.axiosInstance = axiosInstance;
1179
+ this.namespace = namespace;
1180
+ this.useSchemaValidation = useSchemaValidation;
1181
+ }
1182
+ /**
1183
+ * Required Permission: NAMESPACE:{namespace}:AMS:ACCOUNT [READ]
1184
+ */
1185
+ getAccount() {
1186
+ const params = {};
1187
+ const url = "/ams/v1/namespaces/{namespace}/account".replace("{namespace}", this.namespace);
1188
+ const resultPromise = this.axiosInstance.get(url, { params });
1189
+ return Validate9.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, AccountResponse, "AccountResponse");
1190
+ }
1191
+ };
1192
+
1193
+ // src/generated-public/AccountApi.ts
1194
+ import { ApiUtils as ApiUtils9, Network as Network9 } from "@accelbyte/sdk";
1195
+ function AccountApi(sdk, args) {
1196
+ const sdkAssembly = sdk.assembly();
1197
+ const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace;
1198
+ const requestConfig = ApiUtils9.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request);
1199
+ const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? [];
1200
+ const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation;
1201
+ const axiosInstance = Network9.create(requestConfig);
1202
+ for (const interceptor of interceptors) {
1203
+ if (interceptor.type === "request") {
1204
+ axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError);
1205
+ }
1206
+ if (interceptor.type === "response") {
1207
+ axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError);
1208
+ }
1209
+ }
1210
+ async function getAccount() {
1211
+ const $ = new Account$(axiosInstance, namespace, useSchemaValidation);
1212
+ const resp = await $.getAccount();
1213
+ if (resp.error) throw resp.error;
1214
+ return resp.response;
1215
+ }
1216
+ return {
1217
+ getAccount
1218
+ };
1219
+ }
1220
+
1221
+ // src/generated-public/endpoints/AmsInfo$.ts
1222
+ import { Validate as Validate10 } from "@accelbyte/sdk";
1223
+ import { z as z50 } from "zod";
1224
+ var AmsInfo$ = class {
1225
+ // @ts-ignore
1226
+ // prettier-ignore
1227
+ constructor(axiosInstance, namespace, useSchemaValidation = true) {
1228
+ this.axiosInstance = axiosInstance;
1229
+ this.namespace = namespace;
1230
+ this.useSchemaValidation = useSchemaValidation;
1231
+ }
1232
+ getUploadUrl() {
1233
+ const params = {};
1234
+ const url = "/ams/v1/upload-url";
1235
+ const resultPromise = this.axiosInstance.get(url, { params });
1236
+ return Validate10.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z50.unknown(), "z.unknown()");
1237
+ }
1238
+ };
1239
+
1240
+ // src/generated-public/AmsInfoApi.ts
1241
+ import { ApiUtils as ApiUtils10, Network as Network10 } from "@accelbyte/sdk";
1242
+ function AmsInfoApi(sdk, args) {
1243
+ const sdkAssembly = sdk.assembly();
1244
+ const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace;
1245
+ const requestConfig = ApiUtils10.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request);
1246
+ const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? [];
1247
+ const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation;
1248
+ const axiosInstance = Network10.create(requestConfig);
1249
+ for (const interceptor of interceptors) {
1250
+ if (interceptor.type === "request") {
1251
+ axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError);
1252
+ }
1253
+ if (interceptor.type === "response") {
1254
+ axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError);
1255
+ }
1256
+ }
1257
+ async function getUploadUrl() {
1258
+ const $ = new AmsInfo$(axiosInstance, namespace, useSchemaValidation);
1259
+ const resp = await $.getUploadUrl();
1260
+ if (resp.error) throw resp.error;
1261
+ return resp.response;
1262
+ }
1263
+ return {
1264
+ getUploadUrl
1265
+ };
1266
+ }
1267
+
1268
+ // src/generated-public/endpoints/Auth$.ts
1269
+ import { Validate as Validate11 } from "@accelbyte/sdk";
1270
+ import { z as z51 } from "zod";
1271
+ var Auth$ = class {
1272
+ // @ts-ignore
1273
+ // prettier-ignore
1274
+ constructor(axiosInstance, namespace, useSchemaValidation = true) {
1275
+ this.axiosInstance = axiosInstance;
1276
+ this.namespace = namespace;
1277
+ this.useSchemaValidation = useSchemaValidation;
1278
+ }
1279
+ /**
1280
+ * Check if fleet commander is authorized to talk to AMS with this IAM
1281
+ */
1282
+ getAuth() {
1283
+ const params = {};
1284
+ const url = "/ams/auth";
1285
+ const resultPromise = this.axiosInstance.get(url, { params });
1286
+ return Validate11.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z51.unknown(), "z.unknown()");
1287
+ }
1288
+ };
1289
+
1290
+ // src/generated-public/AuthApi.ts
1291
+ import { ApiUtils as ApiUtils11, Network as Network11 } from "@accelbyte/sdk";
1292
+ function AuthApi(sdk, args) {
1293
+ const sdkAssembly = sdk.assembly();
1294
+ const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace;
1295
+ const requestConfig = ApiUtils11.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request);
1296
+ const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? [];
1297
+ const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation;
1298
+ const axiosInstance = Network11.create(requestConfig);
1299
+ for (const interceptor of interceptors) {
1300
+ if (interceptor.type === "request") {
1301
+ axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError);
1302
+ }
1303
+ if (interceptor.type === "response") {
1304
+ axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError);
1305
+ }
1306
+ }
1307
+ async function getAuth() {
1308
+ const $ = new Auth$(axiosInstance, namespace, useSchemaValidation);
1309
+ const resp = await $.getAuth();
1310
+ if (resp.error) throw resp.error;
1311
+ return resp.response;
1312
+ }
1313
+ return {
1314
+ getAuth
1315
+ };
1316
+ }
1317
+
1318
+ // src/generated-public/endpoints/FleetCommander$.ts
1319
+ import { Validate as Validate12 } from "@accelbyte/sdk";
1320
+ import { z as z52 } from "zod";
1321
+ var FleetCommander$ = class {
1322
+ // @ts-ignore
1323
+ // prettier-ignore
1324
+ constructor(axiosInstance, namespace, useSchemaValidation = true) {
1325
+ this.axiosInstance = axiosInstance;
1326
+ this.namespace = namespace;
1327
+ this.useSchemaValidation = useSchemaValidation;
1328
+ }
1329
+ getVersion() {
1330
+ const params = {};
1331
+ const url = "/ams/version";
1332
+ const resultPromise = this.axiosInstance.get(url, { params });
1333
+ return Validate12.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z52.unknown(), "z.unknown()");
1334
+ }
1335
+ };
1336
+
1337
+ // src/generated-public/FleetCommanderApi.ts
1338
+ import { ApiUtils as ApiUtils12, Network as Network12 } from "@accelbyte/sdk";
1339
+ function FleetCommanderApi(sdk, args) {
1340
+ const sdkAssembly = sdk.assembly();
1341
+ const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace;
1342
+ const requestConfig = ApiUtils12.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request);
1343
+ const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? [];
1344
+ const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation;
1345
+ const axiosInstance = Network12.create(requestConfig);
1346
+ for (const interceptor of interceptors) {
1347
+ if (interceptor.type === "request") {
1348
+ axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError);
1349
+ }
1350
+ if (interceptor.type === "response") {
1351
+ axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError);
1352
+ }
1353
+ }
1354
+ async function getVersion() {
1355
+ const $ = new FleetCommander$(axiosInstance, namespace, useSchemaValidation);
1356
+ const resp = await $.getVersion();
1357
+ if (resp.error) throw resp.error;
1358
+ return resp.response;
1359
+ }
1360
+ return {
1361
+ getVersion
1362
+ };
1363
+ }
1364
+
1365
+ // src/generated-definitions/FleetClaimResponse.ts
1366
+ import { z as z53 } from "zod";
1367
+ var FleetClaimResponse = z53.object({ ip: z53.string(), ports: z53.record(z53.number().int()), region: z53.string(), serverId: z53.string() });
1368
+
1369
+ // src/generated-public/endpoints/Fleets$.ts
1370
+ import { Validate as Validate13 } from "@accelbyte/sdk";
1371
+ var Fleets$ = class {
1372
+ // @ts-ignore
1373
+ // prettier-ignore
1374
+ constructor(axiosInstance, namespace, useSchemaValidation = true) {
1375
+ this.axiosInstance = axiosInstance;
1376
+ this.namespace = namespace;
1377
+ this.useSchemaValidation = useSchemaValidation;
1378
+ }
1379
+ /**
1380
+ * Claim a dedicated server from fleets with matching claim keys Required Permission: NAMESPACE:{namespace}:AMS:SERVER:CLAIM [UPDATE]
1381
+ */
1382
+ updateServerClaim(data) {
1383
+ const params = {};
1384
+ const url = "/ams/v1/namespaces/{namespace}/servers/claim".replace("{namespace}", this.namespace);
1385
+ const resultPromise = this.axiosInstance.put(url, data, { params });
1386
+ return Validate13.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetClaimResponse, "FleetClaimResponse");
1387
+ }
1388
+ /**
1389
+ * Required Permission: NAMESPACE:{namespace}:AMS:SERVER:CLAIM [UPDATE]
1390
+ */
1391
+ updateClaim_ByFleetId(fleetID, data) {
1392
+ const params = {};
1393
+ const url = "/ams/v1/namespaces/{namespace}/fleets/{fleetID}/claim".replace("{namespace}", this.namespace).replace("{fleetID}", fleetID);
1394
+ const resultPromise = this.axiosInstance.put(url, data, { params });
1395
+ return Validate13.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, FleetClaimResponse, "FleetClaimResponse");
1396
+ }
1397
+ };
1398
+
1399
+ // src/generated-public/FleetsApi.ts
1400
+ import { ApiUtils as ApiUtils13, Network as Network13 } from "@accelbyte/sdk";
1401
+ function FleetsApi(sdk, args) {
1402
+ const sdkAssembly = sdk.assembly();
1403
+ const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace;
1404
+ const requestConfig = ApiUtils13.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request);
1405
+ const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? [];
1406
+ const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation;
1407
+ const axiosInstance = Network13.create(requestConfig);
1408
+ for (const interceptor of interceptors) {
1409
+ if (interceptor.type === "request") {
1410
+ axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError);
1411
+ }
1412
+ if (interceptor.type === "response") {
1413
+ axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError);
1414
+ }
1415
+ }
1416
+ async function updateServerClaim(data) {
1417
+ const $ = new Fleets$(axiosInstance, namespace, useSchemaValidation);
1418
+ const resp = await $.updateServerClaim(data);
1419
+ if (resp.error) throw resp.error;
1420
+ return resp.response;
1421
+ }
1422
+ async function updateClaim_ByFleetId(fleetID, data) {
1423
+ const $ = new Fleets$(axiosInstance, namespace, useSchemaValidation);
1424
+ const resp = await $.updateClaim_ByFleetId(fleetID, data);
1425
+ if (resp.error) throw resp.error;
1426
+ return resp.response;
1427
+ }
1428
+ return {
1429
+ updateServerClaim,
1430
+ updateClaim_ByFleetId
1431
+ };
1432
+ }
1433
+
1434
+ // src/generated-public/endpoints/Watchdogs$.ts
1435
+ import { Validate as Validate14 } from "@accelbyte/sdk";
1436
+ import { z as z54 } from "zod";
1437
+ var Watchdogs$ = class {
1438
+ // @ts-ignore
1439
+ // prettier-ignore
1440
+ constructor(axiosInstance, namespace, useSchemaValidation = true) {
1441
+ this.axiosInstance = axiosInstance;
1442
+ this.namespace = namespace;
1443
+ this.useSchemaValidation = useSchemaValidation;
1444
+ }
1445
+ /**
1446
+ * This is to support local ds development scenarios Required Permission: NAMESPACE:{namespace}:AMS:LOCALDS [CREATE]
1447
+ */
1448
+ getConnect_ByWatchdogId(watchdogID) {
1449
+ const params = {};
1450
+ const url = "/ams/v1/namespaces/{namespace}/local/{watchdogID}/connect".replace("{namespace}", this.namespace).replace("{watchdogID}", watchdogID);
1451
+ const resultPromise = this.axiosInstance.get(url, { params });
1452
+ return Validate14.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z54.unknown(), "z.unknown()");
1453
+ }
1454
+ /**
1455
+ * Required Permission: NAMESPACE:{namespace}:ARMADA:WATCHDOG [CREATE]
1456
+ */
1457
+ getConnect_ByWatchdogId_ByNS(watchdogID) {
1458
+ const params = {};
1459
+ const url = "/ams/v1/namespaces/{namespace}/watchdogs/{watchdogID}/connect".replace("{namespace}", this.namespace).replace("{watchdogID}", watchdogID);
1460
+ const resultPromise = this.axiosInstance.get(url, { params });
1461
+ return Validate14.validateOrReturnResponse(this.useSchemaValidation, () => resultPromise, z54.unknown(), "z.unknown()");
1462
+ }
1463
+ };
1464
+
1465
+ // src/generated-public/WatchdogsApi.ts
1466
+ import { ApiUtils as ApiUtils14, Network as Network14 } from "@accelbyte/sdk";
1467
+ function WatchdogsApi(sdk, args) {
1468
+ const sdkAssembly = sdk.assembly();
1469
+ const namespace = args?.coreConfig?.namespace ?? sdkAssembly.coreConfig.namespace;
1470
+ const requestConfig = ApiUtils14.mergeAxiosConfigs(sdkAssembly.axiosConfig.request, args?.axiosConfig?.request);
1471
+ const interceptors = args?.axiosConfig?.interceptors ?? sdkAssembly.axiosConfig.interceptors ?? [];
1472
+ const useSchemaValidation = sdkAssembly.coreConfig.useSchemaValidation;
1473
+ const axiosInstance = Network14.create(requestConfig);
1474
+ for (const interceptor of interceptors) {
1475
+ if (interceptor.type === "request") {
1476
+ axiosInstance.interceptors.request.use(interceptor?.onRequest, interceptor.onError);
1477
+ }
1478
+ if (interceptor.type === "response") {
1479
+ axiosInstance.interceptors.response.use(interceptor?.onSuccess, interceptor.onError);
1480
+ }
1481
+ }
1482
+ async function getConnect_ByWatchdogId(watchdogID) {
1483
+ const $ = new Watchdogs$(axiosInstance, namespace, useSchemaValidation);
1484
+ const resp = await $.getConnect_ByWatchdogId(watchdogID);
1485
+ if (resp.error) throw resp.error;
1486
+ return resp.response;
1487
+ }
1488
+ async function getConnect_ByWatchdogId_ByNS(watchdogID) {
1489
+ const $ = new Watchdogs$(axiosInstance, namespace, useSchemaValidation);
1490
+ const resp = await $.getConnect_ByWatchdogId_ByNS(watchdogID);
1491
+ if (resp.error) throw resp.error;
1492
+ return resp.response;
1493
+ }
1494
+ return {
1495
+ getConnect_ByWatchdogId,
1496
+ getConnect_ByWatchdogId_ByNS
1497
+ };
1498
+ }
1499
+
1500
+ export {
1501
+ AccountLimits,
1502
+ AccountCreateResponse,
1503
+ AccountLinkResponse,
1504
+ AccountLinkTokenResponse,
1505
+ AccountResponse,
1506
+ AccountAdmin$,
1507
+ AccountAdminApi,
1508
+ AmsRegionsResponse,
1509
+ InstanceTypeDescriptionResponse,
1510
+ AvailableInstanceTypesResponse,
1511
+ AmsInfoAdmin$,
1512
+ AmsInfoAdminApi,
1513
+ Time,
1514
+ QoSServer,
1515
+ QoSEndpointResponse,
1516
+ AmsQoSAdmin$,
1517
+ AmsQoSAdminApi,
1518
+ ArtifactResponse,
1519
+ ArtifactListResponse,
1520
+ ArtifactUrlResponse,
1521
+ ArtifactUsageResponse,
1522
+ ArtifactSamplingRule,
1523
+ ArtifactTypeSamplingRules,
1524
+ FleetArtifactsSampleRules,
1525
+ ArtifactsAdmin$,
1526
+ ArtifactsAdminApi,
1527
+ DevelopmentServerConfigurationCreateResponse,
1528
+ DevelopmentServerConfigurationGetResponse,
1529
+ DevelopmentServerConfigurationListResponse,
1530
+ DevelopmentAdmin$,
1531
+ DevelopmentAdminApi,
1532
+ FleetCreateResponse,
1533
+ DsHostConfiguration,
1534
+ PortConfiguration,
1535
+ Timeout,
1536
+ ImageDeploymentProfile,
1537
+ RegionConfig,
1538
+ FleetGetResponse,
1539
+ FleetRegionalServerCounts,
1540
+ FleetListItemResponse,
1541
+ FleetListResponse,
1542
+ FleetServerInfoResponse,
1543
+ PagingInfo,
1544
+ FleetServersResponse,
1545
+ FleetsAdmin$,
1546
+ FleetsAdminApi,
1547
+ ReferencingFleet,
1548
+ ImageDetails,
1549
+ ImageListItem,
1550
+ ImageList,
1551
+ ImageStorage,
1552
+ ImagesAdmin$,
1553
+ ImagesAdminApi,
1554
+ DsHistoryEvent,
1555
+ DsHistoryList,
1556
+ FleetServerConnectionInfoResponse,
1557
+ FleetServerHistoryEventResponse,
1558
+ FleetServerHistoryResponse,
1559
+ ServersAdmin$,
1560
+ ServersAdminApi,
1561
+ Account$,
1562
+ AccountApi,
1563
+ AmsInfo$,
1564
+ AmsInfoApi,
1565
+ Auth$,
1566
+ AuthApi,
1567
+ FleetCommander$,
1568
+ FleetCommanderApi,
1569
+ FleetClaimResponse,
1570
+ Fleets$,
1571
+ FleetsApi,
1572
+ Watchdogs$,
1573
+ WatchdogsApi
1574
+ };