@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
@@ -10,7 +10,10 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
- import type { GetVpsConfigRequestContent, GetVpsConfigResponseContent, GetVpsDetailsRequestContent, GetVpsDetailsResponseContent, ListIsosRequestContent, ListIsosResponseContent, ListReinstallOsRequestContent, ListReinstallOsResponseContent, ListVpsServicesResponseContent, MountIsoRequestContent, MountIsoResponseContent, TriggerReinstallRequestContent, TriggerReinstallResponseContent, UpdateVpsConfigRequestContent, UpdateVpsConfigResponseContent } from '../models/index.js';
13
+ import type { GetEncryptedPasswordRequestContent, GetEncryptedPasswordResponseContent, GetVpsConfigRequestContent, GetVpsConfigResponseContent, GetVpsDetailsRequestContent, GetVpsDetailsResponseContent, ListIsosRequestContent, ListIsosResponseContent, ListReinstallOsRequestContent, ListReinstallOsResponseContent, ListVpsServicesResponseContent, MountIsoRequestContent, MountIsoResponseContent, TriggerReinstallRequestContent, TriggerReinstallResponseContent, UpdateVpsConfigRequestContent, UpdateVpsConfigResponseContent } from '../models/index.js';
14
+ export interface GetEncryptedPasswordRequest {
15
+ getEncryptedPasswordRequestContent: GetEncryptedPasswordRequestContent;
16
+ }
14
17
  export interface GetVpsConfigRequest {
15
18
  getVpsConfigRequestContent: GetVpsConfigRequestContent;
16
19
  }
@@ -36,6 +39,18 @@ export interface UpdateVpsConfigRequest {
36
39
  *
37
40
  */
38
41
  export declare class VPSManagementApi extends runtime.BaseAPI {
42
+ /**
43
+ * Creates request options for getEncryptedPassword without sending the request
44
+ */
45
+ getEncryptedPasswordRequestOpts(requestParameters: GetEncryptedPasswordRequest): Promise<runtime.RequestOpts>;
46
+ /**
47
+ * 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).
48
+ */
49
+ getEncryptedPasswordRaw(requestParameters: GetEncryptedPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetEncryptedPasswordResponseContent>>;
50
+ /**
51
+ * 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).
52
+ */
53
+ getEncryptedPassword(requestParameters: GetEncryptedPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetEncryptedPasswordResponseContent>;
39
54
  /**
40
55
  * Creates request options for getVpsConfig without sending the request
41
56
  */
@@ -53,11 +68,11 @@ export declare class VPSManagementApi extends runtime.BaseAPI {
53
68
  */
54
69
  getVpsDetailsRequestOpts(requestParameters: GetVpsDetailsRequest): Promise<runtime.RequestOpts>;
55
70
  /**
56
- * Gets detailed information about a VPS service including configuration, network settings, and statistics
71
+ * 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).
57
72
  */
58
73
  getVpsDetailsRaw(requestParameters: GetVpsDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetVpsDetailsResponseContent>>;
59
74
  /**
60
- * Gets detailed information about a VPS service including configuration, network settings, and statistics
75
+ * 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).
61
76
  */
62
77
  getVpsDetails(requestParameters: GetVpsDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetVpsDetailsResponseContent>;
63
78
  /**
@@ -29,6 +29,53 @@ const index_js_1 = require("../models/index.js");
29
29
  *
30
30
  */
31
31
  class VPSManagementApi extends runtime.BaseAPI {
32
+ /**
33
+ * Creates request options for getEncryptedPassword without sending the request
34
+ */
35
+ getEncryptedPasswordRequestOpts(requestParameters) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (requestParameters['getEncryptedPasswordRequestContent'] == null) {
38
+ throw new runtime.RequiredError('getEncryptedPasswordRequestContent', 'Required parameter "getEncryptedPasswordRequestContent" was null or undefined when calling getEncryptedPassword().');
39
+ }
40
+ const queryParameters = {};
41
+ const headerParameters = {};
42
+ headerParameters['Content-Type'] = 'application/json';
43
+ if (this.configuration && this.configuration.accessToken) {
44
+ const token = this.configuration.accessToken;
45
+ const tokenString = yield token("BearerAuth", []);
46
+ if (tokenString) {
47
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
48
+ }
49
+ }
50
+ let urlPath = `/vps/get-encrypted-password`;
51
+ return {
52
+ path: urlPath,
53
+ method: 'POST',
54
+ headers: headerParameters,
55
+ query: queryParameters,
56
+ body: (0, index_js_1.GetEncryptedPasswordRequestContentToJSON)(requestParameters['getEncryptedPasswordRequestContent']),
57
+ };
58
+ });
59
+ }
60
+ /**
61
+ * 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).
62
+ */
63
+ getEncryptedPasswordRaw(requestParameters, initOverrides) {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ const requestOptions = yield this.getEncryptedPasswordRequestOpts(requestParameters);
66
+ const response = yield this.request(requestOptions, initOverrides);
67
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.GetEncryptedPasswordResponseContentFromJSON)(jsonValue));
68
+ });
69
+ }
70
+ /**
71
+ * 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).
72
+ */
73
+ getEncryptedPassword(requestParameters, initOverrides) {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ const response = yield this.getEncryptedPasswordRaw(requestParameters, initOverrides);
76
+ return yield response.value();
77
+ });
78
+ }
32
79
  /**
33
80
  * Creates request options for getVpsConfig without sending the request
34
81
  */
