hostinger-api-sdk 2.1.1 → 2.1.3

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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.1.1
4
+ * API Version: 2.1.3
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/base.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.1.1
6
+ * API Version: 2.1.3
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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.1.1
4
+ * API Version: 2.1.3
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.1.1
6
+ * API Version: 2.1.3
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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.1.1
4
+ * API Version: 2.1.3
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.1.1
6
+ * API Version: 2.1.3
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
@@ -13,7 +13,7 @@ export class Configuration {
13
13
  var _a;
14
14
  this.accessToken = param.accessToken;
15
15
  this.basePath = param.basePath;
16
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.1.1" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
16
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.1.3" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
17
17
  this.formDataCtor = param.formDataCtor;
18
18
  }
19
19
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.1.1
4
+ * API Version: 2.1.3
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.1.1
6
+ * API Version: 2.1.3
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
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.1.1
4
+ * API Version: 2.1.3
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 2.1.1
7
+ * API Version: 2.1.3
8
8
  *
9
9
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
10
10
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -0,0 +1,238 @@
1
+ # HostingCDNApi
2
+
3
+ All URIs are relative to *https://developers.hostinger.com*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**disableCDNV1**](#disablecdnv1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/cdn/disable | Disable CDN|
8
+ |[**enableCDNV1**](#enablecdnv1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/cdn/enable | Enable CDN|
9
+ |[**getCDNStatusV1**](#getcdnstatusv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/cdn/status | Get CDN status|
10
+ |[**purgeCDNCacheV1**](#purgecdncachev1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/cdn/purge | Purge CDN cache|
11
+
12
+ # **disableCDNV1**
13
+ > CommonSuccessEmptyResource disableCDNV1()
14
+
15
+ Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
16
+
17
+ ### Example
18
+
19
+ ```typescript
20
+ import {
21
+ HostingCDNApi,
22
+ Configuration
23
+ } from '@hostinger/sdk';
24
+
25
+ const configuration = new Configuration();
26
+ const apiInstance = new HostingCDNApi(configuration);
27
+
28
+ let username: string; // (default to undefined)
29
+ let domain: string; //Domain name (default to undefined)
30
+
31
+ const { status, data } = await apiInstance.disableCDNV1(
32
+ username,
33
+ domain
34
+ );
35
+ ```
36
+
37
+ ### Parameters
38
+
39
+ |Name | Type | Description | Notes|
40
+ |------------- | ------------- | ------------- | -------------|
41
+ | **username** | [**string**] | | defaults to undefined|
42
+ | **domain** | [**string**] | Domain name | defaults to undefined|
43
+
44
+
45
+ ### Return type
46
+
47
+ **CommonSuccessEmptyResource**
48
+
49
+ ### Authorization
50
+
51
+ [apiToken](../README.md#apiToken)
52
+
53
+ ### HTTP request headers
54
+
55
+ - **Content-Type**: Not defined
56
+ - **Accept**: application/json
57
+
58
+
59
+ ### HTTP response details
60
+ | Status code | Description | Response headers |
61
+ |-------------|-------------|------------------|
62
+ |**200** | Success empty response | - |
63
+ |**422** | Validation error response | - |
64
+ |**401** | Unauthenticated response | - |
65
+ |**500** | Error response | - |
66
+
67
+ [[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)
68
+
69
+ # **enableCDNV1**
70
+ > CommonSuccessEmptyResource enableCDNV1()
71
+
72
+ Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
73
+
74
+ ### Example
75
+
76
+ ```typescript
77
+ import {
78
+ HostingCDNApi,
79
+ Configuration
80
+ } from '@hostinger/sdk';
81
+
82
+ const configuration = new Configuration();
83
+ const apiInstance = new HostingCDNApi(configuration);
84
+
85
+ let username: string; // (default to undefined)
86
+ let domain: string; //Domain name (default to undefined)
87
+
88
+ const { status, data } = await apiInstance.enableCDNV1(
89
+ username,
90
+ domain
91
+ );
92
+ ```
93
+
94
+ ### Parameters
95
+
96
+ |Name | Type | Description | Notes|
97
+ |------------- | ------------- | ------------- | -------------|
98
+ | **username** | [**string**] | | defaults to undefined|
99
+ | **domain** | [**string**] | Domain name | defaults to undefined|
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**: Not defined
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)
125
+
126
+ # **getCDNStatusV1**
127
+ > HostingV1CdnCdnStatusResource getCDNStatusV1()
128
+
129
+ Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
130
+
131
+ ### Example
132
+
133
+ ```typescript
134
+ import {
135
+ HostingCDNApi,
136
+ Configuration
137
+ } from '@hostinger/sdk';
138
+
139
+ const configuration = new Configuration();
140
+ const apiInstance = new HostingCDNApi(configuration);
141
+
142
+ let username: string; // (default to undefined)
143
+ let domain: string; //Domain name (default to undefined)
144
+
145
+ const { status, data } = await apiInstance.getCDNStatusV1(
146
+ username,
147
+ domain
148
+ );
149
+ ```
150
+
151
+ ### Parameters
152
+
153
+ |Name | Type | Description | Notes|
154
+ |------------- | ------------- | ------------- | -------------|
155
+ | **username** | [**string**] | | defaults to undefined|
156
+ | **domain** | [**string**] | Domain name | defaults to undefined|
157
+
158
+
159
+ ### Return type
160
+
161
+ **HostingV1CdnCdnStatusResource**
162
+
163
+ ### Authorization
164
+
165
+ [apiToken](../README.md#apiToken)
166
+
167
+ ### HTTP request headers
168
+
169
+ - **Content-Type**: Not defined
170
+ - **Accept**: application/json
171
+
172
+
173
+ ### HTTP response details
174
+ | Status code | Description | Response headers |
175
+ |-------------|-------------|------------------|
176
+ |**200** | Success response | - |
177
+ |**401** | Unauthenticated response | - |
178
+ |**500** | Error response | - |
179
+
180
+ [[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)
181
+
182
+ # **purgeCDNCacheV1**
183
+ > CommonSuccessEmptyResource purgeCDNCacheV1()
184
+
185
+ Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
186
+
187
+ ### Example
188
+
189
+ ```typescript
190
+ import {
191
+ HostingCDNApi,
192
+ Configuration
193
+ } from '@hostinger/sdk';
194
+
195
+ const configuration = new Configuration();
196
+ const apiInstance = new HostingCDNApi(configuration);
197
+
198
+ let username: string; // (default to undefined)
199
+ let domain: string; //Domain name (default to undefined)
200
+
201
+ const { status, data } = await apiInstance.purgeCDNCacheV1(
202
+ username,
203
+ domain
204
+ );
205
+ ```
206
+
207
+ ### Parameters
208
+
209
+ |Name | Type | Description | Notes|
210
+ |------------- | ------------- | ------------- | -------------|
211
+ | **username** | [**string**] | | defaults to undefined|
212
+ | **domain** | [**string**] | Domain name | defaults to undefined|
213
+
214
+
215
+ ### Return type
216
+
217
+ **CommonSuccessEmptyResource**
218
+
219
+ ### Authorization
220
+
221
+ [apiToken](../README.md#apiToken)
222
+
223
+ ### HTTP request headers
224
+
225
+ - **Content-Type**: Not defined
226
+ - **Accept**: application/json
227
+
228
+
229
+ ### HTTP response details
230
+ | Status code | Description | Response headers |
231
+ |-------------|-------------|------------------|
232
+ |**200** | Success empty response | - |
233
+ |**422** | Validation error response | - |
234
+ |**401** | Unauthenticated response | - |
235
+ |**500** | Error response | - |
236
+
237
+ [[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)
238
+
@@ -11,7 +11,7 @@ All URIs are relative to *https://developers.hostinger.com*
11
11
  # **clearWebsiteCacheV1**
12
12
  > CommonSuccessEmptyResource clearWebsiteCacheV1()
13
13
 
14
- Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
14
+ Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
15
15
 
16
16
  ### Example
17
17
 
@@ -0,0 +1,20 @@
1
+ # HostingV1CdnCdnStatusResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **is_enabled** | **boolean** | Whether the Hostinger CDN is enabled for the website domain | [default to undefined]
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import { HostingV1CdnCdnStatusResource } from '@hostinger/sdk';
14
+
15
+ const instance: HostingV1CdnCdnStatusResource = {
16
+ is_enabled,
17
+ };
18
+ ```
19
+
20
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)