hostinger-api-sdk 3.2.0 → 3.3.1
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 +254 -6
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +199 -6
- package/dist/api.js +126 -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 +199 -6
- package/dist/esm/api.js +114 -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/DNSPropagationApi.md +66 -0
- package/docs/DNSV1PropagationAuthoritativeAnswerResource.md +23 -0
- package/docs/DNSV1PropagationNameserverAnswerResource.md +24 -0
- package/docs/DNSV1PropagationPropagationReportResource.md +22 -0
- package/docs/DNSV1PropagationVantagePointResource.md +35 -0
- package/docs/HostingNodeJSApi.md +1 -1
- package/docs/HostingV1NodeJsSourceOptionsResource.md +2 -0
- package/docs/HostingV1NodeJsStartBuildRequestSourceOptions.md +3 -1
- package/index.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# DNSPropagationApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://developers.hostinger.com*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**checkDNSRecordPropagationV1**](#checkdnsrecordpropagationv1) | **GET** /api/dns/v1/propagation/{domain}/{type} | Check DNS record propagation|
|
|
8
|
+
|
|
9
|
+
# **checkDNSRecordPropagationV1**
|
|
10
|
+
> DNSV1PropagationPropagationReportResource checkDNSRecordPropagationV1()
|
|
11
|
+
|
|
12
|
+
Check whether a DNS record of a domain or host name has propagated to public resolvers around the world. `authoritative` shows what the domain\'s authoritative nameservers serve now. It is the best signal of the current record value. Its TTL tells how long resolvers may keep serving the old value. `vantage_points` shows what public resolvers at different locations return. `is_propagated` is true when the location returns the same records as the authoritative nameservers. For GeoDNS domains, whose nameservers answer differently by region, true means the location returned a record. A records served from the Hostinger CDN count as propagated. When every responding authoritative nameserver returns no records, `is_propagated` is true. Works for any domain or host name, either a domain or a subdomain. Read-only: it changes nothing. A 404 response with error code 2025 can also mean the check could not be completed, for example when the DNS checker is busy or timed out. It is safe to retry after a short delay.
|
|
13
|
+
|
|
14
|
+
### Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import {
|
|
18
|
+
DNSPropagationApi,
|
|
19
|
+
Configuration
|
|
20
|
+
} from '@hostinger/sdk';
|
|
21
|
+
|
|
22
|
+
const configuration = new Configuration();
|
|
23
|
+
const apiInstance = new DNSPropagationApi(configuration);
|
|
24
|
+
|
|
25
|
+
let domain: string; //Domain or host name to check, either a domain or a subdomain (default to undefined)
|
|
26
|
+
let type: string; //DNS record type to check. One of: A, AAAA, CNAME, MX, SRV, TXT, CAA (default to undefined)
|
|
27
|
+
|
|
28
|
+
const { status, data } = await apiInstance.checkDNSRecordPropagationV1(
|
|
29
|
+
domain,
|
|
30
|
+
type
|
|
31
|
+
);
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Parameters
|
|
35
|
+
|
|
36
|
+
|Name | Type | Description | Notes|
|
|
37
|
+
|------------- | ------------- | ------------- | -------------|
|
|
38
|
+
| **domain** | [**string**] | Domain or host name to check, either a domain or a subdomain | defaults to undefined|
|
|
39
|
+
| **type** | [**string**] | DNS record type to check. One of: A, AAAA, CNAME, MX, SRV, TXT, CAA | defaults to undefined|
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Return type
|
|
43
|
+
|
|
44
|
+
**DNSV1PropagationPropagationReportResource**
|
|
45
|
+
|
|
46
|
+
### Authorization
|
|
47
|
+
|
|
48
|
+
[apiToken](../README.md#apiToken)
|
|
49
|
+
|
|
50
|
+
### HTTP request headers
|
|
51
|
+
|
|
52
|
+
- **Content-Type**: Not defined
|
|
53
|
+
- **Accept**: application/json
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### HTTP response details
|
|
57
|
+
| Status code | Description | Response headers |
|
|
58
|
+
|-------------|-------------|------------------|
|
|
59
|
+
|**200** | Success response | - |
|
|
60
|
+
|**401** | Unauthenticated response | - |
|
|
61
|
+
|**404** | Error response | - |
|
|
62
|
+
|**422** | Validation error response | - |
|
|
63
|
+
|**500** | Error response | - |
|
|
64
|
+
|
|
65
|
+
[[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)
|
|
66
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# DNSV1PropagationAuthoritativeAnswerResource
|
|
2
|
+
|
|
3
|
+
What the authoritative nameservers serve now: the best signal of the current record value
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**zone** | **string** | DNS zone that holds the record | [optional] [default to undefined]
|
|
10
|
+
**nameservers** | [**Array<DNSV1PropagationNameserverAnswerResource>**](DNSV1PropagationNameserverAnswerResource.md) | Answer of each authoritative nameserver of the zone | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { DNSV1PropagationAuthoritativeAnswerResource } from '@hostinger/sdk';
|
|
16
|
+
|
|
17
|
+
const instance: DNSV1PropagationAuthoritativeAnswerResource = {
|
|
18
|
+
zone,
|
|
19
|
+
nameservers,
|
|
20
|
+
};
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# DNSV1PropagationNameserverAnswerResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**nameserver** | **string** | Authoritative nameserver | [optional] [default to undefined]
|
|
9
|
+
**records** | **Array<string>** | Records the nameserver serves; null or empty when it serves none | [optional] [default to undefined]
|
|
10
|
+
**ttl** | **number** | TTL in seconds: how long resolvers may keep serving a previously cached value | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { DNSV1PropagationNameserverAnswerResource } from '@hostinger/sdk';
|
|
16
|
+
|
|
17
|
+
const instance: DNSV1PropagationNameserverAnswerResource = {
|
|
18
|
+
nameserver,
|
|
19
|
+
records,
|
|
20
|
+
ttl,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# DNSV1PropagationPropagationReportResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**authoritative** | [**DNSV1PropagationAuthoritativeAnswerResource**](DNSV1PropagationAuthoritativeAnswerResource.md) | | [optional] [default to undefined]
|
|
9
|
+
**vantage_points** | [**Array<DNSV1PropagationVantagePointResource>**](DNSV1PropagationVantagePointResource.md) | Answers of public resolvers at locations around the world | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { DNSV1PropagationPropagationReportResource } from '@hostinger/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: DNSV1PropagationPropagationReportResource = {
|
|
17
|
+
authoritative,
|
|
18
|
+
vantage_points,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# DNSV1PropagationVantagePointResource
|
|
2
|
+
|
|
3
|
+
Answer of a public resolver at one location
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**country** | **string** | Country code of the resolver | [optional] [default to undefined]
|
|
10
|
+
**provider** | **string** | Resolver provider | [optional] [default to undefined]
|
|
11
|
+
**ip** | **string** | IP address of the resolver | [optional] [default to undefined]
|
|
12
|
+
**location** | **string** | Location of the resolver | [optional] [default to undefined]
|
|
13
|
+
**latitude** | **number** | | [optional] [default to undefined]
|
|
14
|
+
**longitude** | **number** | | [optional] [default to undefined]
|
|
15
|
+
**records** | **Array<string>** | Records the resolver returned; null when it returned none or could not be queried | [optional] [default to undefined]
|
|
16
|
+
**is_propagated** | **boolean** | Whether this location returns the same records as the authoritative nameservers. For GeoDNS domains, whose nameservers answer differently by region, true means the location returned a record. A records served from the Hostinger CDN count as propagated when the location also returns CDN addresses. True when every responding authoritative nameserver returns no records. Null when the location could not be queried or no authoritative answer could be compared. | [optional] [default to undefined]
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { DNSV1PropagationVantagePointResource } from '@hostinger/sdk';
|
|
22
|
+
|
|
23
|
+
const instance: DNSV1PropagationVantagePointResource = {
|
|
24
|
+
country,
|
|
25
|
+
provider,
|
|
26
|
+
ip,
|
|
27
|
+
location,
|
|
28
|
+
latitude,
|
|
29
|
+
longitude,
|
|
30
|
+
records,
|
|
31
|
+
is_propagated,
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/HostingNodeJSApi.md
CHANGED
|
@@ -874,7 +874,7 @@ const { status, data } = await apiInstance.restartNodeJsApplicationV1(
|
|
|
874
874
|
# **startNodeJsBuildV1**
|
|
875
875
|
> HostingV1NodeJsBuildResource startNodeJsBuildV1(hostingV1NodeJsStartBuildRequest)
|
|
876
876
|
|
|
877
|
-
Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. With `source_type` `archive`, `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. With `source_type` `git`, `source_options` carries `owner`, `repository`, `branch` and `installation_uuid`. Take the installation from `List Git installations` and the owner and repository from `List Git installation repositories`; the branch is cloned at its current head. The installation must belong to the same customer as the website. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
|
|
877
|
+
Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. With `source_type` `archive`, `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. Send `source_options.message` with a short summary of what changed; it labels the deployment in the website\'s deployment history, which otherwise shows only the archive file name. With `source_type` `git`, `source_options` carries `owner`, `repository`, `branch` and `installation_uuid`. Take the installation from `List Git installations` and the owner and repository from `List Git installation repositories`; the branch is cloned at its current head. The installation must belong to the same customer as the website. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
|
|
878
878
|
|
|
879
879
|
### Example
|
|
880
880
|
|
|
@@ -7,6 +7,7 @@ Which keys carry values depends on the parent source_type; the others are null.
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
9
|
**archive_path** | **string** | Present if sourceType is \"archive\" | [optional] [default to undefined]
|
|
10
|
+
**message** | **string** | Summary of the deployment given when it was started (present if source_type is \"archive\" and one was sent) | [optional] [default to undefined]
|
|
10
11
|
**owner** | **string** | Repository owner login (present if source_type is \"git\") | [default to undefined]
|
|
11
12
|
**repository** | **string** | Repository name without the .git suffix (present if source_type is \"git\") | [default to undefined]
|
|
12
13
|
**branch** | **string** | Branch that was built (present if source_type is \"git\") | [default to undefined]
|
|
@@ -20,6 +21,7 @@ import { HostingV1NodeJsSourceOptionsResource } from '@hostinger/sdk';
|
|
|
20
21
|
|
|
21
22
|
const instance: HostingV1NodeJsSourceOptionsResource = {
|
|
22
23
|
archive_path,
|
|
24
|
+
message,
|
|
23
25
|
owner,
|
|
24
26
|
repository,
|
|
25
27
|
branch,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# HostingV1NodeJsStartBuildRequestSourceOptions
|
|
2
2
|
|
|
3
|
-
Source-specific options. For `archive` send `archive_path
|
|
3
|
+
Source-specific options. For `archive` send `archive_path` and a `message` describing the change. For `git` send `owner`, `repository`, `branch` and `installation_uuid`, taken from `List Git installations` and `List Git installation repositories`.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
9
|
**archive_path** | **string** | The path to the archive file relative to the document root of the vhost (required if source is \"archive\") | [optional] [default to undefined]
|
|
10
|
+
**message** | **string** | Short summary of what this deployment changes, shown in the website\'s deployment history the way a commit message is for git deployments. Without it the history only shows the archive file name, so always send one: keep the first line under 72 characters and describe the change, not the upload. Only used if source is \"archive\". | [optional] [default to undefined]
|
|
10
11
|
**owner** | **string** | Repository owner login (required if source is \"git\"). GitLab group paths use slashes. | [optional] [default to undefined]
|
|
11
12
|
**repository** | **string** | Repository name without the .git suffix (required if source is \"git\") | [optional] [default to undefined]
|
|
12
13
|
**branch** | **string** | Branch to build (required if source is \"git\") | [optional] [default to undefined]
|
|
@@ -19,6 +20,7 @@ import { HostingV1NodeJsStartBuildRequestSourceOptions } from '@hostinger/sdk';
|
|
|
19
20
|
|
|
20
21
|
const instance: HostingV1NodeJsStartBuildRequestSourceOptions = {
|
|
21
22
|
archive_path,
|
|
23
|
+
message,
|
|
22
24
|
owner,
|
|
23
25
|
repository,
|
|
24
26
|
branch,
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 3.
|
|
6
|
+
* API Version: 3.3.1
|
|
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
|