@@ -105,7 +152,7 @@ class VPSManagementApi extends runtime.BaseAPI {
105
152
  });
106
153
  }
107
154
  /**
108
- * Gets detailed information about a VPS service including configuration, network settings, and statistics
155
+ * 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).
109
156
  */
110
157
  getVpsDetailsRaw(requestParameters, initOverrides) {
111
158
  return __awaiter(this, void 0, void 0, function* () {
@@ -115,7 +162,7 @@ class VPSManagementApi extends runtime.BaseAPI {
115
162
  });
116
163
  }
117
164
  /**
118
- * Gets detailed information about a VPS service including configuration, network settings, and statistics
165
+ * 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).
119
166
  */
120
167
  getVpsDetails(requestParameters, initOverrides) {
121
168
  return __awaiter(this, void 0, void 0, function* () {
@@ -10,7 +10,10 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
- import type { GetVpsConfigRequestContent, GetVpsConfigResponseContent, GetVpsDetailsRequestContent, GetVpsDetailsResponseContent, ListIsosRequestContent, ListIsosResponseContent, ListReinstallOsRequestContent, ListReinstallOsResponseContent, ListVpsServicesResponseContent, MountIsoRequestContent, MountIsoResponseContent, TriggerReinstallRequestContent, TriggerReinstallResponseContent, UpdateVpsConfigRequestContent, UpdateVpsConfigResponseContent } from '../models/index.js';
13
+ import type { GetEncryptedPasswordRequestContent, GetEncryptedPasswordResponseContent, GetVpsConfigRequestContent, GetVpsConfigResponseContent, GetVpsDetailsRequestContent, GetVpsDetailsResponseContent, ListIsosRequestContent, ListIsosResponseContent, ListReinstallOsRequestContent, ListReinstallOsResponseContent, ListVpsServicesResponseContent, MountIsoRequestContent, MountIsoResponseContent, TriggerReinstallRequestContent, TriggerReinstallResponseContent, UpdateVpsConfigRequestContent, UpdateVpsConfigResponseContent } from '../models/index.js';
14
+ export interface GetEncryptedPasswordRequest {
15
+ getEncryptedPasswordRequestContent: GetEncryptedPasswordRequestContent;
16
+ }
14
17
  export interface GetVpsConfigRequest {
15
18
  getVpsConfigRequestContent: GetVpsConfigRequestContent;
16
19
  }
@@ -36,6 +39,18 @@ export interface UpdateVpsConfigRequest {
36
39
  *
37
40
  */
38
41
  export declare class VPSManagementApi extends runtime.BaseAPI {
42
+ /**
43
+ * Creates request options for getEncryptedPassword without sending the request
44
+ */
45
+ getEncryptedPasswordRequestOpts(requestParameters: GetEncryptedPasswordRequest): Promise<runtime.RequestOpts>;
46
+ /**
47
+ * 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).
48
+ */
49
+ getEncryptedPasswordRaw(requestParameters: GetEncryptedPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetEncryptedPasswordResponseContent>>;
50
+ /**
51
+ * 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).
52
+ */
53
+ getEncryptedPassword(requestParameters: GetEncryptedPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetEncryptedPasswordResponseContent>;
39
54
  /**
40
55
  * Creates request options for getVpsConfig without sending the request
41
56
  */
@@ -53,11 +68,11 @@ export declare class VPSManagementApi extends runtime.BaseAPI {
53
68
  */
54
69
  getVpsDetailsRequestOpts(requestParameters: GetVpsDetailsRequest): Promise<runtime.RequestOpts>;
55
70
  /**
56
- * Gets detailed information about a VPS service including configuration, network settings, and statistics
71
+ * 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).
57
72
  */
58
73
  getVpsDetailsRaw(requestParameters: GetVpsDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetVpsDetailsResponseContent>>;
59
74
  /**
60
- * Gets detailed information about a VPS service including configuration, network settings, and statistics
75
+ * 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).
61
76
  */
62
77
  getVpsDetails(requestParameters: GetVpsDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetVpsDetailsResponseContent>;
63
78
  /**
@@ -21,11 +21,58 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime.js';
24
- import { GetVpsConfigRequestContentToJSON, GetVpsConfigResponseContentFromJSON, GetVpsDetailsRequestContentToJSON, GetVpsDetailsResponseContentFromJSON, ListIsosRequestContentToJSON, ListIsosResponseContentFromJSON, ListReinstallOsRequestContentToJSON, ListReinstallOsResponseContentFromJSON, ListVpsServicesResponseContentFromJSON, MountIsoRequestContentToJSON, MountIsoResponseContentFromJSON, TriggerReinstallRequestContentToJSON, TriggerReinstallResponseContentFromJSON, UpdateVpsConfigRequestContentToJSON, UpdateVpsConfigResponseContentFromJSON, } from '../models/index.js';
24
+ import { GetEncryptedPasswordRequestContentToJSON, GetEncryptedPasswordResponseContentFromJSON, GetVpsConfigRequestContentToJSON, GetVpsConfigResponseContentFromJSON, GetVpsDetailsRequestContentToJSON, GetVpsDetailsResponseContentFromJSON, ListIsosRequestContentToJSON, ListIsosResponseContentFromJSON, ListReinstallOsRequestContentToJSON, ListReinstallOsResponseContentFromJSON, ListVpsServicesResponseContentFromJSON, MountIsoRequestContentToJSON, MountIsoResponseContentFromJSON, TriggerReinstallRequestContentToJSON, TriggerReinstallResponseContentFromJSON, UpdateVpsConfigRequestContentToJSON, UpdateVpsConfigResponseContentFromJSON, } from '../models/index.js';
25
25
  /**
26
26
  *
27
27
  */
28
28
  export class VPSManagementApi extends runtime.BaseAPI {
29
+ /**
30
+ * Creates request options for getEncryptedPassword without sending the request
31
+ */
32
+ getEncryptedPasswordRequestOpts(requestParameters) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['getEncryptedPasswordRequestContent'] == null) {
35
+ throw new runtime.RequiredError('getEncryptedPasswordRequestContent', 'Required parameter "getEncryptedPasswordRequestContent" was null or undefined when calling getEncryptedPassword().');
36
+ }
37
+ const queryParameters = {};
38
+ const headerParameters = {};
39
+ headerParameters['Content-Type'] = 'application/json';
40
+ if (this.configuration && this.configuration.accessToken) {
41
+ const token = this.configuration.accessToken;
42
+ const tokenString = yield token("BearerAuth", []);
43
+ if (tokenString) {
44
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
45
+ }
46
+ }
47
+ let urlPath = `/vps/get-encrypted-password`;
48
+ return {
49
+ path: urlPath,
50
+ method: 'POST',
51
+ headers: headerParameters,
52
+ query: queryParameters,
53
+ body: GetEncryptedPasswordRequestContentToJSON(requestParameters['getEncryptedPasswordRequestContent']),
54
+ };
55
+ });
56
+ }
57
+ /**
58
+ * 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).
59
+ */
60
+ getEncryptedPasswordRaw(requestParameters, initOverrides) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ const requestOptions = yield this.getEncryptedPasswordRequestOpts(requestParameters);
63
+ const response = yield this.request(requestOptions, initOverrides);
64
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetEncryptedPasswordResponseContentFromJSON(jsonValue));
65
+ });
66
+ }
67
+ /**
68
+ * 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).
69
+ */
70
+ getEncryptedPassword(requestParameters, initOverrides) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ const response = yield this.getEncryptedPasswordRaw(requestParameters, initOverrides);
73
+ return yield response.value();
74
+ });
75
+ }
29
76
  /**
30
77
  * Creates request options for getVpsConfig without sending the request
31
78
  */
@@ -102,7 +149,7 @@ export class VPSManagementApi extends runtime.BaseAPI {
102
149
  });
