@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,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 * as runtime from '../runtime.js';
|
|
13
|
+
import type { GetInvoiceDetailsRequestContent, GetInvoiceDetailsResponseContent, ListInvoicesResponseContent } from '../models/index.js';
|
|
14
|
+
export interface GetInvoiceDetailsRequest {
|
|
15
|
+
getInvoiceDetailsRequestContent: GetInvoiceDetailsRequestContent;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class BillingApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Creates request options for getInvoiceDetails without sending the request
|
|
23
|
+
*/
|
|
24
|
+
getInvoiceDetailsRequestOpts(requestParameters: GetInvoiceDetailsRequest): Promise<runtime.RequestOpts>;
|
|
25
|
+
/**
|
|
26
|
+
* Gets details for a single invoice, including line items, payee information, and transactions
|
|
27
|
+
*/
|
|
28
|
+
getInvoiceDetailsRaw(requestParameters: GetInvoiceDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetInvoiceDetailsResponseContent>>;
|
|
29
|
+
/**
|
|
30
|
+
* Gets details for a single invoice, including line items, payee information, and transactions
|
|
31
|
+
*/
|
|
32
|
+
getInvoiceDetails(requestParameters: GetInvoiceDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetInvoiceDetailsResponseContent>;
|
|
33
|
+
/**
|
|
34
|
+
* Creates request options for listInvoices without sending the request
|
|
35
|
+
*/
|
|
36
|
+
listInvoicesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
37
|
+
/**
|
|
38
|
+
* Lists invoices for the authenticated user
|
|
39
|
+
*/
|
|
40
|
+
listInvoicesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListInvoicesResponseContent>>;
|
|
41
|
+
/**
|
|
42
|
+
* Lists invoices for the authenticated user
|
|
43
|
+
*/
|
|
44
|
+
listInvoices(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListInvoicesResponseContent>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.BillingApi = void 0;
|
|
26
|
+
const runtime = require("../runtime.js");
|
|
27
|
+
const index_js_1 = require("../models/index.js");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class BillingApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Creates request options for getInvoiceDetails without sending the request
|
|
34
|
+
*/
|
|
35
|
+
getInvoiceDetailsRequestOpts(requestParameters) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['getInvoiceDetailsRequestContent'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('getInvoiceDetailsRequestContent', 'Required parameter "getInvoiceDetailsRequestContent" was null or undefined when calling getInvoiceDetails().');
|
|
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 = `/billing/get-invoice-details`;
|
|
51
|
+
return {
|
|
52
|
+
path: urlPath,
|
|
53
|
+
method: 'POST',
|
|
54
|
+
headers: headerParameters,
|
|
55
|
+
query: queryParameters,
|
|
56
|
+
body: (0, index_js_1.GetInvoiceDetailsRequestContentToJSON)(requestParameters['getInvoiceDetailsRequestContent']),
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Gets details for a single invoice, including line items, payee information, and transactions
|
|
62
|
+
*/
|
|
63
|
+
getInvoiceDetailsRaw(requestParameters, initOverrides) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const requestOptions = yield this.getInvoiceDetailsRequestOpts(requestParameters);
|
|
66
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
67
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.GetInvoiceDetailsResponseContentFromJSON)(jsonValue));
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Gets details for a single invoice, including line items, payee information, and transactions
|
|
72
|
+
*/
|
|
73
|
+
getInvoiceDetails(requestParameters, initOverrides) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
const response = yield this.getInvoiceDetailsRaw(requestParameters, initOverrides);
|
|
76
|
+
return yield response.value();
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Creates request options for listInvoices without sending the request
|
|
81
|
+
*/
|
|
82
|
+
listInvoicesRequestOpts() {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
const queryParameters = {};
|
|
85
|
+
const headerParameters = {};
|
|
86
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
87
|
+
const token = this.configuration.accessToken;
|
|
88
|
+
const tokenString = yield token("BearerAuth", []);
|
|
89
|
+
if (tokenString) {
|
|
90
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
let urlPath = `/billing/list-invoices`;
|
|
94
|
+
return {
|
|
95
|
+
path: urlPath,
|
|
96
|
+
method: 'POST',
|
|
97
|
+
headers: headerParameters,
|
|
98
|
+
query: queryParameters,
|
|
99
|
+
};
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Lists invoices for the authenticated user
|
|
104
|
+
*/
|
|
105
|
+
listInvoicesRaw(initOverrides) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
const requestOptions = yield this.listInvoicesRequestOpts();
|
|
108
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
109
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.ListInvoicesResponseContentFromJSON)(jsonValue));
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Lists invoices for the authenticated user
|
|
114
|
+
*/
|
|
115
|
+
listInvoices(initOverrides) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
const response = yield this.listInvoicesRaw(initOverrides);
|
|
118
|
+
return yield response.value();
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.BillingApi = BillingApi;
|
package/dist/apis/DNSApi.d.ts
CHANGED
|
@@ -38,11 +38,11 @@ export declare class DNSApi extends runtime.BaseAPI {
|
|
|
38
38
|
*/
|
|
39
39
|
addDnsRecordRequestOpts(requestParameters: AddDnsRecordRequest): Promise<runtime.RequestOpts>;
|
|
40
40
|
/**
|
|
41
|
-
* Adds a DNS record to a zone
|
|
41
|
+
* Adds a DNS record to a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
42
42
|
*/
|
|
43
43
|
addDnsRecordRaw(requestParameters: AddDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AddDnsRecordResponseContent>>;
|
|
44
44
|
/**
|
|
45
|
-
* Adds a DNS record to a zone
|
|
45
|
+
* Adds a DNS record to a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
46
46
|
*/
|
|
47
47
|
addDnsRecord(requestParameters: AddDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AddDnsRecordResponseContent>;
|
|
48
48
|
/**
|
|
@@ -62,11 +62,11 @@ export declare class DNSApi extends runtime.BaseAPI {
|
|
|
62
62
|
*/
|
|
63
63
|
deleteDnsRecordRequestOpts(requestParameters: DeleteDnsRecordRequest): Promise<runtime.RequestOpts>;
|
|
64
64
|
/**
|
|
65
|
-
* Deletes a DNS record from a zone
|
|
65
|
+
* Deletes a DNS record from a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
66
66
|
*/
|
|
67
67
|
deleteDnsRecordRaw(requestParameters: DeleteDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteDnsRecordResponseContent>>;
|
|
68
68
|
/**
|
|
69
|
-
* Deletes a DNS record from a zone
|
|
69
|
+
* Deletes a DNS record from a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
70
70
|
*/
|
|
71
71
|
deleteDnsRecord(requestParameters: DeleteDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteDnsRecordResponseContent>;
|
|
72
72
|
/**
|
|
@@ -86,11 +86,11 @@ export declare class DNSApi extends runtime.BaseAPI {
|
|
|
86
86
|
*/
|
|
87
87
|
editDnsRecordRequestOpts(requestParameters: EditDnsRecordRequest): Promise<runtime.RequestOpts>;
|
|
88
88
|
/**
|
|
89
|
-
* Edits a DNS record in a zone
|
|
89
|
+
* Edits a DNS record in a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
90
90
|
*/
|
|
91
91
|
editDnsRecordRaw(requestParameters: EditDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EditDnsRecordResponseContent>>;
|
|
92
92
|
/**
|
|
93
|
-
* Edits a DNS record in a zone
|
|
93
|
+
* Edits a DNS record in a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
94
94
|
*/
|
|
95
95
|
editDnsRecord(requestParameters: EditDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EditDnsRecordResponseContent>;
|
|
96
96
|
/**
|
|
@@ -98,11 +98,11 @@ export declare class DNSApi extends runtime.BaseAPI {
|
|
|
98
98
|
*/
|
|
99
99
|
getDnsZoneDetailsRequestOpts(requestParameters: GetDnsZoneDetailsRequest): Promise<runtime.RequestOpts>;
|
|
100
100
|
/**
|
|
101
|
-
* Retrieves DNS zone details and records for an owned domain.
|
|
101
|
+
* Retrieves DNS zone details and records for an owned domain. Omit backend for the legacy DNS Manager (v1) path; set backend from list-dns-zones to route DirectAdmin zones to v2.
|
|
102
102
|
*/
|
|
103
103
|
getDnsZoneDetailsRaw(requestParameters: GetDnsZoneDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDnsZoneDetailsResponseContent>>;
|
|
104
104
|
/**
|
|
105
|
-
* Retrieves DNS zone details and records for an owned domain.
|
|
105
|
+
* Retrieves DNS zone details and records for an owned domain. Omit backend for the legacy DNS Manager (v1) path; set backend from list-dns-zones to route DirectAdmin zones to v2.
|
|
106
106
|
*/
|
|
107
107
|
getDnsZoneDetails(requestParameters: GetDnsZoneDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDnsZoneDetailsResponseContent>;
|
|
108
108
|
/**
|
package/dist/apis/DNSApi.js
CHANGED
|
@@ -58,7 +58,7 @@ class DNSApi extends runtime.BaseAPI {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
* Adds a DNS record to a zone
|
|
61
|
+
* Adds a DNS record to a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
62
62
|
*/
|
|
63
63
|
addDnsRecordRaw(requestParameters, initOverrides) {
|
|
64
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -68,7 +68,7 @@ class DNSApi extends runtime.BaseAPI {
|
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
|
-
* Adds a DNS record to a zone
|
|
71
|
+
* Adds a DNS record to a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
72
72
|
*/
|
|
73
73
|
addDnsRecord(requestParameters, initOverrides) {
|
|
74
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -152,7 +152,7 @@ class DNSApi extends runtime.BaseAPI {
|
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
155
|
-
* Deletes a DNS record from a zone
|
|
155
|
+
* Deletes a DNS record from a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
156
156
|
*/
|
|
157
157
|
deleteDnsRecordRaw(requestParameters, initOverrides) {
|
|
158
158
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -162,7 +162,7 @@ class DNSApi extends runtime.BaseAPI {
|
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
/**
|
|
165
|
-
* Deletes a DNS record from a zone
|
|
165
|
+
* Deletes a DNS record from a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
166
166
|
*/
|
|
167
167
|
deleteDnsRecord(requestParameters, initOverrides) {
|
|
168
168
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -246,7 +246,7 @@ class DNSApi extends runtime.BaseAPI {
|
|
|
246
246
|
});
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
|
-
* Edits a DNS record in a zone
|
|
249
|
+
* Edits a DNS record in a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
250
250
|
*/
|
|
251
251
|
editDnsRecordRaw(requestParameters, initOverrides) {
|
|
252
252
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -256,7 +256,7 @@ class DNSApi extends runtime.BaseAPI {
|
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
259
|
-
* Edits a DNS record in a zone
|
|
259
|
+
* Edits a DNS record in a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
260
260
|
*/
|
|
261
261
|
editDnsRecord(requestParameters, initOverrides) {
|
|
262
262
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -293,7 +293,7 @@ class DNSApi extends runtime.BaseAPI {
|
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
|
-
* Retrieves DNS zone details and records for an owned domain.
|
|
296
|
+
* Retrieves DNS zone details and records for an owned domain. Omit backend for the legacy DNS Manager (v1) path; set backend from list-dns-zones to route DirectAdmin zones to v2.
|
|
297
297
|
*/
|
|
298
298
|
getDnsZoneDetailsRaw(requestParameters, initOverrides) {
|
|
299
299
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -303,7 +303,7 @@ class DNSApi extends runtime.BaseAPI {
|
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
305
|
/**
|
|
306
|
-
* Retrieves DNS zone details and records for an owned domain.
|
|
306
|
+
* Retrieves DNS zone details and records for an owned domain. Omit backend for the legacy DNS Manager (v1) path; set backend from list-dns-zones to route DirectAdmin zones to v2.
|
|
307
307
|
*/
|
|
308
308
|
getDnsZoneDetails(requestParameters, initOverrides) {
|
|
309
309
|
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
|
/**
|
|
@@ -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* () {
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
19
|
__exportStar(require("./BackupsApi.js"), exports);
|
|
20
|
+
__exportStar(require("./BillingApi.js"), exports);
|
|
20
21
|
__exportStar(require("./ConsoleAccessApi.js"), exports);
|
|
21
22
|
__exportStar(require("./DNSApi.js"), exports);
|
|
22
23
|
__exportStar(require("./DomainsApi.js"), exports);
|
|
@@ -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 * as runtime from '../runtime.js';
|
|
13
|
+
import type { GetInvoiceDetailsRequestContent, GetInvoiceDetailsResponseContent, ListInvoicesResponseContent } from '../models/index.js';
|
|
14
|
+
export interface GetInvoiceDetailsRequest {
|
|
15
|
+
getInvoiceDetailsRequestContent: GetInvoiceDetailsRequestContent;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class BillingApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Creates request options for getInvoiceDetails without sending the request
|
|
23
|
+
*/
|
|
24
|
+
getInvoiceDetailsRequestOpts(requestParameters: GetInvoiceDetailsRequest): Promise<runtime.RequestOpts>;
|
|
25
|
+
/**
|
|
26
|
+
* Gets details for a single invoice, including line items, payee information, and transactions
|
|
27
|
+
*/
|
|
28
|
+
getInvoiceDetailsRaw(requestParameters: GetInvoiceDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetInvoiceDetailsResponseContent>>;
|
|
29
|
+
/**
|
|
30
|
+
* Gets details for a single invoice, including line items, payee information, and transactions
|
|
31
|
+
*/
|
|
32
|
+
getInvoiceDetails(requestParameters: GetInvoiceDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetInvoiceDetailsResponseContent>;
|
|
33
|
+
/**
|
|
34
|
+
* Creates request options for listInvoices without sending the request
|
|
35
|
+
*/
|
|
36
|
+
listInvoicesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
37
|
+
/**
|
|
38
|
+
* Lists invoices for the authenticated user
|
|
39
|
+
*/
|
|
40
|
+
listInvoicesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListInvoicesResponseContent>>;
|
|
41
|
+
/**
|
|
42
|
+
* Lists invoices for the authenticated user
|
|
43
|
+
*/
|
|
44
|
+
listInvoices(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListInvoicesResponseContent>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime.js';
|
|
24
|
+
import { GetInvoiceDetailsRequestContentToJSON, GetInvoiceDetailsResponseContentFromJSON, ListInvoicesResponseContentFromJSON, } from '../models/index.js';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class BillingApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for getInvoiceDetails without sending the request
|
|
31
|
+
*/
|
|
32
|
+
getInvoiceDetailsRequestOpts(requestParameters) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['getInvoiceDetailsRequestContent'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('getInvoiceDetailsRequestContent', 'Required parameter "getInvoiceDetailsRequestContent" was null or undefined when calling getInvoiceDetails().');
|
|
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 = `/billing/get-invoice-details`;
|
|
48
|
+
return {
|
|
49
|
+
path: urlPath,
|
|
50
|
+
method: 'POST',
|
|
51
|
+
headers: headerParameters,
|
|
52
|
+
query: queryParameters,
|
|
53
|
+
body: GetInvoiceDetailsRequestContentToJSON(requestParameters['getInvoiceDetailsRequestContent']),
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Gets details for a single invoice, including line items, payee information, and transactions
|
|
59
|
+
*/
|
|
60
|
+
getInvoiceDetailsRaw(requestParameters, initOverrides) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const requestOptions = yield this.getInvoiceDetailsRequestOpts(requestParameters);
|
|
63
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
64
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetInvoiceDetailsResponseContentFromJSON(jsonValue));
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Gets details for a single invoice, including line items, payee information, and transactions
|
|
69
|
+
*/
|
|
70
|
+
getInvoiceDetails(requestParameters, initOverrides) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const response = yield this.getInvoiceDetailsRaw(requestParameters, initOverrides);
|
|
73
|
+
return yield response.value();
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Creates request options for listInvoices without sending the request
|
|
78
|
+
*/
|
|
79
|
+
listInvoicesRequestOpts() {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
const queryParameters = {};
|
|
82
|
+
const headerParameters = {};
|
|
83
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
84
|
+
const token = this.configuration.accessToken;
|
|
85
|
+
const tokenString = yield token("BearerAuth", []);
|
|
86
|
+
if (tokenString) {
|
|
87
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
let urlPath = `/billing/list-invoices`;
|
|
91
|
+
return {
|
|
92
|
+
path: urlPath,
|
|
93
|
+
method: 'POST',
|
|
94
|
+
headers: headerParameters,
|
|
95
|
+
query: queryParameters,
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Lists invoices for the authenticated user
|
|
101
|
+
*/
|
|
102
|
+
listInvoicesRaw(initOverrides) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
const requestOptions = yield this.listInvoicesRequestOpts();
|
|
105
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
106
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListInvoicesResponseContentFromJSON(jsonValue));
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Lists invoices for the authenticated user
|
|
111
|
+
*/
|
|
112
|
+
listInvoices(initOverrides) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
const response = yield this.listInvoicesRaw(initOverrides);
|
|
115
|
+
return yield response.value();
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -38,11 +38,11 @@ export declare class DNSApi extends runtime.BaseAPI {
|
|
|
38
38
|
*/
|
|
39
39
|
addDnsRecordRequestOpts(requestParameters: AddDnsRecordRequest): Promise<runtime.RequestOpts>;
|
|
40
40
|
/**
|
|
41
|
-
* Adds a DNS record to a zone
|
|
41
|
+
* Adds a DNS record to a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
42
42
|
*/
|
|
43
43
|
addDnsRecordRaw(requestParameters: AddDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AddDnsRecordResponseContent>>;
|
|
44
44
|
/**
|
|
45
|
-
* Adds a DNS record to a zone
|
|
45
|
+
* Adds a DNS record to a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
46
46
|
*/
|
|
47
47
|
addDnsRecord(requestParameters: AddDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AddDnsRecordResponseContent>;
|
|
48
48
|
/**
|
|
@@ -62,11 +62,11 @@ export declare class DNSApi extends runtime.BaseAPI {
|
|
|
62
62
|
*/
|
|
63
63
|
deleteDnsRecordRequestOpts(requestParameters: DeleteDnsRecordRequest): Promise<runtime.RequestOpts>;
|
|
64
64
|
/**
|
|
65
|
-
* Deletes a DNS record from a zone
|
|
65
|
+
* Deletes a DNS record from a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
66
66
|
*/
|
|
67
67
|
deleteDnsRecordRaw(requestParameters: DeleteDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteDnsRecordResponseContent>>;
|
|
68
68
|
/**
|
|
69
|
-
* Deletes a DNS record from a zone
|
|
69
|
+
* Deletes a DNS record from a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
70
70
|
*/
|
|
71
71
|
deleteDnsRecord(requestParameters: DeleteDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteDnsRecordResponseContent>;
|
|
72
72
|
/**
|
|
@@ -86,11 +86,11 @@ export declare class DNSApi extends runtime.BaseAPI {
|
|
|
86
86
|
*/
|
|
87
87
|
editDnsRecordRequestOpts(requestParameters: EditDnsRecordRequest): Promise<runtime.RequestOpts>;
|
|
88
88
|
/**
|
|
89
|
-
* Edits a DNS record in a zone
|
|
89
|
+
* Edits a DNS record in a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
90
90
|
*/
|
|
91
91
|
editDnsRecordRaw(requestParameters: EditDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EditDnsRecordResponseContent>>;
|
|
92
92
|
/**
|
|
93
|
-
* Edits a DNS record in a zone
|
|
93
|
+
* Edits a DNS record in a zone. Legacy callers pass zone_id only (DNS Manager v1). For DirectAdmin, pass backend=directadmin with domain_id; upstream v2 receives domain_id and record only.
|
|
94
94
|
*/
|
|
95
95
|
editDnsRecord(requestParameters: EditDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EditDnsRecordResponseContent>;
|
|
96
96
|
/**
|
|
@@ -98,11 +98,11 @@ export declare class DNSApi extends runtime.BaseAPI {
|
|
|
98
98
|
*/
|
|
99
99
|
getDnsZoneDetailsRequestOpts(requestParameters: GetDnsZoneDetailsRequest): Promise<runtime.RequestOpts>;
|
|
100
100
|
/**
|
|
101
|
-
* Retrieves DNS zone details and records for an owned domain.
|
|
101
|
+
* Retrieves DNS zone details and records for an owned domain. Omit backend for the legacy DNS Manager (v1) path; set backend from list-dns-zones to route DirectAdmin zones to v2.
|
|
102
102
|
*/
|
|
103
103
|
getDnsZoneDetailsRaw(requestParameters: GetDnsZoneDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDnsZoneDetailsResponseContent>>;
|
|
104
104
|
/**
|
|
105
|
-
* Retrieves DNS zone details and records for an owned domain.
|
|
105
|
+
* Retrieves DNS zone details and records for an owned domain. Omit backend for the legacy DNS Manager (v1) path; set backend from list-dns-zones to route DirectAdmin zones to v2.
|
|
106
106
|
*/
|
|
107
107
|
getDnsZoneDetails(requestParameters: GetDnsZoneDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDnsZoneDetailsResponseContent>;
|
|
108
108
|
/**
|