hostinger-api-sdk 0.0.22 → 0.0.23

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.
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 0.19.4
6
+ * API Version: 0.20.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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 0.19.4
4
+ * API Version: 0.20.0
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: 0.19.4
6
+ * API Version: 0.20.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
@@ -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/0.0.22" }, (_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/0.0.23" }, (_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: 0.19.4
4
+ * API Version: 0.20.0
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: 0.19.4
6
+ * API Version: 0.20.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
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 0.19.4
4
+ * API Version: 0.20.0
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: 0.19.4
7
+ * API Version: 0.20.0
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
@@ -5,9 +5,12 @@ All URIs are relative to *https://developers.hostinger.com*
5
5
  |Method | HTTP request | Description|
6
6
  |------------- | ------------- | -------------|
7
7
  |[**changeDatabasePasswordV1**](#changedatabasepasswordv1) | **PATCH** /api/hosting/v1/accounts/{username}/databases/{name}/change-password | Change database password|
8
+ |[**createAccountDatabaseRemoteConnectionV1**](#createaccountdatabaseremoteconnectionv1) | **POST** /api/hosting/v1/accounts/{username}/databases/{name}/remote-connections | Create account database remote connection|
8
9
  |[**createAccountDatabaseV1**](#createaccountdatabasev1) | **POST** /api/hosting/v1/accounts/{username}/databases | Create account database|
10
+ |[**deleteAccountDatabaseRemoteConnectionV1**](#deleteaccountdatabaseremoteconnectionv1) | **DELETE** /api/hosting/v1/accounts/{username}/databases/{name}/remote-connections | Delete account database remote connection|
9
11
  |[**deleteAccountDatabaseV1**](#deleteaccountdatabasev1) | **DELETE** /api/hosting/v1/accounts/{username}/databases/{name} | Delete account database|
10
12
  |[**getPhpMyAdminLinkV1**](#getphpmyadminlinkv1) | **GET** /api/hosting/v1/accounts/{username}/databases/{name}/phpmyadmin-link | Get phpMyAdmin link|
13
+ |[**listAccountDatabaseRemoteConnectionsV1**](#listaccountdatabaseremoteconnectionsv1) | **GET** /api/hosting/v1/accounts/{username}/databases/remote-connections | List account database remote connections|
11
14
  |[**listAccountDatabasesV1**](#listaccountdatabasesv1) | **GET** /api/hosting/v1/accounts/{username}/databases | List account databases|
12
15
  |[**repairDatabaseV1**](#repairdatabasev1) | **PATCH** /api/hosting/v1/accounts/{username}/databases/{name}/repair | Repair database|
13
16
 
@@ -48,6 +51,67 @@ const { status, data } = await apiInstance.changeDatabasePasswordV1(
48
51
  | **name** | [**string**] | Full database name as returned by the list databases endpoint. | defaults to undefined|
49
52
 
50
53
 
54
+ ### Return type
55
+
56
+ **CommonSuccessEmptyResource**
57
+
58
+ ### Authorization
59
+
60
+ [apiToken](../README.md#apiToken)
61
+
62
+ ### HTTP request headers
63
+
64
+ - **Content-Type**: application/json
65
+ - **Accept**: application/json
66
+
67
+
68
+ ### HTTP response details
69
+ | Status code | Description | Response headers |
70
+ |-------------|-------------|------------------|
71
+ |**200** | Success empty response | - |
72
+ |**422** | Validation error response | - |
73
+ |**401** | Unauthenticated response | - |
74
+ |**500** | Error response | - |
75
+
76
+ [[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)
77
+
78
+ # **createAccountDatabaseRemoteConnectionV1**
79
+ > CommonSuccessEmptyResource createAccountDatabaseRemoteConnectionV1(hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest)
80
+
81
+ Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint.
82
+
83
+ ### Example
84
+
85
+ ```typescript
86
+ import {
87
+ HostingDatabasesApi,
88
+ Configuration,
89
+ HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest
90
+ } from 'hostinger-api-sdk';
91
+
92
+ const configuration = new Configuration();
93
+ const apiInstance = new HostingDatabasesApi(configuration);
94
+
95
+ let username: string; // (default to undefined)
96
+ let name: string; //Full database name as returned by the list databases endpoint. (default to undefined)
97
+ let hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest: HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest; //
98
+
99
+ const { status, data } = await apiInstance.createAccountDatabaseRemoteConnectionV1(
100
+ username,
101
+ name,
102
+ hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest
103
+ );
104
+ ```
105
+
106
+ ### Parameters
107
+
108
+ |Name | Type | Description | Notes|
109
+ |------------- | ------------- | ------------- | -------------|
110
+ | **hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest** | **HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest**| | |
111
+ | **username** | [**string**] | | defaults to undefined|
112
+ | **name** | [**string**] | Full database name as returned by the list databases endpoint. | defaults to undefined|
113
+
114
+
51
115
  ### Return type
52
116
 
53
117
  **CommonSuccessEmptyResource**
@@ -130,6 +194,65 @@ const { status, data } = await apiInstance.createAccountDatabaseV1(
130
194
 
131
195
  [[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)
132
196
 
197
+ # **deleteAccountDatabaseRemoteConnectionV1**
198
+ > CommonSuccessEmptyResource deleteAccountDatabaseRemoteConnectionV1()
199
+
200
+ Permanently removes a remote-access rule, revoking the given host\'s remote access to the database. Identify the rule with the required ip query parameter (the IPv4/IPv6 address, or \"%\", exactly as returned by the list remote connections endpoint). The database name must be the full name returned by the list databases endpoint.
201
+
202
+ ### Example
203
+
204
+ ```typescript
205
+ import {
206
+ HostingDatabasesApi,
207
+ Configuration
208
+ } from 'hostinger-api-sdk';
209
+
210
+ const configuration = new Configuration();
211
+ const apiInstance = new HostingDatabasesApi(configuration);
212
+
213
+ let username: string; // (default to undefined)
214
+ let name: string; //Full database name as returned by the list databases endpoint. (default to undefined)
215
+ let ip: string; //Remote host to revoke: the IPv4/IPv6 address, or \"%\", exactly as returned by the list remote connections endpoint. (default to undefined)
216
+
217
+ const { status, data } = await apiInstance.deleteAccountDatabaseRemoteConnectionV1(
218
+ username,
219
+ name,
220
+ ip
221
+ );
222
+ ```
223
+
224
+ ### Parameters
225
+
226
+ |Name | Type | Description | Notes|
227
+ |------------- | ------------- | ------------- | -------------|
228
+ | **username** | [**string**] | | defaults to undefined|
229
+ | **name** | [**string**] | Full database name as returned by the list databases endpoint. | defaults to undefined|
230
+ | **ip** | [**string**] | Remote host to revoke: the IPv4/IPv6 address, or \"%\", exactly as returned by the list remote connections endpoint. | defaults to undefined|
231
+
232
+
233
+ ### Return type
234
+
235
+ **CommonSuccessEmptyResource**
236
+
237
+ ### Authorization
238
+
239
+ [apiToken](../README.md#apiToken)
240
+
241
+ ### HTTP request headers
242
+
243
+ - **Content-Type**: Not defined
244
+ - **Accept**: application/json
245
+
246
+
247
+ ### HTTP response details
248
+ | Status code | Description | Response headers |
249
+ |-------------|-------------|------------------|
250
+ |**200** | Success empty response | - |
251
+ |**401** | Unauthenticated response | - |
252
+ |**500** | Error response | - |
253
+
254
+ [[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)
255
+
133
256
  # **deleteAccountDatabaseV1**
134
257
  > CommonSuccessEmptyResource deleteAccountDatabaseV1()
135
258
 
@@ -233,6 +356,62 @@ const { status, data } = await apiInstance.getPhpMyAdminLinkV1(
233
356
  - **Accept**: application/json
234
357
 
235
358
 
359
+ ### HTTP response details
360
+ | Status code | Description | Response headers |
361
+ |-------------|-------------|------------------|
362
+ |**200** | Success response | - |
363
+ |**401** | Unauthenticated response | - |
364
+ |**500** | Error response | - |
365
+
366
+ [[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)
367
+
368
+ # **listAccountDatabaseRemoteConnectionsV1**
369
+ > Array<HostingV1DatabasesRemoteConnectionsRemoteConnectionResource> listAccountDatabaseRemoteConnectionsV1()
370
+
371
+ Returns the remote-access rules for the specified account: the remote hosts (IPv4/IPv6 addresses, or \"%\" for any host) allowed to connect to the account databases. Use the domain filter to only return rules for databases assigned to a specific domain.
372
+
373
+ ### Example
374
+
375
+ ```typescript
376
+ import {
377
+ HostingDatabasesApi,
378
+ Configuration
379
+ } from 'hostinger-api-sdk';
380
+
381
+ const configuration = new Configuration();
382
+ const apiInstance = new HostingDatabasesApi(configuration);
383
+
384
+ let username: string; // (default to undefined)
385
+ let domain: string; //Filter remote connections by the domain the database is assigned to. Rules for databases not assigned to any domain are always included. (optional) (default to undefined)
386
+
387
+ const { status, data } = await apiInstance.listAccountDatabaseRemoteConnectionsV1(
388
+ username,
389
+ domain
390
+ );
391
+ ```
392
+
393
+ ### Parameters
394
+
395
+ |Name | Type | Description | Notes|
396
+ |------------- | ------------- | ------------- | -------------|
397
+ | **username** | [**string**] | | defaults to undefined|
398
+ | **domain** | [**string**] | Filter remote connections by the domain the database is assigned to. Rules for databases not assigned to any domain are always included. | (optional) defaults to undefined|
399
+
400
+
401
+ ### Return type
402
+
403
+ **Array<HostingV1DatabasesRemoteConnectionsRemoteConnectionResource>**
404
+
405
+ ### Authorization
406
+
407
+ [apiToken](../README.md#apiToken)
408
+
409
+ ### HTTP request headers
410
+
411
+ - **Content-Type**: Not defined
412
+ - **Accept**: application/json
413
+
414
+
236
415
  ### HTTP response details
237
416
  | Status code | Description | Response headers |
238
417
  |-------------|-------------|------------------|
@@ -0,0 +1,20 @@
1
+ # HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **ip** | **string** | Remote host to allow: an IPv4/IPv6 address, or \&quot;%\&quot; for any host. | [default to undefined]
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import { HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest } from 'hostinger-api-sdk';
14
+
15
+ const instance: HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest = {
16
+ ip,
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,24 @@
1
+ # HostingV1DatabasesRemoteConnectionsRemoteConnectionResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **database_name** | **string** | Full name of the database the rule applies to. | [optional] [default to undefined]
9
+ **database_user** | **string** | Database user the rule applies to. | [optional] [default to undefined]
10
+ **ip** | **string** | Allowed remote host: an IPv4/IPv6 address, or \&quot;%\&quot; for any host. | [optional] [default to undefined]
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import { HostingV1DatabasesRemoteConnectionsRemoteConnectionResource } from 'hostinger-api-sdk';
16
+
17
+ const instance: HostingV1DatabasesRemoteConnectionsRemoteConnectionResource = {
18
+ database_name,
19
+ database_user,
20
+ ip,
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)
package/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 0.19.4
6
+ * API Version: 0.20.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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hostinger-api-sdk",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "Hostinger API TypeScript SDK",
5
5
  "author": "Hostinger",
6
6
  "repository": {