hostinger-api-sdk 1.34.0 → 1.36.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 +771 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +514 -1
- package/dist/api.js +510 -9
- 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 +514 -1
- package/dist/esm/api.js +494 -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/AgencyHostingMetricsApi.md +123 -0
- package/docs/AgencyHostingV1OrdersDiskUsageMetricsLimitsResource.md +22 -0
- package/docs/AgencyHostingV1OrdersDiskUsageMetricsMetricResource.md +24 -0
- package/docs/AgencyHostingV1OrdersDiskUsageMetricsMetricsResource.md +22 -0
- package/docs/AgencyHostingV1OrdersResourceUsageMetricsLimitsResource.md +24 -0
- package/docs/AgencyHostingV1OrdersResourceUsageMetricsMetricResource.md +26 -0
- package/docs/AgencyHostingV1OrdersResourceUsageMetricsMetricsResource.md +24 -0
- package/docs/AgencyHostingV1OrdersResourceUsageMetricsWebsiteResource.md +24 -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
package/api.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.38.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
|
|
@@ -260,6 +260,69 @@ export interface AgencyHostingV1OrdersDatacenterResource {
|
|
|
260
260
|
*/
|
|
261
261
|
'country': string;
|
|
262
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
*
|
|
265
|
+
* @export
|
|
266
|
+
* @interface AgencyHostingV1OrdersDiskUsageMetricsLimitsResource
|
|
267
|
+
*/
|
|
268
|
+
export interface AgencyHostingV1OrdersDiskUsageMetricsLimitsResource {
|
|
269
|
+
/**
|
|
270
|
+
* Disk usage quota in bytes
|
|
271
|
+
* @type {number}
|
|
272
|
+
* @memberof AgencyHostingV1OrdersDiskUsageMetricsLimitsResource
|
|
273
|
+
*/
|
|
274
|
+
'disk_bytes': number;
|
|
275
|
+
/**
|
|
276
|
+
* Inodes quota
|
|
277
|
+
* @type {number}
|
|
278
|
+
* @memberof AgencyHostingV1OrdersDiskUsageMetricsLimitsResource
|
|
279
|
+
*/
|
|
280
|
+
'inodes': number;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
*
|
|
284
|
+
* @export
|
|
285
|
+
* @interface AgencyHostingV1OrdersDiskUsageMetricsMetricResource
|
|
286
|
+
*/
|
|
287
|
+
export interface AgencyHostingV1OrdersDiskUsageMetricsMetricResource {
|
|
288
|
+
/**
|
|
289
|
+
* Disk usage in bytes at this sample
|
|
290
|
+
* @type {number}
|
|
291
|
+
* @memberof AgencyHostingV1OrdersDiskUsageMetricsMetricResource
|
|
292
|
+
*/
|
|
293
|
+
'disk_bytes': number;
|
|
294
|
+
/**
|
|
295
|
+
* Number of inodes used at this sample
|
|
296
|
+
* @type {number}
|
|
297
|
+
* @memberof AgencyHostingV1OrdersDiskUsageMetricsMetricResource
|
|
298
|
+
*/
|
|
299
|
+
'inodes': number;
|
|
300
|
+
/**
|
|
301
|
+
* Unix timestamp of the sample
|
|
302
|
+
* @type {number}
|
|
303
|
+
* @memberof AgencyHostingV1OrdersDiskUsageMetricsMetricResource
|
|
304
|
+
*/
|
|
305
|
+
'timestamp': number;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
*
|
|
309
|
+
* @export
|
|
310
|
+
* @interface AgencyHostingV1OrdersDiskUsageMetricsMetricsResource
|
|
311
|
+
*/
|
|
312
|
+
export interface AgencyHostingV1OrdersDiskUsageMetricsMetricsResource {
|
|
313
|
+
/**
|
|
314
|
+
*
|
|
315
|
+
* @type {AgencyHostingV1OrdersDiskUsageMetricsLimitsResource}
|
|
316
|
+
* @memberof AgencyHostingV1OrdersDiskUsageMetricsMetricsResource
|
|
317
|
+
*/
|
|
318
|
+
'limits': AgencyHostingV1OrdersDiskUsageMetricsLimitsResource;
|
|
319
|
+
/**
|
|
320
|
+
* Array of [`AgencyHosting.V1.Orders.DiskUsageMetrics.MetricResource`](#model/agencyhostingv1ordersdiskusagemetricsmetricresource)
|
|
321
|
+
* @type {Array<AgencyHostingV1OrdersDiskUsageMetricsMetricResource>}
|
|
322
|
+
* @memberof AgencyHostingV1OrdersDiskUsageMetricsMetricsResource
|
|
323
|
+
*/
|
|
324
|
+
'metrics': Array<AgencyHostingV1OrdersDiskUsageMetricsMetricResource>;
|
|
325
|
+
}
|
|
263
326
|
/**
|
|
264
327
|
*
|
|
265
328
|
* @export
|
|
@@ -322,6 +385,112 @@ export interface AgencyHostingV1OrdersPlanResource {
|
|
|
322
385
|
*/
|
|
323
386
|
'key': string | null;
|
|
324
387
|
}
|
|
388
|
+
/**
|
|
389
|
+
*
|
|
390
|
+
* @export
|
|
391
|
+
* @interface AgencyHostingV1OrdersResourceUsageMetricsLimitsResource
|
|
392
|
+
*/
|
|
393
|
+
export interface AgencyHostingV1OrdersResourceUsageMetricsLimitsResource {
|
|
394
|
+
/**
|
|
395
|
+
* Memory usage quota in bytes
|
|
396
|
+
* @type {number}
|
|
397
|
+
* @memberof AgencyHostingV1OrdersResourceUsageMetricsLimitsResource
|
|
398
|
+
*/
|
|
399
|
+
'memory_bytes': number;
|
|
400
|
+
/**
|
|
401
|
+
* CPU usage quota in percent
|
|
402
|
+
* @type {number}
|
|
403
|
+
* @memberof AgencyHostingV1OrdersResourceUsageMetricsLimitsResource
|
|
404
|
+
*/
|
|
405
|
+
'cpu_percent': number;
|
|
406
|
+
/**
|
|
407
|
+
* Process usage quota
|
|
408
|
+
* @type {number}
|
|
409
|
+
* @memberof AgencyHostingV1OrdersResourceUsageMetricsLimitsResource
|
|
410
|
+
*/
|
|
411
|
+
'processes': number;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
*
|
|
415
|
+
* @export
|
|
416
|
+
* @interface AgencyHostingV1OrdersResourceUsageMetricsMetricResource
|
|
417
|
+
*/
|
|
418
|
+
export interface AgencyHostingV1OrdersResourceUsageMetricsMetricResource {
|
|
419
|
+
/**
|
|
420
|
+
* CPU usage percentage at this sample
|
|
421
|
+
* @type {number}
|
|
422
|
+
* @memberof AgencyHostingV1OrdersResourceUsageMetricsMetricResource
|
|
423
|
+
*/
|
|
424
|
+
'cpu_percent': number;
|
|
425
|
+
/**
|
|
426
|
+
* Memory usage in bytes at this sample
|
|
427
|
+
* @type {number}
|
|
428
|
+
* @memberof AgencyHostingV1OrdersResourceUsageMetricsMetricResource
|
|
429
|
+
*/
|
|
430
|
+
'memory_bytes': number;
|
|
431
|
+
/**
|
|
432
|
+
* Number of processes at this sample
|
|
433
|
+
* @type {number}
|
|
434
|
+
* @memberof AgencyHostingV1OrdersResourceUsageMetricsMetricResource
|
|
435
|
+
*/
|
|
436
|
+
'processes': number;
|
|
437
|
+
/**
|
|
438
|
+
* Unix timestamp of the sample
|
|
439
|
+
* @type {number}
|
|
440
|
+
* @memberof AgencyHostingV1OrdersResourceUsageMetricsMetricResource
|
|
441
|
+
*/
|
|
442
|
+
'timestamp': number;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
*
|
|
446
|
+
* @export
|
|
447
|
+
* @interface AgencyHostingV1OrdersResourceUsageMetricsMetricsResource
|
|
448
|
+
*/
|
|
449
|
+
export interface AgencyHostingV1OrdersResourceUsageMetricsMetricsResource {
|
|
450
|
+
/**
|
|
451
|
+
*
|
|
452
|
+
* @type {AgencyHostingV1OrdersResourceUsageMetricsLimitsResource}
|
|
453
|
+
* @memberof AgencyHostingV1OrdersResourceUsageMetricsMetricsResource
|
|
454
|
+
*/
|
|
455
|
+
'limits': AgencyHostingV1OrdersResourceUsageMetricsLimitsResource;
|
|
456
|
+
/**
|
|
457
|
+
* Array of [`AgencyHosting.V1.Orders.ResourceUsageMetrics.MetricResource`](#model/agencyhostingv1ordersresourceusagemetricsmetricresource)
|
|
458
|
+
* @type {Array<AgencyHostingV1OrdersResourceUsageMetricsMetricResource>}
|
|
459
|
+
* @memberof AgencyHostingV1OrdersResourceUsageMetricsMetricsResource
|
|
460
|
+
*/
|
|
461
|
+
'metrics': Array<AgencyHostingV1OrdersResourceUsageMetricsMetricResource>;
|
|
462
|
+
/**
|
|
463
|
+
* Array of [`AgencyHosting.V1.Orders.ResourceUsageMetrics.WebsiteResource`](#model/agencyhostingv1ordersresourceusagemetricswebsiteresource)
|
|
464
|
+
* @type {Array<AgencyHostingV1OrdersResourceUsageMetricsWebsiteResource>}
|
|
465
|
+
* @memberof AgencyHostingV1OrdersResourceUsageMetricsMetricsResource
|
|
466
|
+
*/
|
|
467
|
+
'websites': Array<AgencyHostingV1OrdersResourceUsageMetricsWebsiteResource>;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
*
|
|
471
|
+
* @export
|
|
472
|
+
* @interface AgencyHostingV1OrdersResourceUsageMetricsWebsiteResource
|
|
473
|
+
*/
|
|
474
|
+
export interface AgencyHostingV1OrdersResourceUsageMetricsWebsiteResource {
|
|
475
|
+
/**
|
|
476
|
+
* Website UID
|
|
477
|
+
* @type {string}
|
|
478
|
+
* @memberof AgencyHostingV1OrdersResourceUsageMetricsWebsiteResource
|
|
479
|
+
*/
|
|
480
|
+
'uid': string;
|
|
481
|
+
/**
|
|
482
|
+
* Domains associated with the website
|
|
483
|
+
* @type {Array<string>}
|
|
484
|
+
* @memberof AgencyHostingV1OrdersResourceUsageMetricsWebsiteResource
|
|
485
|
+
*/
|
|
486
|
+
'domains': Array<string>;
|
|
487
|
+
/**
|
|
488
|
+
* Array of [`AgencyHosting.V1.Orders.ResourceUsageMetrics.MetricResource`](#model/agencyhostingv1ordersresourceusagemetricsmetricresource)
|
|
489
|
+
* @type {Array<AgencyHostingV1OrdersResourceUsageMetricsMetricResource>}
|
|
490
|
+
* @memberof AgencyHostingV1OrdersResourceUsageMetricsWebsiteResource
|
|
491
|
+
*/
|
|
492
|
+
'metrics': Array<AgencyHostingV1OrdersResourceUsageMetricsMetricResource>;
|
|
493
|
+
}
|
|
325
494
|
/**
|
|
326
495
|
*
|
|
327
496
|
* @export
|
|
@@ -4506,6 +4675,25 @@ export interface HostingListOrdersV1200Response {
|
|
|
4506
4675
|
*/
|
|
4507
4676
|
'meta': CommonSchemaPaginationMetaSchema;
|
|
4508
4677
|
}
|
|
4678
|
+
/**
|
|
4679
|
+
*
|
|
4680
|
+
* @export
|
|
4681
|
+
* @interface HostingListWebsiteRedirectsV1200Response
|
|
4682
|
+
*/
|
|
4683
|
+
export interface HostingListWebsiteRedirectsV1200Response {
|
|
4684
|
+
/**
|
|
4685
|
+
* Array of [`Hosting.V1.Redirects.RedirectResource`](#model/hostingv1redirectsredirectresource)
|
|
4686
|
+
* @type {Array<HostingV1RedirectsRedirectResource>}
|
|
4687
|
+
* @memberof HostingListWebsiteRedirectsV1200Response
|
|
4688
|
+
*/
|
|
4689
|
+
'data': Array<HostingV1RedirectsRedirectResource>;
|
|
4690
|
+
/**
|
|
4691
|
+
*
|
|
4692
|
+
* @type {CommonSchemaPaginationMetaSchema}
|
|
4693
|
+
* @memberof HostingListWebsiteRedirectsV1200Response
|
|
4694
|
+
*/
|
|
4695
|
+
'meta': CommonSchemaPaginationMetaSchema;
|
|
4696
|
+
}
|
|
4509
4697
|
/**
|
|
4510
4698
|
*
|
|
4511
4699
|
* @export
|
|
@@ -5756,6 +5944,57 @@ export interface HostingV1PhpUpdatePhpVersionRequest {
|
|
|
5756
5944
|
*/
|
|
5757
5945
|
'version': string;
|
|
5758
5946
|
}
|
|
5947
|
+
/**
|
|
5948
|
+
*
|
|
5949
|
+
* @export
|
|
5950
|
+
* @interface HostingV1RedirectsCreateRedirectRequest
|
|
5951
|
+
*/
|
|
5952
|
+
export interface HostingV1RedirectsCreateRedirectRequest {
|
|
5953
|
+
/**
|
|
5954
|
+
* Source URL on the selected website
|
|
5955
|
+
* @type {string}
|
|
5956
|
+
* @memberof HostingV1RedirectsCreateRedirectRequest
|
|
5957
|
+
*/
|
|
5958
|
+
'from': string;
|
|
5959
|
+
/**
|
|
5960
|
+
* Destination URL or IP address
|
|
5961
|
+
* @type {string}
|
|
5962
|
+
* @memberof HostingV1RedirectsCreateRedirectRequest
|
|
5963
|
+
*/
|
|
5964
|
+
'to': string;
|
|
5965
|
+
}
|
|
5966
|
+
/**
|
|
5967
|
+
*
|
|
5968
|
+
* @export
|
|
5969
|
+
* @interface HostingV1RedirectsDeleteRedirectRequest
|
|
5970
|
+
*/
|
|
5971
|
+
export interface HostingV1RedirectsDeleteRedirectRequest {
|
|
5972
|
+
/**
|
|
5973
|
+
* Source URL returned by the list redirects endpoint
|
|
5974
|
+
* @type {string}
|
|
5975
|
+
* @memberof HostingV1RedirectsDeleteRedirectRequest
|
|
5976
|
+
*/
|
|
5977
|
+
'from': string;
|
|
5978
|
+
}
|
|
5979
|
+
/**
|
|
5980
|
+
*
|
|
5981
|
+
* @export
|
|
5982
|
+
* @interface HostingV1RedirectsRedirectResource
|
|
5983
|
+
*/
|
|
5984
|
+
export interface HostingV1RedirectsRedirectResource {
|
|
5985
|
+
/**
|
|
5986
|
+
* Source URL
|
|
5987
|
+
* @type {string}
|
|
5988
|
+
* @memberof HostingV1RedirectsRedirectResource
|
|
5989
|
+
*/
|
|
5990
|
+
'from': string;
|
|
5991
|
+
/**
|
|
5992
|
+
* Destination URL
|
|
5993
|
+
* @type {string}
|
|
5994
|
+
* @memberof HostingV1RedirectsRedirectResource
|
|
5995
|
+
*/
|
|
5996
|
+
'to': string;
|
|
5997
|
+
}
|
|
5759
5998
|
/**
|
|
5760
5999
|
*
|
|
5761
6000
|
* @export
|
|
@@ -14476,6 +14715,226 @@ export class AgencyHostingFilesApi extends BaseAPI {
|
|
|
14476
14715
|
|
|
14477
14716
|
|
|
14478
14717
|
|
|
14718
|
+
/**
|
|
14719
|
+
* AgencyHostingMetricsApi - axios parameter creator
|
|
14720
|
+
* @export
|
|
14721
|
+
*/
|
|
14722
|
+
export const AgencyHostingMetricsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
14723
|
+
return {
|
|
14724
|
+
/**
|
|
14725
|
+
* Returns aggregated disk and inode usage for the Agency Plan order over the selected time frame, plus the plan quotas. Figures cover the whole order account. Values may be up to one hour stale. CPU, memory, and process usage are on the resource-usage-metrics endpoint.
|
|
14726
|
+
* @summary List Agency Plan order disk usage metrics
|
|
14727
|
+
* @param {number} orderId Agency Plan order ID
|
|
14728
|
+
* @param {ListAgencyPlanOrderDiskUsageMetricsV1TimeFrameDaysEnum} [timeFrameDays] Length of the window in days, ending now. Bucket size grows with the window.
|
|
14729
|
+
* @param {*} [options] Override http request option.
|
|
14730
|
+
* @throws {RequiredError}
|
|
14731
|
+
*/
|
|
14732
|
+
listAgencyPlanOrderDiskUsageMetricsV1: async (orderId: number, timeFrameDays?: ListAgencyPlanOrderDiskUsageMetricsV1TimeFrameDaysEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
14733
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
14734
|
+
assertParamExists('listAgencyPlanOrderDiskUsageMetricsV1', 'orderId', orderId)
|
|
14735
|
+
const localVarPath = `/api/agency-hosting/v1/orders/{order_id}/disk-usage-metrics`
|
|
14736
|
+
.replace(`{${"order_id"}}`, encodeURIComponent(String(orderId)));
|
|
14737
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
14738
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
14739
|
+
let baseOptions;
|
|
14740
|
+
if (configuration) {
|
|
14741
|
+
baseOptions = configuration.baseOptions;
|
|
14742
|
+
}
|
|
14743
|
+
|
|
14744
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
14745
|
+
const localVarHeaderParameter = {} as any;
|
|
14746
|
+
const localVarQueryParameter = {} as any;
|
|
14747
|
+
|
|
14748
|
+
// authentication apiToken required
|
|
14749
|
+
// http bearer authentication required
|
|
14750
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
14751
|
+
|
|
14752
|
+
if (timeFrameDays !== undefined) {
|
|
14753
|
+
localVarQueryParameter['time_frame_days'] = timeFrameDays;
|
|
14754
|
+
}
|
|
14755
|
+
|
|
14756
|
+
|
|
14757
|
+
|
|
14758
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
14759
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
14760
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
14761
|
+
|
|
14762
|
+
return {
|
|
14763
|
+
url: toPathString(localVarUrlObj),
|
|
14764
|
+
options: localVarRequestOptions,
|
|
14765
|
+
};
|
|
14766
|
+
},
|
|
14767
|
+
/**
|
|
14768
|
+
* Returns aggregated CPU, memory, and process usage for the Agency Plan order over the selected time frame, plus the plan quotas and a per-website breakdown. Each website is identified by uid. Suspended and deleted websites are excluded from both the order totals and the per-website breakdown. Values may be up to one hour stale. Disk and inode usage are on the disk-usage-metrics endpoint.
|
|
14769
|
+
* @summary List order resource usage metrics
|
|
14770
|
+
* @param {number} orderId Agency Plan order ID
|
|
14771
|
+
* @param {ListOrderResourceUsageMetricsV1TimeFrameHoursEnum} [timeFrameHours] Length of the window in hours, ending now. Bucket size grows with the window.
|
|
14772
|
+
* @param {*} [options] Override http request option.
|
|
14773
|
+
* @throws {RequiredError}
|
|
14774
|
+
*/
|
|
14775
|
+
listOrderResourceUsageMetricsV1: async (orderId: number, timeFrameHours?: ListOrderResourceUsageMetricsV1TimeFrameHoursEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
14776
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
14777
|
+
assertParamExists('listOrderResourceUsageMetricsV1', 'orderId', orderId)
|
|
14778
|
+
const localVarPath = `/api/agency-hosting/v1/orders/{order_id}/resource-usage-metrics`
|
|
14779
|
+
.replace(`{${"order_id"}}`, encodeURIComponent(String(orderId)));
|
|
14780
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
14781
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
14782
|
+
let baseOptions;
|
|
14783
|
+
if (configuration) {
|
|
14784
|
+
baseOptions = configuration.baseOptions;
|
|
14785
|
+
}
|
|
14786
|
+
|
|
14787
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
14788
|
+
const localVarHeaderParameter = {} as any;
|
|
14789
|
+
const localVarQueryParameter = {} as any;
|
|
14790
|
+
|
|
14791
|
+
// authentication apiToken required
|
|
14792
|
+
// http bearer authentication required
|
|
14793
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
14794
|
+
|
|
14795
|
+
if (timeFrameHours !== undefined) {
|
|
14796
|
+
localVarQueryParameter['time_frame_hours'] = timeFrameHours;
|
|
14797
|
+
}
|
|
14798
|
+
|
|
14799
|
+
|
|
14800
|
+
|
|
14801
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
14802
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
14803
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
14804
|
+
|
|
14805
|
+
return {
|
|
14806
|
+
url: toPathString(localVarUrlObj),
|
|
14807
|
+
options: localVarRequestOptions,
|
|
14808
|
+
};
|
|
14809
|
+
},
|
|
14810
|
+
}
|
|
14811
|
+
};
|
|
14812
|
+
|
|
14813
|
+
/**
|
|
14814
|
+
* AgencyHostingMetricsApi - functional programming interface
|
|
14815
|
+
* @export
|
|
14816
|
+
*/
|
|
14817
|
+
export const AgencyHostingMetricsApiFp = function(configuration?: Configuration) {
|
|
14818
|
+
const localVarAxiosParamCreator = AgencyHostingMetricsApiAxiosParamCreator(configuration)
|
|
14819
|
+
return {
|
|
14820
|
+
/**
|
|
14821
|
+
* Returns aggregated disk and inode usage for the Agency Plan order over the selected time frame, plus the plan quotas. Figures cover the whole order account. Values may be up to one hour stale. CPU, memory, and process usage are on the resource-usage-metrics endpoint.
|
|
14822
|
+
* @summary List Agency Plan order disk usage metrics
|
|
14823
|
+
* @param {number} orderId Agency Plan order ID
|
|
14824
|
+
* @param {ListAgencyPlanOrderDiskUsageMetricsV1TimeFrameDaysEnum} [timeFrameDays] Length of the window in days, ending now. Bucket size grows with the window.
|
|
14825
|
+
* @param {*} [options] Override http request option.
|
|
14826
|
+
* @throws {RequiredError}
|
|
14827
|
+
*/
|
|
14828
|
+
async listAgencyPlanOrderDiskUsageMetricsV1(orderId: number, timeFrameDays?: ListAgencyPlanOrderDiskUsageMetricsV1TimeFrameDaysEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgencyHostingV1OrdersDiskUsageMetricsMetricsResource>> {
|
|
14829
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listAgencyPlanOrderDiskUsageMetricsV1(orderId, timeFrameDays, options);
|
|
14830
|
+
const localVarOperationServerBasePath = operationServerMap['AgencyHostingMetricsApi.listAgencyPlanOrderDiskUsageMetricsV1']?.[0]?.url;
|
|
14831
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
14832
|
+
},
|
|
14833
|
+
/**
|
|
14834
|
+
* Returns aggregated CPU, memory, and process usage for the Agency Plan order over the selected time frame, plus the plan quotas and a per-website breakdown. Each website is identified by uid. Suspended and deleted websites are excluded from both the order totals and the per-website breakdown. Values may be up to one hour stale. Disk and inode usage are on the disk-usage-metrics endpoint.
|
|
14835
|
+
* @summary List order resource usage metrics
|
|
14836
|
+
* @param {number} orderId Agency Plan order ID
|
|
14837
|
+
* @param {ListOrderResourceUsageMetricsV1TimeFrameHoursEnum} [timeFrameHours] Length of the window in hours, ending now. Bucket size grows with the window.
|
|
14838
|
+
* @param {*} [options] Override http request option.
|
|
14839
|
+
* @throws {RequiredError}
|
|
14840
|
+
*/
|
|
14841
|
+
async listOrderResourceUsageMetricsV1(orderId: number, timeFrameHours?: ListOrderResourceUsageMetricsV1TimeFrameHoursEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgencyHostingV1OrdersResourceUsageMetricsMetricsResource>> {
|
|
14842
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listOrderResourceUsageMetricsV1(orderId, timeFrameHours, options);
|
|
14843
|
+
const localVarOperationServerBasePath = operationServerMap['AgencyHostingMetricsApi.listOrderResourceUsageMetricsV1']?.[0]?.url;
|
|
14844
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
14845
|
+
},
|
|
14846
|
+
}
|
|
14847
|
+
};
|
|
14848
|
+
|
|
14849
|
+
/**
|
|
14850
|
+
* AgencyHostingMetricsApi - factory interface
|
|
14851
|
+
* @export
|
|
14852
|
+
*/
|
|
14853
|
+
export const AgencyHostingMetricsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
14854
|
+
const localVarFp = AgencyHostingMetricsApiFp(configuration)
|
|
14855
|
+
return {
|
|
14856
|
+
/**
|
|
14857
|
+
* Returns aggregated disk and inode usage for the Agency Plan order over the selected time frame, plus the plan quotas. Figures cover the whole order account. Values may be up to one hour stale. CPU, memory, and process usage are on the resource-usage-metrics endpoint.
|
|
14858
|
+
* @summary List Agency Plan order disk usage metrics
|
|
14859
|
+
* @param {number} orderId Agency Plan order ID
|
|
14860
|
+
* @param {ListAgencyPlanOrderDiskUsageMetricsV1TimeFrameDaysEnum} [timeFrameDays] Length of the window in days, ending now. Bucket size grows with the window.
|
|
14861
|
+
* @param {*} [options] Override http request option.
|
|
14862
|
+
* @throws {RequiredError}
|
|
14863
|
+
*/
|
|
14864
|
+
listAgencyPlanOrderDiskUsageMetricsV1(orderId: number, timeFrameDays?: ListAgencyPlanOrderDiskUsageMetricsV1TimeFrameDaysEnum, options?: RawAxiosRequestConfig): AxiosPromise<AgencyHostingV1OrdersDiskUsageMetricsMetricsResource> {
|
|
14865
|
+
return localVarFp.listAgencyPlanOrderDiskUsageMetricsV1(orderId, timeFrameDays, options).then((request) => request(axios, basePath));
|
|
14866
|
+
},
|
|
14867
|
+
/**
|
|
14868
|
+
* Returns aggregated CPU, memory, and process usage for the Agency Plan order over the selected time frame, plus the plan quotas and a per-website breakdown. Each website is identified by uid. Suspended and deleted websites are excluded from both the order totals and the per-website breakdown. Values may be up to one hour stale. Disk and inode usage are on the disk-usage-metrics endpoint.
|
|
14869
|
+
* @summary List order resource usage metrics
|
|
14870
|
+
* @param {number} orderId Agency Plan order ID
|
|
14871
|
+
* @param {ListOrderResourceUsageMetricsV1TimeFrameHoursEnum} [timeFrameHours] Length of the window in hours, ending now. Bucket size grows with the window.
|
|
14872
|
+
* @param {*} [options] Override http request option.
|
|
14873
|
+
* @throws {RequiredError}
|
|
14874
|
+
*/
|
|
14875
|
+
listOrderResourceUsageMetricsV1(orderId: number, timeFrameHours?: ListOrderResourceUsageMetricsV1TimeFrameHoursEnum, options?: RawAxiosRequestConfig): AxiosPromise<AgencyHostingV1OrdersResourceUsageMetricsMetricsResource> {
|
|
14876
|
+
return localVarFp.listOrderResourceUsageMetricsV1(orderId, timeFrameHours, options).then((request) => request(axios, basePath));
|
|
14877
|
+
},
|
|
14878
|
+
};
|
|
14879
|
+
};
|
|
14880
|
+
|
|
14881
|
+
/**
|
|
14882
|
+
* AgencyHostingMetricsApi - object-oriented interface
|
|
14883
|
+
* @export
|
|
14884
|
+
* @class AgencyHostingMetricsApi
|
|
14885
|
+
* @extends {BaseAPI}
|
|
14886
|
+
*/
|
|
14887
|
+
export class AgencyHostingMetricsApi extends BaseAPI {
|
|
14888
|
+
/**
|
|
14889
|
+
* Returns aggregated disk and inode usage for the Agency Plan order over the selected time frame, plus the plan quotas. Figures cover the whole order account. Values may be up to one hour stale. CPU, memory, and process usage are on the resource-usage-metrics endpoint.
|
|
14890
|
+
* @summary List Agency Plan order disk usage metrics
|
|
14891
|
+
* @param {number} orderId Agency Plan order ID
|
|
14892
|
+
* @param {ListAgencyPlanOrderDiskUsageMetricsV1TimeFrameDaysEnum} [timeFrameDays] Length of the window in days, ending now. Bucket size grows with the window.
|
|
14893
|
+
* @param {*} [options] Override http request option.
|
|
14894
|
+
* @throws {RequiredError}
|
|
14895
|
+
* @memberof AgencyHostingMetricsApi
|
|
14896
|
+
*/
|
|
14897
|
+
public listAgencyPlanOrderDiskUsageMetricsV1(orderId: number, timeFrameDays?: ListAgencyPlanOrderDiskUsageMetricsV1TimeFrameDaysEnum, options?: RawAxiosRequestConfig) {
|
|
14898
|
+
return AgencyHostingMetricsApiFp(this.configuration).listAgencyPlanOrderDiskUsageMetricsV1(orderId, timeFrameDays, options).then((request) => request(this.axios, this.basePath));
|
|
14899
|
+
}
|
|
14900
|
+
|
|
14901
|
+
/**
|
|
14902
|
+
* Returns aggregated CPU, memory, and process usage for the Agency Plan order over the selected time frame, plus the plan quotas and a per-website breakdown. Each website is identified by uid. Suspended and deleted websites are excluded from both the order totals and the per-website breakdown. Values may be up to one hour stale. Disk and inode usage are on the disk-usage-metrics endpoint.
|
|
14903
|
+
* @summary List order resource usage metrics
|
|
14904
|
+
* @param {number} orderId Agency Plan order ID
|
|
14905
|
+
* @param {ListOrderResourceUsageMetricsV1TimeFrameHoursEnum} [timeFrameHours] Length of the window in hours, ending now. Bucket size grows with the window.
|
|
14906
|
+
* @param {*} [options] Override http request option.
|
|
14907
|
+
* @throws {RequiredError}
|
|
14908
|
+
* @memberof AgencyHostingMetricsApi
|
|
14909
|
+
*/
|
|
14910
|
+
public listOrderResourceUsageMetricsV1(orderId: number, timeFrameHours?: ListOrderResourceUsageMetricsV1TimeFrameHoursEnum, options?: RawAxiosRequestConfig) {
|
|
14911
|
+
return AgencyHostingMetricsApiFp(this.configuration).listOrderResourceUsageMetricsV1(orderId, timeFrameHours, options).then((request) => request(this.axios, this.basePath));
|
|
14912
|
+
}
|
|
14913
|
+
}
|
|
14914
|
+
|
|
14915
|
+
/**
|
|
14916
|
+
* @export
|
|
14917
|
+
*/
|
|
14918
|
+
export const ListAgencyPlanOrderDiskUsageMetricsV1TimeFrameDaysEnum = {
|
|
14919
|
+
NUMBER_1: 1,
|
|
14920
|
+
NUMBER_7: 7,
|
|
14921
|
+
NUMBER_14: 14,
|
|
14922
|
+
NUMBER_30: 30
|
|
14923
|
+
} as const;
|
|
14924
|
+
export type ListAgencyPlanOrderDiskUsageMetricsV1TimeFrameDaysEnum = typeof ListAgencyPlanOrderDiskUsageMetricsV1TimeFrameDaysEnum[keyof typeof ListAgencyPlanOrderDiskUsageMetricsV1TimeFrameDaysEnum];
|
|
14925
|
+
/**
|
|
14926
|
+
* @export
|
|
14927
|
+
*/
|
|
14928
|
+
export const ListOrderResourceUsageMetricsV1TimeFrameHoursEnum = {
|
|
14929
|
+
NUMBER_1: 1,
|
|
14930
|
+
NUMBER_24: 24,
|
|
14931
|
+
NUMBER_168: 168,
|
|
14932
|
+
NUMBER_336: 336,
|
|
14933
|
+
NUMBER_720: 720
|
|
14934
|
+
} as const;
|
|
14935
|
+
export type ListOrderResourceUsageMetricsV1TimeFrameHoursEnum = typeof ListOrderResourceUsageMetricsV1TimeFrameHoursEnum[keyof typeof ListOrderResourceUsageMetricsV1TimeFrameHoursEnum];
|
|
14936
|
+
|
|
14937
|
+
|
|
14479
14938
|
/**
|
|
14480
14939
|
* AgencyHostingOrdersApi - axios parameter creator
|
|
14481
14940
|
* @export
|
|
@@ -26005,6 +26464,317 @@ export class HostingPHPApi extends BaseAPI {
|
|
|
26005
26464
|
|
|
26006
26465
|
|
|
26007
26466
|
|
|
26467
|
+
/**
|
|
26468
|
+
* HostingRedirectsApi - axios parameter creator
|
|
26469
|
+
* @export
|
|
26470
|
+
*/
|
|
26471
|
+
export const HostingRedirectsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
26472
|
+
return {
|
|
26473
|
+
/**
|
|
26474
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
26475
|
+
* @summary Create website redirect
|
|
26476
|
+
* @param {string} username
|
|
26477
|
+
* @param {string} domain Domain name
|
|
26478
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
26479
|
+
* @param {*} [options] Override http request option.
|
|
26480
|
+
* @throws {RequiredError}
|
|
26481
|
+
*/
|
|
26482
|
+
createWebsiteRedirectV1: async (username: string, domain: string, hostingV1RedirectsCreateRedirectRequest: HostingV1RedirectsCreateRedirectRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
26483
|
+
// verify required parameter 'username' is not null or undefined
|
|
26484
|
+
assertParamExists('createWebsiteRedirectV1', 'username', username)
|
|
26485
|
+
// verify required parameter 'domain' is not null or undefined
|
|
26486
|
+
assertParamExists('createWebsiteRedirectV1', 'domain', domain)
|
|
26487
|
+
// verify required parameter 'hostingV1RedirectsCreateRedirectRequest' is not null or undefined
|
|
26488
|
+
assertParamExists('createWebsiteRedirectV1', 'hostingV1RedirectsCreateRedirectRequest', hostingV1RedirectsCreateRedirectRequest)
|
|
26489
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/redirects`
|
|
26490
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
26491
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
26492
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
26493
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
26494
|
+
let baseOptions;
|
|
26495
|
+
if (configuration) {
|
|
26496
|
+
baseOptions = configuration.baseOptions;
|
|
26497
|
+
}
|
|
26498
|
+
|
|
26499
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
26500
|
+
const localVarHeaderParameter = {} as any;
|
|
26501
|
+
const localVarQueryParameter = {} as any;
|
|
26502
|
+
|
|
26503
|
+
// authentication apiToken required
|
|
26504
|
+
// http bearer authentication required
|
|
26505
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
26506
|
+
|
|
26507
|
+
|
|
26508
|
+
|
|
26509
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
26510
|
+
|
|
26511
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
26512
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
26513
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
26514
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1RedirectsCreateRedirectRequest, localVarRequestOptions, configuration)
|
|
26515
|
+
|
|
26516
|
+
return {
|
|
26517
|
+
url: toPathString(localVarUrlObj),
|
|
26518
|
+
options: localVarRequestOptions,
|
|
26519
|
+
};
|
|
26520
|
+
},
|
|
26521
|
+
/**
|
|
26522
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
26523
|
+
* @summary Delete website redirect
|
|
26524
|
+
* @param {string} username
|
|
26525
|
+
* @param {string} domain Domain name
|
|
26526
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
26527
|
+
* @param {*} [options] Override http request option.
|
|
26528
|
+
* @throws {RequiredError}
|
|
26529
|
+
*/
|
|
26530
|
+
deleteWebsiteRedirectV1: async (username: string, domain: string, from: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
26531
|
+
// verify required parameter 'username' is not null or undefined
|
|
26532
|
+
assertParamExists('deleteWebsiteRedirectV1', 'username', username)
|
|
26533
|
+
// verify required parameter 'domain' is not null or undefined
|
|
26534
|
+
assertParamExists('deleteWebsiteRedirectV1', 'domain', domain)
|
|
26535
|
+
// verify required parameter 'from' is not null or undefined
|
|
26536
|
+
assertParamExists('deleteWebsiteRedirectV1', 'from', from)
|
|
26537
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/redirects`
|
|
26538
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
26539
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
26540
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
26541
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
26542
|
+
let baseOptions;
|
|
26543
|
+
if (configuration) {
|
|
26544
|
+
baseOptions = configuration.baseOptions;
|
|
26545
|
+
}
|
|
26546
|
+
|
|
26547
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
26548
|
+
const localVarHeaderParameter = {} as any;
|
|
26549
|
+
const localVarQueryParameter = {} as any;
|
|
26550
|
+
|
|
26551
|
+
// authentication apiToken required
|
|
26552
|
+
// http bearer authentication required
|
|
26553
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
26554
|
+
|
|
26555
|
+
if (from !== undefined) {
|
|
26556
|
+
localVarQueryParameter['from'] = from;
|
|
26557
|
+
}
|
|
26558
|
+
|
|
26559
|
+
|
|
26560
|
+
|
|
26561
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
26562
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
26563
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
26564
|
+
|
|
26565
|
+
return {
|
|
26566
|
+
url: toPathString(localVarUrlObj),
|
|
26567
|
+
options: localVarRequestOptions,
|
|
26568
|
+
};
|
|
26569
|
+
},
|
|
26570
|
+
/**
|
|
26571
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
26572
|
+
* @summary List website redirects
|
|
26573
|
+
* @param {string} username
|
|
26574
|
+
* @param {string} domain Domain name
|
|
26575
|
+
* @param {number} [page] Page number
|
|
26576
|
+
* @param {number} [perPage] Number of items per page
|
|
26577
|
+
* @param {*} [options] Override http request option.
|
|
26578
|
+
* @throws {RequiredError}
|
|
26579
|
+
*/
|
|
26580
|
+
listWebsiteRedirectsV1: async (username: string, domain: string, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
26581
|
+
// verify required parameter 'username' is not null or undefined
|
|
26582
|
+
assertParamExists('listWebsiteRedirectsV1', 'username', username)
|
|
26583
|
+
// verify required parameter 'domain' is not null or undefined
|
|
26584
|
+
assertParamExists('listWebsiteRedirectsV1', 'domain', domain)
|
|
26585
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/redirects`
|
|
26586
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
26587
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
26588
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
26589
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
26590
|
+
let baseOptions;
|
|
26591
|
+
if (configuration) {
|
|
26592
|
+
baseOptions = configuration.baseOptions;
|
|
26593
|
+
}
|
|
26594
|
+
|
|
26595
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
26596
|
+
const localVarHeaderParameter = {} as any;
|
|
26597
|
+
const localVarQueryParameter = {} as any;
|
|
26598
|
+
|
|
26599
|
+
// authentication apiToken required
|
|
26600
|
+
// http bearer authentication required
|
|
26601
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
26602
|
+
|
|
26603
|
+
if (page !== undefined) {
|
|
26604
|
+
localVarQueryParameter['page'] = page;
|
|
26605
|
+
}
|
|
26606
|
+
|
|
26607
|
+
if (perPage !== undefined) {
|
|
26608
|
+
localVarQueryParameter['per_page'] = perPage;
|
|
26609
|
+
}
|
|
26610
|
+
|
|
26611
|
+
|
|
26612
|
+
|
|
26613
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
26614
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
26615
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
26616
|
+
|
|
26617
|
+
return {
|
|
26618
|
+
url: toPathString(localVarUrlObj),
|
|
26619
|
+
options: localVarRequestOptions,
|
|
26620
|
+
};
|
|
26621
|
+
},
|
|
26622
|
+
}
|
|
26623
|
+
};
|
|
26624
|
+
|
|
26625
|
+
/**
|
|
26626
|
+
* HostingRedirectsApi - functional programming interface
|
|
26627
|
+
* @export
|
|
26628
|
+
*/
|
|
26629
|
+
export const HostingRedirectsApiFp = function(configuration?: Configuration) {
|
|
26630
|
+
const localVarAxiosParamCreator = HostingRedirectsApiAxiosParamCreator(configuration)
|
|
26631
|
+
return {
|
|
26632
|
+
/**
|
|
26633
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
26634
|
+
* @summary Create website redirect
|
|
26635
|
+
* @param {string} username
|
|
26636
|
+
* @param {string} domain Domain name
|
|
26637
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
26638
|
+
* @param {*} [options] Override http request option.
|
|
26639
|
+
* @throws {RequiredError}
|
|
26640
|
+
*/
|
|
26641
|
+
async createWebsiteRedirectV1(username: string, domain: string, hostingV1RedirectsCreateRedirectRequest: HostingV1RedirectsCreateRedirectRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1RedirectsRedirectResource>> {
|
|
26642
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createWebsiteRedirectV1(username, domain, hostingV1RedirectsCreateRedirectRequest, options);
|
|
26643
|
+
const localVarOperationServerBasePath = operationServerMap['HostingRedirectsApi.createWebsiteRedirectV1']?.[0]?.url;
|
|
26644
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
26645
|
+
},
|
|
26646
|
+
/**
|
|
26647
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
26648
|
+
* @summary Delete website redirect
|
|
26649
|
+
* @param {string} username
|
|
26650
|
+
* @param {string} domain Domain name
|
|
26651
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
26652
|
+
* @param {*} [options] Override http request option.
|
|
26653
|
+
* @throws {RequiredError}
|
|
26654
|
+
*/
|
|
26655
|
+
async deleteWebsiteRedirectV1(username: string, domain: string, from: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
26656
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWebsiteRedirectV1(username, domain, from, options);
|
|
26657
|
+
const localVarOperationServerBasePath = operationServerMap['HostingRedirectsApi.deleteWebsiteRedirectV1']?.[0]?.url;
|
|
26658
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
26659
|
+
},
|
|
26660
|
+
/**
|
|
26661
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
26662
|
+
* @summary List website redirects
|
|
26663
|
+
* @param {string} username
|
|
26664
|
+
* @param {string} domain Domain name
|
|
26665
|
+
* @param {number} [page] Page number
|
|
26666
|
+
* @param {number} [perPage] Number of items per page
|
|
26667
|
+
* @param {*} [options] Override http request option.
|
|
26668
|
+
* @throws {RequiredError}
|
|
26669
|
+
*/
|
|
26670
|
+
async listWebsiteRedirectsV1(username: string, domain: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingListWebsiteRedirectsV1200Response>> {
|
|
26671
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listWebsiteRedirectsV1(username, domain, page, perPage, options);
|
|
26672
|
+
const localVarOperationServerBasePath = operationServerMap['HostingRedirectsApi.listWebsiteRedirectsV1']?.[0]?.url;
|
|
26673
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
26674
|
+
},
|
|
26675
|
+
}
|
|
26676
|
+
};
|
|
26677
|
+
|
|
26678
|
+
/**
|
|
26679
|
+
* HostingRedirectsApi - factory interface
|
|
26680
|
+
* @export
|
|
26681
|
+
*/
|
|
26682
|
+
export const HostingRedirectsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
26683
|
+
const localVarFp = HostingRedirectsApiFp(configuration)
|
|
26684
|
+
return {
|
|
26685
|
+
/**
|
|
26686
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
26687
|
+
* @summary Create website redirect
|
|
26688
|
+
* @param {string} username
|
|
26689
|
+
* @param {string} domain Domain name
|
|
26690
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
26691
|
+
* @param {*} [options] Override http request option.
|
|
26692
|
+
* @throws {RequiredError}
|
|
26693
|
+
*/
|
|
26694
|
+
createWebsiteRedirectV1(username: string, domain: string, hostingV1RedirectsCreateRedirectRequest: HostingV1RedirectsCreateRedirectRequest, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1RedirectsRedirectResource> {
|
|
26695
|
+
return localVarFp.createWebsiteRedirectV1(username, domain, hostingV1RedirectsCreateRedirectRequest, options).then((request) => request(axios, basePath));
|
|
26696
|
+
},
|
|
26697
|
+
/**
|
|
26698
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
26699
|
+
* @summary Delete website redirect
|
|
26700
|
+
* @param {string} username
|
|
26701
|
+
* @param {string} domain Domain name
|
|
26702
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
26703
|
+
* @param {*} [options] Override http request option.
|
|
26704
|
+
* @throws {RequiredError}
|
|
26705
|
+
*/
|
|
26706
|
+
deleteWebsiteRedirectV1(username: string, domain: string, from: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
26707
|
+
return localVarFp.deleteWebsiteRedirectV1(username, domain, from, options).then((request) => request(axios, basePath));
|
|
26708
|
+
},
|
|
26709
|
+
/**
|
|
26710
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
26711
|
+
* @summary List website redirects
|
|
26712
|
+
* @param {string} username
|
|
26713
|
+
* @param {string} domain Domain name
|
|
26714
|
+
* @param {number} [page] Page number
|
|
26715
|
+
* @param {number} [perPage] Number of items per page
|
|
26716
|
+
* @param {*} [options] Override http request option.
|
|
26717
|
+
* @throws {RequiredError}
|
|
26718
|
+
*/
|
|
26719
|
+
listWebsiteRedirectsV1(username: string, domain: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<HostingListWebsiteRedirectsV1200Response> {
|
|
26720
|
+
return localVarFp.listWebsiteRedirectsV1(username, domain, page, perPage, options).then((request) => request(axios, basePath));
|
|
26721
|
+
},
|
|
26722
|
+
};
|
|
26723
|
+
};
|
|
26724
|
+
|
|
26725
|
+
/**
|
|
26726
|
+
* HostingRedirectsApi - object-oriented interface
|
|
26727
|
+
* @export
|
|
26728
|
+
* @class HostingRedirectsApi
|
|
26729
|
+
* @extends {BaseAPI}
|
|
26730
|
+
*/
|
|
26731
|
+
export class HostingRedirectsApi extends BaseAPI {
|
|
26732
|
+
/**
|
|
26733
|
+
* Creates a redirect from a URL on the selected website to another URL or IP address.
|
|
26734
|
+
* @summary Create website redirect
|
|
26735
|
+
* @param {string} username
|
|
26736
|
+
* @param {string} domain Domain name
|
|
26737
|
+
* @param {HostingV1RedirectsCreateRedirectRequest} hostingV1RedirectsCreateRedirectRequest
|
|
26738
|
+
* @param {*} [options] Override http request option.
|
|
26739
|
+
* @throws {RequiredError}
|
|
26740
|
+
* @memberof HostingRedirectsApi
|
|
26741
|
+
*/
|
|
26742
|
+
public createWebsiteRedirectV1(username: string, domain: string, hostingV1RedirectsCreateRedirectRequest: HostingV1RedirectsCreateRedirectRequest, options?: RawAxiosRequestConfig) {
|
|
26743
|
+
return HostingRedirectsApiFp(this.configuration).createWebsiteRedirectV1(username, domain, hostingV1RedirectsCreateRedirectRequest, options).then((request) => request(this.axios, this.basePath));
|
|
26744
|
+
}
|
|
26745
|
+
|
|
26746
|
+
/**
|
|
26747
|
+
* Permanently deletes the redirect identified by its source URL. Pass the `from` value exactly as returned by the list redirects endpoint.
|
|
26748
|
+
* @summary Delete website redirect
|
|
26749
|
+
* @param {string} username
|
|
26750
|
+
* @param {string} domain Domain name
|
|
26751
|
+
* @param {string} from Source URL returned by the list redirects endpoint.
|
|
26752
|
+
* @param {*} [options] Override http request option.
|
|
26753
|
+
* @throws {RequiredError}
|
|
26754
|
+
* @memberof HostingRedirectsApi
|
|
26755
|
+
*/
|
|
26756
|
+
public deleteWebsiteRedirectV1(username: string, domain: string, from: string, options?: RawAxiosRequestConfig) {
|
|
26757
|
+
return HostingRedirectsApiFp(this.configuration).deleteWebsiteRedirectV1(username, domain, from, options).then((request) => request(this.axios, this.basePath));
|
|
26758
|
+
}
|
|
26759
|
+
|
|
26760
|
+
/**
|
|
26761
|
+
* Returns a paginated list of redirects configured for the selected website.
|
|
26762
|
+
* @summary List website redirects
|
|
26763
|
+
* @param {string} username
|
|
26764
|
+
* @param {string} domain Domain name
|
|
26765
|
+
* @param {number} [page] Page number
|
|
26766
|
+
* @param {number} [perPage] Number of items per page
|
|
26767
|
+
* @param {*} [options] Override http request option.
|
|
26768
|
+
* @throws {RequiredError}
|
|
26769
|
+
* @memberof HostingRedirectsApi
|
|
26770
|
+
*/
|
|
26771
|
+
public listWebsiteRedirectsV1(username: string, domain: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig) {
|
|
26772
|
+
return HostingRedirectsApiFp(this.configuration).listWebsiteRedirectsV1(username, domain, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
26773
|
+
}
|
|
26774
|
+
}
|
|
26775
|
+
|
|
26776
|
+
|
|
26777
|
+
|
|
26008
26778
|
/**
|
|
26009
26779
|
* HostingWebsitesApi - axios parameter creator
|
|
26010
26780
|
* @export
|