@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,71 @@
|
|
|
1
|
+
|
|
2
|
+
# InvoiceDetails
|
|
3
|
+
|
|
4
|
+
Full invoice details
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`invoiceId` | string
|
|
11
|
+
`invoiceNumber` | string
|
|
12
|
+
`issuedTo` | [InvoiceIssuedTo](InvoiceIssuedTo.md)
|
|
13
|
+
`date` | string
|
|
14
|
+
`dueDate` | string
|
|
15
|
+
`datePaid` | string
|
|
16
|
+
`subtotal` | string
|
|
17
|
+
`credit` | string
|
|
18
|
+
`tax` | string
|
|
19
|
+
`tax2` | string
|
|
20
|
+
`total` | string
|
|
21
|
+
`taxRate` | string
|
|
22
|
+
`taxRate2` | string
|
|
23
|
+
`status` | string
|
|
24
|
+
`paymentMethod` | string
|
|
25
|
+
`totalDue` | string
|
|
26
|
+
`notes` | string
|
|
27
|
+
`items` | [Array<InvoiceItem>](InvoiceItem.md)
|
|
28
|
+
`transactions` | [Array<InvoiceTransaction>](InvoiceTransaction.md)
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import type { InvoiceDetails } from '@hostafrica/ha-sdk-typescript'
|
|
34
|
+
|
|
35
|
+
// TODO: Update the object below with actual values
|
|
36
|
+
const example = {
|
|
37
|
+
"invoiceId": null,
|
|
38
|
+
"invoiceNumber": null,
|
|
39
|
+
"issuedTo": null,
|
|
40
|
+
"date": null,
|
|
41
|
+
"dueDate": null,
|
|
42
|
+
"datePaid": null,
|
|
43
|
+
"subtotal": null,
|
|
44
|
+
"credit": null,
|
|
45
|
+
"tax": null,
|
|
46
|
+
"tax2": null,
|
|
47
|
+
"total": null,
|
|
48
|
+
"taxRate": null,
|
|
49
|
+
"taxRate2": null,
|
|
50
|
+
"status": null,
|
|
51
|
+
"paymentMethod": null,
|
|
52
|
+
"totalDue": null,
|
|
53
|
+
"notes": null,
|
|
54
|
+
"items": null,
|
|
55
|
+
"transactions": null,
|
|
56
|
+
} satisfies InvoiceDetails
|
|
57
|
+
|
|
58
|
+
console.log(example)
|
|
59
|
+
|
|
60
|
+
// Convert the instance to a JSON string
|
|
61
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
62
|
+
console.log(exampleJSON)
|
|
63
|
+
|
|
64
|
+
// Parse the JSON string back to an object
|
|
65
|
+
const exampleParsed = JSON.parse(exampleJSON) as InvoiceDetails
|
|
66
|
+
console.log(exampleParsed)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
70
|
+
|
|
71
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
# InvoiceIssuedTo
|
|
3
|
+
|
|
4
|
+
Recipient / billed-to details on an invoice
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`companyName` | string
|
|
11
|
+
`fullName` | string
|
|
12
|
+
`address` | string
|
|
13
|
+
`cityStateZip` | string
|
|
14
|
+
`country` | string
|
|
15
|
+
`countryName` | string
|
|
16
|
+
`tax` | [InvoiceIssuedToTax](InvoiceIssuedToTax.md)
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { InvoiceIssuedTo } from '@hostafrica/ha-sdk-typescript'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"companyName": null,
|
|
26
|
+
"fullName": null,
|
|
27
|
+
"address": null,
|
|
28
|
+
"cityStateZip": null,
|
|
29
|
+
"country": null,
|
|
30
|
+
"countryName": null,
|
|
31
|
+
"tax": null,
|
|
32
|
+
} satisfies InvoiceIssuedTo
|
|
33
|
+
|
|
34
|
+
console.log(example)
|
|
35
|
+
|
|
36
|
+
// Convert the instance to a JSON string
|
|
37
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
38
|
+
console.log(exampleJSON)
|
|
39
|
+
|
|
40
|
+
// Parse the JSON string back to an object
|
|
41
|
+
const exampleParsed = JSON.parse(exampleJSON) as InvoiceIssuedTo
|
|
42
|
+
console.log(exampleParsed)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
46
|
+
|
|
47
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# InvoiceIssuedToTax
|
|
3
|
+
|
|
4
|
+
Tax applied to the invoice recipient
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`name` | string
|
|
11
|
+
`rate` | number
|
|
12
|
+
`level` | number
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { InvoiceIssuedToTax } from '@hostafrica/ha-sdk-typescript'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"name": null,
|
|
22
|
+
"rate": null,
|
|
23
|
+
"level": null,
|
|
24
|
+
} satisfies InvoiceIssuedToTax
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as InvoiceIssuedToTax
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,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
|
+
|
|
@@ -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/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
|
+
}
|
package/src/apis/DNSApi.ts
CHANGED
|
@@ -158,7 +158,7 @@ export class DNSApi extends runtime.BaseAPI {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
/**
|
|
161
|
-
* Adds a DNS record to a zone
|
|
161
|
+
* 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.
|
|
162
162
|
*/
|
|
163
163
|
async addDnsRecordRaw(requestParameters: AddDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AddDnsRecordResponseContent>> {
|
|
164
164
|
const requestOptions = await this.addDnsRecordRequestOpts(requestParameters);
|
|
@@ -168,7 +168,7 @@ export class DNSApi extends runtime.BaseAPI {
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
/**
|
|
171
|
-
* Adds a DNS record to a zone
|
|
171
|
+
* 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.
|
|
172
172
|
*/
|
|
173
173
|
async addDnsRecord(requestParameters: AddDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AddDnsRecordResponseContent> {
|
|
174
174
|
const response = await this.addDnsRecordRaw(requestParameters, initOverrides);
|
|
@@ -268,7 +268,7 @@ export class DNSApi extends runtime.BaseAPI {
|
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
/**
|
|
271
|
-
* Deletes a DNS record from a zone
|
|
271
|
+
* 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.
|
|
272
272
|
*/
|
|
273
273
|
async deleteDnsRecordRaw(requestParameters: DeleteDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteDnsRecordResponseContent>> {
|
|
274
274
|
const requestOptions = await this.deleteDnsRecordRequestOpts(requestParameters);
|
|
@@ -278,7 +278,7 @@ export class DNSApi extends runtime.BaseAPI {
|
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
/**
|
|
281
|
-
* Deletes a DNS record from a zone
|
|
281
|
+
* 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.
|
|
282
282
|
*/
|
|
283
283
|
async deleteDnsRecord(requestParameters: DeleteDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteDnsRecordResponseContent> {
|
|
284
284
|
const response = await this.deleteDnsRecordRaw(requestParameters, initOverrides);
|
|
@@ -378,7 +378,7 @@ export class DNSApi extends runtime.BaseAPI {
|
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
/**
|
|
381
|
-
* Edits a DNS record in a zone
|
|
381
|
+
* 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.
|
|
382
382
|
*/
|
|
383
383
|
async editDnsRecordRaw(requestParameters: EditDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EditDnsRecordResponseContent>> {
|
|
384
384
|
const requestOptions = await this.editDnsRecordRequestOpts(requestParameters);
|
|
@@ -388,7 +388,7 @@ export class DNSApi extends runtime.BaseAPI {
|
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
/**
|
|
391
|
-
* Edits a DNS record in a zone
|
|
391
|
+
* 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.
|
|
392
392
|
*/
|
|
393
393
|
async editDnsRecord(requestParameters: EditDnsRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EditDnsRecordResponseContent> {
|
|
394
394
|
const response = await this.editDnsRecordRaw(requestParameters, initOverrides);
|
|
@@ -433,7 +433,7 @@ export class DNSApi extends runtime.BaseAPI {
|
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
/**
|
|
436
|
-
* Retrieves DNS zone details and records for an owned domain.
|
|
436
|
+
* 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.
|
|
437
437
|
*/
|
|
438
438
|
async getDnsZoneDetailsRaw(requestParameters: GetDnsZoneDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDnsZoneDetailsResponseContent>> {
|
|
439
439
|
const requestOptions = await this.getDnsZoneDetailsRequestOpts(requestParameters);
|
|
@@ -443,7 +443,7 @@ export class DNSApi extends runtime.BaseAPI {
|
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
/**
|
|
446
|
-
* Retrieves DNS zone details and records for an owned domain.
|
|
446
|
+
* 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.
|
|
447
447
|
*/
|
|
448
448
|
async getDnsZoneDetails(requestParameters: GetDnsZoneDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDnsZoneDetailsResponseContent> {
|
|
449
449
|
const response = await this.getDnsZoneDetailsRaw(requestParameters, initOverrides);
|