@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.
- package/dist/apis/VPSManagementApi.d.ts +18 -3
- package/dist/apis/VPSManagementApi.js +49 -2
- package/dist/esm/apis/VPSManagementApi.d.ts +18 -3
- package/dist/esm/apis/VPSManagementApi.js +50 -3
- package/dist/esm/models/EncryptedPasswordResponseData.d.ts +45 -0
- package/dist/esm/models/EncryptedPasswordResponseData.js +52 -0
- package/dist/esm/models/GetEncryptedPasswordRequestContent.d.ts +38 -0
- package/dist/esm/models/GetEncryptedPasswordRequestContent.js +47 -0
- package/dist/esm/models/GetEncryptedPasswordResponseContent.d.ts +40 -0
- package/dist/esm/models/GetEncryptedPasswordResponseContent.js +49 -0
- package/dist/esm/models/NoVncConsoleDetails.d.ts +19 -1
- package/dist/esm/models/NoVncConsoleDetails.js +7 -3
- package/dist/esm/models/PasswordEncryptionInfo.d.ts +50 -0
- package/dist/esm/models/PasswordEncryptionInfo.js +55 -0
- package/dist/esm/models/VpsCredentials.d.ts +1 -1
- package/dist/esm/models/VpsDetailsResponse.d.ts +4 -3
- package/dist/esm/models/VpsDetailsResponse.js +3 -2
- package/dist/esm/models/VpsIpAddressDetail.d.ts +56 -0
- package/dist/esm/models/VpsIpAddressDetail.js +51 -0
- package/dist/esm/models/VpsVmInfo.d.ts +3 -3
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/esm/retryablePaths.js +1 -0
- package/dist/models/EncryptedPasswordResponseData.d.ts +45 -0
- package/dist/models/EncryptedPasswordResponseData.js +59 -0
- package/dist/models/GetEncryptedPasswordRequestContent.d.ts +38 -0
- package/dist/models/GetEncryptedPasswordRequestContent.js +54 -0
- package/dist/models/GetEncryptedPasswordResponseContent.d.ts +40 -0
- package/dist/models/GetEncryptedPasswordResponseContent.js +56 -0
- package/dist/models/NoVncConsoleDetails.d.ts +19 -1
- package/dist/models/NoVncConsoleDetails.js +7 -3
- package/dist/models/PasswordEncryptionInfo.d.ts +50 -0
- package/dist/models/PasswordEncryptionInfo.js +62 -0
- package/dist/models/VpsCredentials.d.ts +1 -1
- package/dist/models/VpsDetailsResponse.d.ts +4 -3
- package/dist/models/VpsDetailsResponse.js +3 -2
- package/dist/models/VpsIpAddressDetail.d.ts +56 -0
- package/dist/models/VpsIpAddressDetail.js +58 -0
- package/dist/models/VpsVmInfo.d.ts +3 -3
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/dist/retryablePaths.js +1 -0
- package/dist.zip +0 -0
- package/docs/EncryptedPasswordResponseData.md +39 -0
- package/docs/GetEncryptedPasswordRequestContent.md +36 -0
- package/docs/GetEncryptedPasswordResponseContent.md +36 -0
- package/docs/NoVncConsoleDetails.md +6 -0
- package/docs/PasswordEncryptionInfo.md +41 -0
- package/docs/VPSManagementApi.md +81 -1
- package/docs/VpsDetailsResponse.md +1 -1
- package/docs/VpsIpAddressDetail.md +43 -0
- package/docs/VpsVmInfo.md +1 -1
- package/package.json +1 -1
- package/src/apis/VPSManagementApi.ts +67 -2
- package/src/models/EncryptedPasswordResponseData.ts +92 -0
- package/src/models/GetEncryptedPasswordRequestContent.ts +75 -0
- package/src/models/GetEncryptedPasswordResponseContent.ts +92 -0
- package/src/models/NoVncConsoleDetails.ts +26 -3
- package/src/models/PasswordEncryptionInfo.ts +93 -0
- package/src/models/VpsCredentials.ts +1 -1
- package/src/models/VpsDetailsResponse.ts +12 -5
- package/src/models/VpsIpAddressDetail.ts +98 -0
- package/src/models/VpsVmInfo.ts +3 -3
- package/src/models/index.ts +5 -0
- package/src/retryablePaths.ts +1 -0
|
@@ -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;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* HostAfricaApi
|
|
6
|
+
* HostAfrica API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.1.0 - 2026-07-16
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfPasswordEncryptionInfo = instanceOfPasswordEncryptionInfo;
|
|
17
|
+
exports.PasswordEncryptionInfoFromJSON = PasswordEncryptionInfoFromJSON;
|
|
18
|
+
exports.PasswordEncryptionInfoFromJSONTyped = PasswordEncryptionInfoFromJSONTyped;
|
|
19
|
+
exports.PasswordEncryptionInfoToJSON = PasswordEncryptionInfoToJSON;
|
|
20
|
+
exports.PasswordEncryptionInfoToJSONTyped = PasswordEncryptionInfoToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the PasswordEncryptionInfo interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfPasswordEncryptionInfo(value) {
|
|
25
|
+
if (!('algorithm' in value) || value['algorithm'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('hash' in value) || value['hash'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('keySize' in value) || value['keySize'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('encoding' in value) || value['encoding'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function PasswordEncryptionInfoFromJSON(json) {
|
|
36
|
+
return PasswordEncryptionInfoFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function PasswordEncryptionInfoFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'algorithm': json['algorithm'],
|
|
44
|
+
'hash': json['hash'],
|
|
45
|
+
'keySize': json['keySize'],
|
|
46
|
+
'encoding': json['encoding'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function PasswordEncryptionInfoToJSON(json) {
|
|
50
|
+
return PasswordEncryptionInfoToJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function PasswordEncryptionInfoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'algorithm': value['algorithm'],
|
|
58
|
+
'hash': value['hash'],
|
|
59
|
+
'keySize': value['keySize'],
|
|
60
|
+
'encoding': value['encoding'],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -22,7 +22,7 @@ export interface VpsCredentials {
|
|
|
22
22
|
*/
|
|
23
23
|
username: string;
|
|
24
24
|
/**
|
|
25
|
-
* Password for VPS access
|
|
25
|
+
* Password for VPS access. Always returned as "<redacted>" from get-details; plaintext passwords are never included in API responses.
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof VpsCredentials
|
|
28
28
|
*/
|
|
@@ -15,6 +15,7 @@ import type { VpsCredentials } from './VpsCredentials.js';
|
|
|
15
15
|
import type { VpsOsInfo } from './VpsOsInfo.js';
|
|
16
16
|
import type { VpsCpuInfo } from './VpsCpuInfo.js';
|
|
17
17
|
import type { VpsNetworkRate } from './VpsNetworkRate.js';
|
|
18
|
+
import type { VpsIpAddressDetail } from './VpsIpAddressDetail.js';
|
|
18
19
|
import type { VpsMemoryInfo } from './VpsMemoryInfo.js';
|
|
19
20
|
import type { VpsVmInfo } from './VpsVmInfo.js';
|
|
20
21
|
/**
|
|
@@ -60,11 +61,11 @@ export interface VpsDetailsResponse {
|
|
|
60
61
|
*/
|
|
61
62
|
networkRate?: VpsNetworkRate;
|
|
62
63
|
/**
|
|
63
|
-
* List of IP addresses assigned to the VPS
|
|
64
|
-
* @type {Array<
|
|
64
|
+
* List of IP addresses assigned to the VPS, including subnet, gateway, and MAC
|
|
65
|
+
* @type {Array<VpsIpAddressDetail>}
|
|
65
66
|
* @memberof VpsDetailsResponse
|
|
66
67
|
*/
|
|
67
|
-
ipAddresses: Array<
|
|
68
|
+
ipAddresses: Array<VpsIpAddressDetail>;
|
|
68
69
|
/**
|
|
69
70
|
*
|
|
70
71
|
* @type {VpsCredentials}
|
|
@@ -24,6 +24,7 @@ const VpsCredentials_js_1 = require("./VpsCredentials.js");
|
|
|
24
24
|
const VpsOsInfo_js_1 = require("./VpsOsInfo.js");
|
|
25
25
|
const VpsCpuInfo_js_1 = require("./VpsCpuInfo.js");
|
|
26
26
|
const VpsNetworkRate_js_1 = require("./VpsNetworkRate.js");
|
|
27
|
+
const VpsIpAddressDetail_js_1 = require("./VpsIpAddressDetail.js");
|
|
27
28
|
const VpsMemoryInfo_js_1 = require("./VpsMemoryInfo.js");
|
|
28
29
|
const VpsVmInfo_js_1 = require("./VpsVmInfo.js");
|
|
29
30
|
/**
|
|
@@ -62,7 +63,7 @@ function VpsDetailsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
62
63
|
'memory': (0, VpsMemoryInfo_js_1.VpsMemoryInfoFromJSON)(json['memory']),
|
|
63
64
|
'disk': (0, VpsDiskInfo_js_1.VpsDiskInfoFromJSON)(json['disk']),
|
|
64
65
|
'networkRate': json['network_rate'] == null ? undefined : (0, VpsNetworkRate_js_1.VpsNetworkRateFromJSON)(json['network_rate']),
|
|
65
|
-
'ipAddresses': json['ip_addresses'],
|
|
66
|
+
'ipAddresses': (json['ip_addresses'].map(VpsIpAddressDetail_js_1.VpsIpAddressDetailFromJSON)),
|
|
66
67
|
'credentials': (0, VpsCredentials_js_1.VpsCredentialsFromJSON)(json['credentials']),
|
|
67
68
|
'availableFeatures': (0, VpsAvailableFeatures_js_1.VpsAvailableFeaturesFromJSON)(json['available_features']),
|
|
68
69
|
'osInfo': json['os_info'] == null ? undefined : (0, VpsOsInfo_js_1.VpsOsInfoFromJSON)(json['os_info']),
|
|
@@ -82,7 +83,7 @@ function VpsDetailsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
82
83
|
'memory': (0, VpsMemoryInfo_js_1.VpsMemoryInfoToJSON)(value['memory']),
|
|
83
84
|
'disk': (0, VpsDiskInfo_js_1.VpsDiskInfoToJSON)(value['disk']),
|
|
84
85
|
'network_rate': (0, VpsNetworkRate_js_1.VpsNetworkRateToJSON)(value['networkRate']),
|
|
85
|
-
'ip_addresses': value['ipAddresses'],
|
|
86
|
+
'ip_addresses': (value['ipAddresses'].map(VpsIpAddressDetail_js_1.VpsIpAddressDetailToJSON)),
|
|
86
87
|
'credentials': (0, VpsCredentials_js_1.VpsCredentialsToJSON)(value['credentials']),
|
|
87
88
|
'available_features': (0, VpsAvailableFeatures_js_1.VpsAvailableFeaturesToJSON)(value['availableFeatures']),
|
|
88
89
|
'os_info': (0, VpsOsInfo_js_1.VpsOsInfoToJSON)(value['osInfo']),
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
* Detailed IP address assignment for a VPS
|
|
14
|
+
* @export
|
|
15
|
+
* @interface VpsIpAddressDetail
|
|
16
|
+
*/
|
|
17
|
+
export interface VpsIpAddressDetail {
|
|
18
|
+
/**
|
|
19
|
+
* Primary IP address
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof VpsIpAddressDetail
|
|
22
|
+
*/
|
|
23
|
+
ip: string;
|
|
24
|
+
/**
|
|
25
|
+
* IP address (may mirror ip)
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof VpsIpAddressDetail
|
|
28
|
+
*/
|
|
29
|
+
address?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Subnet mask
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof VpsIpAddressDetail
|
|
34
|
+
*/
|
|
35
|
+
subnet?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Gateway address
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof VpsIpAddressDetail
|
|
40
|
+
*/
|
|
41
|
+
gateway?: string;
|
|
42
|
+
/**
|
|
43
|
+
* MAC address when available
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof VpsIpAddressDetail
|
|
46
|
+
*/
|
|
47
|
+
mac?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the VpsIpAddressDetail interface.
|
|
51
|
+
*/
|
|
52
|
+
export declare function instanceOfVpsIpAddressDetail(value: object): value is VpsIpAddressDetail;
|
|
53
|
+
export declare function VpsIpAddressDetailFromJSON(json: any): VpsIpAddressDetail;
|
|
54
|
+
export declare function VpsIpAddressDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): VpsIpAddressDetail;
|
|
55
|
+
export declare function VpsIpAddressDetailToJSON(json: any): VpsIpAddressDetail;
|
|
56
|
+
export declare function VpsIpAddressDetailToJSONTyped(value?: VpsIpAddressDetail | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* HostAfricaApi
|
|
6
|
+
* HostAfrica API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.1.0 - 2026-07-16
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfVpsIpAddressDetail = instanceOfVpsIpAddressDetail;
|
|
17
|
+
exports.VpsIpAddressDetailFromJSON = VpsIpAddressDetailFromJSON;
|
|
18
|
+
exports.VpsIpAddressDetailFromJSONTyped = VpsIpAddressDetailFromJSONTyped;
|
|
19
|
+
exports.VpsIpAddressDetailToJSON = VpsIpAddressDetailToJSON;
|
|
20
|
+
exports.VpsIpAddressDetailToJSONTyped = VpsIpAddressDetailToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the VpsIpAddressDetail interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfVpsIpAddressDetail(value) {
|
|
25
|
+
if (!('ip' in value) || value['ip'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function VpsIpAddressDetailFromJSON(json) {
|
|
30
|
+
return VpsIpAddressDetailFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function VpsIpAddressDetailFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'ip': json['ip'],
|
|
38
|
+
'address': json['address'] == null ? undefined : json['address'],
|
|
39
|
+
'subnet': json['subnet'] == null ? undefined : json['subnet'],
|
|
40
|
+
'gateway': json['gateway'] == null ? undefined : json['gateway'],
|
|
41
|
+
'mac': json['mac'] == null ? undefined : json['mac'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function VpsIpAddressDetailToJSON(json) {
|
|
45
|
+
return VpsIpAddressDetailToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function VpsIpAddressDetailToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'ip': value['ip'],
|
|
53
|
+
'address': value['address'],
|
|
54
|
+
'subnet': value['subnet'],
|
|
55
|
+
'gateway': value['gateway'],
|
|
56
|
+
'mac': value['mac'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -40,11 +40,11 @@ export interface VpsVmInfo {
|
|
|
40
40
|
*/
|
|
41
41
|
hostname?: string;
|
|
42
42
|
/**
|
|
43
|
-
* Boot devices configuration
|
|
44
|
-
* @type {string}
|
|
43
|
+
* Boot devices configuration (e.g., scsi0, scsi1)
|
|
44
|
+
* @type {Array<string>}
|
|
45
45
|
* @memberof VpsVmInfo
|
|
46
46
|
*/
|
|
47
|
-
bootDevices?: string
|
|
47
|
+
bootDevices?: Array<string>;
|
|
48
48
|
/**
|
|
49
49
|
* Proxmox VM ID
|
|
50
50
|
* @type {string}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -95,6 +95,7 @@ export * from './EditBackupScheduleRequestContent.js';
|
|
|
95
95
|
export * from './EditBackupScheduleResponseContent.js';
|
|
96
96
|
export * from './EditDnsRecordRequestContent.js';
|
|
97
97
|
export * from './EditDnsRecordResponseContent.js';
|
|
98
|
+
export * from './EncryptedPasswordResponseData.js';
|
|
98
99
|
export * from './FirewallListResponseData.js';
|
|
99
100
|
export * from './FirewallMoveDirection.js';
|
|
100
101
|
export * from './FirewallMoveResponseData.js';
|
|
@@ -114,6 +115,8 @@ export * from './GetDomainContactsResponseContent.js';
|
|
|
114
115
|
export * from './GetDomainData.js';
|
|
115
116
|
export * from './GetDomainRequestContent.js';
|
|
116
117
|
export * from './GetDomainResponseContent.js';
|
|
118
|
+
export * from './GetEncryptedPasswordRequestContent.js';
|
|
119
|
+
export * from './GetEncryptedPasswordResponseContent.js';
|
|
117
120
|
export * from './GetNoVncConsoleRequestContent.js';
|
|
118
121
|
export * from './GetNoVncConsoleResponseContent.js';
|
|
119
122
|
export * from './GetVpsConfigRequestContent.js';
|
|
@@ -174,6 +177,7 @@ export * from './OperationStatus.js';
|
|
|
174
177
|
export * from './Order.js';
|
|
175
178
|
export * from './OrderLastAttempt.js';
|
|
176
179
|
export * from './OrderWarning.js';
|
|
180
|
+
export * from './PasswordEncryptionInfo.js';
|
|
177
181
|
export * from './PaymentError.js';
|
|
178
182
|
export * from './PaymentStatus.js';
|
|
179
183
|
export * from './PowerTask.js';
|
|
@@ -270,6 +274,7 @@ export * from './VpsCpuInfo.js';
|
|
|
270
274
|
export * from './VpsCredentials.js';
|
|
271
275
|
export * from './VpsDetailsResponse.js';
|
|
272
276
|
export * from './VpsDiskInfo.js';
|
|
277
|
+
export * from './VpsIpAddressDetail.js';
|
|
273
278
|
export * from './VpsMemoryInfo.js';
|
|
274
279
|
export * from './VpsNetworkRate.js';
|
|
275
280
|
export * from './VpsOsInfo.js';
|
package/dist/models/index.js
CHANGED
|
@@ -113,6 +113,7 @@ __exportStar(require("./EditBackupScheduleRequestContent.js"), exports);
|
|
|
113
113
|
__exportStar(require("./EditBackupScheduleResponseContent.js"), exports);
|
|
114
114
|
__exportStar(require("./EditDnsRecordRequestContent.js"), exports);
|
|
115
115
|
__exportStar(require("./EditDnsRecordResponseContent.js"), exports);
|
|
116
|
+
__exportStar(require("./EncryptedPasswordResponseData.js"), exports);
|
|
116
117
|
__exportStar(require("./FirewallListResponseData.js"), exports);
|
|
117
118
|
__exportStar(require("./FirewallMoveDirection.js"), exports);
|
|
118
119
|
__exportStar(require("./FirewallMoveResponseData.js"), exports);
|
|
@@ -132,6 +133,8 @@ __exportStar(require("./GetDomainContactsResponseContent.js"), exports);
|
|
|
132
133
|
__exportStar(require("./GetDomainData.js"), exports);
|
|
133
134
|
__exportStar(require("./GetDomainRequestContent.js"), exports);
|
|
134
135
|
__exportStar(require("./GetDomainResponseContent.js"), exports);
|
|
136
|
+
__exportStar(require("./GetEncryptedPasswordRequestContent.js"), exports);
|
|
137
|
+
__exportStar(require("./GetEncryptedPasswordResponseContent.js"), exports);
|
|
135
138
|
__exportStar(require("./GetNoVncConsoleRequestContent.js"), exports);
|
|
136
139
|
__exportStar(require("./GetNoVncConsoleResponseContent.js"), exports);
|
|
137
140
|
__exportStar(require("./GetVpsConfigRequestContent.js"), exports);
|
|
@@ -192,6 +195,7 @@ __exportStar(require("./OperationStatus.js"), exports);
|
|
|
192
195
|
__exportStar(require("./Order.js"), exports);
|
|
193
196
|
__exportStar(require("./OrderLastAttempt.js"), exports);
|
|
194
197
|
__exportStar(require("./OrderWarning.js"), exports);
|
|
198
|
+
__exportStar(require("./PasswordEncryptionInfo.js"), exports);
|
|
195
199
|
__exportStar(require("./PaymentError.js"), exports);
|
|
196
200
|
__exportStar(require("./PaymentStatus.js"), exports);
|
|
197
201
|
__exportStar(require("./PowerTask.js"), exports);
|
|
@@ -288,6 +292,7 @@ __exportStar(require("./VpsCpuInfo.js"), exports);
|
|
|
288
292
|
__exportStar(require("./VpsCredentials.js"), exports);
|
|
289
293
|
__exportStar(require("./VpsDetailsResponse.js"), exports);
|
|
290
294
|
__exportStar(require("./VpsDiskInfo.js"), exports);
|
|
295
|
+
__exportStar(require("./VpsIpAddressDetail.js"), exports);
|
|
291
296
|
__exportStar(require("./VpsMemoryInfo.js"), exports);
|
|
292
297
|
__exportStar(require("./VpsNetworkRate.js"), exports);
|
|
293
298
|
__exportStar(require("./VpsOsInfo.js"), exports);
|
package/dist/retryablePaths.js
CHANGED
package/dist.zip
CHANGED
|
Binary file
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# EncryptedPasswordResponseData
|
|
3
|
+
|
|
4
|
+
Response data for get-encrypted-password
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`username` | string
|
|
11
|
+
`password` | string
|
|
12
|
+
`encryption` | [PasswordEncryptionInfo](PasswordEncryptionInfo.md)
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { EncryptedPasswordResponseData } from '@hostafrica/ha-sdk-typescript'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"username": null,
|
|
22
|
+
"password": null,
|
|
23
|
+
"encryption": null,
|
|
24
|
+
} satisfies EncryptedPasswordResponseData
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as EncryptedPasswordResponseData
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# GetEncryptedPasswordRequestContent
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`serviceId` | string
|
|
10
|
+
`publicKey` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { GetEncryptedPasswordRequestContent } from '@hostafrica/ha-sdk-typescript'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"serviceId": null,
|
|
20
|
+
"publicKey": null,
|
|
21
|
+
} satisfies GetEncryptedPasswordRequestContent
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetEncryptedPasswordRequestContent
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# GetEncryptedPasswordResponseContent
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`status` | [OperationStatus](OperationStatus.md)
|
|
10
|
+
`data` | [EncryptedPasswordResponseData](EncryptedPasswordResponseData.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { GetEncryptedPasswordResponseContent } from '@hostafrica/ha-sdk-typescript'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"status": null,
|
|
20
|
+
"data": null,
|
|
21
|
+
} satisfies GetEncryptedPasswordResponseContent
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetEncryptedPasswordResponseContent
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -8,6 +8,9 @@ noVNC console connection details
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`novncRedirectUrl` | string
|
|
11
|
+
`mode` | string
|
|
12
|
+
`websocketUrl` | string
|
|
13
|
+
`password` | string
|
|
11
14
|
|
|
12
15
|
## Example
|
|
13
16
|
|
|
@@ -17,6 +20,9 @@ import type { NoVncConsoleDetails } from '@hostafrica/ha-sdk-typescript'
|
|
|
17
20
|
// TODO: Update the object below with actual values
|
|
18
21
|
const example = {
|
|
19
22
|
"novncRedirectUrl": null,
|
|
23
|
+
"mode": null,
|
|
24
|
+
"websocketUrl": null,
|
|
25
|
+
"password": null,
|
|
20
26
|
} satisfies NoVncConsoleDetails
|
|
21
27
|
|
|
22
28
|
console.log(example)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
# PasswordEncryptionInfo
|
|
3
|
+
|
|
4
|
+
Encryption metadata for an RSA-OAEP encrypted password
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`algorithm` | string
|
|
11
|
+
`hash` | string
|
|
12
|
+
`keySize` | number
|
|
13
|
+
`encoding` | string
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { PasswordEncryptionInfo } from '@hostafrica/ha-sdk-typescript'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"algorithm": null,
|
|
23
|
+
"hash": null,
|
|
24
|
+
"keySize": null,
|
|
25
|
+
"encoding": null,
|
|
26
|
+
} satisfies PasswordEncryptionInfo
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as PasswordEncryptionInfo
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|
package/docs/VPSManagementApi.md
CHANGED
|
@@ -4,6 +4,7 @@ All URIs are relative to *https://api.hostafrica.com*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
| [**getEncryptedPassword**](VPSManagementApi.md#getencryptedpassword) | **POST** /vps/get-encrypted-password | |
|
|
7
8
|
| [**getVpsConfig**](VPSManagementApi.md#getvpsconfig) | **POST** /vps/get-config | |
|
|
8
9
|
| [**getVpsDetails**](VPSManagementApi.md#getvpsdetails) | **POST** /vps/get-details | |
|
|
9
10
|
| [**listIsos**](VPSManagementApi.md#listisos) | **POST** /vps/list-isos | |
|
|
@@ -15,6 +16,85 @@ All URIs are relative to *https://api.hostafrica.com*
|
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
|
|
19
|
+
## getEncryptedPassword
|
|
20
|
+
|
|
21
|
+
> GetEncryptedPasswordResponseContent getEncryptedPassword(getEncryptedPasswordRequestContent)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
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).
|
|
26
|
+
|
|
27
|
+
### Example
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import {
|
|
31
|
+
Configuration,
|
|
32
|
+
VPSManagementApi,
|
|
33
|
+
} from '@hostafrica/ha-sdk-typescript';
|
|
34
|
+
import type { GetEncryptedPasswordRequest } from '@hostafrica/ha-sdk-typescript';
|
|
35
|
+
|
|
36
|
+
async function example() {
|
|
37
|
+
console.log("🚀 Testing @hostafrica/ha-sdk-typescript SDK...");
|
|
38
|
+
const config = new Configuration({
|
|
39
|
+
// Configure HTTP bearer authorization: BearerAuth
|
|
40
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
41
|
+
});
|
|
42
|
+
const api = new VPSManagementApi(config);
|
|
43
|
+
|
|
44
|
+
const body = {
|
|
45
|
+
// GetEncryptedPasswordRequestContent
|
|
46
|
+
getEncryptedPasswordRequestContent: ...,
|
|
47
|
+
} satisfies GetEncryptedPasswordRequest;
|
|
48
|
+
|
|
49
|
+
try {
|
|
50
|
+
const data = await api.getEncryptedPassword(body);
|
|
51
|
+
console.log(data);
|
|
52
|
+
} catch (error) {
|
|
53
|
+
console.error(error);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Run the test
|
|
58
|
+
example().catch(console.error);
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Parameters
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
| Name | Type | Description | Notes |
|
|
65
|
+
|------------- | ------------- | ------------- | -------------|
|
|
66
|
+
| **getEncryptedPasswordRequestContent** | [GetEncryptedPasswordRequestContent](GetEncryptedPasswordRequestContent.md) | | |
|
|
67
|
+
|
|
68
|
+
### Return type
|
|
69
|
+
|
|
70
|
+
[**GetEncryptedPasswordResponseContent**](GetEncryptedPasswordResponseContent.md)
|
|
71
|
+
|
|
72
|
+
### Authorization
|
|
73
|
+
|
|
74
|
+
[BearerAuth](../README.md#BearerAuth)
|
|
75
|
+
|
|
76
|
+
### HTTP request headers
|
|
77
|
+
|
|
78
|
+
- **Content-Type**: `application/json`
|
|
79
|
+
- **Accept**: `application/json`
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### HTTP response details
|
|
83
|
+
| Status code | Description | Response headers |
|
|
84
|
+
|-------------|-------------|------------------|
|
|
85
|
+
| **200** | GetEncryptedPassword 200 response | - |
|
|
86
|
+
| **400** | BadRequestError 400 response | - |
|
|
87
|
+
| **401** | UnauthorizedError 401 response | - |
|
|
88
|
+
| **403** | ForbiddenError 403 response | - |
|
|
89
|
+
| **404** | ResourceNotFoundError 404 response | - |
|
|
90
|
+
| **422** | ValidationError 422 response | - |
|
|
91
|
+
| **429** | TooManyRequestsError 429 response | * Retry-After - Number of seconds to wait before retrying <br> |
|
|
92
|
+
| **500** | InternalServiceError 500 response | - |
|
|
93
|
+
| **503** | ServiceUnavailableError 503 response | * Retry-After - Number of seconds to wait before retrying <br> |
|
|
94
|
+
|
|
95
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
96
|
+
|
|
97
|
+
|
|
18
98
|
## getVpsConfig
|
|
19
99
|
|
|
20
100
|
> GetVpsConfigResponseContent getVpsConfig(getVpsConfigRequestContent)
|
|
@@ -100,7 +180,7 @@ example().catch(console.error);
|
|
|
100
180
|
|
|
101
181
|
|
|
102
182
|
|
|
103
|
-
Gets detailed information about a VPS service including configuration, network settings, and statistics
|
|
183
|
+
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).
|
|
104
184
|
|
|
105
185
|
### Example
|
|
106
186
|
|
|
@@ -12,7 +12,7 @@ Name | Type
|
|
|
12
12
|
`memory` | [VpsMemoryInfo](VpsMemoryInfo.md)
|
|
13
13
|
`disk` | [VpsDiskInfo](VpsDiskInfo.md)
|
|
14
14
|
`networkRate` | [VpsNetworkRate](VpsNetworkRate.md)
|
|
15
|
-
`ipAddresses` | Array<
|
|
15
|
+
`ipAddresses` | [Array<VpsIpAddressDetail>](VpsIpAddressDetail.md)
|
|
16
16
|
`credentials` | [VpsCredentials](VpsCredentials.md)
|
|
17
17
|
`availableFeatures` | [VpsAvailableFeatures](VpsAvailableFeatures.md)
|
|
18
18
|
`osInfo` | [VpsOsInfo](VpsOsInfo.md)
|