@hostafrica/ha-sdk-typescript 1.1.3 → 1.1.5
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/BillingApi.d.ts +45 -0
- package/dist/apis/BillingApi.js +122 -0
- package/dist/apis/DNSApi.d.ts +8 -8
- package/dist/apis/DNSApi.js +8 -8
- package/dist/apis/VPSManagementApi.d.ts +18 -3
- package/dist/apis/VPSManagementApi.js +49 -2
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/BillingApi.d.ts +45 -0
- package/dist/esm/apis/BillingApi.js +118 -0
- package/dist/esm/apis/DNSApi.d.ts +8 -8
- package/dist/esm/apis/DNSApi.js +8 -8
- package/dist/esm/apis/VPSManagementApi.d.ts +18 -3
- package/dist/esm/apis/VPSManagementApi.js +50 -3
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AddDnsRecordRequestContent.d.ts +22 -3
- package/dist/esm/models/AddDnsRecordRequestContent.js +8 -3
- package/dist/esm/models/DeleteDnsRecordRequestContent.d.ts +22 -3
- package/dist/esm/models/DeleteDnsRecordRequestContent.js +8 -3
- package/dist/esm/models/DnsBackend.d.ts +28 -0
- package/dist/esm/models/DnsBackend.js +46 -0
- package/dist/esm/models/DnsRecordMutationRecord.d.ts +3 -2
- package/dist/esm/models/DnsZoneInfo.d.ts +7 -0
- package/dist/esm/models/DnsZoneInfo.js +3 -0
- package/dist/esm/models/EditDnsRecordRequestContent.d.ts +22 -3
- package/dist/esm/models/EditDnsRecordRequestContent.js +8 -3
- package/dist/esm/models/EncryptedPasswordResponseData.d.ts +45 -0
- package/dist/esm/models/EncryptedPasswordResponseData.js +52 -0
- package/dist/esm/models/GetDnsZoneDetailsRequestContent.d.ts +7 -0
- package/dist/esm/models/GetDnsZoneDetailsRequestContent.js +3 -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/GetInvoiceDetailsRequestContent.d.ts +32 -0
- package/dist/esm/models/GetInvoiceDetailsRequestContent.js +43 -0
- package/dist/esm/models/GetInvoiceDetailsResponseContent.d.ts +40 -0
- package/dist/esm/models/GetInvoiceDetailsResponseContent.js +49 -0
- package/dist/esm/models/GetInvoiceDetailsResponseData.d.ts +40 -0
- package/dist/esm/models/GetInvoiceDetailsResponseData.js +47 -0
- package/dist/esm/models/InvoiceDetails.d.ts +143 -0
- package/dist/esm/models/InvoiceDetails.js +112 -0
- package/dist/esm/models/InvoiceIssuedTo.d.ts +69 -0
- package/dist/esm/models/InvoiceIssuedTo.js +66 -0
- package/dist/esm/models/InvoiceIssuedToTax.d.ts +44 -0
- package/dist/esm/models/InvoiceIssuedToTax.js +51 -0
- package/dist/esm/models/InvoiceItem.d.ts +56 -0
- package/dist/esm/models/InvoiceItem.js +59 -0
- package/dist/esm/models/InvoiceSummary.d.ts +98 -0
- package/dist/esm/models/InvoiceSummary.js +83 -0
- package/dist/esm/models/InvoiceTransaction.d.ts +74 -0
- package/dist/esm/models/InvoiceTransaction.js +57 -0
- package/dist/esm/models/ListInvoicesResponseContent.d.ts +40 -0
- package/dist/esm/models/ListInvoicesResponseContent.js +49 -0
- package/dist/esm/models/ListInvoicesResponseData.d.ts +39 -0
- package/dist/esm/models/ListInvoicesResponseData.js +48 -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/SelcomMetadata.d.ts +56 -0
- package/dist/esm/models/SelcomMetadata.js +59 -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 +18 -0
- package/dist/esm/models/index.js +18 -0
- package/dist/esm/retryablePaths.js +3 -0
- package/dist/models/AddDnsRecordRequestContent.d.ts +22 -3
- package/dist/models/AddDnsRecordRequestContent.js +8 -3
- package/dist/models/DeleteDnsRecordRequestContent.d.ts +22 -3
- package/dist/models/DeleteDnsRecordRequestContent.js +8 -3
- package/dist/models/DnsBackend.d.ts +28 -0
- package/dist/models/DnsBackend.js +54 -0
- package/dist/models/DnsRecordMutationRecord.d.ts +3 -2
- package/dist/models/DnsZoneInfo.d.ts +7 -0
- package/dist/models/DnsZoneInfo.js +3 -0
- package/dist/models/EditDnsRecordRequestContent.d.ts +22 -3
- package/dist/models/EditDnsRecordRequestContent.js +8 -3
- package/dist/models/EncryptedPasswordResponseData.d.ts +45 -0
- package/dist/models/EncryptedPasswordResponseData.js +59 -0
- package/dist/models/GetDnsZoneDetailsRequestContent.d.ts +7 -0
- package/dist/models/GetDnsZoneDetailsRequestContent.js +3 -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/GetInvoiceDetailsRequestContent.d.ts +32 -0
- package/dist/models/GetInvoiceDetailsRequestContent.js +50 -0
- package/dist/models/GetInvoiceDetailsResponseContent.d.ts +40 -0
- package/dist/models/GetInvoiceDetailsResponseContent.js +56 -0
- package/dist/models/GetInvoiceDetailsResponseData.d.ts +40 -0
- package/dist/models/GetInvoiceDetailsResponseData.js +54 -0
- package/dist/models/InvoiceDetails.d.ts +143 -0
- package/dist/models/InvoiceDetails.js +119 -0
- package/dist/models/InvoiceIssuedTo.d.ts +69 -0
- package/dist/models/InvoiceIssuedTo.js +73 -0
- package/dist/models/InvoiceIssuedToTax.d.ts +44 -0
- package/dist/models/InvoiceIssuedToTax.js +58 -0
- package/dist/models/InvoiceItem.d.ts +56 -0
- package/dist/models/InvoiceItem.js +66 -0
- package/dist/models/InvoiceSummary.d.ts +98 -0
- package/dist/models/InvoiceSummary.js +90 -0
- package/dist/models/InvoiceTransaction.d.ts +74 -0
- package/dist/models/InvoiceTransaction.js +64 -0
- package/dist/models/ListInvoicesResponseContent.d.ts +40 -0
- package/dist/models/ListInvoicesResponseContent.js +56 -0
- package/dist/models/ListInvoicesResponseData.d.ts +39 -0
- package/dist/models/ListInvoicesResponseData.js +55 -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/SelcomMetadata.d.ts +56 -0
- package/dist/models/SelcomMetadata.js +66 -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 +18 -0
- package/dist/models/index.js +18 -0
- package/dist/retryablePaths.js +3 -0
- package/dist.zip +0 -0
- package/docs/AddDnsRecordRequestContent.md +6 -0
- package/docs/BillingApi.md +159 -0
- package/docs/DNSApi.md +4 -4
- package/docs/DeleteDnsRecordRequestContent.md +6 -0
- package/docs/DnsBackend.md +33 -0
- package/docs/DnsRecordMutationRecord.md +1 -1
- package/docs/DnsZoneInfo.md +2 -0
- package/docs/EditDnsRecordRequestContent.md +6 -0
- package/docs/EncryptedPasswordResponseData.md +39 -0
- package/docs/GetDnsZoneDetailsRequestContent.md +2 -0
- package/docs/GetEncryptedPasswordRequestContent.md +36 -0
- package/docs/GetEncryptedPasswordResponseContent.md +36 -0
- package/docs/GetInvoiceDetailsRequestContent.md +34 -0
- package/docs/GetInvoiceDetailsResponseContent.md +36 -0
- package/docs/GetInvoiceDetailsResponseData.md +37 -0
- package/docs/InvoiceDetails.md +71 -0
- package/docs/InvoiceIssuedTo.md +47 -0
- package/docs/InvoiceIssuedToTax.md +39 -0
- package/docs/InvoiceItem.md +43 -0
- package/docs/InvoiceSummary.md +57 -0
- package/docs/InvoiceTransaction.md +49 -0
- package/docs/ListInvoicesResponseContent.md +36 -0
- package/docs/ListInvoicesResponseData.md +37 -0
- package/docs/NoVncConsoleDetails.md +6 -0
- package/docs/PasswordEncryptionInfo.md +41 -0
- package/docs/SelcomMetadata.md +43 -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/BillingApi.ts +164 -0
- package/src/apis/DNSApi.ts +8 -8
- package/src/apis/VPSManagementApi.ts +67 -2
- package/src/apis/index.ts +1 -0
- package/src/models/AddDnsRecordRequestContent.ts +37 -5
- package/src/models/DeleteDnsRecordRequestContent.ts +37 -5
- package/src/models/DnsBackend.ts +56 -0
- package/src/models/DnsRecordMutationRecord.ts +3 -2
- package/src/models/DnsZoneInfo.ts +17 -0
- package/src/models/EditDnsRecordRequestContent.ts +37 -5
- package/src/models/EncryptedPasswordResponseData.ts +92 -0
- package/src/models/GetDnsZoneDetailsRequestContent.ts +18 -0
- package/src/models/GetEncryptedPasswordRequestContent.ts +75 -0
- package/src/models/GetEncryptedPasswordResponseContent.ts +92 -0
- package/src/models/GetInvoiceDetailsRequestContent.ts +66 -0
- package/src/models/GetInvoiceDetailsResponseContent.ts +92 -0
- package/src/models/GetInvoiceDetailsResponseData.ts +89 -0
- package/src/models/InvoiceDetails.ts +247 -0
- package/src/models/InvoiceIssuedTo.ts +127 -0
- package/src/models/InvoiceIssuedToTax.ts +84 -0
- package/src/models/InvoiceItem.ts +102 -0
- package/src/models/InvoiceSummary.ts +163 -0
- package/src/models/InvoiceTransaction.ts +122 -0
- package/src/models/ListInvoicesResponseContent.ts +92 -0
- package/src/models/ListInvoicesResponseData.ts +83 -0
- package/src/models/NoVncConsoleDetails.ts +26 -3
- package/src/models/PasswordEncryptionInfo.ts +93 -0
- package/src/models/SelcomMetadata.ts +102 -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 +18 -0
- package/src/retryablePaths.ts +3 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
# InvoiceItem
|
|
3
|
+
|
|
4
|
+
A single invoice line item
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | number
|
|
11
|
+
`type` | string
|
|
12
|
+
`description` | string
|
|
13
|
+
`amount` | string
|
|
14
|
+
`taxed` | number
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { InvoiceItem } from '@hostafrica/ha-sdk-typescript'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"id": null,
|
|
24
|
+
"type": null,
|
|
25
|
+
"description": null,
|
|
26
|
+
"amount": null,
|
|
27
|
+
"taxed": null,
|
|
28
|
+
} satisfies InvoiceItem
|
|
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 InvoiceItem
|
|
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
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
|
|
2
|
+
# InvoiceSummary
|
|
3
|
+
|
|
4
|
+
Summary of an invoice in the list-invoices response
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`invoiceId` | string
|
|
11
|
+
`invoiceNumber` | string
|
|
12
|
+
`date` | string
|
|
13
|
+
`dueDate` | string
|
|
14
|
+
`status` | string
|
|
15
|
+
`tax` | string
|
|
16
|
+
`tax2` | string
|
|
17
|
+
`taxRate` | string
|
|
18
|
+
`taxRate2` | string
|
|
19
|
+
`total` | string
|
|
20
|
+
`subtotal` | string
|
|
21
|
+
`grandTotal` | string
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import type { InvoiceSummary } from '@hostafrica/ha-sdk-typescript'
|
|
27
|
+
|
|
28
|
+
// TODO: Update the object below with actual values
|
|
29
|
+
const example = {
|
|
30
|
+
"invoiceId": null,
|
|
31
|
+
"invoiceNumber": null,
|
|
32
|
+
"date": null,
|
|
33
|
+
"dueDate": null,
|
|
34
|
+
"status": null,
|
|
35
|
+
"tax": null,
|
|
36
|
+
"tax2": null,
|
|
37
|
+
"taxRate": null,
|
|
38
|
+
"taxRate2": null,
|
|
39
|
+
"total": null,
|
|
40
|
+
"subtotal": null,
|
|
41
|
+
"grandTotal": null,
|
|
42
|
+
} satisfies InvoiceSummary
|
|
43
|
+
|
|
44
|
+
console.log(example)
|
|
45
|
+
|
|
46
|
+
// Convert the instance to a JSON string
|
|
47
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
48
|
+
console.log(exampleJSON)
|
|
49
|
+
|
|
50
|
+
// Parse the JSON string back to an object
|
|
51
|
+
const exampleParsed = JSON.parse(exampleJSON) as InvoiceSummary
|
|
52
|
+
console.log(exampleParsed)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
56
|
+
|
|
57
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
# InvoiceTransaction
|
|
3
|
+
|
|
4
|
+
A payment or refund transaction recorded against an invoice
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | number
|
|
11
|
+
`gateway` | string
|
|
12
|
+
`date` | string
|
|
13
|
+
`description` | string
|
|
14
|
+
`amountIn` | string
|
|
15
|
+
`fees` | string
|
|
16
|
+
`amountOut` | string
|
|
17
|
+
`transId` | string
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import type { InvoiceTransaction } from '@hostafrica/ha-sdk-typescript'
|
|
23
|
+
|
|
24
|
+
// TODO: Update the object below with actual values
|
|
25
|
+
const example = {
|
|
26
|
+
"id": null,
|
|
27
|
+
"gateway": null,
|
|
28
|
+
"date": null,
|
|
29
|
+
"description": null,
|
|
30
|
+
"amountIn": null,
|
|
31
|
+
"fees": null,
|
|
32
|
+
"amountOut": null,
|
|
33
|
+
"transId": null,
|
|
34
|
+
} satisfies InvoiceTransaction
|
|
35
|
+
|
|
36
|
+
console.log(example)
|
|
37
|
+
|
|
38
|
+
// Convert the instance to a JSON string
|
|
39
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
40
|
+
console.log(exampleJSON)
|
|
41
|
+
|
|
42
|
+
// Parse the JSON string back to an object
|
|
43
|
+
const exampleParsed = JSON.parse(exampleJSON) as InvoiceTransaction
|
|
44
|
+
console.log(exampleParsed)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
48
|
+
|
|
49
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# ListInvoicesResponseContent
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`status` | [OperationStatus](OperationStatus.md)
|
|
10
|
+
`data` | [ListInvoicesResponseData](ListInvoicesResponseData.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { ListInvoicesResponseContent } 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 ListInvoicesResponseContent
|
|
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 ListInvoicesResponseContent
|
|
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,37 @@
|
|
|
1
|
+
|
|
2
|
+
# ListInvoicesResponseData
|
|
3
|
+
|
|
4
|
+
Top-level data payload for the ListInvoices response
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`invoices` | [Array<InvoiceSummary>](InvoiceSummary.md)
|
|
11
|
+
`totalCount` | number
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ListInvoicesResponseData } from '@hostafrica/ha-sdk-typescript'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"invoices": null,
|
|
21
|
+
"totalCount": null,
|
|
22
|
+
} satisfies ListInvoicesResponseData
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as ListInvoicesResponseData
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
|
@@ -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
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
# SelcomMetadata
|
|
3
|
+
|
|
4
|
+
Selcom alt-gateway payment details included on an invoice when configured
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`amount` | string
|
|
11
|
+
`pesaAccount` | string
|
|
12
|
+
`mobileReference` | string
|
|
13
|
+
`ussdCode` | string
|
|
14
|
+
`instructions` | string
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { SelcomMetadata } from '@hostafrica/ha-sdk-typescript'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"amount": null,
|
|
24
|
+
"pesaAccount": null,
|
|
25
|
+
"mobileReference": null,
|
|
26
|
+
"ussdCode": null,
|
|
27
|
+
"instructions": null,
|
|
28
|
+
} satisfies SelcomMetadata
|
|
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 SelcomMetadata
|
|
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/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)
|
|
@@ -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
package/package.json
CHANGED
|
@@ -0,0 +1,164 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime.js';
|
|
17
|
+
import type {
|
|
18
|
+
BadRequestErrorResponseContent,
|
|
19
|
+
ForbiddenErrorResponseContent,
|
|
20
|
+
GetInvoiceDetailsRequestContent,
|
|
21
|
+
GetInvoiceDetailsResponseContent,
|
|
22
|
+
InternalServiceErrorResponseContent,
|
|
23
|
+
ListInvoicesResponseContent,
|
|
24
|
+
ResourceNotFoundErrorResponseContent,
|
|
25
|
+
ServiceUnavailableErrorResponseContent,
|
|
26
|
+
TooManyRequestsErrorResponseContent,
|
|
27
|
+
UnauthorizedErrorResponseContent,
|
|
28
|
+
ValidationErrorResponseContent,
|
|
29
|
+
} from '../models/index.js';
|
|
30
|
+
import {
|
|
31
|
+
BadRequestErrorResponseContentFromJSON,
|
|
32
|
+
BadRequestErrorResponseContentToJSON,
|
|
33
|
+
ForbiddenErrorResponseContentFromJSON,
|
|
34
|
+
ForbiddenErrorResponseContentToJSON,
|
|
35
|
+
GetInvoiceDetailsRequestContentFromJSON,
|
|
36
|
+
GetInvoiceDetailsRequestContentToJSON,
|
|
37
|
+
GetInvoiceDetailsResponseContentFromJSON,
|
|
38
|
+
GetInvoiceDetailsResponseContentToJSON,
|
|
39
|
+
InternalServiceErrorResponseContentFromJSON,
|
|
40
|
+
InternalServiceErrorResponseContentToJSON,
|
|
41
|
+
ListInvoicesResponseContentFromJSON,
|
|
42
|
+
ListInvoicesResponseContentToJSON,
|
|
43
|
+
ResourceNotFoundErrorResponseContentFromJSON,
|
|
44
|
+
ResourceNotFoundErrorResponseContentToJSON,
|
|
45
|
+
ServiceUnavailableErrorResponseContentFromJSON,
|
|
46
|
+
ServiceUnavailableErrorResponseContentToJSON,
|
|
47
|
+
TooManyRequestsErrorResponseContentFromJSON,
|
|
48
|
+
TooManyRequestsErrorResponseContentToJSON,
|
|
49
|
+
UnauthorizedErrorResponseContentFromJSON,
|
|
50
|
+
UnauthorizedErrorResponseContentToJSON,
|
|
51
|
+
ValidationErrorResponseContentFromJSON,
|
|
52
|
+
ValidationErrorResponseContentToJSON,
|
|
53
|
+
} from '../models/index.js';
|
|
54
|
+
|
|
55
|
+
export interface GetInvoiceDetailsRequest {
|
|
56
|
+
getInvoiceDetailsRequestContent: GetInvoiceDetailsRequestContent;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
export class BillingApi extends runtime.BaseAPI {
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Creates request options for getInvoiceDetails without sending the request
|
|
66
|
+
*/
|
|
67
|
+
async getInvoiceDetailsRequestOpts(requestParameters: GetInvoiceDetailsRequest): Promise<runtime.RequestOpts> {
|
|
68
|
+
if (requestParameters['getInvoiceDetailsRequestContent'] == null) {
|
|
69
|
+
throw new runtime.RequiredError(
|
|
70
|
+
'getInvoiceDetailsRequestContent',
|
|
71
|
+
'Required parameter "getInvoiceDetailsRequestContent" was null or undefined when calling getInvoiceDetails().'
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const queryParameters: any = {};
|
|
76
|
+
|
|
77
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
78
|
+
|
|
79
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
80
|
+
|
|
81
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
82
|
+
const token = this.configuration.accessToken;
|
|
83
|
+
const tokenString = await token("BearerAuth", []);
|
|
84
|
+
|
|
85
|
+
if (tokenString) {
|
|
86
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
let urlPath = `/billing/get-invoice-details`;
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
path: urlPath,
|
|
94
|
+
method: 'POST',
|
|
95
|
+
headers: headerParameters,
|
|
96
|
+
query: queryParameters,
|
|
97
|
+
body: GetInvoiceDetailsRequestContentToJSON(requestParameters['getInvoiceDetailsRequestContent']),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Gets details for a single invoice, including line items, payee information, and transactions
|
|
103
|
+
*/
|
|
104
|
+
async getInvoiceDetailsRaw(requestParameters: GetInvoiceDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetInvoiceDetailsResponseContent>> {
|
|
105
|
+
const requestOptions = await this.getInvoiceDetailsRequestOpts(requestParameters);
|
|
106
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
107
|
+
|
|
108
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetInvoiceDetailsResponseContentFromJSON(jsonValue));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Gets details for a single invoice, including line items, payee information, and transactions
|
|
113
|
+
*/
|
|
114
|
+
async getInvoiceDetails(requestParameters: GetInvoiceDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetInvoiceDetailsResponseContent> {
|
|
115
|
+
const response = await this.getInvoiceDetailsRaw(requestParameters, initOverrides);
|
|
116
|
+
return await response.value();
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Creates request options for listInvoices without sending the request
|
|
121
|
+
*/
|
|
122
|
+
async listInvoicesRequestOpts(): Promise<runtime.RequestOpts> {
|
|
123
|
+
const queryParameters: any = {};
|
|
124
|
+
|
|
125
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
126
|
+
|
|
127
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
128
|
+
const token = this.configuration.accessToken;
|
|
129
|
+
const tokenString = await token("BearerAuth", []);
|
|
130
|
+
|
|
131
|
+
if (tokenString) {
|
|
132
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
let urlPath = `/billing/list-invoices`;
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
path: urlPath,
|
|
140
|
+
method: 'POST',
|
|
141
|
+
headers: headerParameters,
|
|
142
|
+
query: queryParameters,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Lists invoices for the authenticated user
|
|
148
|
+
*/
|
|
149
|
+
async listInvoicesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListInvoicesResponseContent>> {
|
|
150
|
+
const requestOptions = await this.listInvoicesRequestOpts();
|
|
151
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
152
|
+
|
|
153
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListInvoicesResponseContentFromJSON(jsonValue));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Lists invoices for the authenticated user
|
|
158
|
+
*/
|
|
159
|
+
async listInvoices(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListInvoicesResponseContent> {
|
|
160
|
+
const response = await this.listInvoicesRaw(initOverrides);
|
|
161
|
+
return await response.value();
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
}
|