@hostafrica/ha-sdk-typescript 1.1.4 → 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/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/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/GetDnsZoneDetailsRequestContent.d.ts +7 -0
- package/dist/esm/models/GetDnsZoneDetailsRequestContent.js +3 -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/SelcomMetadata.d.ts +56 -0
- package/dist/esm/models/SelcomMetadata.js +59 -0
- package/dist/esm/models/index.d.ts +13 -0
- package/dist/esm/models/index.js +13 -0
- package/dist/esm/retryablePaths.js +2 -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/GetDnsZoneDetailsRequestContent.d.ts +7 -0
- package/dist/models/GetDnsZoneDetailsRequestContent.js +3 -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/SelcomMetadata.d.ts +56 -0
- package/dist/models/SelcomMetadata.js +66 -0
- package/dist/models/index.d.ts +13 -0
- package/dist/models/index.js +13 -0
- package/dist/retryablePaths.js +2 -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/GetDnsZoneDetailsRequestContent.md +2 -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/SelcomMetadata.md +43 -0
- package/package.json +1 -1
- package/src/apis/BillingApi.ts +164 -0
- package/src/apis/DNSApi.ts +8 -8
- 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/GetDnsZoneDetailsRequestContent.ts +18 -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/SelcomMetadata.ts +102 -0
- package/src/models/index.ts +13 -0
- package/src/retryablePaths.ts +2 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* HostAfricaApi
|
|
5
|
+
* HostAfrica API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.1.0 - 2026-07-16
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime.js';
|
|
16
|
+
/**
|
|
17
|
+
* Summary of an invoice in the list-invoices response
|
|
18
|
+
* @export
|
|
19
|
+
* @interface InvoiceSummary
|
|
20
|
+
*/
|
|
21
|
+
export interface InvoiceSummary {
|
|
22
|
+
/**
|
|
23
|
+
* Unique invoice identifier - must be sent as a string
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof InvoiceSummary
|
|
26
|
+
*/
|
|
27
|
+
invoiceId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Human-readable invoice number when assigned
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof InvoiceSummary
|
|
32
|
+
*/
|
|
33
|
+
invoiceNumber: string;
|
|
34
|
+
/**
|
|
35
|
+
* Invoice issue date (ISO 8601)
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof InvoiceSummary
|
|
38
|
+
*/
|
|
39
|
+
date: string;
|
|
40
|
+
/**
|
|
41
|
+
* Invoice due date (ISO 8601)
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof InvoiceSummary
|
|
44
|
+
*/
|
|
45
|
+
dueDate: string;
|
|
46
|
+
/**
|
|
47
|
+
* Invoice status (e.g. Paid, Unpaid, Cancelled, Refunded)
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof InvoiceSummary
|
|
50
|
+
*/
|
|
51
|
+
status: string;
|
|
52
|
+
/**
|
|
53
|
+
* Primary tax amount as a decimal string
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof InvoiceSummary
|
|
56
|
+
*/
|
|
57
|
+
tax: string;
|
|
58
|
+
/**
|
|
59
|
+
* Secondary tax amount as a decimal string. Omitted when a second tax is not configured.
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof InvoiceSummary
|
|
62
|
+
*/
|
|
63
|
+
tax2?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Primary tax rate as a decimal string
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof InvoiceSummary
|
|
68
|
+
*/
|
|
69
|
+
taxRate: string;
|
|
70
|
+
/**
|
|
71
|
+
* Secondary tax rate as a decimal string. Omitted when a second tax is not configured.
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof InvoiceSummary
|
|
74
|
+
*/
|
|
75
|
+
taxRate2?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Invoice total including tax as a decimal string
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof InvoiceSummary
|
|
80
|
+
*/
|
|
81
|
+
total: string;
|
|
82
|
+
/**
|
|
83
|
+
* Invoice subtotal excluding tax as a decimal string
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @memberof InvoiceSummary
|
|
86
|
+
*/
|
|
87
|
+
subtotal: string;
|
|
88
|
+
/**
|
|
89
|
+
* Grand total as a decimal string
|
|
90
|
+
* @type {string}
|
|
91
|
+
* @memberof InvoiceSummary
|
|
92
|
+
*/
|
|
93
|
+
grandTotal: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Check if a given object implements the InvoiceSummary interface.
|
|
98
|
+
*/
|
|
99
|
+
export function instanceOfInvoiceSummary(value: object): value is InvoiceSummary {
|
|
100
|
+
if (!('invoiceId' in value) || value['invoiceId'] === undefined) return false;
|
|
101
|
+
if (!('invoiceNumber' in value) || value['invoiceNumber'] === undefined) return false;
|
|
102
|
+
if (!('date' in value) || value['date'] === undefined) return false;
|
|
103
|
+
if (!('dueDate' in value) || value['dueDate'] === undefined) return false;
|
|
104
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
105
|
+
if (!('tax' in value) || value['tax'] === undefined) return false;
|
|
106
|
+
if (!('taxRate' in value) || value['taxRate'] === undefined) return false;
|
|
107
|
+
if (!('total' in value) || value['total'] === undefined) return false;
|
|
108
|
+
if (!('subtotal' in value) || value['subtotal'] === undefined) return false;
|
|
109
|
+
if (!('grandTotal' in value) || value['grandTotal'] === undefined) return false;
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function InvoiceSummaryFromJSON(json: any): InvoiceSummary {
|
|
114
|
+
return InvoiceSummaryFromJSONTyped(json, false);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function InvoiceSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceSummary {
|
|
118
|
+
if (json == null) {
|
|
119
|
+
return json;
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
|
|
123
|
+
'invoiceId': json['invoice_id'],
|
|
124
|
+
'invoiceNumber': json['invoice_number'],
|
|
125
|
+
'date': json['date'],
|
|
126
|
+
'dueDate': json['due_date'],
|
|
127
|
+
'status': json['status'],
|
|
128
|
+
'tax': json['tax'],
|
|
129
|
+
'tax2': json['tax2'] == null ? undefined : json['tax2'],
|
|
130
|
+
'taxRate': json['tax_rate'],
|
|
131
|
+
'taxRate2': json['tax_rate2'] == null ? undefined : json['tax_rate2'],
|
|
132
|
+
'total': json['total'],
|
|
133
|
+
'subtotal': json['subtotal'],
|
|
134
|
+
'grandTotal': json['grand_total'],
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function InvoiceSummaryToJSON(json: any): InvoiceSummary {
|
|
139
|
+
return InvoiceSummaryToJSONTyped(json, false);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function InvoiceSummaryToJSONTyped(value?: InvoiceSummary | null, ignoreDiscriminator: boolean = false): any {
|
|
143
|
+
if (value == null) {
|
|
144
|
+
return value;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return {
|
|
148
|
+
|
|
149
|
+
'invoice_id': value['invoiceId'],
|
|
150
|
+
'invoice_number': value['invoiceNumber'],
|
|
151
|
+
'date': value['date'],
|
|
152
|
+
'due_date': value['dueDate'],
|
|
153
|
+
'status': value['status'],
|
|
154
|
+
'tax': value['tax'],
|
|
155
|
+
'tax2': value['tax2'],
|
|
156
|
+
'tax_rate': value['taxRate'],
|
|
157
|
+
'tax_rate2': value['taxRate2'],
|
|
158
|
+
'total': value['total'],
|
|
159
|
+
'subtotal': value['subtotal'],
|
|
160
|
+
'grand_total': value['grandTotal'],
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* HostAfricaApi
|
|
5
|
+
* HostAfrica API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.1.0 - 2026-07-16
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime.js';
|
|
16
|
+
/**
|
|
17
|
+
* A payment or refund transaction recorded against an invoice
|
|
18
|
+
* @export
|
|
19
|
+
* @interface InvoiceTransaction
|
|
20
|
+
*/
|
|
21
|
+
export interface InvoiceTransaction {
|
|
22
|
+
/**
|
|
23
|
+
* Transaction identifier
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof InvoiceTransaction
|
|
26
|
+
*/
|
|
27
|
+
id: number;
|
|
28
|
+
/**
|
|
29
|
+
* Payment gateway identifier
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof InvoiceTransaction
|
|
32
|
+
*/
|
|
33
|
+
gateway?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Transaction date (ISO 8601 or upstream date string)
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof InvoiceTransaction
|
|
38
|
+
*/
|
|
39
|
+
date?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Transaction description
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof InvoiceTransaction
|
|
44
|
+
*/
|
|
45
|
+
description?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Amount received as a decimal string
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof InvoiceTransaction
|
|
50
|
+
*/
|
|
51
|
+
amountIn?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Gateway fees as a decimal string
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof InvoiceTransaction
|
|
56
|
+
*/
|
|
57
|
+
fees?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Amount paid out (e.g. refund) as a decimal string
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof InvoiceTransaction
|
|
62
|
+
*/
|
|
63
|
+
amountOut?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Gateway transaction reference
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof InvoiceTransaction
|
|
68
|
+
*/
|
|
69
|
+
transId?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Check if a given object implements the InvoiceTransaction interface.
|
|
74
|
+
*/
|
|
75
|
+
export function instanceOfInvoiceTransaction(value: object): value is InvoiceTransaction {
|
|
76
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function InvoiceTransactionFromJSON(json: any): InvoiceTransaction {
|
|
81
|
+
return InvoiceTransactionFromJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function InvoiceTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceTransaction {
|
|
85
|
+
if (json == null) {
|
|
86
|
+
return json;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'id': json['id'],
|
|
91
|
+
'gateway': json['gateway'] == null ? undefined : json['gateway'],
|
|
92
|
+
'date': json['date'] == null ? undefined : json['date'],
|
|
93
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
94
|
+
'amountIn': json['amount_in'] == null ? undefined : json['amount_in'],
|
|
95
|
+
'fees': json['fees'] == null ? undefined : json['fees'],
|
|
96
|
+
'amountOut': json['amount_out'] == null ? undefined : json['amount_out'],
|
|
97
|
+
'transId': json['trans_id'] == null ? undefined : json['trans_id'],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function InvoiceTransactionToJSON(json: any): InvoiceTransaction {
|
|
102
|
+
return InvoiceTransactionToJSONTyped(json, false);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function InvoiceTransactionToJSONTyped(value?: InvoiceTransaction | null, ignoreDiscriminator: boolean = false): any {
|
|
106
|
+
if (value == null) {
|
|
107
|
+
return value;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
|
|
112
|
+
'id': value['id'],
|
|
113
|
+
'gateway': value['gateway'],
|
|
114
|
+
'date': value['date'],
|
|
115
|
+
'description': value['description'],
|
|
116
|
+
'amount_in': value['amountIn'],
|
|
117
|
+
'fees': value['fees'],
|
|
118
|
+
'amount_out': value['amountOut'],
|
|
119
|
+
'trans_id': value['transId'],
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* HostAfricaApi
|
|
5
|
+
* HostAfrica API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.1.0 - 2026-07-16
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime.js';
|
|
16
|
+
import type { ListInvoicesResponseData } from './ListInvoicesResponseData.js';
|
|
17
|
+
import {
|
|
18
|
+
ListInvoicesResponseDataFromJSON,
|
|
19
|
+
ListInvoicesResponseDataFromJSONTyped,
|
|
20
|
+
ListInvoicesResponseDataToJSON,
|
|
21
|
+
ListInvoicesResponseDataToJSONTyped,
|
|
22
|
+
} from './ListInvoicesResponseData.js';
|
|
23
|
+
import type { OperationStatus } from './OperationStatus.js';
|
|
24
|
+
import {
|
|
25
|
+
OperationStatusFromJSON,
|
|
26
|
+
OperationStatusFromJSONTyped,
|
|
27
|
+
OperationStatusToJSON,
|
|
28
|
+
OperationStatusToJSONTyped,
|
|
29
|
+
} from './OperationStatus.js';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface ListInvoicesResponseContent
|
|
35
|
+
*/
|
|
36
|
+
export interface ListInvoicesResponseContent {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {OperationStatus}
|
|
40
|
+
* @memberof ListInvoicesResponseContent
|
|
41
|
+
*/
|
|
42
|
+
status: OperationStatus;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {ListInvoicesResponseData}
|
|
46
|
+
* @memberof ListInvoicesResponseContent
|
|
47
|
+
*/
|
|
48
|
+
data: ListInvoicesResponseData;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the ListInvoicesResponseContent interface.
|
|
55
|
+
*/
|
|
56
|
+
export function instanceOfListInvoicesResponseContent(value: object): value is ListInvoicesResponseContent {
|
|
57
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
58
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function ListInvoicesResponseContentFromJSON(json: any): ListInvoicesResponseContent {
|
|
63
|
+
return ListInvoicesResponseContentFromJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function ListInvoicesResponseContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListInvoicesResponseContent {
|
|
67
|
+
if (json == null) {
|
|
68
|
+
return json;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'status': OperationStatusFromJSON(json['status']),
|
|
73
|
+
'data': ListInvoicesResponseDataFromJSON(json['data']),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function ListInvoicesResponseContentToJSON(json: any): ListInvoicesResponseContent {
|
|
78
|
+
return ListInvoicesResponseContentToJSONTyped(json, false);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function ListInvoicesResponseContentToJSONTyped(value?: ListInvoicesResponseContent | null, ignoreDiscriminator: boolean = false): any {
|
|
82
|
+
if (value == null) {
|
|
83
|
+
return value;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
|
|
88
|
+
'status': OperationStatusToJSON(value['status']),
|
|
89
|
+
'data': ListInvoicesResponseDataToJSON(value['data']),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* HostAfricaApi
|
|
5
|
+
* HostAfrica API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.1.0 - 2026-07-16
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime.js';
|
|
16
|
+
import type { InvoiceSummary } from './InvoiceSummary.js';
|
|
17
|
+
import {
|
|
18
|
+
InvoiceSummaryFromJSON,
|
|
19
|
+
InvoiceSummaryFromJSONTyped,
|
|
20
|
+
InvoiceSummaryToJSON,
|
|
21
|
+
InvoiceSummaryToJSONTyped,
|
|
22
|
+
} from './InvoiceSummary.js';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Top-level data payload for the ListInvoices response
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ListInvoicesResponseData
|
|
28
|
+
*/
|
|
29
|
+
export interface ListInvoicesResponseData {
|
|
30
|
+
/**
|
|
31
|
+
* List of invoices for the authenticated user
|
|
32
|
+
* @type {Array<InvoiceSummary>}
|
|
33
|
+
* @memberof ListInvoicesResponseData
|
|
34
|
+
*/
|
|
35
|
+
invoices: Array<InvoiceSummary>;
|
|
36
|
+
/**
|
|
37
|
+
* Total number of invoices returned
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof ListInvoicesResponseData
|
|
40
|
+
*/
|
|
41
|
+
totalCount: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the ListInvoicesResponseData interface.
|
|
46
|
+
*/
|
|
47
|
+
export function instanceOfListInvoicesResponseData(value: object): value is ListInvoicesResponseData {
|
|
48
|
+
if (!('invoices' in value) || value['invoices'] === undefined) return false;
|
|
49
|
+
if (!('totalCount' in value) || value['totalCount'] === undefined) return false;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function ListInvoicesResponseDataFromJSON(json: any): ListInvoicesResponseData {
|
|
54
|
+
return ListInvoicesResponseDataFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function ListInvoicesResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListInvoicesResponseData {
|
|
58
|
+
if (json == null) {
|
|
59
|
+
return json;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'invoices': ((json['invoices'] as Array<any>).map(InvoiceSummaryFromJSON)),
|
|
64
|
+
'totalCount': json['total_count'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function ListInvoicesResponseDataToJSON(json: any): ListInvoicesResponseData {
|
|
69
|
+
return ListInvoicesResponseDataToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function ListInvoicesResponseDataToJSONTyped(value?: ListInvoicesResponseData | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'invoices': ((value['invoices'] as Array<any>).map(InvoiceSummaryToJSON)),
|
|
80
|
+
'total_count': value['totalCount'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* HostAfricaApi
|
|
5
|
+
* HostAfrica API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.1.0 - 2026-07-16
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime.js';
|
|
16
|
+
/**
|
|
17
|
+
* Selcom alt-gateway payment details included on an invoice when configured
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SelcomMetadata
|
|
20
|
+
*/
|
|
21
|
+
export interface SelcomMetadata {
|
|
22
|
+
/**
|
|
23
|
+
* Due amount formatted for display (e.g. "TZS 29,000.00"). Non-TZS amounts are converted using the WHMCS currency rate.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SelcomMetadata
|
|
26
|
+
*/
|
|
27
|
+
amount: string;
|
|
28
|
+
/**
|
|
29
|
+
* Selcom Pesa account: 5-digit padded client id plus 6-digit padded invoice id
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SelcomMetadata
|
|
32
|
+
*/
|
|
33
|
+
pesaAccount: string;
|
|
34
|
+
/**
|
|
35
|
+
* Mobile payment reference: 61107370 plus the same padded client and invoice ids
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof SelcomMetadata
|
|
38
|
+
*/
|
|
39
|
+
mobileReference: string;
|
|
40
|
+
/**
|
|
41
|
+
* USSD shortcode for Selcom (always *150*50*1#)
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof SelcomMetadata
|
|
44
|
+
*/
|
|
45
|
+
ussdCode: string;
|
|
46
|
+
/**
|
|
47
|
+
* WHMCS Selcom alt-gateway instructions HTML with placeholders filled
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof SelcomMetadata
|
|
50
|
+
*/
|
|
51
|
+
instructions: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the SelcomMetadata interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfSelcomMetadata(value: object): value is SelcomMetadata {
|
|
58
|
+
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
59
|
+
if (!('pesaAccount' in value) || value['pesaAccount'] === undefined) return false;
|
|
60
|
+
if (!('mobileReference' in value) || value['mobileReference'] === undefined) return false;
|
|
61
|
+
if (!('ussdCode' in value) || value['ussdCode'] === undefined) return false;
|
|
62
|
+
if (!('instructions' in value) || value['instructions'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function SelcomMetadataFromJSON(json: any): SelcomMetadata {
|
|
67
|
+
return SelcomMetadataFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function SelcomMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SelcomMetadata {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'amount': json['amount'],
|
|
77
|
+
'pesaAccount': json['pesa_account'],
|
|
78
|
+
'mobileReference': json['mobile_reference'],
|
|
79
|
+
'ussdCode': json['ussd_code'],
|
|
80
|
+
'instructions': json['instructions'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function SelcomMetadataToJSON(json: any): SelcomMetadata {
|
|
85
|
+
return SelcomMetadataToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function SelcomMetadataToJSONTyped(value?: SelcomMetadata | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'amount': value['amount'],
|
|
96
|
+
'pesa_account': value['pesaAccount'],
|
|
97
|
+
'mobile_reference': value['mobileReference'],
|
|
98
|
+
'ussd_code': value['ussdCode'],
|
|
99
|
+
'instructions': value['instructions'],
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -68,6 +68,7 @@ export * from './DeleteSnapshotJobRequestContent.js';
|
|
|
68
68
|
export * from './DeleteSnapshotJobResponseContent.js';
|
|
69
69
|
export * from './DeleteSnapshotRequestContent.js';
|
|
70
70
|
export * from './DeleteSnapshotResponseContent.js';
|
|
71
|
+
export * from './DnsBackend.js';
|
|
71
72
|
export * from './DnsCreateCandidateInfo.js';
|
|
72
73
|
export * from './DnsRecordInfo.js';
|
|
73
74
|
export * from './DnsRecordMutationData.js';
|
|
@@ -119,6 +120,9 @@ export * from './GetDomainRequestContent.js';
|
|
|
119
120
|
export * from './GetDomainResponseContent.js';
|
|
120
121
|
export * from './GetEncryptedPasswordRequestContent.js';
|
|
121
122
|
export * from './GetEncryptedPasswordResponseContent.js';
|
|
123
|
+
export * from './GetInvoiceDetailsRequestContent.js';
|
|
124
|
+
export * from './GetInvoiceDetailsResponseContent.js';
|
|
125
|
+
export * from './GetInvoiceDetailsResponseData.js';
|
|
122
126
|
export * from './GetNoVncConsoleRequestContent.js';
|
|
123
127
|
export * from './GetNoVncConsoleResponseContent.js';
|
|
124
128
|
export * from './GetVpsConfigRequestContent.js';
|
|
@@ -127,6 +131,12 @@ export * from './GetVpsDetailsRequestContent.js';
|
|
|
127
131
|
export * from './GetVpsDetailsResponseContent.js';
|
|
128
132
|
export * from './InternalServiceErrorResponseContent.js';
|
|
129
133
|
export * from './InvalidStateErrorResponseContent.js';
|
|
134
|
+
export * from './InvoiceDetails.js';
|
|
135
|
+
export * from './InvoiceIssuedTo.js';
|
|
136
|
+
export * from './InvoiceIssuedToTax.js';
|
|
137
|
+
export * from './InvoiceItem.js';
|
|
138
|
+
export * from './InvoiceSummary.js';
|
|
139
|
+
export * from './InvoiceTransaction.js';
|
|
130
140
|
export * from './ListBackupSchedulesRequestContent.js';
|
|
131
141
|
export * from './ListBackupSchedulesResponseContent.js';
|
|
132
142
|
export * from './ListBackupsRequestContent.js';
|
|
@@ -144,6 +154,8 @@ export * from './ListDomainsRequiringDataResponseContent.js';
|
|
|
144
154
|
export * from './ListDomainsResponseContent.js';
|
|
145
155
|
export * from './ListFirewallRulesRequestContent.js';
|
|
146
156
|
export * from './ListFirewallRulesResponseContent.js';
|
|
157
|
+
export * from './ListInvoicesResponseContent.js';
|
|
158
|
+
export * from './ListInvoicesResponseData.js';
|
|
147
159
|
export * from './ListIsosRequestContent.js';
|
|
148
160
|
export * from './ListIsosResponseContent.js';
|
|
149
161
|
export * from './ListIsosResponseData.js';
|
|
@@ -205,6 +217,7 @@ export * from './RollbackSnapshotResponseContent.js';
|
|
|
205
217
|
export * from './SaveDomainRequiredDataData.js';
|
|
206
218
|
export * from './SaveDomainRequiredDataRequestContent.js';
|
|
207
219
|
export * from './SaveDomainRequiredDataResponseContent.js';
|
|
220
|
+
export * from './SelcomMetadata.js';
|
|
208
221
|
export * from './ServiceBackupsResponseData.js';
|
|
209
222
|
export * from './ServiceSnapshotsResponseData.js';
|
|
210
223
|
export * from './ServiceUnavailableErrorResponseContent.js';
|
package/src/retryablePaths.ts
CHANGED
|
@@ -22,6 +22,8 @@ export const RETRYABLE_PATHS = new Set<string>([
|
|
|
22
22
|
"/vps/get-catalogue",
|
|
23
23
|
"/vps/validate-pricing",
|
|
24
24
|
"/vps/list-orders",
|
|
25
|
+
"/billing/list-invoices",
|
|
26
|
+
"/billing/get-invoice-details",
|
|
25
27
|
"/dns/list-rdns-records",
|
|
26
28
|
"/domain/check-availability",
|
|
27
29
|
"/domain/suggest",
|