@hostafrica/ha-sdk-typescript 1.1.3 → 1.1.4

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 (65) hide show
  1. package/dist/apis/VPSManagementApi.d.ts +18 -3
  2. package/dist/apis/VPSManagementApi.js +49 -2
  3. package/dist/esm/apis/VPSManagementApi.d.ts +18 -3
  4. package/dist/esm/apis/VPSManagementApi.js +50 -3
  5. package/dist/esm/models/EncryptedPasswordResponseData.d.ts +45 -0
  6. package/dist/esm/models/EncryptedPasswordResponseData.js +52 -0
  7. package/dist/esm/models/GetEncryptedPasswordRequestContent.d.ts +38 -0
  8. package/dist/esm/models/GetEncryptedPasswordRequestContent.js +47 -0
  9. package/dist/esm/models/GetEncryptedPasswordResponseContent.d.ts +40 -0
  10. package/dist/esm/models/GetEncryptedPasswordResponseContent.js +49 -0
  11. package/dist/esm/models/NoVncConsoleDetails.d.ts +19 -1
  12. package/dist/esm/models/NoVncConsoleDetails.js +7 -3
  13. package/dist/esm/models/PasswordEncryptionInfo.d.ts +50 -0
  14. package/dist/esm/models/PasswordEncryptionInfo.js +55 -0
  15. package/dist/esm/models/VpsCredentials.d.ts +1 -1
  16. package/dist/esm/models/VpsDetailsResponse.d.ts +4 -3
  17. package/dist/esm/models/VpsDetailsResponse.js +3 -2
  18. package/dist/esm/models/VpsIpAddressDetail.d.ts +56 -0
  19. package/dist/esm/models/VpsIpAddressDetail.js +51 -0
  20. package/dist/esm/models/VpsVmInfo.d.ts +3 -3
  21. package/dist/esm/models/index.d.ts +5 -0
  22. package/dist/esm/models/index.js +5 -0
  23. package/dist/esm/retryablePaths.js +1 -0
  24. package/dist/models/EncryptedPasswordResponseData.d.ts +45 -0
  25. package/dist/models/EncryptedPasswordResponseData.js +59 -0
  26. package/dist/models/GetEncryptedPasswordRequestContent.d.ts +38 -0
  27. package/dist/models/GetEncryptedPasswordRequestContent.js +54 -0
  28. package/dist/models/GetEncryptedPasswordResponseContent.d.ts +40 -0
  29. package/dist/models/GetEncryptedPasswordResponseContent.js +56 -0
  30. package/dist/models/NoVncConsoleDetails.d.ts +19 -1
  31. package/dist/models/NoVncConsoleDetails.js +7 -3
  32. package/dist/models/PasswordEncryptionInfo.d.ts +50 -0
  33. package/dist/models/PasswordEncryptionInfo.js +62 -0
  34. package/dist/models/VpsCredentials.d.ts +1 -1
  35. package/dist/models/VpsDetailsResponse.d.ts +4 -3
  36. package/dist/models/VpsDetailsResponse.js +3 -2
  37. package/dist/models/VpsIpAddressDetail.d.ts +56 -0
  38. package/dist/models/VpsIpAddressDetail.js +58 -0
  39. package/dist/models/VpsVmInfo.d.ts +3 -3
  40. package/dist/models/index.d.ts +5 -0
  41. package/dist/models/index.js +5 -0
  42. package/dist/retryablePaths.js +1 -0
  43. package/dist.zip +0 -0
  44. package/docs/EncryptedPasswordResponseData.md +39 -0
  45. package/docs/GetEncryptedPasswordRequestContent.md +36 -0
  46. package/docs/GetEncryptedPasswordResponseContent.md +36 -0
  47. package/docs/NoVncConsoleDetails.md +6 -0
  48. package/docs/PasswordEncryptionInfo.md +41 -0
  49. package/docs/VPSManagementApi.md +81 -1
  50. package/docs/VpsDetailsResponse.md +1 -1
  51. package/docs/VpsIpAddressDetail.md +43 -0
  52. package/docs/VpsVmInfo.md +1 -1
  53. package/package.json +1 -1
  54. package/src/apis/VPSManagementApi.ts +67 -2
  55. package/src/models/EncryptedPasswordResponseData.ts +92 -0
  56. package/src/models/GetEncryptedPasswordRequestContent.ts +75 -0
  57. package/src/models/GetEncryptedPasswordResponseContent.ts +92 -0
  58. package/src/models/NoVncConsoleDetails.ts +26 -3
  59. package/src/models/PasswordEncryptionInfo.ts +93 -0
  60. package/src/models/VpsCredentials.ts +1 -1
  61. package/src/models/VpsDetailsResponse.ts +12 -5
  62. package/src/models/VpsIpAddressDetail.ts +98 -0
  63. package/src/models/VpsVmInfo.ts +3 -3
  64. package/src/models/index.ts +5 -0
  65. package/src/retryablePaths.ts +1 -0
