@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.
Files changed (139) hide show
  1. package/dist/apis/BillingApi.d.ts +45 -0
  2. package/dist/apis/BillingApi.js +122 -0
  3. package/dist/apis/DNSApi.d.ts +8 -8
  4. package/dist/apis/DNSApi.js +8 -8
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/esm/apis/BillingApi.d.ts +45 -0
  8. package/dist/esm/apis/BillingApi.js +118 -0
  9. package/dist/esm/apis/DNSApi.d.ts +8 -8
  10. package/dist/esm/apis/DNSApi.js +8 -8
  11. package/dist/esm/apis/index.d.ts +1 -0
  12. package/dist/esm/apis/index.js +1 -0
  13. package/dist/esm/models/AddDnsRecordRequestContent.d.ts +22 -3
  14. package/dist/esm/models/AddDnsRecordRequestContent.js +8 -3
  15. package/dist/esm/models/DeleteDnsRecordRequestContent.d.ts +22 -3
  16. package/dist/esm/models/DeleteDnsRecordRequestContent.js +8 -3
  17. package/dist/esm/models/DnsBackend.d.ts +28 -0
  18. package/dist/esm/models/DnsBackend.js +46 -0
  19. package/dist/esm/models/DnsRecordMutationRecord.d.ts +3 -2
  20. package/dist/esm/models/DnsZoneInfo.d.ts +7 -0
  21. package/dist/esm/models/DnsZoneInfo.js +3 -0
  22. package/dist/esm/models/EditDnsRecordRequestContent.d.ts +22 -3
  23. package/dist/esm/models/EditDnsRecordRequestContent.js +8 -3
  24. package/dist/esm/models/GetDnsZoneDetailsRequestContent.d.ts +7 -0
  25. package/dist/esm/models/GetDnsZoneDetailsRequestContent.js +3 -0
  26. package/dist/esm/models/GetInvoiceDetailsRequestContent.d.ts +32 -0
  27. package/dist/esm/models/GetInvoiceDetailsRequestContent.js +43 -0
  28. package/dist/esm/models/GetInvoiceDetailsResponseContent.d.ts +40 -0
  29. package/dist/esm/models/GetInvoiceDetailsResponseContent.js +49 -0
  30. package/dist/esm/models/GetInvoiceDetailsResponseData.d.ts +40 -0
  31. package/dist/esm/models/GetInvoiceDetailsResponseData.js +47 -0
  32. package/dist/esm/models/InvoiceDetails.d.ts +143 -0
  33. package/dist/esm/models/InvoiceDetails.js +112 -0
  34. package/dist/esm/models/InvoiceIssuedTo.d.ts +69 -0
  35. package/dist/esm/models/InvoiceIssuedTo.js +66 -0
  36. package/dist/esm/models/InvoiceIssuedToTax.d.ts +44 -0
  37. package/dist/esm/models/InvoiceIssuedToTax.js +51 -0
  38. package/dist/esm/models/InvoiceItem.d.ts +56 -0
  39. package/dist/esm/models/InvoiceItem.js +59 -0
  40. package/dist/esm/models/InvoiceSummary.d.ts +98 -0
  41. package/dist/esm/models/InvoiceSummary.js +83 -0
  42. package/dist/esm/models/InvoiceTransaction.d.ts +74 -0
  43. package/dist/esm/models/InvoiceTransaction.js +57 -0
  44. package/dist/esm/models/ListInvoicesResponseContent.d.ts +40 -0
  45. package/dist/esm/models/ListInvoicesResponseContent.js +49 -0
  46. package/dist/esm/models/ListInvoicesResponseData.d.ts +39 -0
  47. package/dist/esm/models/ListInvoicesResponseData.js +48 -0
  48. package/dist/esm/models/SelcomMetadata.d.ts +56 -0
  49. package/dist/esm/models/SelcomMetadata.js +59 -0
  50. package/dist/esm/models/index.d.ts +13 -0
  51. package/dist/esm/models/index.js +13 -0
  52. package/dist/esm/retryablePaths.js +2 -0
  53. package/dist/models/AddDnsRecordRequestContent.d.ts +22 -3
  54. package/dist/models/AddDnsRecordRequestContent.js +8 -3
  55. package/dist/models/DeleteDnsRecordRequestContent.d.ts +22 -3
  56. package/dist/models/DeleteDnsRecordRequestContent.js +8 -3
  57. package/dist/models/DnsBackend.d.ts +28 -0
  58. package/dist/models/DnsBackend.js +54 -0
  59. package/dist/models/DnsRecordMutationRecord.d.ts +3 -2
  60. package/dist/models/DnsZoneInfo.d.ts +7 -0
  61. package/dist/models/DnsZoneInfo.js +3 -0
  62. package/dist/models/EditDnsRecordRequestContent.d.ts +22 -3
  63. package/dist/models/EditDnsRecordRequestContent.js +8 -3
  64. package/dist/models/GetDnsZoneDetailsRequestContent.d.ts +7 -0
  65. package/dist/models/GetDnsZoneDetailsRequestContent.js +3 -0
  66. package/dist/models/GetInvoiceDetailsRequestContent.d.ts +32 -0
  67. package/dist/models/GetInvoiceDetailsRequestContent.js +50 -0
  68. package/dist/models/GetInvoiceDetailsResponseContent.d.ts +40 -0
  69. package/dist/models/GetInvoiceDetailsResponseContent.js +56 -0
  70. package/dist/models/GetInvoiceDetailsResponseData.d.ts +40 -0
  71. package/dist/models/GetInvoiceDetailsResponseData.js +54 -0
  72. package/dist/models/InvoiceDetails.d.ts +143 -0
  73. package/dist/models/InvoiceDetails.js +119 -0
  74. package/dist/models/InvoiceIssuedTo.d.ts +69 -0
  75. package/dist/models/InvoiceIssuedTo.js +73 -0
  76. package/dist/models/InvoiceIssuedToTax.d.ts +44 -0
  77. package/dist/models/InvoiceIssuedToTax.js +58 -0
  78. package/dist/models/InvoiceItem.d.ts +56 -0
  79. package/dist/models/InvoiceItem.js +66 -0
  80. package/dist/models/InvoiceSummary.d.ts +98 -0
  81. package/dist/models/InvoiceSummary.js +90 -0
  82. package/dist/models/InvoiceTransaction.d.ts +74 -0
  83. package/dist/models/InvoiceTransaction.js +64 -0
  84. package/dist/models/ListInvoicesResponseContent.d.ts +40 -0
  85. package/dist/models/ListInvoicesResponseContent.js +56 -0
  86. package/dist/models/ListInvoicesResponseData.d.ts +39 -0
  87. package/dist/models/ListInvoicesResponseData.js +55 -0
  88. package/dist/models/SelcomMetadata.d.ts +56 -0
  89. package/dist/models/SelcomMetadata.js +66 -0
  90. package/dist/models/index.d.ts +13 -0
  91. package/dist/models/index.js +13 -0
  92. package/dist/retryablePaths.js +2 -0
  93. package/dist.zip +0 -0
  94. package/docs/AddDnsRecordRequestContent.md +6 -0
  95. package/docs/BillingApi.md +159 -0
  96. package/docs/DNSApi.md +4 -4
  97. package/docs/DeleteDnsRecordRequestContent.md +6 -0
  98. package/docs/DnsBackend.md +33 -0
  99. package/docs/DnsRecordMutationRecord.md +1 -1
  100. package/docs/DnsZoneInfo.md +2 -0
  101. package/docs/EditDnsRecordRequestContent.md +6 -0
  102. package/docs/GetDnsZoneDetailsRequestContent.md +2 -0
  103. package/docs/GetInvoiceDetailsRequestContent.md +34 -0
  104. package/docs/GetInvoiceDetailsResponseContent.md +36 -0
  105. package/docs/GetInvoiceDetailsResponseData.md +37 -0
  106. package/docs/InvoiceDetails.md +71 -0
  107. package/docs/InvoiceIssuedTo.md +47 -0
  108. package/docs/InvoiceIssuedToTax.md +39 -0
  109. package/docs/InvoiceItem.md +43 -0
  110. package/docs/InvoiceSummary.md +57 -0
  111. package/docs/InvoiceTransaction.md +49 -0
  112. package/docs/ListInvoicesResponseContent.md +36 -0
  113. package/docs/ListInvoicesResponseData.md +37 -0
  114. package/docs/SelcomMetadata.md +43 -0
  115. package/package.json +1 -1
  116. package/src/apis/BillingApi.ts +164 -0
  117. package/src/apis/DNSApi.ts +8 -8
  118. package/src/apis/index.ts +1 -0
  119. package/src/models/AddDnsRecordRequestContent.ts +37 -5
  120. package/src/models/DeleteDnsRecordRequestContent.ts +37 -5
  121. package/src/models/DnsBackend.ts +56 -0
  122. package/src/models/DnsRecordMutationRecord.ts +3 -2
  123. package/src/models/DnsZoneInfo.ts +17 -0
  124. package/src/models/EditDnsRecordRequestContent.ts +37 -5
  125. package/src/models/GetDnsZoneDetailsRequestContent.ts +18 -0
  126. package/src/models/GetInvoiceDetailsRequestContent.ts +66 -0
  127. package/src/models/GetInvoiceDetailsResponseContent.ts +92 -0
  128. package/src/models/GetInvoiceDetailsResponseData.ts +89 -0
  129. package/src/models/InvoiceDetails.ts +247 -0
  130. package/src/models/InvoiceIssuedTo.ts +127 -0
  131. package/src/models/InvoiceIssuedToTax.ts +84 -0
  132. package/src/models/InvoiceItem.ts +102 -0
  133. package/src/models/InvoiceSummary.ts +163 -0
  134. package/src/models/InvoiceTransaction.ts +122 -0
  135. package/src/models/ListInvoicesResponseContent.ts +92 -0
  136. package/src/models/ListInvoicesResponseData.ts +83 -0
  137. package/src/models/SelcomMetadata.ts +102 -0
  138. package/src/models/index.ts +13 -0
  139. 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostafrica/ha-sdk-typescript",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "HostAfrica API TypeScript SDK",
5
5
  "author": "HostAfrica",
6
6
  "repository": {
@@ -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
+ }
@@ -158,7 +158,7 @@ export class DNSApi extends runtime.BaseAPI {
158
158
  }
159
159
 
160
160
  /**
161
- * Adds a DNS record to a zone via DNSManager.
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 via DNSManager.
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 via DNSManager.
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 via DNSManager.
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 via DNSManager.
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 via DNSManager.
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);
package/src/apis/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export * from './BackupsApi.js';
4
+ export * from './BillingApi.js';
4
5
  export * from './ConsoleAccessApi.js';
5
6
  export * from './DNSApi.js';
6
7
  export * from './DomainsApi.js';