hostinger-api-sdk 1.33.0 → 1.34.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/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.35.0
6
+ * API Version: 1.36.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'
@@ -230,11 +239,24 @@ export const HostingV1FilesFilesResourceItemsInnerTypeEnum = {
230
239
  };
231
240
  export const HostingV1NodeJsBuildOptionsResourceAppTypeEnum = {
232
241
  CreateReactApp: 'create-react-app',
242
+ Gatsby: 'gatsby',
233
243
  Vite: 'vite',
234
244
  Angular: 'angular',
235
245
  React: 'react',
236
246
  Vue: 'vue',
237
- Parcel: 'parcel'
247
+ Parcel: 'parcel',
248
+ Next: 'next',
249
+ Nuxt: 'nuxt',
250
+ Nest: 'nest',
251
+ Express: 'express',
252
+ Fastify: 'fastify',
253
+ Astro: 'astro',
254
+ Svelte: 'svelte',
255
+ SvelteKit: 'svelte-kit',
256
+ Hono: 'hono',
257
+ ReactRouter: 'react-router',
258
+ Nitro: 'nitro',
259
+ Other: 'other'
238
260
  };
239
261
  export const HostingV1NodeJsBuildOptionsResourcePackageManagerEnum = {
240
262
  Npm: 'npm',
@@ -258,14 +280,24 @@ export const HostingV1NodeJsCreateFromArchiveRequestNodeVersionEnum = {
258
280
  };
259
281
  export const HostingV1NodeJsCreateFromArchiveRequestAppTypeEnum = {
260
282
  CreateReactApp: 'create-react-app',
283
+ Gatsby: 'gatsby',
261
284
  Vite: 'vite',
262
285
  Angular: 'angular',
263
286
  React: 'react',
264
287
  Vue: 'vue',
265
288
  Parcel: 'parcel',
289
+ Next: 'next',
290
+ Nuxt: 'nuxt',
291
+ Nest: 'nest',
266
292
  Express: 'express',
267
293
  Fastify: 'fastify',
268
- Nest: 'nest'
294
+ Astro: 'astro',
295
+ Svelte: 'svelte',
296
+ SvelteKit: 'svelte-kit',
297
+ Hono: 'hono',
298
+ ReactRouter: 'react-router',
299
+ Nitro: 'nitro',
300
+ Other: 'other'
269
301
  };
270
302
  export const HostingV1NodeJsCreateFromArchiveRequestPackageManagerEnum = {
271
303
  Npm: 'npm',
@@ -2247,6 +2279,540 @@ export class AgencyHostingOrdersApi extends BaseAPI {
2247
2279
  return AgencyHostingOrdersApiFp(this.configuration).listOrdersV1(page, perPage, options).then((request) => request(this.axios, this.basePath));
2248
2280
  }
2249
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));
2725
+ },
2726
+ };
2727
+ };
2728
+ /**
2729
+ * AgencyHostingPHPApi - object-oriented interface
2730
+ * @export
2731
+ * @class AgencyHostingPHPApi
2732
+ * @extends {BaseAPI}
2733
+ */
2734
+ export class AgencyHostingPHPApi extends BaseAPI {
2735
+ /**
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
2739
+ * @param {*} [options] Override http request option.
2740
+ * @throws {RequiredError}
2741
+ * @memberof AgencyHostingPHPApi
2742
+ */
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));
2814
+ }
2815
+ }
2250
2816
  /**
2251
2817
  * AgencyHostingWebsiteSetupsApi - axios parameter creator
2252
2818
  * @export
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.35.0
4
+ * API Version: 1.36.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/base.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.35.0
6
+ * API Version: 1.36.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.35.0
4
+ * API Version: 1.36.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api