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/dist/configuration.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.37.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/configuration.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.
|
|
7
|
+
* API Version: 1.37.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
|
|
@@ -16,7 +16,7 @@ class Configuration {
|
|
|
16
16
|
var _a;
|
|
17
17
|
this.accessToken = param.accessToken;
|
|
18
18
|
this.basePath = param.basePath;
|
|
19
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.
|
|
19
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.35.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
20
20
|
this.formDataCtor = param.formDataCtor;
|
|
21
21
|
}
|
|
22
22
|
/**
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.37.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
|
|
@@ -4403,6 +4403,25 @@ export interface HostingListOrdersV1200Response {
|
|
|
4403
4403
|
*/
|
|
4404
4404
|
'meta': CommonSchemaPaginationMetaSchema;
|
|
4405
4405
|
}
|
|
4406
|
+
/**
|
|
4407
|
+
*
|
|
4408
|
+
* @export
|
|
4409
|
+
* @interface HostingListWebsiteRedirectsV1200Response
|
|
4410
|
+
*/
|
|
4411
|
+
export interface HostingListWebsiteRedirectsV1200Response {
|
|
4412
|
+
/**
|
|
4413
|
+
* Array of [`Hosting.V1.Redirects.RedirectResource`](#model/hostingv1redirectsredirectresource)
|
|
4414
|
+
* @type {Array<HostingV1RedirectsRedirectResource>}
|
|
4415
|
+
* @memberof HostingListWebsiteRedirectsV1200Response
|
|
4416
|
+
*/
|
|
4417
|
+
'data': Array<HostingV1RedirectsRedirectResource>;
|
|
4418
|
+
/**
|
|
4419
|
+
*
|
|
4420
|
+
* @type {CommonSchemaPaginationMetaSchema}
|
|
4421
|
+
* @memberof HostingListWebsiteRedirectsV1200Response
|
|
4422
|
+
*/
|
|
4423
|
+
'meta': CommonSchemaPaginationMetaSchema;
|
|
4424
|
+
}
|
|
4406
4425
|
/**
|
|
4407
4426
|
*
|
|
4408
4427
|
* @export
|
|
@@ -5634,6 +5653,57 @@ export interface HostingV1PhpUpdatePhpVersionRequest {
|
|
|
5634
5653
|
*/
|
|
5635
5654
|
'version': string;
|
|
5636
5655
|
}
|
|
5656
|
+
/**
|
|
5657
|
+
*
|
|
5658
|
+
* @export
|
|
5659
|
+
* @interface HostingV1RedirectsCreateRedirectRequest
|
|
5660
|
+
*/
|
|
5661
|
+
export interface HostingV1RedirectsCreateRedirectRequest {
|
|
5662
|
+
/**
|
|
5663
|
+
* Source URL on the selected website
|
|
5664
|
+
* @type {string}
|
|
5665
|
+
* @memberof HostingV1RedirectsCreateRedirectRequest
|
|
5666
|
+
*/
|
|
5667
|
+
'from': string;
|
|
5668
|
+
/**
|
|
5669
|
+
* Destination URL or IP address
|
|
5670
|
+
* @type {string}
|
|
5671
|
+
* @memberof HostingV1RedirectsCreateRedirectRequest
|
|
5672
|
+
*/
|
|
5673
|
+
'to': string;
|
|
5674
|
+
}
|
|
5675
|
+
/**
|
|
5676
|
+
*
|
|
5677
|
+
* @export
|
|
5678
|
+
* @interface HostingV1RedirectsDeleteRedirectRequest
|
|
5679
|
+
*/
|
|
5680
|
+
export interface HostingV1RedirectsDeleteRedirectRequest {
|
|
5681
|
+
/**
|
|
5682
|
+
* Source URL returned by the list redirects endpoint
|
|
5683
|
+
* @type {string}
|
|
5684
|
+
* @memberof HostingV1RedirectsDeleteRedirectRequest
|
|
5685
|
+
*/
|
|
5686
|
+
'from': string;
|
|
5687
|
+
}
|
|
5688
|
+
/**
|
|
5689
|
+
*
|
|
5690
|
+
* @export
|
|
5691
|
+
* @interface HostingV1RedirectsRedirectResource
|
|
5692
|
+
*/
|
|
5693
|
+
export interface HostingV1RedirectsRedirectResource {
|
|
5694
|
+
/**
|
|
5695
|
+
* Source URL
|
|
5696
|
+
* @type {string}
|
|
5697
|
+
* @memberof HostingV1RedirectsRedirectResource
|
|
5698
|
+
*/
|
|
5699
|
+
'from': string;
|
|
5700
|
+
/**
|
|
5701
|
+
* Destination URL
|
|
5702
|
+
* @type {string}
|
|
5703
|
+
* @memberof HostingV1RedirectsRedirectResource
|
|
5704
|
+
*/
|
|
5705
|
+
'to': string;
|
|
5706
|
+
}
|
|
5637
5707
|
/**
|
|
5638
5708
|
*
|
|
5639
5709
|
* @export
|
|
@@ -19039,6 +19109,159 @@ export declare class HostingPHPApi extends BaseAPI {
|
|
|
19039
19109
|
*/
|
|
19040
19110
|
updatePHPVersionV1(username: string, domain: string, hostingV1PhpUpdatePhpVersionRequest: HostingV1PhpUpdatePhpVersionRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CommonSuccessEmptyResource, any, {}, any>>;
|
|
19041
19111
|
}
|
|
19112
|
+
/**
|
|
19113
|
+
* HostingRedirectsApi - axios parameter creator
|
|
19114
|
+
* @export
|
|
19115
|
+
*/
|
|
19116
|
+
export declare const HostingRedirectsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
19117
|
+
/**
|
|
19118
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
19119
|
+
* @summary Create website redirect
|
|
19120
|
+
* @param {string} username
|
|
19121
|
+
* @param {string} domain Domain name
|
|
19122
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
19123
|
+
* @param {*} [options] Override http request option.
|
|
19124
|
+
* @throws {RequiredError}
|
|
19125
|
+
*/
|
|
19126
|
+
createWebsiteRedirectV1: (username: string, domain: string, hostingV1RedirectsCreateRedirectRequest: HostingV1RedirectsCreateRedirectRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
19127
|
+
/**
|
|
19128
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
19129
|
+
* @summary Delete website redirect
|
|
19130
|
+
* @param {string} username
|
|
19131
|
+
* @param {string} domain Domain name
|
|
19132
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
19133
|
+
* @param {*} [options] Override http request option.
|
|
19134
|
+
* @throws {RequiredError}
|
|
19135
|
+
*/
|
|
19136
|
+
deleteWebsiteRedirectV1: (username: string, domain: string, from: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
19137
|
+
/**
|
|
19138
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
19139
|
+
* @summary List website redirects
|
|
19140
|
+
* @param {string} username
|
|
19141
|
+
* @param {string} domain Domain name
|
|
19142
|
+
* @param {number} [page] Page number
|
|
19143
|
+
* @param {number} [perPage] Number of items per page
|
|
19144
|
+
* @param {*} [options] Override http request option.
|
|
19145
|
+
* @throws {RequiredError}
|
|
19146
|
+
*/
|
|
19147
|
+
listWebsiteRedirectsV1: (username: string, domain: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
19148
|
+
};
|
|
19149
|
+
/**
|
|
19150
|
+
* HostingRedirectsApi - functional programming interface
|
|
19151
|
+
* @export
|
|
19152
|
+
*/
|
|
19153
|
+
export declare const HostingRedirectsApiFp: (configuration?: Configuration) => {
|
|
19154
|
+
/**
|
|
19155
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
19156
|
+
* @summary Create website redirect
|
|
19157
|
+
* @param {string} username
|
|
19158
|
+
* @param {string} domain Domain name
|
|
19159
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
19160
|
+
* @param {*} [options] Override http request option.
|
|
19161
|
+
* @throws {RequiredError}
|
|
19162
|
+
*/
|
|
19163
|
+
createWebsiteRedirectV1(username: string, domain: string, hostingV1RedirectsCreateRedirectRequest: HostingV1RedirectsCreateRedirectRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1RedirectsRedirectResource>>;
|
|
19164
|
+
/**
|
|
19165
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
19166
|
+
* @summary Delete website redirect
|
|
19167
|
+
* @param {string} username
|
|
19168
|
+
* @param {string} domain Domain name
|
|
19169
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
19170
|
+
* @param {*} [options] Override http request option.
|
|
19171
|
+
* @throws {RequiredError}
|
|
19172
|
+
*/
|
|
19173
|
+
deleteWebsiteRedirectV1(username: string, domain: string, from: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>>;
|
|
19174
|
+
/**
|
|
19175
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
19176
|
+
* @summary List website redirects
|
|
19177
|
+
* @param {string} username
|
|
19178
|
+
* @param {string} domain Domain name
|
|
19179
|
+
* @param {number} [page] Page number
|
|
19180
|
+
* @param {number} [perPage] Number of items per page
|
|
19181
|
+
* @param {*} [options] Override http request option.
|
|
19182
|
+
* @throws {RequiredError}
|
|
19183
|
+
*/
|
|
19184
|
+
listWebsiteRedirectsV1(username: string, domain: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingListWebsiteRedirectsV1200Response>>;
|
|
19185
|
+
};
|
|
19186
|
+
/**
|
|
19187
|
+
* HostingRedirectsApi - factory interface
|
|
19188
|
+
* @export
|
|
19189
|
+
*/
|
|
19190
|
+
export declare const HostingRedirectsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
19191
|
+
/**
|
|
19192
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
19193
|
+
* @summary Create website redirect
|
|
19194
|
+
* @param {string} username
|
|
19195
|
+
* @param {string} domain Domain name
|
|
19196
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
19197
|
+
* @param {*} [options] Override http request option.
|
|
19198
|
+
* @throws {RequiredError}
|
|
19199
|
+
*/
|
|
19200
|
+
createWebsiteRedirectV1(username: string, domain: string, hostingV1RedirectsCreateRedirectRequest: HostingV1RedirectsCreateRedirectRequest, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1RedirectsRedirectResource>;
|
|
19201
|
+
/**
|
|
19202
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
19203
|
+
* @summary Delete website redirect
|
|
19204
|
+
* @param {string} username
|
|
19205
|
+
* @param {string} domain Domain name
|
|
19206
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
19207
|
+
* @param {*} [options] Override http request option.
|
|
19208
|
+
* @throws {RequiredError}
|
|
19209
|
+
*/
|
|
19210
|
+
deleteWebsiteRedirectV1(username: string, domain: string, from: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource>;
|
|
19211
|
+
/**
|
|
19212
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
19213
|
+
* @summary List website redirects
|
|
19214
|
+
* @param {string} username
|
|
19215
|
+
* @param {string} domain Domain name
|
|
19216
|
+
* @param {number} [page] Page number
|
|
19217
|
+
* @param {number} [perPage] Number of items per page
|
|
19218
|
+
* @param {*} [options] Override http request option.
|
|
19219
|
+
* @throws {RequiredError}
|
|
19220
|
+
*/
|
|
19221
|
+
listWebsiteRedirectsV1(username: string, domain: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<HostingListWebsiteRedirectsV1200Response>;
|
|
19222
|
+
};
|
|
19223
|
+
/**
|
|
19224
|
+
* HostingRedirectsApi - object-oriented interface
|
|
19225
|
+
* @export
|
|
19226
|
+
* @class HostingRedirectsApi
|
|
19227
|
+
* @extends {BaseAPI}
|
|
19228
|
+
*/
|
|
19229
|
+
export declare class HostingRedirectsApi extends BaseAPI {
|
|
19230
|
+
/**
|
|
19231
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
19232
|
+
* @summary Create website redirect
|
|
19233
|
+
* @param {string} username
|
|
19234
|
+
* @param {string} domain Domain name
|
|
19235
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
19236
|
+
* @param {*} [options] Override http request option.
|
|
19237
|
+
* @throws {RequiredError}
|
|
19238
|
+
* @memberof HostingRedirectsApi
|
|
19239
|
+
*/
|
|
19240
|
+
createWebsiteRedirectV1(username: string, domain: string, hostingV1RedirectsCreateRedirectRequest: HostingV1RedirectsCreateRedirectRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<HostingV1RedirectsRedirectResource, any, {}, any>>;
|
|
19241
|
+
/**
|
|
19242
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
19243
|
+
* @summary Delete website redirect
|
|
19244
|
+
* @param {string} username
|
|
19245
|
+
* @param {string} domain Domain name
|
|
19246
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
19247
|
+
* @param {*} [options] Override http request option.
|
|
19248
|
+
* @throws {RequiredError}
|
|
19249
|
+
* @memberof HostingRedirectsApi
|
|
19250
|
+
*/
|
|
19251
|
+
deleteWebsiteRedirectV1(username: string, domain: string, from: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CommonSuccessEmptyResource, any, {}, any>>;
|
|
19252
|
+
/**
|
|
19253
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
19254
|
+
* @summary List website redirects
|
|
19255
|
+
* @param {string} username
|
|
19256
|
+
* @param {string} domain Domain name
|
|
19257
|
+
* @param {number} [page] Page number
|
|
19258
|
+
* @param {number} [perPage] Number of items per page
|
|
19259
|
+
* @param {*} [options] Override http request option.
|
|
19260
|
+
* @throws {RequiredError}
|
|
19261
|
+
* @memberof HostingRedirectsApi
|
|
19262
|
+
*/
|
|
19263
|
+
listWebsiteRedirectsV1(username: string, domain: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<HostingListWebsiteRedirectsV1200Response, any, {}, any>>;
|
|
19264
|
+
}
|
|
19042
19265
|
/**
|
|
19043
19266
|
* HostingWebsitesApi - axios parameter creator
|
|
19044
19267
|
* @export
|
package/dist/esm/api.js
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
|
|
@@ -12922,6 +12922,296 @@ export class HostingPHPApi extends BaseAPI {
|
|
|
12922
12922
|
return HostingPHPApiFp(this.configuration).updatePHPVersionV1(username, domain, hostingV1PhpUpdatePhpVersionRequest, options).then((request) => request(this.axios, this.basePath));
|
|
12923
12923
|
}
|
|
12924
12924
|
}
|
|
12925
|
+
/**
|
|
12926
|
+
* HostingRedirectsApi - axios parameter creator
|
|
12927
|
+
* @export
|
|
12928
|
+
*/
|
|
12929
|
+
export const HostingRedirectsApiAxiosParamCreator = function (configuration) {
|
|
12930
|
+
return {
|
|
12931
|
+
/**
|
|
12932
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
12933
|
+
* @summary Create website redirect
|
|
12934
|
+
* @param {string} username
|
|
12935
|
+
* @param {string} domain Domain name
|
|
12936
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
12937
|
+
* @param {*} [options] Override http request option.
|
|
12938
|
+
* @throws {RequiredError}
|
|
12939
|
+
*/
|
|
12940
|
+
createWebsiteRedirectV1: (username_1, domain_1, hostingV1RedirectsCreateRedirectRequest_1, ...args_1) => __awaiter(this, [username_1, domain_1, hostingV1RedirectsCreateRedirectRequest_1, ...args_1], void 0, function* (username, domain, hostingV1RedirectsCreateRedirectRequest, options = {}) {
|
|
12941
|
+
// verify required parameter 'username' is not null or undefined
|
|
12942
|
+
assertParamExists('createWebsiteRedirectV1', 'username', username);
|
|
12943
|
+
// verify required parameter 'domain' is not null or undefined
|
|
12944
|
+
assertParamExists('createWebsiteRedirectV1', 'domain', domain);
|
|
12945
|
+
// verify required parameter 'hostingV1RedirectsCreateRedirectRequest' is not null or undefined
|
|
12946
|
+
assertParamExists('createWebsiteRedirectV1', 'hostingV1RedirectsCreateRedirectRequest', hostingV1RedirectsCreateRedirectRequest);
|
|
12947
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/redirects`
|
|
12948
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
12949
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
12950
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12951
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12952
|
+
let baseOptions;
|
|
12953
|
+
if (configuration) {
|
|
12954
|
+
baseOptions = configuration.baseOptions;
|
|
12955
|
+
}
|
|
12956
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
12957
|
+
const localVarHeaderParameter = {};
|
|
12958
|
+
const localVarQueryParameter = {};
|
|
12959
|
+
// authentication apiToken required
|
|
12960
|
+
// http bearer authentication required
|
|
12961
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12962
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
12963
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12964
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12965
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12966
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1RedirectsCreateRedirectRequest, localVarRequestOptions, configuration);
|
|
12967
|
+
return {
|
|
12968
|
+
url: toPathString(localVarUrlObj),
|
|
12969
|
+
options: localVarRequestOptions,
|
|
12970
|
+
};
|
|
12971
|
+
}),
|
|
12972
|
+
/**
|
|
12973
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
12974
|
+
* @summary Delete website redirect
|
|
12975
|
+
* @param {string} username
|
|
12976
|
+
* @param {string} domain Domain name
|
|
12977
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
12978
|
+
* @param {*} [options] Override http request option.
|
|
12979
|
+
* @throws {RequiredError}
|
|
12980
|
+
*/
|
|
12981
|
+
deleteWebsiteRedirectV1: (username_1, domain_1, from_1, ...args_1) => __awaiter(this, [username_1, domain_1, from_1, ...args_1], void 0, function* (username, domain, from, options = {}) {
|
|
12982
|
+
// verify required parameter 'username' is not null or undefined
|
|
12983
|
+
assertParamExists('deleteWebsiteRedirectV1', 'username', username);
|
|
12984
|
+
// verify required parameter 'domain' is not null or undefined
|
|
12985
|
+
assertParamExists('deleteWebsiteRedirectV1', 'domain', domain);
|
|
12986
|
+
// verify required parameter 'from' is not null or undefined
|
|
12987
|
+
assertParamExists('deleteWebsiteRedirectV1', 'from', from);
|
|
12988
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/redirects`
|
|
12989
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
12990
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
12991
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12992
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12993
|
+
let baseOptions;
|
|
12994
|
+
if (configuration) {
|
|
12995
|
+
baseOptions = configuration.baseOptions;
|
|
12996
|
+
}
|
|
12997
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
12998
|
+
const localVarHeaderParameter = {};
|
|
12999
|
+
const localVarQueryParameter = {};
|
|
13000
|
+
// authentication apiToken required
|
|
13001
|
+
// http bearer authentication required
|
|
13002
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
13003
|
+
if (from !== undefined) {
|
|
13004
|
+
localVarQueryParameter['from'] = from;
|
|
13005
|
+
}
|
|
13006
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
13007
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
13008
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
13009
|
+
return {
|
|
13010
|
+
url: toPathString(localVarUrlObj),
|
|
13011
|
+
options: localVarRequestOptions,
|
|
13012
|
+
};
|
|
13013
|
+
}),
|
|
13014
|
+
/**
|
|
13015
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
13016
|
+
* @summary List website redirects
|
|
13017
|
+
* @param {string} username
|
|
13018
|
+
* @param {string} domain Domain name
|
|
13019
|
+
* @param {number} [page] Page number
|
|
13020
|
+
* @param {number} [perPage] Number of items per page
|
|
13021
|
+
* @param {*} [options] Override http request option.
|
|
13022
|
+
* @throws {RequiredError}
|
|
13023
|
+
*/
|
|
13024
|
+
listWebsiteRedirectsV1: (username_1, domain_1, page_1, perPage_1, ...args_1) => __awaiter(this, [username_1, domain_1, page_1, perPage_1, ...args_1], void 0, function* (username, domain, page, perPage, options = {}) {
|
|
13025
|
+
// verify required parameter 'username' is not null or undefined
|
|
13026
|
+
assertParamExists('listWebsiteRedirectsV1', 'username', username);
|
|
13027
|
+
// verify required parameter 'domain' is not null or undefined
|
|
13028
|
+
assertParamExists('listWebsiteRedirectsV1', 'domain', domain);
|
|
13029
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/redirects`
|
|
13030
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
13031
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
13032
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
13033
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
13034
|
+
let baseOptions;
|
|
13035
|
+
if (configuration) {
|
|
13036
|
+
baseOptions = configuration.baseOptions;
|
|
13037
|
+
}
|
|
13038
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
13039
|
+
const localVarHeaderParameter = {};
|
|
13040
|
+
const localVarQueryParameter = {};
|
|
13041
|
+
// authentication apiToken required
|
|
13042
|
+
// http bearer authentication required
|
|
13043
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
13044
|
+
if (page !== undefined) {
|
|
13045
|
+
localVarQueryParameter['page'] = page;
|
|
13046
|
+
}
|
|
13047
|
+
if (perPage !== undefined) {
|
|
13048
|
+
localVarQueryParameter['per_page'] = perPage;
|
|
13049
|
+
}
|
|
13050
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
13051
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
13052
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
13053
|
+
return {
|
|
13054
|
+
url: toPathString(localVarUrlObj),
|
|
13055
|
+
options: localVarRequestOptions,
|
|
13056
|
+
};
|
|
13057
|
+
}),
|
|
13058
|
+
};
|
|
13059
|
+
};
|
|
13060
|
+
/**
|
|
13061
|
+
* HostingRedirectsApi - functional programming interface
|
|
13062
|
+
* @export
|
|
13063
|
+
*/
|
|
13064
|
+
export const HostingRedirectsApiFp = function (configuration) {
|
|
13065
|
+
const localVarAxiosParamCreator = HostingRedirectsApiAxiosParamCreator(configuration);
|
|
13066
|
+
return {
|
|
13067
|
+
/**
|
|
13068
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
13069
|
+
* @summary Create website redirect
|
|
13070
|
+
* @param {string} username
|
|
13071
|
+
* @param {string} domain Domain name
|
|
13072
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
13073
|
+
* @param {*} [options] Override http request option.
|
|
13074
|
+
* @throws {RequiredError}
|
|
13075
|
+
*/
|
|
13076
|
+
createWebsiteRedirectV1(username, domain, hostingV1RedirectsCreateRedirectRequest, options) {
|
|
13077
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13078
|
+
var _a, _b;
|
|
13079
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createWebsiteRedirectV1(username, domain, hostingV1RedirectsCreateRedirectRequest, options);
|
|
13080
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingRedirectsApi.createWebsiteRedirectV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
13081
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
13082
|
+
});
|
|
13083
|
+
},
|
|
13084
|
+
/**
|
|
13085
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
13086
|
+
* @summary Delete website redirect
|
|
13087
|
+
* @param {string} username
|
|
13088
|
+
* @param {string} domain Domain name
|
|
13089
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
13090
|
+
* @param {*} [options] Override http request option.
|
|
13091
|
+
* @throws {RequiredError}
|
|
13092
|
+
*/
|
|
13093
|
+
deleteWebsiteRedirectV1(username, domain, from, options) {
|
|
13094
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13095
|
+
var _a, _b;
|
|
13096
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteWebsiteRedirectV1(username, domain, from, options);
|
|
13097
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingRedirectsApi.deleteWebsiteRedirectV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
13098
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
13099
|
+
});
|
|
13100
|
+
},
|
|
13101
|
+
/**
|
|
13102
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
13103
|
+
* @summary List website redirects
|
|
13104
|
+
* @param {string} username
|
|
13105
|
+
* @param {string} domain Domain name
|
|
13106
|
+
* @param {number} [page] Page number
|
|
13107
|
+
* @param {number} [perPage] Number of items per page
|
|
13108
|
+
* @param {*} [options] Override http request option.
|
|
13109
|
+
* @throws {RequiredError}
|
|
13110
|
+
*/
|
|
13111
|
+
listWebsiteRedirectsV1(username, domain, page, perPage, options) {
|
|
13112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13113
|
+
var _a, _b;
|
|
13114
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listWebsiteRedirectsV1(username, domain, page, perPage, options);
|
|
13115
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingRedirectsApi.listWebsiteRedirectsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
13116
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
13117
|
+
});
|
|
13118
|
+
},
|
|
13119
|
+
};
|
|
13120
|
+
};
|
|
13121
|
+
/**
|
|
13122
|
+
* HostingRedirectsApi - factory interface
|
|
13123
|
+
* @export
|
|
13124
|
+
*/
|
|
13125
|
+
export const HostingRedirectsApiFactory = function (configuration, basePath, axios) {
|
|
13126
|
+
const localVarFp = HostingRedirectsApiFp(configuration);
|
|
13127
|
+
return {
|
|
13128
|
+
/**
|
|
13129
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
13130
|
+
* @summary Create website redirect
|
|
13131
|
+
* @param {string} username
|
|
13132
|
+
* @param {string} domain Domain name
|
|
13133
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
13134
|
+
* @param {*} [options] Override http request option.
|
|
13135
|
+
* @throws {RequiredError}
|
|
13136
|
+
*/
|
|
13137
|
+
createWebsiteRedirectV1(username, domain, hostingV1RedirectsCreateRedirectRequest, options) {
|
|
13138
|
+
return localVarFp.createWebsiteRedirectV1(username, domain, hostingV1RedirectsCreateRedirectRequest, options).then((request) => request(axios, basePath));
|
|
13139
|
+
},
|
|
13140
|
+
/**
|
|
13141
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
13142
|
+
* @summary Delete website redirect
|
|
13143
|
+
* @param {string} username
|
|
13144
|
+
* @param {string} domain Domain name
|
|
13145
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
13146
|
+
* @param {*} [options] Override http request option.
|
|
13147
|
+
* @throws {RequiredError}
|
|
13148
|
+
*/
|
|
13149
|
+
deleteWebsiteRedirectV1(username, domain, from, options) {
|
|
13150
|
+
return localVarFp.deleteWebsiteRedirectV1(username, domain, from, options).then((request) => request(axios, basePath));
|
|
13151
|
+
},
|
|
13152
|
+
/**
|
|
13153
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
13154
|
+
* @summary List website redirects
|
|
13155
|
+
* @param {string} username
|
|
13156
|
+
* @param {string} domain Domain name
|
|
13157
|
+
* @param {number} [page] Page number
|
|
13158
|
+
* @param {number} [perPage] Number of items per page
|
|
13159
|
+
* @param {*} [options] Override http request option.
|
|
13160
|
+
* @throws {RequiredError}
|
|
13161
|
+
*/
|
|
13162
|
+
listWebsiteRedirectsV1(username, domain, page, perPage, options) {
|
|
13163
|
+
return localVarFp.listWebsiteRedirectsV1(username, domain, page, perPage, options).then((request) => request(axios, basePath));
|
|
13164
|
+
},
|
|
13165
|
+
};
|
|
13166
|
+
};
|
|
13167
|
+
/**
|
|
13168
|
+
* HostingRedirectsApi - object-oriented interface
|
|
13169
|
+
* @export
|
|
13170
|
+
* @class HostingRedirectsApi
|
|
13171
|
+
* @extends {BaseAPI}
|
|
13172
|
+
*/
|
|
13173
|
+
export class HostingRedirectsApi extends BaseAPI {
|
|
13174
|
+
/**
|
|
13175
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
13176
|
+
* @summary Create website redirect
|
|
13177
|
+
* @param {string} username
|
|
13178
|
+
* @param {string} domain Domain name
|
|
13179
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
13180
|
+
* @param {*} [options] Override http request option.
|
|
13181
|
+
* @throws {RequiredError}
|
|
13182
|
+
* @memberof HostingRedirectsApi
|
|
13183
|
+
*/
|
|
13184
|
+
createWebsiteRedirectV1(username, domain, hostingV1RedirectsCreateRedirectRequest, options) {
|
|
13185
|
+
return HostingRedirectsApiFp(this.configuration).createWebsiteRedirectV1(username, domain, hostingV1RedirectsCreateRedirectRequest, options).then((request) => request(this.axios, this.basePath));
|
|
13186
|
+
}
|
|
13187
|
+
/**
|
|
13188
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
13189
|
+
* @summary Delete website redirect
|
|
13190
|
+
* @param {string} username
|
|
13191
|
+
* @param {string} domain Domain name
|
|
13192
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
13193
|
+
* @param {*} [options] Override http request option.
|
|
13194
|
+
* @throws {RequiredError}
|
|
13195
|
+
* @memberof HostingRedirectsApi
|
|
13196
|
+
*/
|
|
13197
|
+
deleteWebsiteRedirectV1(username, domain, from, options) {
|
|
13198
|
+
return HostingRedirectsApiFp(this.configuration).deleteWebsiteRedirectV1(username, domain, from, options).then((request) => request(this.axios, this.basePath));
|
|
13199
|
+
}
|
|
13200
|
+
/**
|
|
13201
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
13202
|
+
* @summary List website redirects
|
|
13203
|
+
* @param {string} username
|
|
13204
|
+
* @param {string} domain Domain name
|
|
13205
|
+
* @param {number} [page] Page number
|
|
13206
|
+
* @param {number} [perPage] Number of items per page
|
|
13207
|
+
* @param {*} [options] Override http request option.
|
|
13208
|
+
* @throws {RequiredError}
|
|
13209
|
+
* @memberof HostingRedirectsApi
|
|
13210
|
+
*/
|
|
13211
|
+
listWebsiteRedirectsV1(username, domain, page, perPage, options) {
|
|
13212
|
+
return HostingRedirectsApiFp(this.configuration).listWebsiteRedirectsV1(username, domain, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
13213
|
+
}
|
|
13214
|
+
}
|
|
12925
13215
|
/**
|
|
12926
13216
|
* HostingWebsitesApi - axios parameter creator
|
|
12927
13217
|
* @export
|
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.37.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/base.js
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/dist/esm/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.37.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/common.js
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
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.37.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: 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
|
|
@@ -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/1.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.35.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
17
17
|
this.formDataCtor = param.formDataCtor;
|
|
18
18
|
}
|
|
19
19
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.37.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
|