@@ -0,0 +1,43 @@
1
+
2
+ # VpsIpAddressDetail
3
+
4
+ Detailed IP address assignment for a VPS
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `ip` | string
11
+ `address` | string
12
+ `subnet` | string
13
+ `gateway` | string
14
+ `mac` | string
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import type { VpsIpAddressDetail } from '@hostafrica/ha-sdk-typescript'
20
+
21
+ // TODO: Update the object below with actual values
22
+ const example = {
23
+ "ip": null,
24
+ "address": null,
25
+ "subnet": null,
26
+ "gateway": null,
27
+ "mac": null,
28
+ } satisfies VpsIpAddressDetail
29
+
30
+ console.log(example)
31
+
32
+ // Convert the instance to a JSON string
33
+ const exampleJSON: string = JSON.stringify(example)
34
+ console.log(exampleJSON)
35
+
36
+ // Parse the JSON string back to an object
37
+ const exampleParsed = JSON.parse(exampleJSON) as VpsIpAddressDetail
38
+ console.log(exampleParsed)
39
+ ```
40
+
41
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
42
+
43
+
package/docs/VpsVmInfo.md CHANGED
@@ -11,7 +11,7 @@ Name | Type
11
11
  `uptime` | string
12
12
  `uptimeSeconds` | number
13
13
  `hostname` | string
14
- `bootDevices` | string
14
+ `bootDevices` | Array<string>
15
15
  `vmid` | string
16
16
  `node` | string
17
17
  `virtualization` | string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostafrica/ha-sdk-typescript",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "HostAfrica API TypeScript SDK",
5
5
  "author": "HostAfrica",
6
6
  "repository": {
@@ -17,6 +17,8 @@ import * as runtime from '../runtime.js';
17
17
  import type {
18
18
  BadRequestErrorResponseContent,
19
19
  ForbiddenErrorResponseContent,
20
+ GetEncryptedPasswordRequestContent,
21
+ GetEncryptedPasswordResponseContent,
20
22
  GetVpsConfigRequestContent,
21
23
  GetVpsConfigResponseContent,
22
24
  GetVpsDetailsRequestContent,
@@ -45,6 +47,10 @@ import {
45
47
  BadRequestErrorResponseContentToJSON,
46
48
  ForbiddenErrorResponseContentFromJSON,
47
49
  ForbiddenErrorResponseContentToJSON,
50
+ GetEncryptedPasswordRequestContentFromJSON,
51
+ GetEncryptedPasswordRequestContentToJSON,
52
+ GetEncryptedPasswordResponseContentFromJSON,
53
+ GetEncryptedPasswordResponseContentToJSON,
48
54
  GetVpsConfigRequestContentFromJSON,
49
55
  GetVpsConfigRequestContentToJSON,
50
56
  GetVpsConfigResponseContentFromJSON,
@@ -91,6 +97,10 @@ import {
91
97
  ValidationErrorResponseContentToJSON,
92
98
  } from '../models/index.js';
93
99
 
100
+ export interface GetEncryptedPasswordRequest {
101
+ getEncryptedPasswordRequestContent: GetEncryptedPasswordRequestContent;
102
+ }
103
+
94
104
  export interface GetVpsConfigRequest {
95
105
  getVpsConfigRequestContent: GetVpsConfigRequestContent;
96
106
  }
@@ -124,6 +134,61 @@ export interface UpdateVpsConfigRequest {
124
134
  */
125
135
  export class VPSManagementApi extends runtime.BaseAPI {
126
136
 
137
+ /**
138
+ * Creates request options for getEncryptedPassword without sending the request
139
+ */
140
+ async getEncryptedPasswordRequestOpts(requestParameters: GetEncryptedPasswordRequest): Promise<runtime.RequestOpts> {
141
+ if (requestParameters['getEncryptedPasswordRequestContent'] == null) {
142
+ throw new runtime.RequiredError(
143
+ 'getEncryptedPasswordRequestContent',
144
+ 'Required parameter "getEncryptedPasswordRequestContent" was null or undefined when calling getEncryptedPassword().'
145
+ );
146
+ }
147
+
148
+ const queryParameters: any = {};
149
+
150
+ const headerParameters: runtime.HTTPHeaders = {};
151
+
152
+ headerParameters['Content-Type'] = 'application/json';
153
+
154
+ if (this.configuration && this.configuration.accessToken) {
155
+ const token = this.configuration.accessToken;
156
+ const tokenString = await token("BearerAuth", []);
157
+
158
+ if (tokenString) {
159
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
160
+ }
161
+ }
162
+
163
+ let urlPath = `/vps/get-encrypted-password`;
164
+
165
+ return {
166
+ path: urlPath,
167
+ method: 'POST',
168
+ headers: headerParameters,
169
+ query: queryParameters,
170
+ body: GetEncryptedPasswordRequestContentToJSON(requestParameters['getEncryptedPasswordRequestContent']),
171
+ };
172
+ }
173
+
174
+ /**
175
+ * Retrieves the VPS username and root password without exposing plaintext over the API. Send a PEM-encoded RSA 4096-bit public key; the API encrypts the password with RSA-OAEP (SHA-256), and returns base64 ciphertext plus encryption metadata. Never send the private key. Invalid or non-4096-bit keys return HTTP 422 ValidationError. Generate a key with: openssl genrsa -out private.pem 4096 && openssl rsa -in private.pem -pubout -out public.pem. Decrypt with: echo CIPHERTEXT | base64 -d | openssl pkeyutl -decrypt -inkey private.pem -pkeyopt rsa_padding_mode:oaep -pkeyopt rsa_oaep_md:sha256 -pkeyopt rsa_mgf1_md:sha256 (macOS: base64 -D).
176
+ */
177
+ async getEncryptedPasswordRaw(requestParameters: GetEncryptedPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetEncryptedPasswordResponseContent>> {
178
+ const requestOptions = await this.getEncryptedPasswordRequestOpts(requestParameters);
179
+ const response = await this.request(requestOptions, initOverrides);
180
+
181
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetEncryptedPasswordResponseContentFromJSON(jsonValue));
182
+ }
183
+
184
+ /**
185
+ * Retrieves the VPS username and root password without exposing plaintext over the API. Send a PEM-encoded RSA 4096-bit public key; the API encrypts the password with RSA-OAEP (SHA-256), and returns base64 ciphertext plus encryption metadata. Never send the private key. Invalid or non-4096-bit keys return HTTP 422 ValidationError. Generate a key with: openssl genrsa -out private.pem 4096 && openssl rsa -in private.pem -pubout -out public.pem. Decrypt with: echo CIPHERTEXT | base64 -d | openssl pkeyutl -decrypt -inkey private.pem -pkeyopt rsa_padding_mode:oaep -pkeyopt rsa_oaep_md:sha256 -pkeyopt rsa_mgf1_md:sha256 (macOS: base64 -D).
186
+ */
187
+ async getEncryptedPassword(requestParameters: GetEncryptedPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetEncryptedPasswordResponseContent> {
188
+ const response = await this.getEncryptedPasswordRaw(requestParameters, initOverrides);
189
+ return await response.value();
190
+ }
191
+
127
192
  /**
128
193
  * Creates request options for getVpsConfig without sending the request
129
194
  */
@@ -217,7 +282,7 @@ export class VPSManagementApi extends runtime.BaseAPI {
217
282
  }
218
283
 
219
284
  /**
220
- * Gets detailed information about a VPS service including configuration, network settings, and statistics
285
+ * Gets detailed information about a VPS service including configuration, network settings, and statistics. Credentials.password is always \"<redacted>\"; plaintext passwords are never returned. To retrieve the password securely, use GetEncryptedPassword (/vps/get-encrypted-password).
221
286
  */
222
287
  async getVpsDetailsRaw(requestParameters: GetVpsDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetVpsDetailsResponseContent>> {
223
288
  const requestOptions = await this.getVpsDetailsRequestOpts(requestParameters);
@@ -227,7 +292,7 @@ export class VPSManagementApi extends runtime.BaseAPI {
227
292
  }
228
293
 
229
294
  /**
230
- * Gets detailed information about a VPS service including configuration, network settings, and statistics
295
+ * Gets detailed information about a VPS service including configuration, network settings, and statistics. Credentials.password is always \"<redacted>\"; plaintext passwords are never returned. To retrieve the password securely, use GetEncryptedPassword (/vps/get-encrypted-password).
231
296
  */
232
297
  async getVpsDetails(requestParameters: GetVpsDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetVpsDetailsResponseContent> {
233
298
  const response = await this.getVpsDetailsRaw(requestParameters, initOverrides);
@@ -0,0 +1,92 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * HostAfricaApi
5
+ * HostAfrica API
6
+ *
7
+ * The version of the OpenAPI document: 1.1.0 - 2026-07-16
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { PasswordEncryptionInfo } from './PasswordEncryptionInfo.js';
17
+ import {
18
+ PasswordEncryptionInfoFromJSON,
19
+ PasswordEncryptionInfoFromJSONTyped,
20
+ PasswordEncryptionInfoToJSON,
21
+ PasswordEncryptionInfoToJSONTyped,
22
+ } from './PasswordEncryptionInfo.js';
23
+
24
+ /**
25
+ * Response data for get-encrypted-password
26
+ * @export
27
+ * @interface EncryptedPasswordResponseData
28
+ */
29
+ export interface EncryptedPasswordResponseData {
30
+ /**
31
+ * Username for VPS access (plaintext)
32
+ * @type {string}
33
+ * @memberof EncryptedPasswordResponseData
34
+ */
35
+ username: string;
36
+ /**
37
+ * Base64-encoded ciphertext of the VPS password. Produced with RSA-OAEP (SHA-256) and the request public_key. Decode from base64, then decrypt with the matching private key via openssl pkeyutl -decrypt -pkeyopt rsa_padding_mode:oaep -pkeyopt rsa_oaep_md:sha256 -pkeyopt rsa_mgf1_md:sha256.
38
+ * @type {string}
39
+ * @memberof EncryptedPasswordResponseData
40
+ */
41
+ password: string;
42
+ /**
43
+ *
44
+ * @type {PasswordEncryptionInfo}
45
+ * @memberof EncryptedPasswordResponseData
46
+ */
47
+ encryption: PasswordEncryptionInfo;
48
+ }
49
+
50
+ /**
51
+ * Check if a given object implements the EncryptedPasswordResponseData interface.
52
+ */
53
+ export function instanceOfEncryptedPasswordResponseData(value: object): value is EncryptedPasswordResponseData {
54
+ if (!('username' in value) || value['username'] === undefined) return false;
55
+ if (!('password' in value) || value['password'] === undefined) return false;
56
+ if (!('encryption' in value) || value['encryption'] === undefined) return false;
57
+ return true;
58
+ }
59
+
60
+ export function EncryptedPasswordResponseDataFromJSON(json: any): EncryptedPasswordResponseData {
61
+ return EncryptedPasswordResponseDataFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function EncryptedPasswordResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): EncryptedPasswordResponseData {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'username': json['username'],
71
+ 'password': json['password'],
72
+ 'encryption': PasswordEncryptionInfoFromJSON(json['encryption']),
73
+ };
74
+ }
75
+
76
+ export function EncryptedPasswordResponseDataToJSON(json: any): EncryptedPasswordResponseData {
77
+ return EncryptedPasswordResponseDataToJSONTyped(json, false);
78
+ }
79
+
80
+ export function EncryptedPasswordResponseDataToJSONTyped(value?: EncryptedPasswordResponseData | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'username': value['username'],
88
+ 'password': value['password'],
89
+ 'encryption': PasswordEncryptionInfoToJSON(value['encryption']),
90
+ };
91
+ }
92
+
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * HostAfricaApi
5
+ * HostAfrica API
6
+ *
7
+ * The version of the OpenAPI document: 1.1.0 - 2026-07-16
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface GetEncryptedPasswordRequestContent
20
+ */
21
+ export interface GetEncryptedPasswordRequestContent {
22
+ /**
23
+ * Service ID - must be sent as a string
24
+ * @type {string}
25
+ * @memberof GetEncryptedPasswordRequestContent
26
+ */
27
+ serviceId: string;
28
+ /**
29
+ * PEM-encoded RSA public key only (never the private key). Accepts SPKI (`-----BEGIN PUBLIC KEY-----`) or PKCS#1 (`-----BEGIN RSA PUBLIC KEY-----`). Must be exactly 4096-bit. Used with RSA-OAEP and SHA-256 to encrypt the password.
30
+ * @type {string}
31
+ * @memberof GetEncryptedPasswordRequestContent
32
+ */
33
+ publicKey: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the GetEncryptedPasswordRequestContent interface.
38
+ */
39
+ export function instanceOfGetEncryptedPasswordRequestContent(value: object): value is GetEncryptedPasswordRequestContent {
40
+ if (!('serviceId' in value) || value['serviceId'] === undefined) return false;
41
+ if (!('publicKey' in value) || value['publicKey'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function GetEncryptedPasswordRequestContentFromJSON(json: any): GetEncryptedPasswordRequestContent {
46
+ return GetEncryptedPasswordRequestContentFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function GetEncryptedPasswordRequestContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetEncryptedPasswordRequestContent {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'serviceId': json['service_id'],
56
+ 'publicKey': json['public_key'],
57
+ };
58
+ }
59
+
60
+ export function GetEncryptedPasswordRequestContentToJSON(json: any): GetEncryptedPasswordRequestContent {
61
+ return GetEncryptedPasswordRequestContentToJSONTyped(json, false);
62
+ }
63
+
64
+ export function GetEncryptedPasswordRequestContentToJSONTyped(value?: GetEncryptedPasswordRequestContent | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'service_id': value['serviceId'],
72
+ 'public_key': value['publicKey'],
73
+ };
74
+ }
75
+
@@ -0,0 +1,92 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * HostAfricaApi
5
+ * HostAfrica API
6
+ *
7
+ * The version of the OpenAPI document: 1.1.0 - 2026-07-16
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { OperationStatus } from './OperationStatus.js';
17
+ import {
18
+ OperationStatusFromJSON,
19
+ OperationStatusFromJSONTyped,
20
+ OperationStatusToJSON,
21
+ OperationStatusToJSONTyped,
22
+ } from './OperationStatus.js';
23
+ import type { EncryptedPasswordResponseData } from './EncryptedPasswordResponseData.js';
24
+ import {
25
+ EncryptedPasswordResponseDataFromJSON,
26
+ EncryptedPasswordResponseDataFromJSONTyped,
27
+ EncryptedPasswordResponseDataToJSON,
28
+ EncryptedPasswordResponseDataToJSONTyped,
29
+ } from './EncryptedPasswordResponseData.js';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface GetEncryptedPasswordResponseContent
35
+ */
36
+ export interface GetEncryptedPasswordResponseContent {
37
+ /**
38
+ *
39
+ * @type {OperationStatus}
40
+ * @memberof GetEncryptedPasswordResponseContent
41
+ */
42
+ status: OperationStatus;
43
+ /**
44
+ *
45
+ * @type {EncryptedPasswordResponseData}
46
+ * @memberof GetEncryptedPasswordResponseContent
47
+ */
48
+ data: EncryptedPasswordResponseData;
49
+ }
50
+
51
+
52
+
53
+ /**
54
+ * Check if a given object implements the GetEncryptedPasswordResponseContent interface.
55
+ */
56
+ export function instanceOfGetEncryptedPasswordResponseContent(value: object): value is GetEncryptedPasswordResponseContent {
57
+ if (!('status' in value) || value['status'] === undefined) return false;
58
+ if (!('data' in value) || value['data'] === undefined) return false;
59
+ return true;
60
+ }
61
+
62
+ export function GetEncryptedPasswordResponseContentFromJSON(json: any): GetEncryptedPasswordResponseContent {
63
+ return GetEncryptedPasswordResponseContentFromJSONTyped(json, false);
64
+ }
65
+
66
+ export function GetEncryptedPasswordResponseContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetEncryptedPasswordResponseContent {
67
+ if (json == null) {
68
+ return json;
69
+ }
70
+ return {
71
+
72
+ 'status': OperationStatusFromJSON(json['status']),
73
+ 'data': EncryptedPasswordResponseDataFromJSON(json['data']),
74
+ };
75
+ }
76
+
77
+ export function GetEncryptedPasswordResponseContentToJSON(json: any): GetEncryptedPasswordResponseContent {
78
+ return GetEncryptedPasswordResponseContentToJSONTyped(json, false);
79
+ }
80
+
81
+ export function GetEncryptedPasswordResponseContentToJSONTyped(value?: GetEncryptedPasswordResponseContent | null, ignoreDiscriminator: boolean = false): any {
82
+ if (value == null) {
83
+ return value;
84
+ }
85
+
86
+ return {
87
+
88
+ 'status': OperationStatusToJSON(value['status']),
89
+ 'data': EncryptedPasswordResponseDataToJSON(value['data']),
90
+ };
91
+ }
92
+
@@ -24,14 +24,31 @@ export interface NoVncConsoleDetails {
24
24
  * @type {string}
25
25
  * @memberof NoVncConsoleDetails
26
26
  */
27
- novncRedirectUrl: string;
27
+ novncRedirectUrl?: string;
28
+ /**
29
+ * Console connection mode
30
+ * @type {string}
31
+ * @memberof NoVncConsoleDetails
32
+ */
33
+ mode?: string;
34
+ /**
35
+ * WebSocket URL for proxied console access
36
+ * @type {string}
37
+ * @memberof NoVncConsoleDetails
38
+ */
39
+ websocketUrl?: string;
40
+ /**
41
+ * Password for proxied console access
42
+ * @type {string}
43
+ * @memberof NoVncConsoleDetails
44
+ */
45
+ password?: string;
28
46
  }
29
47
 
30
48
  /**
31
49
  * Check if a given object implements the NoVncConsoleDetails interface.
32
50
  */
33
51
  export function instanceOfNoVncConsoleDetails(value: object): value is NoVncConsoleDetails {
34
- if (!('novncRedirectUrl' in value) || value['novncRedirectUrl'] === undefined) return false;
35
52
  return true;
36
53
  }
37
54
 
@@ -45,7 +62,10 @@ export function NoVncConsoleDetailsFromJSONTyped(json: any, ignoreDiscriminator:
45
62
  }
46
63
  return {
47
64
 
48
- 'novncRedirectUrl': json['novnc_redirect_url'],
65
+ 'novncRedirectUrl': json['novnc_redirect_url'] == null ? undefined : json['novnc_redirect_url'],
66
+ 'mode': json['mode'] == null ? undefined : json['mode'],
67
+ 'websocketUrl': json['websocket_url'] == null ? undefined : json['websocket_url'],
68
+ 'password': json['password'] == null ? undefined : json['password'],
49
69
  };
50
70
  }
51
71
 
@@ -61,6 +81,9 @@ export function NoVncConsoleDetailsToJSONTyped(value?: NoVncConsoleDetails | nul
61
81
  return {
62
82
 
63
83
  'novnc_redirect_url': value['novncRedirectUrl'],
84
+ 'mode': value['mode'],
85
+ 'websocket_url': value['websocketUrl'],
86
+ 'password': value['password'],
64
87
  };
65
88
  }
66
89
 
@@ -0,0 +1,93 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * HostAfricaApi
5
+ * HostAfrica API
6
+ *
7
+ * The version of the OpenAPI document: 1.1.0 - 2026-07-16
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ /**
17
+ * Encryption metadata for an RSA-OAEP encrypted password
18
+ * @export
19
+ * @interface PasswordEncryptionInfo
20
+ */
21
+ export interface PasswordEncryptionInfo {
22
+ /**
23
+ * Asymmetric encryption algorithm. Always "RSA-OAEP".
24
+ * @type {string}
25
+ * @memberof PasswordEncryptionInfo
26
+ */
27
+ algorithm: string;
28
+ /**
29
+ * OAEP hash / MGF1 hash function. Always "SHA-256".
30
+ * @type {string}
31
+ * @memberof PasswordEncryptionInfo
32
+ */
33
+ hash: string;
34
+ /**
35
+ * RSA modulus size in bits. Always 4096.
36
+ * @type {number}
37
+ * @memberof PasswordEncryptionInfo
38
+ */
39
+ keySize: number;
40
+ /**
41
+ * Encoding of the password ciphertext field. Always "base64" (standard alphabet, not URL-safe).
42
+ * @type {string}
43
+ * @memberof PasswordEncryptionInfo
44
+ */
45
+ encoding: string;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the PasswordEncryptionInfo interface.
50
+ */
51
+ export function instanceOfPasswordEncryptionInfo(value: object): value is PasswordEncryptionInfo {
52
+ if (!('algorithm' in value) || value['algorithm'] === undefined) return false;
53
+ if (!('hash' in value) || value['hash'] === undefined) return false;
54
+ if (!('keySize' in value) || value['keySize'] === undefined) return false;
55
+ if (!('encoding' in value) || value['encoding'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function PasswordEncryptionInfoFromJSON(json: any): PasswordEncryptionInfo {
60
+ return PasswordEncryptionInfoFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function PasswordEncryptionInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordEncryptionInfo {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'algorithm': json['algorithm'],
70
+ 'hash': json['hash'],
71
+ 'keySize': json['keySize'],
72
+ 'encoding': json['encoding'],
73
+ };
74
+ }
75
+
76
+ export function PasswordEncryptionInfoToJSON(json: any): PasswordEncryptionInfo {
77
+ return PasswordEncryptionInfoToJSONTyped(json, false);
78
+ }
79
+
80
+ export function PasswordEncryptionInfoToJSONTyped(value?: PasswordEncryptionInfo | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'algorithm': value['algorithm'],
88
+ 'hash': value['hash'],
89
+ 'keySize': value['keySize'],
90
+ 'encoding': value['encoding'],
91
+ };
92
+ }
93
+
@@ -26,7 +26,7 @@ export interface VpsCredentials {
26
26
  */
27
27
  username: string;
28
28
  /**
29
- * Password for VPS access
29
+ * Password for VPS access. Always returned as "<redacted>" from get-details; plaintext passwords are never included in API responses.
30
30
  * @type {string}
31
31
  * @memberof VpsCredentials
32
32
  */
@@ -55,6 +55,13 @@ import {
55
55
  VpsNetworkRateToJSON,
56
56
  VpsNetworkRateToJSONTyped,
57
57
  } from './VpsNetworkRate.js';
58
+ import type { VpsIpAddressDetail } from './VpsIpAddressDetail.js';
59
+ import {
60
+ VpsIpAddressDetailFromJSON,
61
+ VpsIpAddressDetailFromJSONTyped,
62
+ VpsIpAddressDetailToJSON,
63
+ VpsIpAddressDetailToJSONTyped,
64
+ } from './VpsIpAddressDetail.js';
58
65
  import type { VpsMemoryInfo } from './VpsMemoryInfo.js';
59
66
  import {
60
67
  VpsMemoryInfoFromJSON,
@@ -113,11 +120,11 @@ export interface VpsDetailsResponse {
113
120
  */
114
121
  networkRate?: VpsNetworkRate;
115
122
  /**
116
- * List of IP addresses assigned to the VPS
117
- * @type {Array<string>}
123
+ * List of IP addresses assigned to the VPS, including subnet, gateway, and MAC
124
+ * @type {Array<VpsIpAddressDetail>}
118
125
  * @memberof VpsDetailsResponse
119
126
  */
120
- ipAddresses: Array<string>;
127
+ ipAddresses: Array<VpsIpAddressDetail>;
121
128
  /**
122
129
  *
123
130
  * @type {VpsCredentials}
@@ -169,7 +176,7 @@ export function VpsDetailsResponseFromJSONTyped(json: any, ignoreDiscriminator:
169
176
  'memory': VpsMemoryInfoFromJSON(json['memory']),
170
177
  'disk': VpsDiskInfoFromJSON(json['disk']),
171
178
  'networkRate': json['network_rate'] == null ? undefined : VpsNetworkRateFromJSON(json['network_rate']),
172
- 'ipAddresses': json['ip_addresses'],
179
+ 'ipAddresses': ((json['ip_addresses'] as Array<any>).map(VpsIpAddressDetailFromJSON)),
173
180
  'credentials': VpsCredentialsFromJSON(json['credentials']),
174
181
  'availableFeatures': VpsAvailableFeaturesFromJSON(json['available_features']),
175
182
  'osInfo': json['os_info'] == null ? undefined : VpsOsInfoFromJSON(json['os_info']),
@@ -193,7 +200,7 @@ export function VpsDetailsResponseToJSONTyped(value?: VpsDetailsResponse | null,
193
200
  'memory': VpsMemoryInfoToJSON(value['memory']),
194
201
  'disk': VpsDiskInfoToJSON(value['disk']),
195
202
  'network_rate': VpsNetworkRateToJSON(value['networkRate']),
196
- 'ip_addresses': value['ipAddresses'],
203
+ 'ip_addresses': ((value['ipAddresses'] as Array<any>).map(VpsIpAddressDetailToJSON)),
197
204
  'credentials': VpsCredentialsToJSON(value['credentials']),
198
205
  'available_features': VpsAvailableFeaturesToJSON(value['availableFeatures']),
199
206
  'os_info': VpsOsInfoToJSON(value['osInfo']),