hostinger-api-sdk 1.5.0 → 1.5.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.
@@ -5,10 +5,8 @@ All URIs are relative to *https://developers.hostinger.com*
5
5
  |Method | HTTP request | Description|
6
6
  |------------- | ------------- | -------------|
7
7
  |[**clearWebsiteCacheV1**](#clearwebsitecachev1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/cache/clear | Clear website cache|
8
- |[**disableCachelessModeV1**](#disablecachelessmodev1) | **PATCH** /api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/disable | Disable cacheless mode|
9
- |[**disableWebsiteCacheV1**](#disablewebsitecachev1) | **PATCH** /api/hosting/v1/accounts/{username}/websites/{domain}/cache/disable | Disable website cache|
10
- |[**enableCachelessModeV1**](#enablecachelessmodev1) | **PATCH** /api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/enable | Enable cacheless mode|
11
- |[**enableWebsiteCacheV1**](#enablewebsitecachev1) | **PATCH** /api/hosting/v1/accounts/{username}/websites/{domain}/cache/enable | Enable website cache|
8
+ |[**toggleCachelessModeV1**](#togglecachelessmodev1) | **PATCH** /api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/toggle | Toggle cacheless mode|
9
+ |[**toggleWebsiteCacheV1**](#togglewebsitecachev1) | **PATCH** /api/hosting/v1/accounts/{username}/websites/{domain}/cache/toggle | Toggle website cache|
12
10
 
13
11
  # **clearWebsiteCacheV1**
14
12
  > CommonSuccessEmptyResource clearWebsiteCacheV1()
@@ -69,129 +67,18 @@ const { status, data } = await apiInstance.clearWebsiteCacheV1(
69
67
 
70
68
  [[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)
71
69
 
72
- # **disableCachelessModeV1**
73
- > CommonSuccessEmptyResource disableCachelessModeV1()
70
+ # **toggleCachelessModeV1**
71
+ > CommonSuccessEmptyResource toggleCachelessModeV1(hostingV1CacheToggleCachelessModeRequest)
74
72
 
75
- Turns off development (cacheless) mode and returns the website to normal caching. Use it after finishing development work to restore the performance benefits of caching.
73
+ Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching.
76
74
 
77
75
  ### Example
78
76
 
79
77
  ```typescript
80
78
  import {
81
79
  HostingCacheApi,
82
- Configuration
83
- } from 'hostinger-api-sdk';
84
-
85
- const configuration = new Configuration();
86
- const apiInstance = new HostingCacheApi(configuration);
87
-
88
- let username: string; // (default to undefined)
89
- let domain: string; //Domain name (default to undefined)
90
-
91
- const { status, data } = await apiInstance.disableCachelessModeV1(
92
- username,
93
- domain
94
- );
95
- ```
96
-
97
- ### Parameters
98
-
99
- |Name | Type | Description | Notes|
100
- |------------- | ------------- | ------------- | -------------|
101
- | **username** | [**string**] | | defaults to undefined|
102
- | **domain** | [**string**] | Domain name | defaults to undefined|
103
-
104
-
105
- ### Return type
106
-
107
- **CommonSuccessEmptyResource**
108
-
109
- ### Authorization
110
-
111
- [apiToken](../README.md#apiToken)
112
-
113
- ### HTTP request headers
114
-
115
- - **Content-Type**: Not defined
116
- - **Accept**: application/json
117
-
118
-
119
- ### HTTP response details
120
- | Status code | Description | Response headers |
121
- |-------------|-------------|------------------|
122
- |**200** | Success empty response | - |
123
- |**401** | Unauthenticated response | - |
124
- |**500** | Error response | - |
125
-
126
- [[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)
127
-
128
- # **disableWebsiteCacheV1**
129
- > CommonSuccessEmptyResource disableWebsiteCacheV1()
130
-
131
- Turns off server-side caching for the website until it is enabled again. May impact performance. Use it when experiencing cache-related issues; to temporarily bypass caching while developing or debugging, prefer enabling cacheless mode instead. Does nothing if caching is already disabled.
132
-
133
- ### Example
134
-
135
- ```typescript
136
- import {
137
- HostingCacheApi,
138
- Configuration
139
- } from 'hostinger-api-sdk';
140
-
141
- const configuration = new Configuration();
142
- const apiInstance = new HostingCacheApi(configuration);
143
-
144
- let username: string; // (default to undefined)
145
- let domain: string; //Domain name (default to undefined)
146
-
147
- const { status, data } = await apiInstance.disableWebsiteCacheV1(
148
- username,
149
- domain
150
- );
151
- ```
152
-
153
- ### Parameters
154
-
155
- |Name | Type | Description | Notes|
156
- |------------- | ------------- | ------------- | -------------|
157
- | **username** | [**string**] | | defaults to undefined|
158
- | **domain** | [**string**] | Domain name | defaults to undefined|
159
-
160
-
161
- ### Return type
162
-
163
- **CommonSuccessEmptyResource**
164
-
165
- ### Authorization
166
-
167
- [apiToken](../README.md#apiToken)
168
-
169
- ### HTTP request headers
170
-
171
- - **Content-Type**: Not defined
172
- - **Accept**: application/json
173
-
174
-
175
- ### HTTP response details
176
- | Status code | Description | Response headers |
177
- |-------------|-------------|------------------|
178
- |**200** | Success empty response | - |
179
- |**401** | Unauthenticated response | - |
180
- |**500** | Error response | - |
181
-
182
- [[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)
183
-
184
- # **enableCachelessModeV1**
185
- > CommonSuccessEmptyResource enableCachelessModeV1()
186
-
187
- Enables development (cacheless) mode where nothing is cached, effectively turning off all caching for the website. Use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable cacheless mode afterwards to restore normal caching.
188
-
189
- ### Example
190
-
191
- ```typescript
192
- import {
193
- HostingCacheApi,
194
- Configuration
80
+ Configuration,
81
+ HostingV1CacheToggleCachelessModeRequest
195
82
  } from 'hostinger-api-sdk';
196
83
 
197
84
  const configuration = new Configuration();
@@ -199,10 +86,12 @@ const apiInstance = new HostingCacheApi(configuration);
199
86
 
200
87
  let username: string; // (default to undefined)
201
88
  let domain: string; //Domain name (default to undefined)
89
+ let hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest; //
202
90
 
203
- const { status, data } = await apiInstance.enableCachelessModeV1(
91
+ const { status, data } = await apiInstance.toggleCachelessModeV1(
204
92
  username,
205
- domain
93
+ domain,
94
+ hostingV1CacheToggleCachelessModeRequest
206
95
  );
207
96
  ```
208
97
 
@@ -210,6 +99,7 @@ const { status, data } = await apiInstance.enableCachelessModeV1(
210
99
 
211
100
  |Name | Type | Description | Notes|
212
101
  |------------- | ------------- | ------------- | -------------|
102
+ | **hostingV1CacheToggleCachelessModeRequest** | **HostingV1CacheToggleCachelessModeRequest**| | |
213
103
  | **username** | [**string**] | | defaults to undefined|
214
104
  | **domain** | [**string**] | Domain name | defaults to undefined|
215
105
 
@@ -224,7 +114,7 @@ const { status, data } = await apiInstance.enableCachelessModeV1(
224
114
 
225
115
  ### HTTP request headers
226
116
 
227
- - **Content-Type**: Not defined
117
+ - **Content-Type**: application/json
228
118
  - **Accept**: application/json
229
119
 
230
120
 
@@ -232,22 +122,24 @@ const { status, data } = await apiInstance.enableCachelessModeV1(
232
122
  | Status code | Description | Response headers |
233
123
  |-------------|-------------|------------------|
234
124
  |**200** | Success empty response | - |
125
+ |**422** | Validation error response | - |
235
126
  |**401** | Unauthenticated response | - |
236
127
  |**500** | Error response | - |
237
128
 
238
129
  [[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)
239
130
 
240
- # **enableWebsiteCacheV1**
241
- > CommonSuccessEmptyResource enableWebsiteCacheV1()
131
+ # **toggleWebsiteCacheV1**
132
+ > CommonSuccessEmptyResource toggleWebsiteCacheV1(hostingV1CacheToggleCacheRequest)
242
133
 
243
- Turns on server-side caching for the website for better performance. Use it for faster page loads, reduced server load, or improved user experience. Recommended for production websites. Does nothing if caching is already enabled.
134
+ Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
244
135
 
245
136
  ### Example
246
137
 
247
138
  ```typescript
248
139
  import {
249
140
  HostingCacheApi,
250
- Configuration
141
+ Configuration,
142
+ HostingV1CacheToggleCacheRequest
251
143
  } from 'hostinger-api-sdk';
252
144
 
253
145
  const configuration = new Configuration();
@@ -255,10 +147,12 @@ const apiInstance = new HostingCacheApi(configuration);
255
147
 
256
148
  let username: string; // (default to undefined)
257
149
  let domain: string; //Domain name (default to undefined)
150
+ let hostingV1CacheToggleCacheRequest: HostingV1CacheToggleCacheRequest; //
258
151
 
259
- const { status, data } = await apiInstance.enableWebsiteCacheV1(
152
+ const { status, data } = await apiInstance.toggleWebsiteCacheV1(
260
153
  username,
261
- domain
154
+ domain,
155
+ hostingV1CacheToggleCacheRequest
262
156
  );
263
157
  ```
264
158
 
@@ -266,6 +160,7 @@ const { status, data } = await apiInstance.enableWebsiteCacheV1(
266
160
 
267
161
  |Name | Type | Description | Notes|
268
162
  |------------- | ------------- | ------------- | -------------|
163
+ | **hostingV1CacheToggleCacheRequest** | **HostingV1CacheToggleCacheRequest**| | |
269
164
  | **username** | [**string**] | | defaults to undefined|
270
165
  | **domain** | [**string**] | Domain name | defaults to undefined|
271
166
 
@@ -280,7 +175,7 @@ const { status, data } = await apiInstance.enableWebsiteCacheV1(
280
175
 
281
176
  ### HTTP request headers
282
177
 
283
- - **Content-Type**: Not defined
178
+ - **Content-Type**: application/json
284
179
  - **Accept**: application/json
285
180
 
286
181
 
@@ -288,6 +183,7 @@ const { status, data } = await apiInstance.enableWebsiteCacheV1(
288
183
  | Status code | Description | Response headers |
289
184
  |-------------|-------------|------------------|
290
185
  |**200** | Success empty response | - |
186
+ |**422** | Validation error response | - |
291
187
  |**401** | Unauthenticated response | - |
292
188
  |**500** | Error response | - |
293
189
 
@@ -0,0 +1,20 @@
1
+ # HostingV1CacheToggleCacheRequest
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **enabled** | **boolean** | Turn server-side caching on (true) or off (false) for the website. | [default to undefined]
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import { HostingV1CacheToggleCacheRequest } from 'hostinger-api-sdk';
14
+
15
+ const instance: HostingV1CacheToggleCacheRequest = {
16
+ 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)
@@ -0,0 +1,20 @@
1
+ # HostingV1CacheToggleCachelessModeRequest
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **enabled** | **boolean** | Turn development (cacheless) mode on (true) or off (false) for the website. | [default to undefined]
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import { HostingV1CacheToggleCachelessModeRequest } from 'hostinger-api-sdk';
14
+
15
+ const instance: HostingV1CacheToggleCachelessModeRequest = {
16
+ 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)
package/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.5.0
6
+ * API Version: 1.5.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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hostinger-api-sdk",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Hostinger API TypeScript SDK",
5
5
  "author": "Hostinger",
6
6
  "repository": {