Skip to content

Commit ddb7e77

Browse files
chore: sdk update
1 parent 3dcae9b commit ddb7e77

12 files changed

Lines changed: 415 additions & 9 deletions

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
## @hostinger/sdk@3.3.0
1+
## @hostinger/sdk@3.3.1
22

33
For more information, please visit [https://developers.hostinger.com](https://developers.hostinger.com).
44

55
### Usage
66

77
```
8-
npm install @hostinger/sdk@3.3.0 --save
8+
npm install @hostinger/sdk@3.3.1 --save
99
```

‎api.ts‎

Lines changed: 237 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Hostinger API
55
*
6-
* API Version: 3.3.0
6+
* API Version: 3.3.1
77
*
88
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -2858,6 +2858,124 @@ export interface CommonSuccessEmptyResource {
28582858
*/
28592859
'message': string;
28602860
}
2861+
/**
2862+
* What the authoritative nameservers serve now: the best signal of the current record value
2863+
* @export
2864+
* @interface DNSV1PropagationAuthoritativeAnswerResource
2865+
*/
2866+
export interface DNSV1PropagationAuthoritativeAnswerResource {
2867+
/**
2868+
* DNS zone that holds the record
2869+
* @type {string}
2870+
* @memberof DNSV1PropagationAuthoritativeAnswerResource
2871+
*/
2872+
'zone': string;
2873+
/**
2874+
* Answer of each authoritative nameserver of the zone
2875+
* @type {Array<DNSV1PropagationNameserverAnswerResource>}
2876+
* @memberof DNSV1PropagationAuthoritativeAnswerResource
2877+
*/
2878+
'nameservers': Array<DNSV1PropagationNameserverAnswerResource>;
2879+
}
2880+
/**
2881+
*
2882+
* @export
2883+
* @interface DNSV1PropagationNameserverAnswerResource
2884+
*/
2885+
export interface DNSV1PropagationNameserverAnswerResource {
2886+
/**
2887+
* Authoritative nameserver
2888+
* @type {string}
2889+
* @memberof DNSV1PropagationNameserverAnswerResource
2890+
*/
2891+
'nameserver': string;
2892+
/**
2893+
* Records the nameserver serves; null or empty when it serves none
2894+
* @type {Array<string>}
2895+
* @memberof DNSV1PropagationNameserverAnswerResource
2896+
*/
2897+
'records': Array<string> | null;
2898+
/**
2899+
* TTL in seconds: how long resolvers may keep serving a previously cached value
2900+
* @type {number}
2901+
* @memberof DNSV1PropagationNameserverAnswerResource
2902+
*/
2903+
'ttl': number;
2904+
}
2905+
/**
2906+
*
2907+
* @export
2908+
* @interface DNSV1PropagationPropagationReportResource
2909+
*/
2910+
export interface DNSV1PropagationPropagationReportResource {
2911+
/**
2912+
*
2913+
* @type {DNSV1PropagationAuthoritativeAnswerResource}
2914+
* @memberof DNSV1PropagationPropagationReportResource
2915+
*/
2916+
'authoritative': DNSV1PropagationAuthoritativeAnswerResource;
2917+
/**
2918+
* Answers of public resolvers at locations around the world
2919+
* @type {Array<DNSV1PropagationVantagePointResource>}
2920+
* @memberof DNSV1PropagationPropagationReportResource
2921+
*/
2922+
'vantage_points': Array<DNSV1PropagationVantagePointResource>;
2923+
}
2924+
/**
2925+
* Answer of a public resolver at one location
2926+
* @export
2927+
* @interface DNSV1PropagationVantagePointResource
2928+
*/
2929+
export interface DNSV1PropagationVantagePointResource {
2930+
/**
2931+
* Country code of the resolver
2932+
* @type {string}
2933+
* @memberof DNSV1PropagationVantagePointResource
2934+
*/
2935+
'country': string;
2936+
/**
2937+
* Resolver provider
2938+
* @type {string}
2939+
* @memberof DNSV1PropagationVantagePointResource
2940+
*/
2941+
'provider': string;
2942+
/**
2943+
* IP address of the resolver
2944+
* @type {string}
2945+
* @memberof DNSV1PropagationVantagePointResource
2946+
*/
2947+
'ip': string;
2948+
/**
2949+
* Location of the resolver
2950+
* @type {string}
2951+
* @memberof DNSV1PropagationVantagePointResource
2952+
*/
2953+
'location': string;
2954+
/**
2955+
*
2956+
* @type {number}
2957+
* @memberof DNSV1PropagationVantagePointResource
2958+
*/
2959+
'latitude': number;
2960+
/**
2961+
*
2962+
* @type {number}
2963+
* @memberof DNSV1PropagationVantagePointResource
2964+
*/
2965+
'longitude': number;
2966+
/**
2967+
* Records the resolver returned; null when it returned none or could not be queried
2968+
* @type {Array<string>}
2969+
* @memberof DNSV1PropagationVantagePointResource
2970+
*/
2971+
'records': Array<string> | null;
2972+
/**
2973+
* 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.
2974+
* @type {boolean}
2975+
* @memberof DNSV1PropagationVantagePointResource
2976+
*/
2977+
'is_propagated': boolean | null;
2978+
}
28612979
/**
28622980
*
28632981
* @export
@@ -24874,6 +24992,124 @@ export class BillingSubscriptionsApi extends BaseAPI {
2487424992

2487524993

2487624994

24995+
/**
24996+
* DNSPropagationApi - axios parameter creator
24997+
* @export
24998+
*/
24999+
export const DNSPropagationApiAxiosParamCreator = function (configuration?: Configuration) {
25000+
return {
25001+
/**
25002+
* 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.
25003+
* @summary Check DNS record propagation
25004+
* @param {string} domain Domain or host name to check, either a domain or a subdomain
25005+
* @param {string} type DNS record type to check. One of: A, AAAA, CNAME, MX, SRV, TXT, CAA
25006+
* @param {*} [options] Override http request option.
25007+
* @throws {RequiredError}
25008+
*/
25009+
checkDNSRecordPropagationV1: async (domain: string, type: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
25010+
// verify required parameter 'domain' is not null or undefined
25011+
assertParamExists('checkDNSRecordPropagationV1', 'domain', domain)
25012+
// verify required parameter 'type' is not null or undefined
25013+
assertParamExists('checkDNSRecordPropagationV1', 'type', type)
25014+
const localVarPath = `/api/dns/v1/propagation/{domain}/{type}`
25015+
.replace(`{${"domain"}}`, encodePathParam('domain', domain))
25016+
.replace(`{${"type"}}`, encodePathParam('type', type));
25017+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
25018+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25019+
let baseOptions;
25020+
if (configuration) {
25021+
baseOptions = configuration.baseOptions;
25022+
}
25023+
25024+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
25025+
const localVarHeaderParameter = {} as any;
25026+
const localVarQueryParameter = {} as any;
25027+
25028+
// authentication apiToken required
25029+
// http bearer authentication required
25030+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
25031+
25032+
25033+
25034+
setSearchParams(localVarUrlObj, localVarQueryParameter);
25035+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25036+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
25037+
25038+
return {
25039+
url: toPathString(localVarUrlObj),
25040+
options: localVarRequestOptions,
25041+
};
25042+
},
25043+
}
25044+
};
25045+
25046+
/**
25047+
* DNSPropagationApi - functional programming interface
25048+
* @export
25049+
*/
25050+
export const DNSPropagationApiFp = function(configuration?: Configuration) {
25051+
const localVarAxiosParamCreator = DNSPropagationApiAxiosParamCreator(configuration)
25052+
return {
25053+
/**
25054+
* 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.
25055+
* @summary Check DNS record propagation
25056+
* @param {string} domain Domain or host name to check, either a domain or a subdomain
25057+
* @param {string} type DNS record type to check. One of: A, AAAA, CNAME, MX, SRV, TXT, CAA
25058+
* @param {*} [options] Override http request option.
25059+
* @throws {RequiredError}
25060+
*/
25061+
async checkDNSRecordPropagationV1(domain: string, type: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DNSV1PropagationPropagationReportResource>> {
25062+
const localVarAxiosArgs = await localVarAxiosParamCreator.checkDNSRecordPropagationV1(domain, type, options);
25063+
const localVarOperationServerBasePath = operationServerMap['DNSPropagationApi.checkDNSRecordPropagationV1']?.[0]?.url;
25064+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25065+
},
25066+
}
25067+
};
25068+
25069+
/**
25070+
* DNSPropagationApi - factory interface
25071+
* @export
25072+
*/
25073+
export const DNSPropagationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
25074+
const localVarFp = DNSPropagationApiFp(configuration)
25075+
return {
25076+
/**
25077+
* 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.
25078+
* @summary Check DNS record propagation
25079+
* @param {string} domain Domain or host name to check, either a domain or a subdomain
25080+
* @param {string} type DNS record type to check. One of: A, AAAA, CNAME, MX, SRV, TXT, CAA
25081+
* @param {*} [options] Override http request option.
25082+
* @throws {RequiredError}
25083+
*/
25084+
checkDNSRecordPropagationV1(domain: string, type: string, options?: RawAxiosRequestConfig): AxiosPromise<DNSV1PropagationPropagationReportResource> {
25085+
return localVarFp.checkDNSRecordPropagationV1(domain, type, options).then((request) => request(axios, basePath));
25086+
},
25087+
};
25088+
};
25089+
25090+
/**
25091+
* DNSPropagationApi - object-oriented interface
25092+
* @export
25093+
* @class DNSPropagationApi
25094+
* @extends {BaseAPI}
25095+
*/
25096+
export class DNSPropagationApi extends BaseAPI {
25097+
/**
25098+
* 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.
25099+
* @summary Check DNS record propagation
25100+
* @param {string} domain Domain or host name to check, either a domain or a subdomain
25101+
* @param {string} type DNS record type to check. One of: A, AAAA, CNAME, MX, SRV, TXT, CAA
25102+
* @param {*} [options] Override http request option.
25103+
* @throws {RequiredError}
25104+
* @memberof DNSPropagationApi
25105+
*/
25106+
public checkDNSRecordPropagationV1(domain: string, type: string, options?: RawAxiosRequestConfig) {
25107+
return DNSPropagationApiFp(this.configuration).checkDNSRecordPropagationV1(domain, type, options).then((request) => request(this.axios, this.basePath));
25108+
}
25109+
}
25110+
25111+
25112+
2487725113
/**
2487825114
* DNSSnapshotApi - axios parameter creator
2487925115
* @export

‎base.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Hostinger API
55
*
6-
* API Version: 3.3.0
6+
* API Version: 3.3.1
77
*
88
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

‎common.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Hostinger API
55
*
6-
* API Version: 3.3.0
6+
* API Version: 3.3.1
77
*
88
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

‎configuration.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Hostinger API
55
*
6-
* API Version: 3.3.0
6+
* API Version: 3.3.1
77
*
88
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -48,7 +48,7 @@ export class Configuration {
4848
this.baseOptions = {
4949
...param.baseOptions,
5050
headers: {
51-
'User-Agent': "hostinger-typescript-sdk/3.3.0",
51+
'User-Agent': "hostinger-typescript-sdk/3.3.1",
5252
...param.baseOptions?.headers,
5353
},
5454
};

‎docs/DNSPropagationApi.md‎

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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&lt;DNSV1PropagationNameserverAnswerResource&gt;**](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 commit comments

Comments
 (0)