103
150
  }
104
151
  /**
105
- * Gets detailed information about a VPS service including configuration, network settings, and statistics
152
+ * 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).
106
153
  */
107
154
  getVpsDetailsRaw(requestParameters, initOverrides) {
108
155
  return __awaiter(this, void 0, void 0, function* () {
@@ -112,7 +159,7 @@ export class VPSManagementApi extends runtime.BaseAPI {
112
159
  });
113
160
  }
114
161
  /**
115
- * Gets detailed information about a VPS service including configuration, network settings, and statistics
162
+ * 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).
116
163
  */
117
164
  getVpsDetails(requestParameters, initOverrides) {
118
165
  return __awaiter(this, void 0, void 0, function* () {
@@ -0,0 +1,45 @@
1
+ /**
2
+ * HostAfricaApi
3
+ * HostAfrica API
4
+ *
5
+ * The version of the OpenAPI document: 1.1.0 - 2026-07-16
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { PasswordEncryptionInfo } from './PasswordEncryptionInfo.js';
13
+ /**
14
+ * Response data for get-encrypted-password
15
+ * @export
16
+ * @interface EncryptedPasswordResponseData
17
+ */
18
+ export interface EncryptedPasswordResponseData {
19
+ /**
20
+ * Username for VPS access (plaintext)
21
+ * @type {string}
22
+ * @memberof EncryptedPasswordResponseData
23
+ */
24
+ username: string;
25
+ /**
26
+ * 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.
27
+ * @type {string}
28
+ * @memberof EncryptedPasswordResponseData
29
+ */
30
+ password: string;
31
+ /**
32
+ *
33
+ * @type {PasswordEncryptionInfo}
34
+ * @memberof EncryptedPasswordResponseData
35
+ */
36
+ encryption: PasswordEncryptionInfo;
37
+ }
38
+ /**
39
+ * Check if a given object implements the EncryptedPasswordResponseData interface.
40
+ */
41
+ export declare function instanceOfEncryptedPasswordResponseData(value: object): value is EncryptedPasswordResponseData;
42
+ export declare function EncryptedPasswordResponseDataFromJSON(json: any): EncryptedPasswordResponseData;
43
+ export declare function EncryptedPasswordResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): EncryptedPasswordResponseData;
44
+ export declare function EncryptedPasswordResponseDataToJSON(json: any): EncryptedPasswordResponseData;
45
+ export declare function EncryptedPasswordResponseDataToJSONTyped(value?: EncryptedPasswordResponseData | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,52 @@
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
+ import { PasswordEncryptionInfoFromJSON, PasswordEncryptionInfoToJSON, } from './PasswordEncryptionInfo.js';
15
+ /**
16
+ * Check if a given object implements the EncryptedPasswordResponseData interface.
17
+ */
18
+ export function instanceOfEncryptedPasswordResponseData(value) {
19
+ if (!('username' in value) || value['username'] === undefined)
20
+ return false;
21
+ if (!('password' in value) || value['password'] === undefined)
22
+ return false;
23
+ if (!('encryption' in value) || value['encryption'] === undefined)
24
+ return false;
25
+ return true;
26
+ }
27
+ export function EncryptedPasswordResponseDataFromJSON(json) {
28
+ return EncryptedPasswordResponseDataFromJSONTyped(json, false);
29
+ }
30
+ export function EncryptedPasswordResponseDataFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'username': json['username'],
36
+ 'password': json['password'],
37
+ 'encryption': PasswordEncryptionInfoFromJSON(json['encryption']),
38
+ };
39
+ }
40
+ export function EncryptedPasswordResponseDataToJSON(json) {
41
+ return EncryptedPasswordResponseDataToJSONTyped(json, false);
42
+ }
43
+ export function EncryptedPasswordResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'username': value['username'],
49
+ 'password': value['password'],
50
+ 'encryption': PasswordEncryptionInfoToJSON(value['encryption']),
51
+ };
52
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * HostAfricaApi
3
+ * HostAfrica API
4
+ *
5
+ * The version of the OpenAPI document: 1.1.0 - 2026-07-16
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface GetEncryptedPasswordRequestContent
16
+ */
17
+ export interface GetEncryptedPasswordRequestContent {
18
+ /**
19
+ * Service ID - must be sent as a string
20
+ * @type {string}
21
+ * @memberof GetEncryptedPasswordRequestContent
22
+ */
23
+ serviceId: string;
24
+ /**
25
+ * 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.
26
+ * @type {string}
27
+ * @memberof GetEncryptedPasswordRequestContent
28
+ */
29
+ publicKey: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the GetEncryptedPasswordRequestContent interface.
33
+ */
34
+ export declare function instanceOfGetEncryptedPasswordRequestContent(value: object): value is GetEncryptedPasswordRequestContent;
35
+ export declare function GetEncryptedPasswordRequestContentFromJSON(json: any): GetEncryptedPasswordRequestContent;
36
+ export declare function GetEncryptedPasswordRequestContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetEncryptedPasswordRequestContent;
37
+ export declare function GetEncryptedPasswordRequestContentToJSON(json: any): GetEncryptedPasswordRequestContent;
38
+ export declare function GetEncryptedPasswordRequestContentToJSONTyped(value?: GetEncryptedPasswordRequestContent | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,47 @@
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
+ * Check if a given object implements the GetEncryptedPasswordRequestContent interface.
16
+ */
17
+ export function instanceOfGetEncryptedPasswordRequestContent(value) {
18
+ if (!('serviceId' in value) || value['serviceId'] === undefined)
19
+ return false;
20
+ if (!('publicKey' in value) || value['publicKey'] === undefined)
21
+ return false;
22
+ return true;
23
+ }
24
+ export function GetEncryptedPasswordRequestContentFromJSON(json) {
25
+ return GetEncryptedPasswordRequestContentFromJSONTyped(json, false);
26
+ }
27
+ export function GetEncryptedPasswordRequestContentFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'serviceId': json['service_id'],
33
+ 'publicKey': json['public_key'],
34
+ };
35
+ }
36
+ export function GetEncryptedPasswordRequestContentToJSON(json) {
37
+ return GetEncryptedPasswordRequestContentToJSONTyped(json, false);
38
+ }
39
+ export function GetEncryptedPasswordRequestContentToJSONTyped(value, ignoreDiscriminator = false) {
40
+ if (value == null) {
41
+ return value;
42
+ }
43
+ return {
44
+ 'service_id': value['serviceId'],
45
+ 'public_key': value['publicKey'],
46
+ };
47
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * HostAfricaApi
3
+ * HostAfrica API
4
+ *
5
+ * The version of the OpenAPI document: 1.1.0 - 2026-07-16
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { OperationStatus } from './OperationStatus.js';
13
+ import type { EncryptedPasswordResponseData } from './EncryptedPasswordResponseData.js';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface GetEncryptedPasswordResponseContent
18
+ */
19
+ export interface GetEncryptedPasswordResponseContent {
20
+ /**
21
+ *
22
+ * @type {OperationStatus}
23
+ * @memberof GetEncryptedPasswordResponseContent
24
+ */
25
+ status: OperationStatus;
26
+ /**
27
+ *
28
+ * @type {EncryptedPasswordResponseData}
29
+ * @memberof GetEncryptedPasswordResponseContent
30
+ */
31
+ data: EncryptedPasswordResponseData;
32
+ }
33
+ /**
34
+ * Check if a given object implements the GetEncryptedPasswordResponseContent interface.
35
+ */
36
+ export declare function instanceOfGetEncryptedPasswordResponseContent(value: object): value is GetEncryptedPasswordResponseContent;
37
+ export declare function GetEncryptedPasswordResponseContentFromJSON(json: any): GetEncryptedPasswordResponseContent;
38
+ export declare function GetEncryptedPasswordResponseContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetEncryptedPasswordResponseContent;
39
+ export declare function GetEncryptedPasswordResponseContentToJSON(json: any): GetEncryptedPasswordResponseContent;
40
+ export declare function GetEncryptedPasswordResponseContentToJSONTyped(value?: GetEncryptedPasswordResponseContent | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,49 @@
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
+ import { OperationStatusFromJSON, OperationStatusToJSON, } from './OperationStatus.js';
15
+ import { EncryptedPasswordResponseDataFromJSON, EncryptedPasswordResponseDataToJSON, } from './EncryptedPasswordResponseData.js';
16
+ /**
17
+ * Check if a given object implements the GetEncryptedPasswordResponseContent interface.
18
+ */
19
+ export function instanceOfGetEncryptedPasswordResponseContent(value) {
20
+ if (!('status' in value) || value['status'] === undefined)
21
+ return false;
22
+ if (!('data' in value) || value['data'] === undefined)
23
+ return false;
24
+ return true;
25
+ }
26
+ export function GetEncryptedPasswordResponseContentFromJSON(json) {
27
+ return GetEncryptedPasswordResponseContentFromJSONTyped(json, false);
28
+ }
29
+ export function GetEncryptedPasswordResponseContentFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'status': OperationStatusFromJSON(json['status']),
35
+ 'data': EncryptedPasswordResponseDataFromJSON(json['data']),
36
+ };
37
+ }
38
+ export function GetEncryptedPasswordResponseContentToJSON(json) {
39
+ return GetEncryptedPasswordResponseContentToJSONTyped(json, false);
40
+ }
41
+ export function GetEncryptedPasswordResponseContentToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'status': OperationStatusToJSON(value['status']),
47
+ 'data': EncryptedPasswordResponseDataToJSON(value['data']),
48
+ };
49
+ }
@@ -20,7 +20,25 @@ export interface NoVncConsoleDetails {
20
20
  * @type {string}
21
21
  * @memberof NoVncConsoleDetails
22
22
  */
23
- novncRedirectUrl: string;
23
+ novncRedirectUrl?: string;
24
+ /**
25
+ * Console connection mode
26
+ * @type {string}
27
+ * @memberof NoVncConsoleDetails
28
+ */
29
+ mode?: string;
30
+ /**
31
+ * WebSocket URL for proxied console access
32
+ * @type {string}
33
+ * @memberof NoVncConsoleDetails
34
+ */
35
+ websocketUrl?: string;
36
+ /**
37
+ * Password for proxied console access
38
+ * @type {string}
39
+ * @memberof NoVncConsoleDetails
40
+ */
41
+ password?: string;
24
42
  }
