hostinger-api-sdk 1.33.1 → 1.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +2 -2
  2. package/api.ts +1179 -72
  3. package/base.ts +1 -1
  4. package/common.ts +1 -1
  5. package/configuration.ts +2 -2
  6. package/dist/api.d.ts +643 -1
  7. package/dist/api.js +866 -25
  8. package/dist/base.d.ts +1 -1
  9. package/dist/base.js +1 -1
  10. package/dist/common.d.ts +1 -1
  11. package/dist/common.js +1 -1
  12. package/dist/configuration.d.ts +1 -1
  13. package/dist/configuration.js +2 -2
  14. package/dist/esm/api.d.ts +643 -1
  15. package/dist/esm/api.js +846 -13
  16. package/dist/esm/base.d.ts +1 -1
  17. package/dist/esm/base.js +1 -1
  18. package/dist/esm/common.d.ts +1 -1
  19. package/dist/esm/common.js +1 -1
  20. package/dist/esm/configuration.d.ts +1 -1
  21. package/dist/esm/configuration.js +2 -2
  22. package/dist/esm/index.d.ts +1 -1
  23. package/dist/esm/index.js +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +1 -1
  26. package/docs/AgencyHostingPHPApi.md +400 -0
  27. package/docs/AgencyHostingV1PhpExtensionResource.md +24 -0
  28. package/docs/AgencyHostingV1PhpOptionResource.md +30 -0
  29. package/docs/AgencyHostingV1PhpUpdateExtensionsRequest.md +20 -0
  30. package/docs/AgencyHostingV1PhpUpdateOptionsRequest.md +20 -0
  31. package/docs/AgencyHostingV1PhpUpdateOptionsRequestOptionsInner.md +22 -0
  32. package/docs/AgencyHostingV1PhpUpdateVersionRequest.md +20 -0
  33. package/docs/AgencyHostingV1PhpVersionResource.md +20 -0
  34. package/docs/HostingListWebsiteRedirectsV1200Response.md +22 -0
  35. package/docs/HostingRedirectsApi.md +193 -0
  36. package/docs/HostingV1RedirectsCreateRedirectRequest.md +22 -0
  37. package/docs/HostingV1RedirectsDeleteRedirectRequest.md +20 -0
  38. package/docs/HostingV1RedirectsRedirectResource.md +22 -0
  39. package/index.ts +1 -1
  40. package/package.json +1 -1
package/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.35.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
@@ -23,6 +23,15 @@ import globalAxios from 'axios';
23
23
  import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
24
24
  // @ts-ignore
25
25
  import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from './base';
