hostinger-api-sdk 1.34.0 → 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 +382 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +224 -1
- package/dist/api.js +300 -6
- 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 +224 -1
- package/dist/esm/api.js +291 -1
- 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/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
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
## hostinger-api-sdk@1.
|
|
1
|
+
## hostinger-api-sdk@1.35.0
|
|
2
2
|
|
|
3
3
|
For more information, please visit [https://developers.hostinger.com](https://developers.hostinger.com).
|
|
4
4
|
|
|
5
5
|
### Usage
|
|
6
6
|
|
|
7
7
|
```
|
|
8
|
-
npm install hostinger-api-sdk@1.
|
|
8
|
+
npm install hostinger-api-sdk@1.35.0 --save
|
|
9
9
|
```
|
package/api.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
|
|
@@ -4506,6 +4506,25 @@ export interface HostingListOrdersV1200Response {
|
|
|
4506
4506
|
*/
|
|
4507
4507
|
'meta': CommonSchemaPaginationMetaSchema;
|
|
4508
4508
|
}
|
|
4509
|
+
/**
|
|
4510
|
+
*
|
|
4511
|
+
* @export
|
|
4512
|
+
* @interface HostingListWebsiteRedirectsV1200Response
|
|
4513
|
+
*/
|
|
4514
|
+
export interface HostingListWebsiteRedirectsV1200Response {
|
|
4515
|
+
/**
|
|
4516
|
+
* Array of [`Hosting.V1.Redirects.RedirectResource`](#model/hostingv1redirectsredirectresource)
|
|
4517
|
+
* @type {Array<HostingV1RedirectsRedirectResource>}
|
|
4518
|
+
* @memberof HostingListWebsiteRedirectsV1200Response
|
|
4519
|
+
*/
|
|
4520
|
+
'data': Array<HostingV1RedirectsRedirectResource>;
|
|
4521
|
+
/**
|
|
4522
|
+
*
|
|
4523
|
+
* @type {CommonSchemaPaginationMetaSchema}
|
|
4524
|
+
* @memberof HostingListWebsiteRedirectsV1200Response
|
|
4525
|
+
*/
|
|
4526
|
+
'meta': CommonSchemaPaginationMetaSchema;
|
|
4527
|
+
}
|
|
4509
4528
|
/**
|
|
4510
4529
|
*
|
|
4511
4530
|
* @export
|
|
@@ -5756,6 +5775,57 @@ export interface HostingV1PhpUpdatePhpVersionRequest {
|
|
|
5756
5775
|
*/
|
|
5757
5776
|
'version': string;
|
|
5758
5777
|
}
|
|
5778
|
+
/**
|
|
5779
|
+
*
|
|
5780
|
+
* @export
|
|
5781
|
+
* @interface HostingV1RedirectsCreateRedirectRequest
|
|
5782
|
+
*/
|
|
5783
|
+
export interface HostingV1RedirectsCreateRedirectRequest {
|
|
5784
|
+
/**
|
|
5785
|
+
* Source URL on the selected website
|
|
5786
|
+
* @type {string}
|
|
5787
|
+
* @memberof HostingV1RedirectsCreateRedirectRequest
|
|
5788
|
+
*/
|
|
5789
|
+
'from': string;
|
|
5790
|
+
/**
|
|
5791
|
+
* Destination URL or IP address
|
|
5792
|
+
* @type {string}
|
|
5793
|
+
* @memberof HostingV1RedirectsCreateRedirectRequest
|
|
5794
|
+
*/
|
|
5795
|
+
'to': string;
|
|
5796
|
+
}
|
|
5797
|
+
/**
|
|
5798
|
+
*
|
|
5799
|
+
* @export
|
|
5800
|
+
* @interface HostingV1RedirectsDeleteRedirectRequest
|
|
5801
|
+
*/
|
|
5802
|
+
export interface HostingV1RedirectsDeleteRedirectRequest {
|
|
5803
|
+
/**
|
|
5804
|
+
* Source URL returned by the list redirects endpoint
|
|
5805
|
+
* @type {string}
|
|
5806
|
+
* @memberof HostingV1RedirectsDeleteRedirectRequest
|
|
5807
|
+
*/
|
|
5808
|
+
'from': string;
|
|
5809
|
+
}
|
|
5810
|
+
/**
|
|
5811
|
+
*
|
|
5812
|
+
* @export
|
|
5813
|
+
* @interface HostingV1RedirectsRedirectResource
|
|
5814
|
+
*/
|
|
5815
|
+
export interface HostingV1RedirectsRedirectResource {
|
|
5816
|
+
/**
|
|
5817
|
+
* Source URL
|
|
5818
|
+
* @type {string}
|
|
5819
|
+
* @memberof HostingV1RedirectsRedirectResource
|
|
5820
|
+
*/
|
|
5821
|
+
'from': string;
|
|
5822
|
+
/**
|
|
5823
|
+
* Destination URL
|
|
5824
|
+
* @type {string}
|
|
5825
|
+
* @memberof HostingV1RedirectsRedirectResource
|
|
5826
|
+
*/
|
|
5827
|
+
'to': string;
|
|
5828
|
+
}
|
|
5759
5829
|
/**
|
|
5760
5830
|
*
|
|
5761
5831
|
* @export
|
|
@@ -26005,6 +26075,317 @@ export class HostingPHPApi extends BaseAPI {
|
|
|
26005
26075
|
|
|
26006
26076
|
|
|
26007
26077
|
|
|
26078
|
+
/**
|
|
26079
|
+
* HostingRedirectsApi - axios parameter creator
|
|
26080
|
+
* @export
|
|
26081
|
+
*/
|
|
26082
|
+
export const HostingRedirectsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
26083
|
+
return {
|
|
26084
|
+
/**
|
|
26085
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
26086
|
+
* @summary Create website redirect
|
|
26087
|
+
* @param {string} username
|
|
26088
|
+
* @param {string} domain Domain name
|
|
26089
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
26090
|
+
* @param {*} [options] Override http request option.
|
|
26091
|
+
* @throws {RequiredError}
|
|
26092
|
+
*/
|
|
26093
|
+
createWebsiteRedirectV1: async (username: string, domain: string, hostingV1RedirectsCreateRedirectRequest: HostingV1RedirectsCreateRedirectRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
26094
|
+
// verify required parameter 'username' is not null or undefined
|
|
26095
|
+
assertParamExists('createWebsiteRedirectV1', 'username', username)
|
|
26096
|
+
// verify required parameter 'domain' is not null or undefined
|
|
26097
|
+
assertParamExists('createWebsiteRedirectV1', 'domain', domain)
|
|
26098
|
+
// verify required parameter 'hostingV1RedirectsCreateRedirectRequest' is not null or undefined
|
|
26099
|
+
assertParamExists('createWebsiteRedirectV1', 'hostingV1RedirectsCreateRedirectRequest', hostingV1RedirectsCreateRedirectRequest)
|
|
26100
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/redirects`
|
|
26101
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
26102
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
26103
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
26104
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
26105
|
+
let baseOptions;
|
|
26106
|
+
if (configuration) {
|
|
26107
|
+
baseOptions = configuration.baseOptions;
|
|
26108
|
+
}
|
|
26109
|
+
|
|
26110
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
26111
|
+
const localVarHeaderParameter = {} as any;
|
|
26112
|
+
const localVarQueryParameter = {} as any;
|
|
26113
|
+
|
|
26114
|
+
// authentication apiToken required
|
|
26115
|
+
// http bearer authentication required
|
|
26116
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
26117
|
+
|
|
26118
|
+
|
|
26119
|
+
|
|
26120
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
26121
|
+
|
|
26122
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
26123
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
26124
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
26125
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1RedirectsCreateRedirectRequest, localVarRequestOptions, configuration)
|
|
26126
|
+
|
|
26127
|
+
return {
|
|
26128
|
+
url: toPathString(localVarUrlObj),
|
|
26129
|
+
options: localVarRequestOptions,
|
|
26130
|
+
};
|
|
26131
|
+
},
|
|
26132
|
+
/**
|
|
26133
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
26134
|
+
* @summary Delete website redirect
|
|
26135
|
+
* @param {string} username
|
|
26136
|
+
* @param {string} domain Domain name
|
|
26137
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
26138
|
+
* @param {*} [options] Override http request option.
|
|
26139
|
+
* @throws {RequiredError}
|
|
26140
|
+
*/
|
|
26141
|
+
deleteWebsiteRedirectV1: async (username: string, domain: string, from: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
26142
|
+
// verify required parameter 'username' is not null or undefined
|
|
26143
|
+
assertParamExists('deleteWebsiteRedirectV1', 'username', username)
|
|
26144
|
+
// verify required parameter 'domain' is not null or undefined
|
|
26145
|
+
assertParamExists('deleteWebsiteRedirectV1', 'domain', domain)
|
|
26146
|
+
// verify required parameter 'from' is not null or undefined
|
|
26147
|
+
assertParamExists('deleteWebsiteRedirectV1', 'from', from)
|
|
26148
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/redirects`
|
|
26149
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
26150
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
26151
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
26152
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
26153
|
+
let baseOptions;
|
|
26154
|
+
if (configuration) {
|
|
26155
|
+
baseOptions = configuration.baseOptions;
|
|
26156
|
+
}
|
|
26157
|
+
|
|
26158
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
26159
|
+
const localVarHeaderParameter = {} as any;
|
|
26160
|
+
const localVarQueryParameter = {} as any;
|
|
26161
|
+
|
|
26162
|
+
// authentication apiToken required
|
|
26163
|
+
// http bearer authentication required
|
|
26164
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
26165
|
+
|
|
26166
|
+
if (from !== undefined) {
|
|
26167
|
+
localVarQueryParameter['from'] = from;
|
|
26168
|
+
}
|
|
26169
|
+
|
|
26170
|
+
|
|
26171
|
+
|
|
26172
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
26173
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
26174
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
26175
|
+
|
|
26176
|
+
return {
|
|
26177
|
+
url: toPathString(localVarUrlObj),
|
|
26178
|
+
options: localVarRequestOptions,
|
|
26179
|
+
};
|
|
26180
|
+
},
|
|
26181
|
+
/**
|
|
26182
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
26183
|
+
* @summary List website redirects
|
|
26184
|
+
* @param {string} username
|
|
26185
|
+
* @param {string} domain Domain name
|
|
26186
|
+
* @param {number} [page] Page number
|
|
26187
|
+
* @param {number} [perPage] Number of items per page
|
|
26188
|
+
* @param {*} [options] Override http request option.
|
|
26189
|
+
* @throws {RequiredError}
|
|
26190
|
+
*/
|
|
26191
|
+
listWebsiteRedirectsV1: async (username: string, domain: string, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
26192
|
+
// verify required parameter 'username' is not null or undefined
|
|
26193
|
+
assertParamExists('listWebsiteRedirectsV1', 'username', username)
|
|
26194
|
+
// verify required parameter 'domain' is not null or undefined
|
|
26195
|
+
assertParamExists('listWebsiteRedirectsV1', 'domain', domain)
|
|
26196
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/redirects`
|
|
26197
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
26198
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
26199
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
26200
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
26201
|
+
let baseOptions;
|
|
26202
|
+
if (configuration) {
|
|
26203
|
+
baseOptions = configuration.baseOptions;
|
|
26204
|
+
}
|
|
26205
|
+
|
|
26206
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
26207
|
+
const localVarHeaderParameter = {} as any;
|
|
26208
|
+
const localVarQueryParameter = {} as any;
|
|
26209
|
+
|
|
26210
|
+
// authentication apiToken required
|
|
26211
|
+
// http bearer authentication required
|
|
26212
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
26213
|
+
|
|
26214
|
+
if (page !== undefined) {
|
|
26215
|
+
localVarQueryParameter['page'] = page;
|
|
26216
|
+
}
|
|
26217
|
+
|
|
26218
|
+
if (perPage !== undefined) {
|
|
26219
|
+
localVarQueryParameter['per_page'] = perPage;
|
|
26220
|
+
}
|
|
26221
|
+
|
|
26222
|
+
|
|
26223
|
+
|
|
26224
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
26225
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
26226
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
26227
|
+
|
|
26228
|
+
return {
|
|
26229
|
+
url: toPathString(localVarUrlObj),
|
|
26230
|
+
options: localVarRequestOptions,
|
|
26231
|
+
};
|
|
26232
|
+
},
|
|
26233
|
+
}
|
|
26234
|
+
};
|
|
26235
|
+
|
|
26236
|
+
/**
|
|
26237
|
+
* HostingRedirectsApi - functional programming interface
|
|
26238
|
+
* @export
|
|
26239
|
+
*/
|
|
26240
|
+
export const HostingRedirectsApiFp = function(configuration?: Configuration) {
|
|
26241
|
+
const localVarAxiosParamCreator = HostingRedirectsApiAxiosParamCreator(configuration)
|
|
26242
|
+
return {
|
|
26243
|
+
/**
|
|
26244
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
26245
|
+
* @summary Create website redirect
|
|
26246
|
+
* @param {string} username
|
|
26247
|
+
* @param {string} domain Domain name
|
|
26248
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
26249
|
+
* @param {*} [options] Override http request option.
|
|
26250
|
+
* @throws {RequiredError}
|
|
26251
|
+
*/
|
|
26252
|
+
async createWebsiteRedirectV1(username: string, domain: string, hostingV1RedirectsCreateRedirectRequest: HostingV1RedirectsCreateRedirectRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1RedirectsRedirectResource>> {
|
|
26253
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createWebsiteRedirectV1(username, domain, hostingV1RedirectsCreateRedirectRequest, options);
|
|
26254
|
+
const localVarOperationServerBasePath = operationServerMap['HostingRedirectsApi.createWebsiteRedirectV1']?.[0]?.url;
|
|
26255
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
26256
|
+
},
|
|
26257
|
+
/**
|
|
26258
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
26259
|
+
* @summary Delete website redirect
|
|
26260
|
+
* @param {string} username
|
|
26261
|
+
* @param {string} domain Domain name
|
|
26262
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
26263
|
+
* @param {*} [options] Override http request option.
|
|
26264
|
+
* @throws {RequiredError}
|
|
26265
|
+
*/
|
|
26266
|
+
async deleteWebsiteRedirectV1(username: string, domain: string, from: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
26267
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWebsiteRedirectV1(username, domain, from, options);
|
|
26268
|
+
const localVarOperationServerBasePath = operationServerMap['HostingRedirectsApi.deleteWebsiteRedirectV1']?.[0]?.url;
|
|
26269
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
26270
|
+
},
|
|
26271
|
+
/**
|
|
26272
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
26273
|
+
* @summary List website redirects
|
|
26274
|
+
* @param {string} username
|
|
26275
|
+
* @param {string} domain Domain name
|
|
26276
|
+
* @param {number} [page] Page number
|
|
26277
|
+
* @param {number} [perPage] Number of items per page
|
|
26278
|
+
* @param {*} [options] Override http request option.
|
|
26279
|
+
* @throws {RequiredError}
|
|
26280
|
+
*/
|
|
26281
|
+
async listWebsiteRedirectsV1(username: string, domain: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingListWebsiteRedirectsV1200Response>> {
|
|
26282
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listWebsiteRedirectsV1(username, domain, page, perPage, options);
|
|
26283
|
+
const localVarOperationServerBasePath = operationServerMap['HostingRedirectsApi.listWebsiteRedirectsV1']?.[0]?.url;
|
|
26284
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
26285
|
+
},
|
|
26286
|
+
}
|
|
26287
|
+
};
|
|
26288
|
+
|
|
26289
|
+
/**
|
|
26290
|
+
* HostingRedirectsApi - factory interface
|
|
26291
|
+
* @export
|
|
26292
|
+
*/
|
|
26293
|
+
export const HostingRedirectsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
26294
|
+
const localVarFp = HostingRedirectsApiFp(configuration)
|
|
26295
|
+
return {
|
|
26296
|
+
/**
|
|
26297
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
26298
|
+
* @summary Create website redirect
|
|
26299
|
+
* @param {string} username
|
|
26300
|
+
* @param {string} domain Domain name
|
|
26301
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
26302
|
+
* @param {*} [options] Override http request option.
|
|
26303
|
+
* @throws {RequiredError}
|
|
26304
|
+
*/
|
|
26305
|
+
createWebsiteRedirectV1(username: string, domain: string, hostingV1RedirectsCreateRedirectRequest: HostingV1RedirectsCreateRedirectRequest, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1RedirectsRedirectResource> {
|
|
26306
|
+
return localVarFp.createWebsiteRedirectV1(username, domain, hostingV1RedirectsCreateRedirectRequest, options).then((request) => request(axios, basePath));
|
|
26307
|
+
},
|
|
26308
|
+
/**
|
|
26309
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
26310
|
+
* @summary Delete website redirect
|
|
26311
|
+
* @param {string} username
|
|
26312
|
+
* @param {string} domain Domain name
|
|
26313
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
26314
|
+
* @param {*} [options] Override http request option.
|
|
26315
|
+
* @throws {RequiredError}
|
|
26316
|
+
*/
|
|
26317
|
+
deleteWebsiteRedirectV1(username: string, domain: string, from: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
26318
|
+
return localVarFp.deleteWebsiteRedirectV1(username, domain, from, options).then((request) => request(axios, basePath));
|
|
26319
|
+
},
|
|
26320
|
+
/**
|
|
26321
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
26322
|
+
* @summary List website redirects
|
|
26323
|
+
* @param {string} username
|
|
26324
|
+
* @param {string} domain Domain name
|
|
26325
|
+
* @param {number} [page] Page number
|
|
26326
|
+
* @param {number} [perPage] Number of items per page
|
|
26327
|
+
* @param {*} [options] Override http request option.
|
|
26328
|
+
* @throws {RequiredError}
|
|
26329
|
+
*/
|
|
26330
|
+
listWebsiteRedirectsV1(username: string, domain: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<HostingListWebsiteRedirectsV1200Response> {
|
|
26331
|
+
return localVarFp.listWebsiteRedirectsV1(username, domain, page, perPage, options).then((request) => request(axios, basePath));
|
|
26332
|
+
},
|
|
26333
|
+
};
|
|
26334
|
+
};
|
|
26335
|
+
|
|
26336
|
+
/**
|
|
26337
|
+
* HostingRedirectsApi - object-oriented interface
|
|
26338
|
+
* @export
|
|
26339
|
+
* @class HostingRedirectsApi
|
|
26340
|
+
* @extends {BaseAPI}
|
|
26341
|
+
*/
|
|
26342
|
+
export class HostingRedirectsApi extends BaseAPI {
|
|
26343
|
+
/**
|
|
26344
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
26345
|
+
* @summary Create website redirect
|
|
26346
|
+
* @param {string} username
|
|
26347
|
+
* @param {string} domain Domain name
|
|
26348
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
26349
|
+
* @param {*} [options] Override http request option.
|
|
26350
|
+
* @throws {RequiredError}
|
|
26351
|
+
* @memberof HostingRedirectsApi
|
|
26352
|
+
*/
|
|
26353
|
+
public createWebsiteRedirectV1(username: string, domain: string, hostingV1RedirectsCreateRedirectRequest: HostingV1RedirectsCreateRedirectRequest, options?: RawAxiosRequestConfig) {
|
|
26354
|
+
return HostingRedirectsApiFp(this.configuration).createWebsiteRedirectV1(username, domain, hostingV1RedirectsCreateRedirectRequest, options).then((request) => request(this.axios, this.basePath));
|
|
26355
|
+
}
|
|
26356
|
+
|
|
26357
|
+
/**
|
|
26358
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
26359
|
+
* @summary Delete website redirect
|
|
26360
|
+
* @param {string} username
|
|
26361
|
+
* @param {string} domain Domain name
|
|
26362
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
26363
|
+
* @param {*} [options] Override http request option.
|
|
26364
|
+
* @throws {RequiredError}
|
|
26365
|
+
* @memberof HostingRedirectsApi
|
|
26366
|
+
*/
|
|
26367
|
+
public deleteWebsiteRedirectV1(username: string, domain: string, from: string, options?: RawAxiosRequestConfig) {
|
|
26368
|
+
return HostingRedirectsApiFp(this.configuration).deleteWebsiteRedirectV1(username, domain, from, options).then((request) => request(this.axios, this.basePath));
|
|
26369
|
+
}
|
|
26370
|
+
|
|
26371
|
+
/**
|
|
26372
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
26373
|
+
* @summary List website redirects
|
|
26374
|
+
* @param {string} username
|
|
26375
|
+
* @param {string} domain Domain name
|
|
26376
|
+
* @param {number} [page] Page number
|
|
26377
|
+
* @param {number} [perPage] Number of items per page
|
|
26378
|
+
* @param {*} [options] Override http request option.
|
|
26379
|
+
* @throws {RequiredError}
|
|
26380
|
+
* @memberof HostingRedirectsApi
|
|
26381
|
+
*/
|
|
26382
|
+
public listWebsiteRedirectsV1(username: string, domain: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig) {
|
|
26383
|
+
return HostingRedirectsApiFp(this.configuration).listWebsiteRedirectsV1(username, domain, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
26384
|
+
}
|
|
26385
|
+
}
|
|
26386
|
+
|
|
26387
|
+
|
|
26388
|
+
|
|
26008
26389
|
/**
|
|
26009
26390
|
* HostingWebsitesApi - axios parameter creator
|
|
26010
26391
|
* @export
|
package/base.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
|
package/common.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
|
package/configuration.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
|
|
@@ -48,7 +48,7 @@ export class Configuration {
|
|
|
48
48
|
this.baseOptions = {
|
|
49
49
|
...param.baseOptions,
|
|
50
50
|
headers: {
|
|
51
|
-
'User-Agent': "hostinger-typescript-sdk/1.
|
|
51
|
+
'User-Agent': "hostinger-typescript-sdk/1.35.0",
|
|
52
52
|
...param.baseOptions?.headers,
|
|
53
53
|
},
|
|
54
54
|
};
|