25
43
  /**
26
44
  * Check if a given object implements the NoVncConsoleDetails interface.
@@ -15,8 +15,6 @@
15
15
  * Check if a given object implements the NoVncConsoleDetails interface.
16
16
  */
17
17
  export function instanceOfNoVncConsoleDetails(value) {
18
- if (!('novncRedirectUrl' in value) || value['novncRedirectUrl'] === undefined)
19
- return false;
20
18
  return true;
21
19
  }
22
20
  export function NoVncConsoleDetailsFromJSON(json) {
@@ -27,7 +25,10 @@ export function NoVncConsoleDetailsFromJSONTyped(json, ignoreDiscriminator) {
27
25
  return json;
28
26
  }
29
27
  return {
30
- 'novncRedirectUrl': json['novnc_redirect_url'],
28
+ 'novncRedirectUrl': json['novnc_redirect_url'] == null ? undefined : json['novnc_redirect_url'],
29
+ 'mode': json['mode'] == null ? undefined : json['mode'],
30
+ 'websocketUrl': json['websocket_url'] == null ? undefined : json['websocket_url'],
31
+ 'password': json['password'] == null ? undefined : json['password'],
31
32
  };
32
33
  }
33
34
  export function NoVncConsoleDetailsToJSON(json) {
@@ -39,5 +40,8 @@ export function NoVncConsoleDetailsToJSONTyped(value, ignoreDiscriminator = fals
39
40
  }
40
41
  return {
41
42
  'novnc_redirect_url': value['novncRedirectUrl'],
43
+ 'mode': value['mode'],
44
+ 'websocket_url': value['websocketUrl'],
45
+ 'password': value['password'],
42
46
  };
43
47
  }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * HostAfricaApi