26
+ export const AgencyHostingV1PhpExtensionResourceStateEnum = {
27
+ Enabled: 'enabled',
28
+ Disabled: 'disabled',
29
+ BuiltIn: 'built-in'
30
+ };
31
+ export const AgencyHostingV1PhpOptionResourceTypeEnum = {
32
+ Value: 'value',
33
+ List: 'list'
34
+ };
26
35
  export const AgencyHostingV1SetupsCreateSetupRequestTypeEnum = {
27
36
  Horizons: 'horizons',
28
37
  NodeStatic: 'node-static'
@@ -2245,29 +2254,563 @@ export const AgencyHostingOrdersApiFactory = function (configuration, basePath,
2245
2254
  * @param {*} [options] Override http request option.
2246
2255
  * @throws {RequiredError}
2247
2256
  */
2248
- listOrdersV1(page, perPage, options) {
2249
- return localVarFp.listOrdersV1(page, perPage, options).then((request) => request(axios, basePath));
2257
+ listOrdersV1(page, perPage, options) {
2258
+ return localVarFp.listOrdersV1(page, perPage, options).then((request) => request(axios, basePath));
2259
+ },
2260
+ };
2261
+ };
2262
+ /**
2263
+ * AgencyHostingOrdersApi - object-oriented interface
2264
+ * @export
2265
+ * @class AgencyHostingOrdersApi
2266
+ * @extends {BaseAPI}
2267
+ */
2268
+ export class AgencyHostingOrdersApi extends BaseAPI {
2269
+ /**
2270
+ * Returns a paginated list of Agency Plan orders accessible to the authenticated client.
2271
+ * @summary List orders
2272
+ * @param {number} [page] Page number
2273
+ * @param {number} [perPage] Number of items per page
2274
+ * @param {*} [options] Override http request option.
2275
+ * @throws {RequiredError}
2276
+ * @memberof AgencyHostingOrdersApi
2277
+ */
2278
+ listOrdersV1(page, perPage, options) {
2279
+ return AgencyHostingOrdersApiFp(this.configuration).listOrdersV1(page, perPage, options).then((request) => request(this.axios, this.basePath));
2280
+ }
2281
+ }
2282
+ /**
2283
+ * AgencyHostingPHPApi - axios parameter creator
2284
+ * @export
2285
+ */
2286
+ export const AgencyHostingPHPApiAxiosParamCreator = function (configuration) {
2287
+ return {
2288
+ /**
2289
+ * Lists the PHP versions an Agency Plan website can be switched to. The version the website is currently running is returned as settings.php.version by the website details endpoint.
2290
+ * @summary List available PHP versions for a website
2291
+ * @param {string} websiteUid Agency Plan website UID
2292
+ * @param {*} [options] Override http request option.
2293
+ * @throws {RequiredError}
2294
+ */
2295
+ listAvailablePHPVersionsForAWebsiteV1: (websiteUid_1, ...args_1) => __awaiter(this, [websiteUid_1, ...args_1], void 0, function* (websiteUid, options = {}) {
2296
+ // verify required parameter 'websiteUid' is not null or undefined
2297
+ assertParamExists('listAvailablePHPVersionsForAWebsiteV1', 'websiteUid', websiteUid);
2298
+ const localVarPath = `/api/agency-hosting/v1/websites/{website_uid}/php-settings/versions`
2299
+ .replace(`{${"website_uid"}}`, encodeURIComponent(String(websiteUid)));
2300
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2301
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2302
+ let baseOptions;
2303
+ if (configuration) {
2304
+ baseOptions = configuration.baseOptions;
2305
+ }
2306
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2307
+ const localVarHeaderParameter = {};
2308
+ const localVarQueryParameter = {};
2309
+ // authentication apiToken required
2310
+ // http bearer authentication required
2311
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2312
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2313
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2314
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2315
+ return {
2316
+ url: toPathString(localVarUrlObj),
2317
+ options: localVarRequestOptions,
2318
+ };
2319
+ }),
2320
+ /**
2321
+ * Lists the PHP versions available to websites created under an Agency Plan order, determined by the server the order is hosted on. Use this before creating a website; for a website that already exists, call the website-scoped versions endpoint instead.
2322
+ * @summary List available PHP versions for an order
2323
+ * @param {number} orderId Agency Plan order ID
2324
+ * @param {*} [options] Override http request option.
2325
+ * @throws {RequiredError}
2326
+ */
2327
+ listAvailablePHPVersionsForAnOrderV1: (orderId_1, ...args_1) => __awaiter(this, [orderId_1, ...args_1], void 0, function* (orderId, options = {}) {
2328
+ // verify required parameter 'orderId' is not null or undefined
2329
+ assertParamExists('listAvailablePHPVersionsForAnOrderV1', 'orderId', orderId);
2330
+ const localVarPath = `/api/agency-hosting/v1/orders/{order_id}/websites/php-settings/versions`
2331
+ .replace(`{${"order_id"}}`, encodeURIComponent(String(orderId)));
2332
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2333
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2334
+ let baseOptions;
2335
+ if (configuration) {
2336
+ baseOptions = configuration.baseOptions;
2337
+ }
2338
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2339
+ const localVarHeaderParameter = {};
2340
+ const localVarQueryParameter = {};
2341
+ // authentication apiToken required
2342
+ // http bearer authentication required
2343
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2344
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2345
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2346
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2347
+ return {
2348
+ url: toPathString(localVarUrlObj),
2349
+ options: localVarRequestOptions,
2350
+ };
2351
+ }),
2352
+ /**
2353
+ * Lists every PHP extension available to an Agency Plan website and whether it is currently enabled.
2354
+ * @summary List PHP extensions for a website
2355
+ * @param {string} websiteUid Agency Plan website UID
2356
+ * @param {*} [options] Override http request option.
2357
+ * @throws {RequiredError}
2358
+ */
2359
+ listPHPExtensionsForAWebsiteV1: (websiteUid_1, ...args_1) => __awaiter(this, [websiteUid_1, ...args_1], void 0, function* (websiteUid, options = {}) {
2360
+ // verify required parameter 'websiteUid' is not null or undefined
2361
+ assertParamExists('listPHPExtensionsForAWebsiteV1', 'websiteUid', websiteUid);
2362
+ const localVarPath = `/api/agency-hosting/v1/websites/{website_uid}/php-settings/extensions`
2363
+ .replace(`{${"website_uid"}}`, encodeURIComponent(String(websiteUid)));
2364
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2365
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2366
+ let baseOptions;
2367
+ if (configuration) {
2368
+ baseOptions = configuration.baseOptions;
2369
+ }
2370
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2371
+ const localVarHeaderParameter = {};
2372
+ const localVarQueryParameter = {};
2373
+ // authentication apiToken required
2374
+ // http bearer authentication required
2375
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2376
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2377
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2378
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2379
+ return {
2380
+ url: toPathString(localVarUrlObj),
2381
+ options: localVarRequestOptions,
2382
+ };
2383
+ }),
2384
+ /**
2385
+ * Lists the php.ini directives that can be configured for an Agency Plan website, each with its default, the value currently in effect, and the values it accepts.
2386
+ * @summary List PHP options for a website
2387
+ * @param {string} websiteUid Agency Plan website UID
2388
+ * @param {*} [options] Override http request option.
2389
+ * @throws {RequiredError}
2390
+ */
2391
+ listPHPOptionsForAWebsiteV1: (websiteUid_1, ...args_1) => __awaiter(this, [websiteUid_1, ...args_1], void 0, function* (websiteUid, options = {}) {
2392
+ // verify required parameter 'websiteUid' is not null or undefined
2393
+ assertParamExists('listPHPOptionsForAWebsiteV1', 'websiteUid', websiteUid);
2394
+ const localVarPath = `/api/agency-hosting/v1/websites/{website_uid}/php-settings/options`
2395
+ .replace(`{${"website_uid"}}`, encodeURIComponent(String(websiteUid)));
2396
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2397
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2398
+ let baseOptions;
2399
+ if (configuration) {
2400
+ baseOptions = configuration.baseOptions;
2401
+ }
2402
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2403
+ const localVarHeaderParameter = {};
2404
+ const localVarQueryParameter = {};
2405
+ // authentication apiToken required
2406
+ // http bearer authentication required
2407
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2408
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2409
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2410
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2411
+ return {
2412
+ url: toPathString(localVarUrlObj),
2413
+ options: localVarRequestOptions,
2414
+ };
2415
+ }),
2416
+ /**
2417
+ * Replaces the set of PHP extensions enabled on an Agency Plan website with the ones provided. Any toggleable extension not in the request is disabled, so call the extensions endpoint first and send the full desired set. Extensions compiled into PHP, reported with the \"built-in\" state, are always active and are unaffected.
2418
+ * @summary Replace website PHP extensions
2419
+ * @param {string} websiteUid Agency Plan website UID
2420
+ * @param {AgencyHostingV1PhpUpdateExtensionsRequest} agencyHostingV1PhpUpdateExtensionsRequest
2421
+ * @param {*} [options] Override http request option.
2422
+ * @throws {RequiredError}
2423
+ */
2424
+ replaceWebsitePHPExtensionsV1: (websiteUid_1, agencyHostingV1PhpUpdateExtensionsRequest_1, ...args_1) => __awaiter(this, [websiteUid_1, agencyHostingV1PhpUpdateExtensionsRequest_1, ...args_1], void 0, function* (websiteUid, agencyHostingV1PhpUpdateExtensionsRequest, options = {}) {
2425
+ // verify required parameter 'websiteUid' is not null or undefined
2426
+ assertParamExists('replaceWebsitePHPExtensionsV1', 'websiteUid', websiteUid);
2427
+ // verify required parameter 'agencyHostingV1PhpUpdateExtensionsRequest' is not null or undefined
2428
+ assertParamExists('replaceWebsitePHPExtensionsV1', 'agencyHostingV1PhpUpdateExtensionsRequest', agencyHostingV1PhpUpdateExtensionsRequest);
2429
+ const localVarPath = `/api/agency-hosting/v1/websites/{website_uid}/php-settings/extensions`
2430
+ .replace(`{${"website_uid"}}`, encodeURIComponent(String(websiteUid)));
2431
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2432
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2433
+ let baseOptions;
2434
+ if (configuration) {
2435
+ baseOptions = configuration.baseOptions;
2436
+ }
2437
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2438
+ const localVarHeaderParameter = {};
2439
+ const localVarQueryParameter = {};
2440
+ // authentication apiToken required
2441
+ // http bearer authentication required
2442
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2443
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2444
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2445
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2446
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2447
+ localVarRequestOptions.data = serializeDataIfNeeded(agencyHostingV1PhpUpdateExtensionsRequest, localVarRequestOptions, configuration);
2448
+ return {
2449
+ url: toPathString(localVarUrlObj),
2450
+ options: localVarRequestOptions,
2451
+ };
2452
+ }),
2453
+ /**
2454
+ * Replaces the custom php.ini values on an Agency Plan website with the ones provided. Any option not in the request is reset to its default, so call the options endpoint first and send the full desired set. Sending an empty array resets every option to its default.
2455
+ * @summary Replace website PHP options
2456
+ * @param {string} websiteUid Agency Plan website UID
2457
+ * @param {AgencyHostingV1PhpUpdateOptionsRequest} agencyHostingV1PhpUpdateOptionsRequest
2458
+ * @param {*} [options] Override http request option.
2459
+ * @throws {RequiredError}
2460
+ */
2461
+ replaceWebsitePHPOptionsV1: (websiteUid_1, agencyHostingV1PhpUpdateOptionsRequest_1, ...args_1) => __awaiter(this, [websiteUid_1, agencyHostingV1PhpUpdateOptionsRequest_1, ...args_1], void 0, function* (websiteUid, agencyHostingV1PhpUpdateOptionsRequest, options = {}) {
2462
+ // verify required parameter 'websiteUid' is not null or undefined
2463
+ assertParamExists('replaceWebsitePHPOptionsV1', 'websiteUid', websiteUid);
2464
+ // verify required parameter 'agencyHostingV1PhpUpdateOptionsRequest' is not null or undefined
2465
+ assertParamExists('replaceWebsitePHPOptionsV1', 'agencyHostingV1PhpUpdateOptionsRequest', agencyHostingV1PhpUpdateOptionsRequest);
2466
+ const localVarPath = `/api/agency-hosting/v1/websites/{website_uid}/php-settings/options`
2467
+ .replace(`{${"website_uid"}}`, encodeURIComponent(String(websiteUid)));
2468
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2469
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2470
+ let baseOptions;
2471
+ if (configuration) {
2472
+ baseOptions = configuration.baseOptions;
2473
+ }
2474
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2475
+ const localVarHeaderParameter = {};
2476
+ const localVarQueryParameter = {};
2477
+ // authentication apiToken required
2478
+ // http bearer authentication required
2479
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2480
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2481
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2482
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2483
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2484
+ localVarRequestOptions.data = serializeDataIfNeeded(agencyHostingV1PhpUpdateOptionsRequest, localVarRequestOptions, configuration);
2485
+ return {
2486
+ url: toPathString(localVarUrlObj),
2487
+ options: localVarRequestOptions,
2488
+ };
2489
+ }),
2490
+ /**
2491
+ * Switches an Agency Plan website to a different PHP version. Call the available versions endpoint first to see which versions can be selected. The website restarts on the new version, so requests served during the switch may fail and code that is incompatible with the target version will break.
2492
+ * @summary Update website PHP version
2493
+ * @param {string} websiteUid Agency Plan website UID
2494
+ * @param {AgencyHostingV1PhpUpdateVersionRequest} agencyHostingV1PhpUpdateVersionRequest
2495
+ * @param {*} [options] Override http request option.
2496
+ * @throws {RequiredError}
2497
+ */
2498
+ updateWebsitePHPVersionV1: (websiteUid_1, agencyHostingV1PhpUpdateVersionRequest_1, ...args_1) => __awaiter(this, [websiteUid_1, agencyHostingV1PhpUpdateVersionRequest_1, ...args_1], void 0, function* (websiteUid, agencyHostingV1PhpUpdateVersionRequest, options = {}) {
2499
+ // verify required parameter 'websiteUid' is not null or undefined
2500
+ assertParamExists('updateWebsitePHPVersionV1', 'websiteUid', websiteUid);
2501
+ // verify required parameter 'agencyHostingV1PhpUpdateVersionRequest' is not null or undefined
2502
+ assertParamExists('updateWebsitePHPVersionV1', 'agencyHostingV1PhpUpdateVersionRequest', agencyHostingV1PhpUpdateVersionRequest);
2503
+ const localVarPath = `/api/agency-hosting/v1/websites/{website_uid}/php-settings/version`
2504
+ .replace(`{${"website_uid"}}`, encodeURIComponent(String(websiteUid)));
2505
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2506
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2507
+ let baseOptions;
2508
+ if (configuration) {
2509
+ baseOptions = configuration.baseOptions;
2510
+ }
2511
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
2512
+ const localVarHeaderParameter = {};
2513
+ const localVarQueryParameter = {};
2514
+ // authentication apiToken required
2515
+ // http bearer authentication required
2516
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
2517
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2518
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2519
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2520
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2521
+ localVarRequestOptions.data = serializeDataIfNeeded(agencyHostingV1PhpUpdateVersionRequest, localVarRequestOptions, configuration);
2522
+ return {
2523
+ url: toPathString(localVarUrlObj),
2524
+ options: localVarRequestOptions,
2525
+ };
2526
+ }),
2527
+ };
2528
+ };
2529
+ /**
2530
+ * AgencyHostingPHPApi - functional programming interface
2531
+ * @export
2532
+ */
2533
+ export const AgencyHostingPHPApiFp = function (configuration) {
2534
+ const localVarAxiosParamCreator = AgencyHostingPHPApiAxiosParamCreator(configuration);
2535
+ return {
2536
+ /**
2537
+ * Lists the PHP versions an Agency Plan website can be switched to. The version the website is currently running is returned as settings.php.version by the website details endpoint.
2538
+ * @summary List available PHP versions for a website
2539
+ * @param {string} websiteUid Agency Plan website UID
2540
+ * @param {*} [options] Override http request option.
2541
+ * @throws {RequiredError}
2542
+ */
2543
+ listAvailablePHPVersionsForAWebsiteV1(websiteUid, options) {
2544
+ return __awaiter(this, void 0, void 0, function* () {
2545
+ var _a, _b;
2546
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAvailablePHPVersionsForAWebsiteV1(websiteUid, options);
2547
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['AgencyHostingPHPApi.listAvailablePHPVersionsForAWebsiteV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2548
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2549
+ });
2550
+ },
2551
+ /**
2552
+ * Lists the PHP versions available to websites created under an Agency Plan order, determined by the server the order is hosted on. Use this before creating a website; for a website that already exists, call the website-scoped versions endpoint instead.
2553
+ * @summary List available PHP versions for an order
2554
+ * @param {number} orderId Agency Plan order ID
2555
+ * @param {*} [options] Override http request option.
2556
+ * @throws {RequiredError}
2557
+ */
2558
+ listAvailablePHPVersionsForAnOrderV1(orderId, options) {
2559
+ return __awaiter(this, void 0, void 0, function* () {
2560
+ var _a, _b;
2561
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAvailablePHPVersionsForAnOrderV1(orderId, options);
2562
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['AgencyHostingPHPApi.listAvailablePHPVersionsForAnOrderV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2563
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2564
+ });
2565
+ },
2566
+ /**
2567
+ * Lists every PHP extension available to an Agency Plan website and whether it is currently enabled.
2568
+ * @summary List PHP extensions for a website
2569
+ * @param {string} websiteUid Agency Plan website UID
2570
+ * @param {*} [options] Override http request option.
2571
+ * @throws {RequiredError}
2572
+ */
2573
+ listPHPExtensionsForAWebsiteV1(websiteUid, options) {
2574
+ return __awaiter(this, void 0, void 0, function* () {
2575
+ var _a, _b;
2576
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listPHPExtensionsForAWebsiteV1(websiteUid, options);
2577
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['AgencyHostingPHPApi.listPHPExtensionsForAWebsiteV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2578
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2579
+ });
2580
+ },
2581
+ /**
2582
+ * Lists the php.ini directives that can be configured for an Agency Plan website, each with its default, the value currently in effect, and the values it accepts.
2583
+ * @summary List PHP options for a website
2584
+ * @param {string} websiteUid Agency Plan website UID
2585
+ * @param {*} [options] Override http request option.
2586
+ * @throws {RequiredError}
2587
+ */
2588
+ listPHPOptionsForAWebsiteV1(websiteUid, options) {
2589
+ return __awaiter(this, void 0, void 0, function* () {
2590
+ var _a, _b;
2591
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listPHPOptionsForAWebsiteV1(websiteUid, options);
2592
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['AgencyHostingPHPApi.listPHPOptionsForAWebsiteV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2593
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2594
+ });
2595
+ },
2596
+ /**
2597
+ * Replaces the set of PHP extensions enabled on an Agency Plan website with the ones provided. Any toggleable extension not in the request is disabled, so call the extensions endpoint first and send the full desired set. Extensions compiled into PHP, reported with the \"built-in\" state, are always active and are unaffected.
2598
+ * @summary Replace website PHP extensions
2599
+ * @param {string} websiteUid Agency Plan website UID
2600
+ * @param {AgencyHostingV1PhpUpdateExtensionsRequest} agencyHostingV1PhpUpdateExtensionsRequest
2601
+ * @param {*} [options] Override http request option.
2602
+ * @throws {RequiredError}
2603
+ */
2604
+ replaceWebsitePHPExtensionsV1(websiteUid, agencyHostingV1PhpUpdateExtensionsRequest, options) {
2605
+ return __awaiter(this, void 0, void 0, function* () {
2606
+ var _a, _b;
2607
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.replaceWebsitePHPExtensionsV1(websiteUid, agencyHostingV1PhpUpdateExtensionsRequest, options);
2608
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['AgencyHostingPHPApi.replaceWebsitePHPExtensionsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2609
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2610
+ });
2611
+ },
2612
+ /**
2613
+ * Replaces the custom php.ini values on an Agency Plan website with the ones provided. Any option not in the request is reset to its default, so call the options endpoint first and send the full desired set. Sending an empty array resets every option to its default.
2614
+ * @summary Replace website PHP options
2615
+ * @param {string} websiteUid Agency Plan website UID
2616
+ * @param {AgencyHostingV1PhpUpdateOptionsRequest} agencyHostingV1PhpUpdateOptionsRequest
2617
+ * @param {*} [options] Override http request option.
2618
+ * @throws {RequiredError}
2619
+ */
2620
+ replaceWebsitePHPOptionsV1(websiteUid, agencyHostingV1PhpUpdateOptionsRequest, options) {
2621
+ return __awaiter(this, void 0, void 0, function* () {
2622
+ var _a, _b;
2623
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.replaceWebsitePHPOptionsV1(websiteUid, agencyHostingV1PhpUpdateOptionsRequest, options);
2624
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['AgencyHostingPHPApi.replaceWebsitePHPOptionsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2625
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2626
+ });
2627
+ },
2628
+ /**
2629
+ * Switches an Agency Plan website to a different PHP version. Call the available versions endpoint first to see which versions can be selected. The website restarts on the new version, so requests served during the switch may fail and code that is incompatible with the target version will break.
2630
+ * @summary Update website PHP version
2631
+ * @param {string} websiteUid Agency Plan website UID
2632
+ * @param {AgencyHostingV1PhpUpdateVersionRequest} agencyHostingV1PhpUpdateVersionRequest
2633
+ * @param {*} [options] Override http request option.
2634
+ * @throws {RequiredError}
2635
+ */
2636
+ updateWebsitePHPVersionV1(websiteUid, agencyHostingV1PhpUpdateVersionRequest, options) {
2637
+ return __awaiter(this, void 0, void 0, function* () {
2638
+ var _a, _b;
2639
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateWebsitePHPVersionV1(websiteUid, agencyHostingV1PhpUpdateVersionRequest, options);
2640
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['AgencyHostingPHPApi.updateWebsitePHPVersionV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2641
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2642
+ });
2643
+ },
2644
+ };
2645
+ };
2646
+ /**
2647
+ * AgencyHostingPHPApi - factory interface
2648
+ * @export
2649
+ */
2650
+ export const AgencyHostingPHPApiFactory = function (configuration, basePath, axios) {
2651
+ const localVarFp = AgencyHostingPHPApiFp(configuration);
2652
+ return {
2653
+ /**
2654
+ * Lists the PHP versions an Agency Plan website can be switched to. The version the website is currently running is returned as settings.php.version by the website details endpoint.
2655
+ * @summary List available PHP versions for a website
2656
+ * @param {string} websiteUid Agency Plan website UID
2657
+ * @param {*} [options] Override http request option.
2658
+ * @throws {RequiredError}
2659
+ */
2660
+ listAvailablePHPVersionsForAWebsiteV1(websiteUid, options) {
2661
+ return localVarFp.listAvailablePHPVersionsForAWebsiteV1(websiteUid, options).then((request) => request(axios, basePath));
2662
+ },
2663
+ /**
2664
+ * Lists the PHP versions available to websites created under an Agency Plan order, determined by the server the order is hosted on. Use this before creating a website; for a website that already exists, call the website-scoped versions endpoint instead.
2665
+ * @summary List available PHP versions for an order
2666
+ * @param {number} orderId Agency Plan order ID
2667
+ * @param {*} [options] Override http request option.
2668
+ * @throws {RequiredError}
2669
+ */
2670
+ listAvailablePHPVersionsForAnOrderV1(orderId, options) {
2671
+ return localVarFp.listAvailablePHPVersionsForAnOrderV1(orderId, options).then((request) => request(axios, basePath));
2672
+ },
2673
+ /**
2674
+ * Lists every PHP extension available to an Agency Plan website and whether it is currently enabled.
2675
+ * @summary List PHP extensions for a website
2676
+ * @param {string} websiteUid Agency Plan website UID
2677
+ * @param {*} [options] Override http request option.
2678
+ * @throws {RequiredError}
2679
+ */
2680
+ listPHPExtensionsForAWebsiteV1(websiteUid, options) {
2681
+ return localVarFp.listPHPExtensionsForAWebsiteV1(websiteUid, options).then((request) => request(axios, basePath));
2682
+ },
2683
+ /**
2684
+ * Lists the php.ini directives that can be configured for an Agency Plan website, each with its default, the value currently in effect, and the values it accepts.
2685
+ * @summary List PHP options for a website
2686
+ * @param {string} websiteUid Agency Plan website UID
2687
+ * @param {*} [options] Override http request option.
2688
+ * @throws {RequiredError}
2689
+ */
2690
+ listPHPOptionsForAWebsiteV1(websiteUid, options) {
2691
+ return localVarFp.listPHPOptionsForAWebsiteV1(websiteUid, options).then((request) => request(axios, basePath));
2692
+ },
2693
+ /**
2694
+ * Replaces the set of PHP extensions enabled on an Agency Plan website with the ones provided. Any toggleable extension not in the request is disabled, so call the extensions endpoint first and send the full desired set. Extensions compiled into PHP, reported with the \"built-in\" state, are always active and are unaffected.
2695
+ * @summary Replace website PHP extensions
2696
+ * @param {string} websiteUid Agency Plan website UID
2697
+ * @param {AgencyHostingV1PhpUpdateExtensionsRequest} agencyHostingV1PhpUpdateExtensionsRequest
2698
+ * @param {*} [options] Override http request option.
2699
+ * @throws {RequiredError}
2700
+ */
2701
+ replaceWebsitePHPExtensionsV1(websiteUid, agencyHostingV1PhpUpdateExtensionsRequest, options) {
2702
+ return localVarFp.replaceWebsitePHPExtensionsV1(websiteUid, agencyHostingV1PhpUpdateExtensionsRequest, options).then((request) => request(axios, basePath));
2703
+ },
2704
+ /**
2705
+ * Replaces the custom php.ini values on an Agency Plan website with the ones provided. Any option not in the request is reset to its default, so call the options endpoint first and send the full desired set. Sending an empty array resets every option to its default.
2706
+ * @summary Replace website PHP options
2707
+ * @param {string} websiteUid Agency Plan website UID
2708
+ * @param {AgencyHostingV1PhpUpdateOptionsRequest} agencyHostingV1PhpUpdateOptionsRequest
2709
+ * @param {*} [options] Override http request option.
2710
+ * @throws {RequiredError}
2711
+ */
2712
+ replaceWebsitePHPOptionsV1(websiteUid, agencyHostingV1PhpUpdateOptionsRequest, options) {
2713
+ return localVarFp.replaceWebsitePHPOptionsV1(websiteUid, agencyHostingV1PhpUpdateOptionsRequest, options).then((request) => request(axios, basePath));
2714
+ },
2715
+ /**
2716
+ * Switches an Agency Plan website to a different PHP version. Call the available versions endpoint first to see which versions can be selected. The website restarts on the new version, so requests served during the switch may fail and code that is incompatible with the target version will break.
2717
+ * @summary Update website PHP version
2718
+ * @param {string} websiteUid Agency Plan website UID
2719
+ * @param {AgencyHostingV1PhpUpdateVersionRequest} agencyHostingV1PhpUpdateVersionRequest
2720
+ * @param {*} [options] Override http request option.
2721
+ * @throws {RequiredError}
2722
+ */
2723
+ updateWebsitePHPVersionV1(websiteUid, agencyHostingV1PhpUpdateVersionRequest, options) {
2724
+ return localVarFp.updateWebsitePHPVersionV1(websiteUid, agencyHostingV1PhpUpdateVersionRequest, options).then((request) => request(axios, basePath));
2250
2725
  },
2251
2726
  };
2252
2727
  };
2253
2728
  /**
2254
- * AgencyHostingOrdersApi - object-oriented interface
2729
+ * AgencyHostingPHPApi - object-oriented interface
2255
2730
  * @export
2256
- * @class AgencyHostingOrdersApi
2731
+ * @class AgencyHostingPHPApi
2257
2732
  * @extends {BaseAPI}
2258
2733
  */
2259
- export class AgencyHostingOrdersApi extends BaseAPI {
2734
+ export class AgencyHostingPHPApi extends BaseAPI {
2260
2735
  /**
2261
- * Returns a paginated list of Agency Plan orders accessible to the authenticated client.
2262
- * @summary List orders
2263
- * @param {number} [page] Page number
2264
- * @param {number} [perPage] Number of items per page
2736
+ * Lists the PHP versions an Agency Plan website can be switched to. The version the website is currently running is returned as settings.php.version by the website details endpoint.
2737
+ * @summary List available PHP versions for a website
2738
+ * @param {string} websiteUid Agency Plan website UID
2265
2739
  * @param {*} [options] Override http request option.
2266
2740
  * @throws {RequiredError}
2267
- * @memberof AgencyHostingOrdersApi
2741
+ * @memberof AgencyHostingPHPApi
2268
2742
  */
2269
- listOrdersV1(page, perPage, options) {
2270
- return AgencyHostingOrdersApiFp(this.configuration).listOrdersV1(page, perPage, options).then((request) => request(this.axios, this.basePath));
2743
+ listAvailablePHPVersionsForAWebsiteV1(websiteUid, options) {
2744
+ return AgencyHostingPHPApiFp(this.configuration).listAvailablePHPVersionsForAWebsiteV1(websiteUid, options).then((request) => request(this.axios, this.basePath));
2745
+ }
2746
+ /**
2747
+ * Lists the PHP versions available to websites created under an Agency Plan order, determined by the server the order is hosted on. Use this before creating a website; for a website that already exists, call the website-scoped versions endpoint instead.
2748
+ * @summary List available PHP versions for an order
2749
+ * @param {number} orderId Agency Plan order ID
2750
+ * @param {*} [options] Override http request option.
2751
+ * @throws {RequiredError}
2752
+ * @memberof AgencyHostingPHPApi
2753
+ */
2754
+ listAvailablePHPVersionsForAnOrderV1(orderId, options) {
2755
+ return AgencyHostingPHPApiFp(this.configuration).listAvailablePHPVersionsForAnOrderV1(orderId, options).then((request) => request(this.axios, this.basePath));
2756
+ }
2757
+ /**
2758
+ * Lists every PHP extension available to an Agency Plan website and whether it is currently enabled.
2759
+ * @summary List PHP extensions for a website
2760
+ * @param {string} websiteUid Agency Plan website UID
2761
+ * @param {*} [options] Override http request option.
2762
+ * @throws {RequiredError}
2763
+ * @memberof AgencyHostingPHPApi
2764
+ */
2765
+ listPHPExtensionsForAWebsiteV1(websiteUid, options) {
2766
+ return AgencyHostingPHPApiFp(this.configuration).listPHPExtensionsForAWebsiteV1(websiteUid, options).then((request) => request(this.axios, this.basePath));
2767
+ }
2768
+ /**
2769
+ * Lists the php.ini directives that can be configured for an Agency Plan website, each with its default, the value currently in effect, and the values it accepts.
2770
+ * @summary List PHP options for a website
2771
+ * @param {string} websiteUid Agency Plan website UID
2772
+ * @param {*} [options] Override http request option.
2773
+ * @throws {RequiredError}
2774
+ * @memberof AgencyHostingPHPApi
2775
+ */
2776
+ listPHPOptionsForAWebsiteV1(websiteUid, options) {
2777
+ return AgencyHostingPHPApiFp(this.configuration).listPHPOptionsForAWebsiteV1(websiteUid, options).then((request) => request(this.axios, this.basePath));
2778
+ }
2779
+ /**
2780
+ * Replaces the set of PHP extensions enabled on an Agency Plan website with the ones provided. Any toggleable extension not in the request is disabled, so call the extensions endpoint first and send the full desired set. Extensions compiled into PHP, reported with the \"built-in\" state, are always active and are unaffected.
2781
+ * @summary Replace website PHP extensions
2782
+ * @param {string} websiteUid Agency Plan website UID
2783
+ * @param {AgencyHostingV1PhpUpdateExtensionsRequest} agencyHostingV1PhpUpdateExtensionsRequest
2784
+ * @param {*} [options] Override http request option.
2785
+ * @throws {RequiredError}
2786
+ * @memberof AgencyHostingPHPApi
2787
+ */
2788
+ replaceWebsitePHPExtensionsV1(websiteUid, agencyHostingV1PhpUpdateExtensionsRequest, options) {
2789
+ return AgencyHostingPHPApiFp(this.configuration).replaceWebsitePHPExtensionsV1(websiteUid, agencyHostingV1PhpUpdateExtensionsRequest, options).then((request) => request(this.axios, this.basePath));
2790
+ }
2791
+ /**
2792
+ * Replaces the custom php.ini values on an Agency Plan website with the ones provided. Any option not in the request is reset to its default, so call the options endpoint first and send the full desired set. Sending an empty array resets every option to its default.
2793
+ * @summary Replace website PHP options
2794
+ * @param {string} websiteUid Agency Plan website UID
2795
+ * @param {AgencyHostingV1PhpUpdateOptionsRequest} agencyHostingV1PhpUpdateOptionsRequest
2796
+ * @param {*} [options] Override http request option.
2797
+ * @throws {RequiredError}
2798
+ * @memberof AgencyHostingPHPApi
2799
+ */
2800
+ replaceWebsitePHPOptionsV1(websiteUid, agencyHostingV1PhpUpdateOptionsRequest, options) {
2801
+ return AgencyHostingPHPApiFp(this.configuration).replaceWebsitePHPOptionsV1(websiteUid, agencyHostingV1PhpUpdateOptionsRequest, options).then((request) => request(this.axios, this.basePath));
2802
+ }
2803
+ /**
2804
+ * Switches an Agency Plan website to a different PHP version. Call the available versions endpoint first to see which versions can be selected. The website restarts on the new version, so requests served during the switch may fail and code that is incompatible with the target version will break.
2805
+ * @summary Update website PHP version
2806
+ * @param {string} websiteUid Agency Plan website UID
2807
+ * @param {AgencyHostingV1PhpUpdateVersionRequest} agencyHostingV1PhpUpdateVersionRequest
2808
+ * @param {*} [options] Override http request option.
2809
+ * @throws {RequiredError}
2810
+ * @memberof AgencyHostingPHPApi
2811
+ */
2812
+ updateWebsitePHPVersionV1(websiteUid, agencyHostingV1PhpUpdateVersionRequest, options) {
2813
+ return AgencyHostingPHPApiFp(this.configuration).updateWebsitePHPVersionV1(websiteUid, agencyHostingV1PhpUpdateVersionRequest, options).then((request) => request(this.axios, this.basePath));
2271
2814
  }
2272
2815
  }
2273
2816
  /**
@@ -12379,6 +12922,296 @@ export class HostingPHPApi extends BaseAPI {
12379
12922
  return HostingPHPApiFp(this.configuration).updatePHPVersionV1(username, domain, hostingV1PhpUpdatePhpVersionRequest, options).then((request) => request(this.axios, this.basePath));
12380
12923
  }
12381
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
+ }
12382
13215
  /**
12383
13216
  * HostingWebsitesApi - axios parameter creator
12384
13217
  * @export