hostinger-api-sdk 1.33.1 → 1.35.0
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 +1179 -72
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +643 -1
- package/dist/api.js +866 -25
- 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 +643 -1
- package/dist/esm/api.js +846 -13
- 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/AgencyHostingPHPApi.md +400 -0
- package/docs/AgencyHostingV1PhpExtensionResource.md +24 -0
- package/docs/AgencyHostingV1PhpOptionResource.md +30 -0
- package/docs/AgencyHostingV1PhpUpdateExtensionsRequest.md +20 -0
- package/docs/AgencyHostingV1PhpUpdateOptionsRequest.md +20 -0
- package/docs/AgencyHostingV1PhpUpdateOptionsRequestOptionsInner.md +22 -0
- package/docs/AgencyHostingV1PhpUpdateVersionRequest.md +20 -0
- package/docs/AgencyHostingV1PhpVersionResource.md +20 -0
- package/docs/HostingListWebsiteRedirectsV1200Response.md +22 -0
- package/docs/HostingRedirectsApi.md +193 -0
- package/docs/HostingV1RedirectsCreateRedirectRequest.md +22 -0
- package/docs/HostingV1RedirectsDeleteRedirectRequest.md +20 -0
- package/docs/HostingV1RedirectsRedirectResource.md +22 -0
- package/index.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# HostingListWebsiteRedirectsV1200Response
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**data** | [**Array<HostingV1RedirectsRedirectResource>**](HostingV1RedirectsRedirectResource.md) | Array of [`Hosting.V1.Redirects.RedirectResource`](#model/hostingv1redirectsredirectresource) | [optional] [default to undefined]
|
|
9
|
+
**meta** | [**CommonSchemaPaginationMetaSchema**](CommonSchemaPaginationMetaSchema.md) | | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { HostingListWebsiteRedirectsV1200Response } from 'hostinger-api-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: HostingListWebsiteRedirectsV1200Response = {
|
|
17
|
+
data,
|
|
18
|
+
meta,
|
|
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,193 @@
|
|
|
1
|
+
# HostingRedirectsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://developers.hostinger.com*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**createWebsiteRedirectV1**](#createwebsiteredirectv1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/redirects | Create website redirect|
|
|
8
|
+
|[**deleteWebsiteRedirectV1**](#deletewebsiteredirectv1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/redirects | Delete website redirect|
|
|
9
|
+
|[**listWebsiteRedirectsV1**](#listwebsiteredirectsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/redirects | List website redirects|
|
|
10
|
+
|
|
11
|
+
# **createWebsiteRedirectV1**
|
|
12
|
+
> HostingV1RedirectsRedirectResource createWebsiteRedirectV1(hostingV1RedirectsCreateRedirectRequest)
|
|
13
|
+
|
|
14
|
+
Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
15
|
+
|
|
16
|
+
### Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import {
|
|
20
|
+
HostingRedirectsApi,
|
|
21
|
+
Configuration,
|
|
22
|
+
HostingV1RedirectsCreateRedirectRequest
|
|
23
|
+
} from 'hostinger-api-sdk';
|
|
24
|
+
|
|
25
|
+
const configuration = new Configuration();
|
|
26
|
+
const apiInstance = new HostingRedirectsApi(configuration);
|
|
27
|
+
|
|
28
|
+
let username: string; // (default to undefined)
|
|
29
|
+
let domain: string; //Domain name (default to undefined)
|
|
30
|
+
let hostingV1RedirectsCreateRedirectRequest: HostingV1RedirectsCreateRedirectRequest; //
|
|
31
|
+
|
|
32
|
+
const { status, data } = await apiInstance.createWebsiteRedirectV1(
|
|
33
|
+
username,
|
|
34
|
+
domain,
|
|
35
|
+
hostingV1RedirectsCreateRedirectRequest
|
|
36
|
+
);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Parameters
|
|
40
|
+
|
|
41
|
+
|Name | Type | Description | Notes|
|
|
42
|
+
|------------- | ------------- | ------------- | -------------|
|
|
43
|
+
| **hostingV1RedirectsCreateRedirectRequest** | **HostingV1RedirectsCreateRedirectRequest**| | |
|
|
44
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
45
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Return type
|
|
49
|
+
|
|
50
|
+
**HostingV1RedirectsRedirectResource**
|
|
51
|
+
|
|
52
|
+
### Authorization
|
|
53
|
+
|
|
54
|
+
[apiToken](../README.md#apiToken)
|
|
55
|
+
|
|
56
|
+
### HTTP request headers
|
|
57
|
+
|
|
58
|
+
- **Content-Type**: application/json
|
|
59
|
+
- **Accept**: application/json
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### HTTP response details
|
|
63
|
+
| Status code | Description | Response headers |
|
|
64
|
+
|-------------|-------------|------------------|
|
|
65
|
+
|**200** | Success response | - |
|
|
66
|
+
|**422** | Validation error response | - |
|
|
67
|
+
|**401** | Unauthenticated response | - |
|
|
68
|
+
|**500** | Error response | - |
|
|
69
|
+
|
|
70
|
+
[[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
|
+
|
|
72
|
+
# **deleteWebsiteRedirectV1**
|
|
73
|
+
> CommonSuccessEmptyResource deleteWebsiteRedirectV1()
|
|
74
|
+
|
|
75
|
+
Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
76
|
+
|
|
77
|
+
### Example
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
import {
|
|
81
|
+
HostingRedirectsApi,
|
|
82
|
+
Configuration
|
|
83
|
+
} from 'hostinger-api-sdk';
|
|
84
|
+
|
|
85
|
+
const configuration = new Configuration();
|
|
86
|
+
const apiInstance = new HostingRedirectsApi(configuration);
|
|
87
|
+
|
|
88
|
+
let username: string; // (default to undefined)
|
|
89
|
+
let domain: string; //Domain name (default to undefined)
|
|
90
|
+
let from: string; //Source URL returned by the list redirects endpoint. (default to undefined)
|
|
91
|
+
|
|
92
|
+
const { status, data } = await apiInstance.deleteWebsiteRedirectV1(
|
|
93
|
+
username,
|
|
94
|
+
domain,
|
|
95
|
+
from
|
|
96
|
+
);
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Parameters
|
|
100
|
+
|
|
101
|
+
|Name | Type | Description | Notes|
|
|
102
|
+
|------------- | ------------- | ------------- | -------------|
|
|
103
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
104
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
105
|
+
| **from** | [**string**] | Source URL returned by the list redirects endpoint. | defaults to undefined|
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Return type
|
|
109
|
+
|
|
110
|
+
**CommonSuccessEmptyResource**
|
|
111
|
+
|
|
112
|
+
### Authorization
|
|
113
|
+
|
|
114
|
+
[apiToken](../README.md#apiToken)
|
|
115
|
+
|
|
116
|
+
### HTTP request headers
|
|
117
|
+
|
|
118
|
+
- **Content-Type**: Not defined
|
|
119
|
+
- **Accept**: application/json
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
### HTTP response details
|
|
123
|
+
| Status code | Description | Response headers |
|
|
124
|
+
|-------------|-------------|------------------|
|
|
125
|
+
|**200** | Success empty response | - |
|
|
126
|
+
|**422** | Validation error response | - |
|
|
127
|
+
|**401** | Unauthenticated response | - |
|
|
128
|
+
|**500** | Error response | - |
|
|
129
|
+
|
|
130
|
+
[[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)
|
|
131
|
+
|
|
132
|
+
# **listWebsiteRedirectsV1**
|
|
133
|
+
> HostingListWebsiteRedirectsV1200Response listWebsiteRedirectsV1()
|
|
134
|
+
|
|
135
|
+
Returns a paginated list of redirects configured for the selected website.
|
|
136
|
+
|
|
137
|
+
### Example
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
import {
|
|
141
|
+
HostingRedirectsApi,
|
|
142
|
+
Configuration
|
|
143
|
+
} from 'hostinger-api-sdk';
|
|
144
|
+
|
|
145
|
+
const configuration = new Configuration();
|
|
146
|
+
const apiInstance = new HostingRedirectsApi(configuration);
|
|
147
|
+
|
|
148
|
+
let username: string; // (default to undefined)
|
|
149
|
+
let domain: string; //Domain name (default to undefined)
|
|
150
|
+
let page: number; //Page number (optional) (default to undefined)
|
|
151
|
+
let perPage: number; //Number of items per page (optional) (default to 25)
|
|
152
|
+
|
|
153
|
+
const { status, data } = await apiInstance.listWebsiteRedirectsV1(
|
|
154
|
+
username,
|
|
155
|
+
domain,
|
|
156
|
+
page,
|
|
157
|
+
perPage
|
|
158
|
+
);
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Parameters
|
|
162
|
+
|
|
163
|
+
|Name | Type | Description | Notes|
|
|
164
|
+
|------------- | ------------- | ------------- | -------------|
|
|
165
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
166
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
167
|
+
| **page** | [**number**] | Page number | (optional) defaults to undefined|
|
|
168
|
+
| **perPage** | [**number**] | Number of items per page | (optional) defaults to 25|
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
### Return type
|
|
172
|
+
|
|
173
|
+
**HostingListWebsiteRedirectsV1200Response**
|
|
174
|
+
|
|
175
|
+
### Authorization
|
|
176
|
+
|
|
177
|
+
[apiToken](../README.md#apiToken)
|
|
178
|
+
|
|
179
|
+
### HTTP request headers
|
|
180
|
+
|
|
181
|
+
- **Content-Type**: Not defined
|
|
182
|
+
- **Accept**: application/json
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
### HTTP response details
|
|
186
|
+
| Status code | Description | Response headers |
|
|
187
|
+
|-------------|-------------|------------------|
|
|
188
|
+
|**200** | Success response | - |
|
|
189
|
+
|**401** | Unauthenticated response | - |
|
|
190
|
+
|**500** | Error response | - |
|
|
191
|
+
|
|
192
|
+
[[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)
|
|
193
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# HostingV1RedirectsCreateRedirectRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**from** | **string** | Source URL on the selected website | [default to undefined]
|
|
9
|
+
**to** | **string** | Destination URL or IP address | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { HostingV1RedirectsCreateRedirectRequest } from 'hostinger-api-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: HostingV1RedirectsCreateRedirectRequest = {
|
|
17
|
+
from,
|
|
18
|
+
to,
|
|
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,20 @@
|
|
|
1
|
+
# HostingV1RedirectsDeleteRedirectRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**from** | **string** | Source URL returned by the list redirects endpoint | [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { HostingV1RedirectsDeleteRedirectRequest } from 'hostinger-api-sdk';
|
|
14
|
+
|
|
15
|
+
const instance: HostingV1RedirectsDeleteRedirectRequest = {
|
|
16
|
+
from,
|
|
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,22 @@
|
|
|
1
|
+
# HostingV1RedirectsRedirectResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**from** | **string** | Source URL | [optional] [default to undefined]
|
|
9
|
+
**to** | **string** | Destination URL | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { HostingV1RedirectsRedirectResource } from 'hostinger-api-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: HostingV1RedirectsRedirectResource = {
|
|
17
|
+
from,
|
|
18
|
+
to,
|
|
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)
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.37.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
|