3
+ * HostAfrica API
4
+ *
5
+ * The version of the OpenAPI document: 1.1.0 - 2026-07-16
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Encryption metadata for an RSA-OAEP encrypted password
14
+ * @export
15
+ * @interface PasswordEncryptionInfo
16
+ */
17
+ export interface PasswordEncryptionInfo {
18
+ /**
19
+ * Asymmetric encryption algorithm. Always "RSA-OAEP".
20
+ * @type {string}
21
+ * @memberof PasswordEncryptionInfo
22
+ */
23
+ algorithm: string;
24
+ /**
25
+ * OAEP hash / MGF1 hash function. Always "SHA-256".
26
+ * @type {string}
27
+ * @memberof PasswordEncryptionInfo
28
+ */
29
+ hash: string;
30
+ /**
31
+ * RSA modulus size in bits. Always 4096.
32
+ * @type {number}
33
+ * @memberof PasswordEncryptionInfo
34
+ */
35
+ keySize: number;
36
+ /**
37
+ * Encoding of the password ciphertext field. Always "base64" (standard alphabet, not URL-safe).
38
+ * @type {string}
39
+ * @memberof PasswordEncryptionInfo
40
+ */
41
+ encoding: string;
42
+ }
43
+ /**
44
+ * Check if a given object implements the PasswordEncryptionInfo interface.
45
+ */
46
+ export declare function instanceOfPasswordEncryptionInfo(value: object): value is PasswordEncryptionInfo;
47
+ export declare function PasswordEncryptionInfoFromJSON(json: any): PasswordEncryptionInfo;
48
+ export declare function PasswordEncryptionInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordEncryptionInfo;
49
+ export declare function PasswordEncryptionInfoToJSON(json: any): PasswordEncryptionInfo;
50
+ export declare function PasswordEncryptionInfoToJSONTyped(value?: PasswordEncryptionInfo | null, ignoreDiscriminator?: boolean): any;