hostinger-api-sdk 1.22.1 → 1.24.0
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/README.md +2 -2
- package/api.ts +460 -5
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +257 -5
- package/dist/api.js +365 -13
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +257 -5
- package/dist/esm/api.js +357 -5
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/DomainsV1IRTPVerificationResource.md +32 -0
- package/docs/DomainsV1WHOISChangeUpdateRequest.md +24 -0
- package/docs/DomainsWHOISApi.md +272 -0
- package/docs/VPSVirtualMachineApi.md +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/docs/DomainsWHOISApi.md
CHANGED
|
@@ -4,11 +4,124 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
4
4
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
|[**cancelPendingIRTPVerificationV1**](#cancelpendingirtpverificationv1) | **DELETE** /api/domains/v1/irtp/{domain} | Cancel pending IRTP verification|
|
|
8
|
+
|[**changeWHOISProfileForDomainV1**](#changewhoisprofilefordomainv1) | **PUT** /api/domains/v1/whois/change | Change WHOIS profile for domain|
|
|
7
9
|
|[**createWHOISProfileV1**](#createwhoisprofilev1) | **POST** /api/domains/v1/whois | Create WHOIS profile|
|
|
8
10
|
|[**deleteWHOISProfileV1**](#deletewhoisprofilev1) | **DELETE** /api/domains/v1/whois/{whoisId} | Delete WHOIS profile|
|
|
11
|
+
|[**getPendingIRTPVerificationV1**](#getpendingirtpverificationv1) | **GET** /api/domains/v1/irtp/{domain} | Get pending IRTP verification|
|
|
9
12
|
|[**getWHOISProfileListV1**](#getwhoisprofilelistv1) | **GET** /api/domains/v1/whois | Get WHOIS profile list|
|
|
10
13
|
|[**getWHOISProfileUsageV1**](#getwhoisprofileusagev1) | **GET** /api/domains/v1/whois/{whoisId}/usage | Get WHOIS profile usage|
|
|
11
14
|
|[**getWHOISProfileV1**](#getwhoisprofilev1) | **GET** /api/domains/v1/whois/{whoisId} | Get WHOIS profile|
|
|
15
|
+
|[**setWHOISProfileAsDefaultV1**](#setwhoisprofileasdefaultv1) | **PUT** /api/domains/v1/whois/default/{whoisId} | Set WHOIS profile as default|
|
|
16
|
+
|[**unsetDefaultWHOISProfileV1**](#unsetdefaultwhoisprofilev1) | **DELETE** /api/domains/v1/whois/default/{whoisId} | Unset default WHOIS profile|
|
|
17
|
+
|
|
18
|
+
# **cancelPendingIRTPVerificationV1**
|
|
19
|
+
> CommonSuccessEmptyResource cancelPendingIRTPVerificationV1()
|
|
20
|
+
|
|
21
|
+
Cancel a pending IRTP verification. Use this endpoint to back out of a WHOIS change that is stuck waiting on registrant confirmation, for example when the confirmation email cannot be received, without waiting out the 5-day expiry.
|
|
22
|
+
|
|
23
|
+
### Example
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import {
|
|
27
|
+
DomainsWHOISApi,
|
|
28
|
+
Configuration
|
|
29
|
+
} from 'hostinger-api-sdk';
|
|
30
|
+
|
|
31
|
+
const configuration = new Configuration();
|
|
32
|
+
const apiInstance = new DomainsWHOISApi(configuration);
|
|
33
|
+
|
|
34
|
+
let domain: string; //Domain name (default to undefined)
|
|
35
|
+
|
|
36
|
+
const { status, data } = await apiInstance.cancelPendingIRTPVerificationV1(
|
|
37
|
+
domain
|
|
38
|
+
);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Parameters
|
|
42
|
+
|
|
43
|
+
|Name | Type | Description | Notes|
|
|
44
|
+
|------------- | ------------- | ------------- | -------------|
|
|
45
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Return type
|
|
49
|
+
|
|
50
|
+
**CommonSuccessEmptyResource**
|
|
51
|
+
|
|
52
|
+
### Authorization
|
|
53
|
+
|
|
54
|
+
[apiToken](../README.md#apiToken)
|
|
55
|
+
|
|
56
|
+
### HTTP request headers
|
|
57
|
+
|
|
58
|
+
- **Content-Type**: Not defined
|
|
59
|
+
- **Accept**: application/json
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### HTTP response details
|
|
63
|
+
| Status code | Description | Response headers |
|
|
64
|
+
|-------------|-------------|------------------|
|
|
65
|
+
|**200** | Success empty response | - |
|
|
66
|
+
|**401** | Unauthenticated response | - |
|
|
67
|
+
|**500** | Error response | - |
|
|
68
|
+
|
|
69
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
70
|
+
|
|
71
|
+
# **changeWHOISProfileForDomainV1**
|
|
72
|
+
> CommonSuccessEmptyResource changeWHOISProfileForDomainV1(domainsV1WHOISChangeUpdateRequest)
|
|
73
|
+
|
|
74
|
+
Change WHOIS contact profile for a domain. Repoints the given contact roles to a new WHOIS profile and submits the change to the registry. The profile currently assigned to those roles is resolved automatically; the request fails if the given roles are not all on the same profile today. Changing transfer sensitive fields on the owner contact starts an IRTP verification. The change is processed asynchronously. Use this endpoint to move a registered domain onto different contact information.
|
|
75
|
+
|
|
76
|
+
### Example
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
import {
|
|
80
|
+
DomainsWHOISApi,
|
|
81
|
+
Configuration,
|
|
82
|
+
DomainsV1WHOISChangeUpdateRequest
|
|
83
|
+
} from 'hostinger-api-sdk';
|
|
84
|
+
|
|
85
|
+
const configuration = new Configuration();
|
|
86
|
+
const apiInstance = new DomainsWHOISApi(configuration);
|
|
87
|
+
|
|
88
|
+
let domainsV1WHOISChangeUpdateRequest: DomainsV1WHOISChangeUpdateRequest; //
|
|
89
|
+
|
|
90
|
+
const { status, data } = await apiInstance.changeWHOISProfileForDomainV1(
|
|
91
|
+
domainsV1WHOISChangeUpdateRequest
|
|
92
|
+
);
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Parameters
|
|
96
|
+
|
|
97
|
+
|Name | Type | Description | Notes|
|
|
98
|
+
|------------- | ------------- | ------------- | -------------|
|
|
99
|
+
| **domainsV1WHOISChangeUpdateRequest** | **DomainsV1WHOISChangeUpdateRequest**| | |
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
### Return type
|
|
103
|
+
|
|
104
|
+
**CommonSuccessEmptyResource**
|
|
105
|
+
|
|
106
|
+
### Authorization
|
|
107
|
+
|
|
108
|
+
[apiToken](../README.md#apiToken)
|
|
109
|
+
|
|
110
|
+
### HTTP request headers
|
|
111
|
+
|
|
112
|
+
- **Content-Type**: application/json
|
|
113
|
+
- **Accept**: application/json
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
### HTTP response details
|
|
117
|
+
| Status code | Description | Response headers |
|
|
118
|
+
|-------------|-------------|------------------|
|
|
119
|
+
|**200** | Success empty response | - |
|
|
120
|
+
|**422** | Validation error response | - |
|
|
121
|
+
|**401** | Unauthenticated response | - |
|
|
122
|
+
|**500** | Error response | - |
|
|
123
|
+
|
|
124
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
12
125
|
|
|
13
126
|
# **createWHOISProfileV1**
|
|
14
127
|
> DomainsV1WHOISProfileResource createWHOISProfileV1(domainsV1WHOISStoreRequest)
|
|
@@ -109,6 +222,59 @@ const { status, data } = await apiInstance.deleteWHOISProfileV1(
|
|
|
109
222
|
- **Accept**: application/json
|
|
110
223
|
|
|
111
224
|
|
|
225
|
+
### HTTP response details
|
|
226
|
+
| Status code | Description | Response headers |
|
|
227
|
+
|-------------|-------------|------------------|
|
|
228
|
+
|**200** | Success response | - |
|
|
229
|
+
|**401** | Unauthenticated response | - |
|
|
230
|
+
|**500** | Error response | - |
|
|
231
|
+
|
|
232
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
233
|
+
|
|
234
|
+
# **getPendingIRTPVerificationV1**
|
|
235
|
+
> DomainsV1IRTPVerificationResource getPendingIRTPVerificationV1()
|
|
236
|
+
|
|
237
|
+
Retrieve a pending IRTP verification for a domain. Both the old and new registrant must confirm it before the WHOIS change takes effect. Use this endpoint to check the status of a WHOIS change awaiting registrant confirmation.
|
|
238
|
+
|
|
239
|
+
### Example
|
|
240
|
+
|
|
241
|
+
```typescript
|
|
242
|
+
import {
|
|
243
|
+
DomainsWHOISApi,
|
|
244
|
+
Configuration
|
|
245
|
+
} from 'hostinger-api-sdk';
|
|
246
|
+
|
|
247
|
+
const configuration = new Configuration();
|
|
248
|
+
const apiInstance = new DomainsWHOISApi(configuration);
|
|
249
|
+
|
|
250
|
+
let domain: string; //Domain name (default to undefined)
|
|
251
|
+
|
|
252
|
+
const { status, data } = await apiInstance.getPendingIRTPVerificationV1(
|
|
253
|
+
domain
|
|
254
|
+
);
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Parameters
|
|
258
|
+
|
|
259
|
+
|Name | Type | Description | Notes|
|
|
260
|
+
|------------- | ------------- | ------------- | -------------|
|
|
261
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
### Return type
|
|
265
|
+
|
|
266
|
+
**DomainsV1IRTPVerificationResource**
|
|
267
|
+
|
|
268
|
+
### Authorization
|
|
269
|
+
|
|
270
|
+
[apiToken](../README.md#apiToken)
|
|
271
|
+
|
|
272
|
+
### HTTP request headers
|
|
273
|
+
|
|
274
|
+
- **Content-Type**: Not defined
|
|
275
|
+
- **Accept**: application/json
|
|
276
|
+
|
|
277
|
+
|
|
112
278
|
### HTTP response details
|
|
113
279
|
| Status code | Description | Response headers |
|
|
114
280
|
|-------------|-------------|------------------|
|
|
@@ -277,3 +443,109 @@ const { status, data } = await apiInstance.getWHOISProfileV1(
|
|
|
277
443
|
|
|
278
444
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
279
445
|
|
|
446
|
+
# **setWHOISProfileAsDefaultV1**
|
|
447
|
+
> CommonSuccessEmptyResource setWHOISProfileAsDefaultV1()
|
|
448
|
+
|
|
449
|
+
Set WHOIS contact profile as default. The default profile is pre-selected for the TLD it belongs to when registering new domains. Use this endpoint to avoid picking contact information for every registration.
|
|
450
|
+
|
|
451
|
+
### Example
|
|
452
|
+
|
|
453
|
+
```typescript
|
|
454
|
+
import {
|
|
455
|
+
DomainsWHOISApi,
|
|
456
|
+
Configuration
|
|
457
|
+
} from 'hostinger-api-sdk';
|
|
458
|
+
|
|
459
|
+
const configuration = new Configuration();
|
|
460
|
+
const apiInstance = new DomainsWHOISApi(configuration);
|
|
461
|
+
|
|
462
|
+
let whoisId: number; //WHOIS ID (default to undefined)
|
|
463
|
+
|
|
464
|
+
const { status, data } = await apiInstance.setWHOISProfileAsDefaultV1(
|
|
465
|
+
whoisId
|
|
466
|
+
);
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
### Parameters
|
|
470
|
+
|
|
471
|
+
|Name | Type | Description | Notes|
|
|
472
|
+
|------------- | ------------- | ------------- | -------------|
|
|
473
|
+
| **whoisId** | [**number**] | WHOIS ID | defaults to undefined|
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
### Return type
|
|
477
|
+
|
|
478
|
+
**CommonSuccessEmptyResource**
|
|
479
|
+
|
|
480
|
+
### Authorization
|
|
481
|
+
|
|
482
|
+
[apiToken](../README.md#apiToken)
|
|
483
|
+
|
|
484
|
+
### HTTP request headers
|
|
485
|
+
|
|
486
|
+
- **Content-Type**: Not defined
|
|
487
|
+
- **Accept**: application/json
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
### HTTP response details
|
|
491
|
+
| Status code | Description | Response headers |
|
|
492
|
+
|-------------|-------------|------------------|
|
|
493
|
+
|**200** | Success empty response | - |
|
|
494
|
+
|**401** | Unauthenticated response | - |
|
|
495
|
+
|**500** | Error response | - |
|
|
496
|
+
|
|
497
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
498
|
+
|
|
499
|
+
# **unsetDefaultWHOISProfileV1**
|
|
500
|
+
> CommonSuccessEmptyResource unsetDefaultWHOISProfileV1()
|
|
501
|
+
|
|
502
|
+
Unset WHOIS contact profile as default. The profile itself is kept, it is only no longer pre-selected for its TLD. Use this endpoint to stop reusing contact information for new registrations.
|
|
503
|
+
|
|
504
|
+
### Example
|
|
505
|
+
|
|
506
|
+
```typescript
|
|
507
|
+
import {
|
|
508
|
+
DomainsWHOISApi,
|
|
509
|
+
Configuration
|
|
510
|
+
} from 'hostinger-api-sdk';
|
|
511
|
+
|
|
512
|
+
const configuration = new Configuration();
|
|
513
|
+
const apiInstance = new DomainsWHOISApi(configuration);
|
|
514
|
+
|
|
515
|
+
let whoisId: number; //WHOIS ID (default to undefined)
|
|
516
|
+
|
|
517
|
+
const { status, data } = await apiInstance.unsetDefaultWHOISProfileV1(
|
|
518
|
+
whoisId
|
|
519
|
+
);
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
### Parameters
|
|
523
|
+
|
|
524
|
+
|Name | Type | Description | Notes|
|
|
525
|
+
|------------- | ------------- | ------------- | -------------|
|
|
526
|
+
| **whoisId** | [**number**] | WHOIS ID | defaults to undefined|
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
### Return type
|
|
530
|
+
|
|
531
|
+
**CommonSuccessEmptyResource**
|
|
532
|
+
|
|
533
|
+
### Authorization
|
|
534
|
+
|
|
535
|
+
[apiToken](../README.md#apiToken)
|
|
536
|
+
|
|
537
|
+
### HTTP request headers
|
|
538
|
+
|
|
539
|
+
- **Content-Type**: Not defined
|
|
540
|
+
- **Accept**: application/json
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
### HTTP response details
|
|
544
|
+
| Status code | Description | Response headers |
|
|
545
|
+
|-------------|-------------|------------------|
|
|
546
|
+
|**200** | Success empty response | - |
|
|
547
|
+
|**401** | Unauthenticated response | - |
|
|
548
|
+
|**500** | Error response | - |
|
|
549
|
+
|
|
550
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
551
|
+
|
|
@@ -800,7 +800,7 @@ const { status, data } = await apiInstance.startVirtualMachineV1(
|
|
|
800
800
|
# **stopVirtualMachineV1**
|
|
801
801
|
> VPSV1ActionActionResource stopVirtualMachineV1()
|
|
802
802
|
|
|
803
|
-
Stop a specified virtual machine. If the virtual machine is already stopped, the request will still be processed without any effect. Use this endpoint to power off running VPS instances.
|
|
803
|
+
Stop a specified virtual machine. If the virtual machine is already stopped, the request will still be processed without any effect. This is a compute-only power state change and does not affect billing. To stop future charges, disable auto-renewal on the owning subscription. Use this endpoint to power off running VPS instances.
|
|
804
804
|
|
|
805
805
|
### Example
|
|
806
806
|
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.25.0
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|