@hostinger/sdk 1.52.1 → 1.53.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 (39) hide show
  1. package/README.md +2 -2
  2. package/api.ts +891 -18
  3. package/base.ts +1 -1
  4. package/common.ts +1 -1
  5. package/configuration.ts +2 -2
  6. package/dist/api.d.ts +568 -16
  7. package/dist/api.js +621 -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 +568 -16
  15. package/dist/esm/api.js +607 -15
  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/HostingGitApi.md +178 -2
  27. package/docs/HostingNodeJSApi.md +1 -1
  28. package/docs/HostingSSLApi.md +242 -0
  29. package/docs/HostingV1GitGitAutoDeploymentSettingsResource.md +31 -0
  30. package/docs/HostingV1GitGitCommitAuthorResource.md +22 -0
  31. package/docs/HostingV1GitGitCommitResource.md +24 -0
  32. package/docs/HostingV1GitUpdateGitAutoDeploymentSettingsRequest.md +30 -0
  33. package/docs/HostingV1NodeJsSourceOptionsResource.md +11 -0
  34. package/docs/HostingV1NodeJsStartBuildRequest.md +1 -1
  35. package/docs/HostingV1NodeJsStartBuildRequestSourceOptions.md +9 -1
  36. package/docs/HostingV1SslSslStatusResource.md +30 -0
  37. package/docs/HostingV1SslToggleHttpsRedirectRequest.md +20 -0
  38. package/index.ts +1 -1
  39. 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.52.1
6
+ * API Version: 1.53.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
@@ -350,7 +350,8 @@ export const HostingV1NodeJsBuildOptionsResourcePackageManagerEnum = {
350
350
  Pnpm: 'pnpm'
351
351
  };
352
352
  export const HostingV1NodeJsBuildOptionsResourceSourceTypeEnum = {
353
- Archive: 'archive'
353
+ Archive: 'archive',
354
+ Git: 'git'
354
355
  };
355
356
  export const HostingV1NodeJsBuildResourceStateEnum = {
356
357
  Pending: 'pending',
@@ -449,7 +450,8 @@ export const HostingV1NodeJsStartBuildRequestPackageManagerEnum = {
449
450
  Pnpm: 'pnpm'
450
451
  };
451
452
  export const HostingV1NodeJsStartBuildRequestSourceTypeEnum = {
452
- Archive: 'archive'
453
+ Archive: 'archive',
454
+ Git: 'git'
453
455
  };
454
456
  export const HostingV1NodeJsStoredBuildSettingsResourceAppTypeEnum = {
455
457
  CreateReactApp: 'create-react-app',
@@ -516,6 +518,21 @@ export const HostingV1NodeJsVulnerabilityResourceSeverityEnum = {
516
518
  Critical: 'critical',
517
519
  Unknown: 'unknown'
518
520
  };
521
+ export const HostingV1SslSslStatusResourceStatusEnum = {
522
+ NotInstalled: 'not_installed',
523
+ Installing: 'installing',
524
+ WaitingForRetry: 'waiting_for_retry',
525
+ Active: 'active',
526
+ Expired: 'expired',
527
+ Failed: 'failed'
528
+ };
529
+ export const HostingV1SslSslStatusResourceProviderEnum = {
530
+ Custom: 'custom',
531
+ Letsencrypt: 'letsencrypt',
532
+ Zerossl: 'zerossl',
533
+ Googlessl: 'googlessl',
534
+ Hssl: 'hssl'
535
+ };
519
536
  export const HostingV1WebsitesWebsiteResourceVhostTypeEnum = {
520
537
  Main: 'main',
521
538
  Addon: 'addon',
@@ -14307,7 +14324,79 @@ export const ListWebsiteFilesAndDirectoriesV1FileTypesEnum = {
14307
14324
  export const HostingGitApiAxiosParamCreator = function (configuration) {
14308
14325
  return {
14309
14326
  /**
14310
- * Lists the repositories the Git installation can access, read live from the provider. Works for github and gitlab installations. Use an active installation: a suspended or pending one is still queried and the call fails with whatever the provider answers. The list is cut at the first 500 repositories in the order the provider returns them; when the account has more, name the repository directly instead of searching this list. `owner`, `name` and `default_branch` identify a repository and a branch to deploy. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
14327
+ * Removes the Git auto-deployment settings of the website. Files already deployed stay on the website; pushes stop deploying until settings are saved again. Succeeds also when nothing is configured.
14328
+ * @summary Delete Git auto-deployment settings
14329
+ * @param {string} username
14330
+ * @param {string} domain Domain name
14331
+ * @param {*} [options] Override http request option.
14332
+ * @throws {RequiredError}
14333
+ */
14334
+ deleteGitAutoDeploymentSettingsV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
14335
+ // verify required parameter 'username' is not null or undefined
14336
+ assertParamExists('deleteGitAutoDeploymentSettingsV1', 'username', username);
14337
+ // verify required parameter 'domain' is not null or undefined
14338
+ assertParamExists('deleteGitAutoDeploymentSettingsV1', 'domain', domain);
14339
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings`
14340
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
14341
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
14342
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
14343
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
14344
+ let baseOptions;
14345
+ if (configuration) {
14346
+ baseOptions = configuration.baseOptions;
14347
+ }
14348
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
14349
+ const localVarHeaderParameter = {};
14350
+ const localVarQueryParameter = {};
14351
+ // authentication apiToken required
14352
+ // http bearer authentication required
14353
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
14354
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
14355
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
14356
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
14357
+ return {
14358
+ url: toPathString(localVarUrlObj),
14359
+ options: localVarRequestOptions,
14360
+ };
14361
+ }),
14362
+ /**
14363
+ * Returns the Git auto-deployment settings of the website: which repository and branch deploy into which directory, and whether pushes trigger a deployment. `is_enabled` false keeps the repository link but ignores pushes. When the website has no auto-deployment configured every field is null. Save settings with `Update Git auto-deployment settings`.
14364
+ * @summary Get Git auto-deployment settings
14365
+ * @param {string} username
14366
+ * @param {string} domain Domain name
14367
+ * @param {*} [options] Override http request option.
14368
+ * @throws {RequiredError}
14369
+ */
14370
+ getGitAutoDeploymentSettingsV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
14371
+ // verify required parameter 'username' is not null or undefined
14372
+ assertParamExists('getGitAutoDeploymentSettingsV1', 'username', username);
14373
+ // verify required parameter 'domain' is not null or undefined
14374
+ assertParamExists('getGitAutoDeploymentSettingsV1', 'domain', domain);
14375
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings`
14376
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
14377
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
14378
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
14379
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
14380
+ let baseOptions;
14381
+ if (configuration) {
14382
+ baseOptions = configuration.baseOptions;
14383
+ }
14384
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
14385
+ const localVarHeaderParameter = {};
14386
+ const localVarQueryParameter = {};
14387
+ // authentication apiToken required
14388
+ // http bearer authentication required
14389
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
14390
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
14391
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
14392
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
14393
+ return {
14394
+ url: toPathString(localVarUrlObj),
14395
+ options: localVarRequestOptions,
14396
+ };
14397
+ }),
14398
+ /**
14399
+ * Lists the repositories the Git installation can access, read live from the provider. Works for github and gitlab installations. Use an active installation: a suspended or pending one is still queried and the call fails with whatever the provider answers. The list is cut at the first 500 repositories in the order the provider returns them; when the account has more, name the repository directly instead of searching this list. `owner`, `name` and a branch (`default_branch` or another one) go into `source_options` of `Start Node.js build` or into `Update Git auto-deployment settings`. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
14311
14400
  * @summary List Git installation repositories
14312
14401
  * @param {string} uuid Git installation UUID from the List Git installations endpoint
14313
14402
  * @param {*} [options] Override http request option.
@@ -14339,7 +14428,7 @@ export const HostingGitApiAxiosParamCreator = function (configuration) {
14339
14428
  };
14340
14429
  }),
14341
14430
  /**
14342
- * Lists the Git provider accounts the customer has connected. Only installations with status `active` are returned unless the `status` filter says otherwise. An empty list means the customer has no active installation. Check `status=suspended` and `status=pending` as well. If there is none at all, GitHub has to be connected once in hPanel (Websites, Manage, Advanced, Git, Connect GitHub; or Add Website, Node.js Web App, Import Git Repository, Continue with GitHub); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`.
14431
+ * Lists the Git provider accounts the customer has connected. Only installations with status `active` are returned unless the `status` filter says otherwise. An empty list means the customer has no active installation. Check `status=suspended` and `status=pending` as well. If there is none at all, a Git provider (GitHub or GitLab) has to be connected once in hPanel (Websites, Manage, Advanced, Git; or Add Website, Node.js Web App, Import Git Repository); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`, and as `installation_uuid` in `Start Node.js build` with `source_type` `git` and in `Update Git auto-deployment settings`.
14343
14432
  * @summary List Git installations
14344
14433
  * @param {ListGitInstallationsV1ProviderEnum} [provider] Filter by Git provider
14345
14434
  * @param {ListGitInstallationsV1StatusEnum} [status] Filter by installation status
@@ -14374,6 +14463,47 @@ export const HostingGitApiAxiosParamCreator = function (configuration) {
14374
14463
  options: localVarRequestOptions,
14375
14464
  };
14376
14465
  }),
14466
+ /**
14467
+ * Creates or replaces the Git auto-deployment settings of the website: repository, branch, the directory under the document root to deploy into, and `is_enabled`. Send the full set; `is_enabled` defaults to true and `directory` to the document root. `installation_uuid` must be an installation from `List Git installations` that belongs to the same customer as the website. For PHP and static websites, saving with `is_enabled` true deploys the branch right away and every later push to that branch deploys again. For Node.js and Website Builder websites saving does not clone anything. On a Node.js website start the first deploy with `Start Node.js build` using `source_type` `git`; pushes then trigger new builds with the build settings stored for the website.
14468
+ * @summary Update Git auto-deployment settings
14469
+ * @param {string} username
14470
+ * @param {string} domain Domain name
14471
+ * @param {HostingV1GitUpdateGitAutoDeploymentSettingsRequest} hostingV1GitUpdateGitAutoDeploymentSettingsRequest
14472
+ * @param {*} [options] Override http request option.
14473
+ * @throws {RequiredError}
14474
+ */
14475
+ updateGitAutoDeploymentSettingsV1: (username_1, domain_1, hostingV1GitUpdateGitAutoDeploymentSettingsRequest_1, ...args_1) => __awaiter(this, [username_1, domain_1, hostingV1GitUpdateGitAutoDeploymentSettingsRequest_1, ...args_1], void 0, function* (username, domain, hostingV1GitUpdateGitAutoDeploymentSettingsRequest, options = {}) {
14476
+ // verify required parameter 'username' is not null or undefined
14477
+ assertParamExists('updateGitAutoDeploymentSettingsV1', 'username', username);
14478
+ // verify required parameter 'domain' is not null or undefined
14479
+ assertParamExists('updateGitAutoDeploymentSettingsV1', 'domain', domain);
14480
+ // verify required parameter 'hostingV1GitUpdateGitAutoDeploymentSettingsRequest' is not null or undefined
14481
+ assertParamExists('updateGitAutoDeploymentSettingsV1', 'hostingV1GitUpdateGitAutoDeploymentSettingsRequest', hostingV1GitUpdateGitAutoDeploymentSettingsRequest);
14482
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings`
14483
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
14484
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
14485
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
14486
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
14487
+ let baseOptions;
14488
+ if (configuration) {
14489
+ baseOptions = configuration.baseOptions;
14490
+ }
14491
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
14492
+ const localVarHeaderParameter = {};
14493
+ const localVarQueryParameter = {};
14494
+ // authentication apiToken required
14495
+ // http bearer authentication required
14496
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
14497
+ localVarHeaderParameter['Content-Type'] = 'application/json';
14498
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
14499
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
14500
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
14501
+ localVarRequestOptions.data = serializeDataIfNeeded(hostingV1GitUpdateGitAutoDeploymentSettingsRequest, localVarRequestOptions, configuration);
14502
+ return {
14503
+ url: toPathString(localVarUrlObj),
14504
+ options: localVarRequestOptions,
14505
+ };
14506
+ }),
14377
14507
  };
14378
14508
  };
14379
14509
  /**
@@ -14384,7 +14514,39 @@ export const HostingGitApiFp = function (configuration) {
14384
14514
  const localVarAxiosParamCreator = HostingGitApiAxiosParamCreator(configuration);
14385
14515
  return {
14386
14516
  /**
14387
- * Lists the repositories the Git installation can access, read live from the provider. Works for github and gitlab installations. Use an active installation: a suspended or pending one is still queried and the call fails with whatever the provider answers. The list is cut at the first 500 repositories in the order the provider returns them; when the account has more, name the repository directly instead of searching this list. `owner`, `name` and `default_branch` identify a repository and a branch to deploy. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
14517
+ * Removes the Git auto-deployment settings of the website. Files already deployed stay on the website; pushes stop deploying until settings are saved again. Succeeds also when nothing is configured.
14518
+ * @summary Delete Git auto-deployment settings
14519
+ * @param {string} username
14520
+ * @param {string} domain Domain name
14521
+ * @param {*} [options] Override http request option.
14522
+ * @throws {RequiredError}
14523
+ */
14524
+ deleteGitAutoDeploymentSettingsV1(username, domain, options) {
14525
+ return __awaiter(this, void 0, void 0, function* () {
14526
+ var _a, _b;
14527
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteGitAutoDeploymentSettingsV1(username, domain, options);
14528
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingGitApi.deleteGitAutoDeploymentSettingsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
14529
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
14530
+ });
14531
+ },
14532
+ /**
14533
+ * Returns the Git auto-deployment settings of the website: which repository and branch deploy into which directory, and whether pushes trigger a deployment. `is_enabled` false keeps the repository link but ignores pushes. When the website has no auto-deployment configured every field is null. Save settings with `Update Git auto-deployment settings`.
14534
+ * @summary Get Git auto-deployment settings
14535
+ * @param {string} username
14536
+ * @param {string} domain Domain name
14537
+ * @param {*} [options] Override http request option.
14538
+ * @throws {RequiredError}
14539
+ */
14540
+ getGitAutoDeploymentSettingsV1(username, domain, options) {
14541
+ return __awaiter(this, void 0, void 0, function* () {
14542
+ var _a, _b;
14543
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getGitAutoDeploymentSettingsV1(username, domain, options);
14544
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingGitApi.getGitAutoDeploymentSettingsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
14545
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
14546
+ });
14547
+ },
14548
+ /**
14549
+ * Lists the repositories the Git installation can access, read live from the provider. Works for github and gitlab installations. Use an active installation: a suspended or pending one is still queried and the call fails with whatever the provider answers. The list is cut at the first 500 repositories in the order the provider returns them; when the account has more, name the repository directly instead of searching this list. `owner`, `name` and a branch (`default_branch` or another one) go into `source_options` of `Start Node.js build` or into `Update Git auto-deployment settings`. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
14388
14550
  * @summary List Git installation repositories
14389
14551
  * @param {string} uuid Git installation UUID from the List Git installations endpoint
14390
14552
  * @param {*} [options] Override http request option.
@@ -14399,7 +14561,7 @@ export const HostingGitApiFp = function (configuration) {
14399
14561
  });
14400
14562
  },
14401
14563
  /**
14402
- * Lists the Git provider accounts the customer has connected. Only installations with status `active` are returned unless the `status` filter says otherwise. An empty list means the customer has no active installation. Check `status=suspended` and `status=pending` as well. If there is none at all, GitHub has to be connected once in hPanel (Websites, Manage, Advanced, Git, Connect GitHub; or Add Website, Node.js Web App, Import Git Repository, Continue with GitHub); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`.
14564
+ * Lists the Git provider accounts the customer has connected. Only installations with status `active` are returned unless the `status` filter says otherwise. An empty list means the customer has no active installation. Check `status=suspended` and `status=pending` as well. If there is none at all, a Git provider (GitHub or GitLab) has to be connected once in hPanel (Websites, Manage, Advanced, Git; or Add Website, Node.js Web App, Import Git Repository); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`, and as `installation_uuid` in `Start Node.js build` with `source_type` `git` and in `Update Git auto-deployment settings`.
14403
14565
  * @summary List Git installations
14404
14566
  * @param {ListGitInstallationsV1ProviderEnum} [provider] Filter by Git provider
14405
14567
  * @param {ListGitInstallationsV1StatusEnum} [status] Filter by installation status
@@ -14414,6 +14576,23 @@ export const HostingGitApiFp = function (configuration) {
14414
14576
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
14415
14577
  });
14416
14578
  },
14579
+ /**
14580
+ * Creates or replaces the Git auto-deployment settings of the website: repository, branch, the directory under the document root to deploy into, and `is_enabled`. Send the full set; `is_enabled` defaults to true and `directory` to the document root. `installation_uuid` must be an installation from `List Git installations` that belongs to the same customer as the website. For PHP and static websites, saving with `is_enabled` true deploys the branch right away and every later push to that branch deploys again. For Node.js and Website Builder websites saving does not clone anything. On a Node.js website start the first deploy with `Start Node.js build` using `source_type` `git`; pushes then trigger new builds with the build settings stored for the website.
14581
+ * @summary Update Git auto-deployment settings
14582
+ * @param {string} username
14583
+ * @param {string} domain Domain name
14584
+ * @param {HostingV1GitUpdateGitAutoDeploymentSettingsRequest} hostingV1GitUpdateGitAutoDeploymentSettingsRequest
14585
+ * @param {*} [options] Override http request option.
14586
+ * @throws {RequiredError}
14587
+ */
14588
+ updateGitAutoDeploymentSettingsV1(username, domain, hostingV1GitUpdateGitAutoDeploymentSettingsRequest, options) {
14589
+ return __awaiter(this, void 0, void 0, function* () {
14590
+ var _a, _b;
14591
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateGitAutoDeploymentSettingsV1(username, domain, hostingV1GitUpdateGitAutoDeploymentSettingsRequest, options);
14592
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingGitApi.updateGitAutoDeploymentSettingsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
14593
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
14594
+ });
14595
+ },
14417
14596
  };
14418
14597
  };
14419
14598
  /**
@@ -14424,7 +14603,29 @@ export const HostingGitApiFactory = function (configuration, basePath, axios) {
14424
14603
  const localVarFp = HostingGitApiFp(configuration);
14425
14604
  return {
14426
14605
  /**
14427
- * Lists the repositories the Git installation can access, read live from the provider. Works for github and gitlab installations. Use an active installation: a suspended or pending one is still queried and the call fails with whatever the provider answers. The list is cut at the first 500 repositories in the order the provider returns them; when the account has more, name the repository directly instead of searching this list. `owner`, `name` and `default_branch` identify a repository and a branch to deploy. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
14606
+ * Removes the Git auto-deployment settings of the website. Files already deployed stay on the website; pushes stop deploying until settings are saved again. Succeeds also when nothing is configured.
14607
+ * @summary Delete Git auto-deployment settings
14608
+ * @param {string} username
14609
+ * @param {string} domain Domain name
14610
+ * @param {*} [options] Override http request option.
14611
+ * @throws {RequiredError}
14612
+ */
14613
+ deleteGitAutoDeploymentSettingsV1(username, domain, options) {
14614
+ return localVarFp.deleteGitAutoDeploymentSettingsV1(username, domain, options).then((request) => request(axios, basePath));
14615
+ },
14616
+ /**
14617
+ * Returns the Git auto-deployment settings of the website: which repository and branch deploy into which directory, and whether pushes trigger a deployment. `is_enabled` false keeps the repository link but ignores pushes. When the website has no auto-deployment configured every field is null. Save settings with `Update Git auto-deployment settings`.
14618
+ * @summary Get Git auto-deployment settings
14619
+ * @param {string} username
14620
+ * @param {string} domain Domain name
14621
+ * @param {*} [options] Override http request option.
14622
+ * @throws {RequiredError}
14623
+ */
14624
+ getGitAutoDeploymentSettingsV1(username, domain, options) {
14625
+ return localVarFp.getGitAutoDeploymentSettingsV1(username, domain, options).then((request) => request(axios, basePath));
14626
+ },
14627
+ /**
14628
+ * Lists the repositories the Git installation can access, read live from the provider. Works for github and gitlab installations. Use an active installation: a suspended or pending one is still queried and the call fails with whatever the provider answers. The list is cut at the first 500 repositories in the order the provider returns them; when the account has more, name the repository directly instead of searching this list. `owner`, `name` and a branch (`default_branch` or another one) go into `source_options` of `Start Node.js build` or into `Update Git auto-deployment settings`. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
14428
14629
  * @summary List Git installation repositories
14429
14630
  * @param {string} uuid Git installation UUID from the List Git installations endpoint
14430
14631
  * @param {*} [options] Override http request option.
@@ -14434,7 +14635,7 @@ export const HostingGitApiFactory = function (configuration, basePath, axios) {
14434
14635
  return localVarFp.listGitInstallationRepositoriesV1(uuid, options).then((request) => request(axios, basePath));
14435
14636
  },
14436
14637
  /**
14437
- * Lists the Git provider accounts the customer has connected. Only installations with status `active` are returned unless the `status` filter says otherwise. An empty list means the customer has no active installation. Check `status=suspended` and `status=pending` as well. If there is none at all, GitHub has to be connected once in hPanel (Websites, Manage, Advanced, Git, Connect GitHub; or Add Website, Node.js Web App, Import Git Repository, Continue with GitHub); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`.
14638
+ * Lists the Git provider accounts the customer has connected. Only installations with status `active` are returned unless the `status` filter says otherwise. An empty list means the customer has no active installation. Check `status=suspended` and `status=pending` as well. If there is none at all, a Git provider (GitHub or GitLab) has to be connected once in hPanel (Websites, Manage, Advanced, Git; or Add Website, Node.js Web App, Import Git Repository); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`, and as `installation_uuid` in `Start Node.js build` with `source_type` `git` and in `Update Git auto-deployment settings`.
14438
14639
  * @summary List Git installations
14439
14640
  * @param {ListGitInstallationsV1ProviderEnum} [provider] Filter by Git provider
14440
14641
  * @param {ListGitInstallationsV1StatusEnum} [status] Filter by installation status
@@ -14444,6 +14645,18 @@ export const HostingGitApiFactory = function (configuration, basePath, axios) {
14444
14645
  listGitInstallationsV1(provider, status, options) {
14445
14646
  return localVarFp.listGitInstallationsV1(provider, status, options).then((request) => request(axios, basePath));
14446
14647
  },
14648
+ /**
14649
+ * Creates or replaces the Git auto-deployment settings of the website: repository, branch, the directory under the document root to deploy into, and `is_enabled`. Send the full set; `is_enabled` defaults to true and `directory` to the document root. `installation_uuid` must be an installation from `List Git installations` that belongs to the same customer as the website. For PHP and static websites, saving with `is_enabled` true deploys the branch right away and every later push to that branch deploys again. For Node.js and Website Builder websites saving does not clone anything. On a Node.js website start the first deploy with `Start Node.js build` using `source_type` `git`; pushes then trigger new builds with the build settings stored for the website.
14650
+ * @summary Update Git auto-deployment settings
14651
+ * @param {string} username
14652
+ * @param {string} domain Domain name
14653
+ * @param {HostingV1GitUpdateGitAutoDeploymentSettingsRequest} hostingV1GitUpdateGitAutoDeploymentSettingsRequest
14654
+ * @param {*} [options] Override http request option.
14655
+ * @throws {RequiredError}
14656
+ */
14657
+ updateGitAutoDeploymentSettingsV1(username, domain, hostingV1GitUpdateGitAutoDeploymentSettingsRequest, options) {
14658
+ return localVarFp.updateGitAutoDeploymentSettingsV1(username, domain, hostingV1GitUpdateGitAutoDeploymentSettingsRequest, options).then((request) => request(axios, basePath));
14659
+ },
14447
14660
  };
14448
14661
  };
14449
14662
  /**
@@ -14454,7 +14667,31 @@ export const HostingGitApiFactory = function (configuration, basePath, axios) {
14454
14667
  */
14455
14668
  export class HostingGitApi extends BaseAPI {
14456
14669
  /**
14457
- * Lists the repositories the Git installation can access, read live from the provider. Works for github and gitlab installations. Use an active installation: a suspended or pending one is still queried and the call fails with whatever the provider answers. The list is cut at the first 500 repositories in the order the provider returns them; when the account has more, name the repository directly instead of searching this list. `owner`, `name` and `default_branch` identify a repository and a branch to deploy. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
14670
+ * Removes the Git auto-deployment settings of the website. Files already deployed stay on the website; pushes stop deploying until settings are saved again. Succeeds also when nothing is configured.
14671
+ * @summary Delete Git auto-deployment settings
14672
+ * @param {string} username
14673
+ * @param {string} domain Domain name
14674
+ * @param {*} [options] Override http request option.
14675
+ * @throws {RequiredError}
14676
+ * @memberof HostingGitApi
14677
+ */
14678
+ deleteGitAutoDeploymentSettingsV1(username, domain, options) {
14679
+ return HostingGitApiFp(this.configuration).deleteGitAutoDeploymentSettingsV1(username, domain, options).then((request) => request(this.axios, this.basePath));
14680
+ }
14681
+ /**
14682
+ * Returns the Git auto-deployment settings of the website: which repository and branch deploy into which directory, and whether pushes trigger a deployment. `is_enabled` false keeps the repository link but ignores pushes. When the website has no auto-deployment configured every field is null. Save settings with `Update Git auto-deployment settings`.
14683
+ * @summary Get Git auto-deployment settings
14684
+ * @param {string} username
14685
+ * @param {string} domain Domain name
14686
+ * @param {*} [options] Override http request option.
14687
+ * @throws {RequiredError}
14688
+ * @memberof HostingGitApi
14689
+ */
14690
+ getGitAutoDeploymentSettingsV1(username, domain, options) {
14691
+ return HostingGitApiFp(this.configuration).getGitAutoDeploymentSettingsV1(username, domain, options).then((request) => request(this.axios, this.basePath));
14692
+ }
14693
+ /**
14694
+ * Lists the repositories the Git installation can access, read live from the provider. Works for github and gitlab installations. Use an active installation: a suspended or pending one is still queried and the call fails with whatever the provider answers. The list is cut at the first 500 repositories in the order the provider returns them; when the account has more, name the repository directly instead of searching this list. `owner`, `name` and a branch (`default_branch` or another one) go into `source_options` of `Start Node.js build` or into `Update Git auto-deployment settings`. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
14458
14695
  * @summary List Git installation repositories
14459
14696
  * @param {string} uuid Git installation UUID from the List Git installations endpoint
14460
14697
  * @param {*} [options] Override http request option.
@@ -14465,7 +14702,7 @@ export class HostingGitApi extends BaseAPI {
14465
14702
  return HostingGitApiFp(this.configuration).listGitInstallationRepositoriesV1(uuid, options).then((request) => request(this.axios, this.basePath));
14466
14703
  }
14467
14704
  /**
14468
- * Lists the Git provider accounts the customer has connected. Only installations with status `active` are returned unless the `status` filter says otherwise. An empty list means the customer has no active installation. Check `status=suspended` and `status=pending` as well. If there is none at all, GitHub has to be connected once in hPanel (Websites, Manage, Advanced, Git, Connect GitHub; or Add Website, Node.js Web App, Import Git Repository, Continue with GitHub); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`.
14705
+ * Lists the Git provider accounts the customer has connected. Only installations with status `active` are returned unless the `status` filter says otherwise. An empty list means the customer has no active installation. Check `status=suspended` and `status=pending` as well. If there is none at all, a Git provider (GitHub or GitLab) has to be connected once in hPanel (Websites, Manage, Advanced, Git; or Add Website, Node.js Web App, Import Git Repository); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`, and as `installation_uuid` in `Start Node.js build` with `source_type` `git` and in `Update Git auto-deployment settings`.
14469
14706
  * @summary List Git installations
14470
14707
  * @param {ListGitInstallationsV1ProviderEnum} [provider] Filter by Git provider
14471
14708
  * @param {ListGitInstallationsV1StatusEnum} [status] Filter by installation status
@@ -14476,6 +14713,19 @@ export class HostingGitApi extends BaseAPI {
14476
14713
  listGitInstallationsV1(provider, status, options) {
14477
14714
  return HostingGitApiFp(this.configuration).listGitInstallationsV1(provider, status, options).then((request) => request(this.axios, this.basePath));
14478
14715
  }
14716
+ /**
14717
+ * Creates or replaces the Git auto-deployment settings of the website: repository, branch, the directory under the document root to deploy into, and `is_enabled`. Send the full set; `is_enabled` defaults to true and `directory` to the document root. `installation_uuid` must be an installation from `List Git installations` that belongs to the same customer as the website. For PHP and static websites, saving with `is_enabled` true deploys the branch right away and every later push to that branch deploys again. For Node.js and Website Builder websites saving does not clone anything. On a Node.js website start the first deploy with `Start Node.js build` using `source_type` `git`; pushes then trigger new builds with the build settings stored for the website.
14718
+ * @summary Update Git auto-deployment settings
14719
+ * @param {string} username
14720
+ * @param {string} domain Domain name
14721
+ * @param {HostingV1GitUpdateGitAutoDeploymentSettingsRequest} hostingV1GitUpdateGitAutoDeploymentSettingsRequest
14722
+ * @param {*} [options] Override http request option.
14723
+ * @throws {RequiredError}
14724
+ * @memberof HostingGitApi
14725
+ */
14726
+ updateGitAutoDeploymentSettingsV1(username, domain, hostingV1GitUpdateGitAutoDeploymentSettingsRequest, options) {
14727
+ return HostingGitApiFp(this.configuration).updateGitAutoDeploymentSettingsV1(username, domain, hostingV1GitUpdateGitAutoDeploymentSettingsRequest, options).then((request) => request(this.axios, this.basePath));
14728
+ }
14479
14729
  }
14480
14730
  /**
14481
14731
  * @export
@@ -15032,7 +15282,7 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration) {
15032
15282
  };
15033
15283
  }),
15034
15284
  /**
15035
- * Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. The `source_type` must be `archive` and `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
15285
+ * Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. With `source_type` `archive`, `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. With `source_type` `git`, `source_options` carries `owner`, `repository`, `branch` and `installation_uuid`. Take the installation from `List Git installations` and the owner and repository from `List Git installation repositories`; the branch is cloned at its current head. The installation must belong to the same customer as the website. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
15036
15286
  * @summary Start Node.js build
15037
15287
  * @param {string} username
15038
15288
  * @param {string} domain Domain name
@@ -15346,7 +15596,7 @@ export const HostingNodeJSApiFp = function (configuration) {
15346
15596
  });
15347
15597
  },
15348
15598
  /**
15349
- * Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. The `source_type` must be `archive` and `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
15599
+ * Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. With `source_type` `archive`, `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. With `source_type` `git`, `source_options` carries `owner`, `repository`, `branch` and `installation_uuid`. Take the installation from `List Git installations` and the owner and repository from `List Git installation repositories`; the branch is cloned at its current head. The installation must belong to the same customer as the website. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
15350
15600
  * @summary Start Node.js build
15351
15601
  * @param {string} username
15352
15602
  * @param {string} domain Domain name
@@ -15547,7 +15797,7 @@ export const HostingNodeJSApiFactory = function (configuration, basePath, axios)
15547
15797
  return localVarFp.restartNodeJsApplicationV1(username, domain, options).then((request) => request(axios, basePath));
15548
15798
  },
15549
15799
  /**
15550
- * Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. The `source_type` must be `archive` and `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
15800
+ * Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. With `source_type` `archive`, `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. With `source_type` `git`, `source_options` carries `owner`, `repository`, `branch` and `installation_uuid`. Take the installation from `List Git installations` and the owner and repository from `List Git installation repositories`; the branch is cloned at its current head. The installation must belong to the same customer as the website. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
15551
15801
  * @summary Start Node.js build
15552
15802
  * @param {string} username
15553
15803
  * @param {string} domain Domain name
@@ -15751,7 +16001,7 @@ export class HostingNodeJSApi extends BaseAPI {
15751
16001
  return HostingNodeJSApiFp(this.configuration).restartNodeJsApplicationV1(username, domain, options).then((request) => request(this.axios, this.basePath));
15752
16002
  }
15753
16003
  /**
15754
- * Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. The `source_type` must be `archive` and `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
16004
+ * Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. With `source_type` `archive`, `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. With `source_type` `git`, `source_options` carries `owner`, `repository`, `branch` and `installation_uuid`. Take the installation from `List Git installations` and the owner and repository from `List Git installation repositories`; the branch is cloned at its current head. The installation must belong to the same customer as the website. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
15755
16005
  * @summary Start Node.js build
15756
16006
  * @param {string} username
15757
16007
  * @param {string} domain Domain name
@@ -16746,6 +16996,348 @@ export class HostingRedirectsApi extends BaseAPI {
16746
16996
  return HostingRedirectsApiFp(this.configuration).listWebsiteRedirectsV1(username, domain, page, perPage, options).then((request) => request(this.axios, this.basePath));
16747
16997
  }
16748
16998
  }
16999
+ /**
17000
+ * HostingSSLApi - axios parameter creator
17001
+ * @export
17002
+ */
17003
+ export const HostingSSLApiAxiosParamCreator = function (configuration) {
17004
+ return {
17005
+ /**
17006
+ * Returns the SSL state of the website: the certificate `status` and `provider`, whether the certificate is a lifetime one managed by the platform, whether HTTP requests are redirected to HTTPS, when the certificate stops being valid and the last installation error. `installing` and `waiting_for_retry` mean an installation is in progress. `failed` means the last installation gave up, or the website was not updated for 60 minutes while `installing`; `last_error` holds the reason when it is a known message, otherwise it is null. `expired` means the assigned certificate\'s validity has ended. `not_installed` means no certificate is assigned. Free subdomains use a platform-managed certificate: with no installation recorded they report `active` with `provider` and `expires_at` null.
17007
+ * @summary Get SSL status
17008
+ * @param {string} username
17009
+ * @param {string} domain Domain name
17010
+ * @param {*} [options] Override http request option.
17011
+ * @throws {RequiredError}
17012
+ */
17013
+ getSSLStatusV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
17014
+ // verify required parameter 'username' is not null or undefined
17015
+ assertParamExists('getSSLStatusV1', 'username', username);
17016
+ // verify required parameter 'domain' is not null or undefined
17017
+ assertParamExists('getSSLStatusV1', 'domain', domain);
17018
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl/status`
17019
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
17020
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
17021
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17022
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17023
+ let baseOptions;
17024
+ if (configuration) {
17025
+ baseOptions = configuration.baseOptions;
17026
+ }
17027
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
17028
+ const localVarHeaderParameter = {};
17029
+ const localVarQueryParameter = {};
17030
+ // authentication apiToken required
17031
+ // http bearer authentication required
17032
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17033
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17034
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17035
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17036
+ return {
17037
+ url: toPathString(localVarUrlObj),
17038
+ options: localVarRequestOptions,
17039
+ };
17040
+ }),
17041
+ /**
17042
+ * Requests a lifetime SSL certificate for the website. The installation runs in the background; `Get SSL status` reports `active` or `failed` when it ends. An `active` lifetime certificate does not block the request: a new installation is requested, which is how a certificate is reinstalled. Returns 422 for free subdomains (their certificate is managed by the platform), while an installation is `installing` or `waiting_for_retry`, when the website\'s certificate was revoked (it cannot be reissued), and when an uploaded custom certificate is installed; that one has to be uninstalled first.
17043
+ * @summary Install SSL
17044
+ * @param {string} username
17045
+ * @param {string} domain Domain name
17046
+ * @param {*} [options] Override http request option.
17047
+ * @throws {RequiredError}
17048
+ */
17049
+ installSSLV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
17050
+ // verify required parameter 'username' is not null or undefined
17051
+ assertParamExists('installSSLV1', 'username', username);
17052
+ // verify required parameter 'domain' is not null or undefined
17053
+ assertParamExists('installSSLV1', 'domain', domain);
17054
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl/setup`
17055
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
17056
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
17057
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17058
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17059
+ let baseOptions;
17060
+ if (configuration) {
17061
+ baseOptions = configuration.baseOptions;
17062
+ }
17063
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
17064
+ const localVarHeaderParameter = {};
17065
+ const localVarQueryParameter = {};
17066
+ // authentication apiToken required
17067
+ // http bearer authentication required
17068
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17069
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17070
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17071
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17072
+ return {
17073
+ url: toPathString(localVarUrlObj),
17074
+ options: localVarRequestOptions,
17075
+ };
17076
+ }),
17077
+ /**
17078
+ * Turns the HTTP to HTTPS redirect of the website on or off, based on `is_enabled`. Does nothing when the redirect is already in the requested state. Turning it on requires an installed certificate (`status` `active` or `expired` on `Get SSL status`) and returns 422 when there is none; turning it off is always accepted.
17079
+ * @summary Toggle HTTPS redirect
17080
+ * @param {string} username
17081
+ * @param {string} domain Domain name
17082
+ * @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
17083
+ * @param {*} [options] Override http request option.
17084
+ * @throws {RequiredError}
17085
+ */
17086
+ toggleHTTPSRedirectV1: (username_1, domain_1, hostingV1SslToggleHttpsRedirectRequest_1, ...args_1) => __awaiter(this, [username_1, domain_1, hostingV1SslToggleHttpsRedirectRequest_1, ...args_1], void 0, function* (username, domain, hostingV1SslToggleHttpsRedirectRequest, options = {}) {
17087
+ // verify required parameter 'username' is not null or undefined
17088
+ assertParamExists('toggleHTTPSRedirectV1', 'username', username);
17089
+ // verify required parameter 'domain' is not null or undefined
17090
+ assertParamExists('toggleHTTPSRedirectV1', 'domain', domain);
17091
+ // verify required parameter 'hostingV1SslToggleHttpsRedirectRequest' is not null or undefined
17092
+ assertParamExists('toggleHTTPSRedirectV1', 'hostingV1SslToggleHttpsRedirectRequest', hostingV1SslToggleHttpsRedirectRequest);
17093
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl/https-redirect/toggle`
17094
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
17095
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
17096
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17097
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17098
+ let baseOptions;
17099
+ if (configuration) {
17100
+ baseOptions = configuration.baseOptions;
17101
+ }
17102
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
17103
+ const localVarHeaderParameter = {};
17104
+ const localVarQueryParameter = {};
17105
+ // authentication apiToken required
17106
+ // http bearer authentication required
17107
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17108
+ localVarHeaderParameter['Content-Type'] = 'application/json';
17109
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17110
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17111
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17112
+ localVarRequestOptions.data = serializeDataIfNeeded(hostingV1SslToggleHttpsRedirectRequest, localVarRequestOptions, configuration);
17113
+ return {
17114
+ url: toPathString(localVarUrlObj),
17115
+ options: localVarRequestOptions,
17116
+ };
17117
+ }),
17118
+ /**
17119
+ * Removes the SSL certificate assigned to the website, turns the HTTPS redirect off and cancels a pending installation retry. The website serves plain HTTP until a new installation completes. `Get SSL status` reports `not_installed` as soon as the call returns; the call also succeeds when no certificate is assigned, so repeating it is safe. Returns 422 for free subdomains (their certificate is managed by the platform) and while an installation is `installing`.
17120
+ * @summary Uninstall SSL
17121
+ * @param {string} username
17122
+ * @param {string} domain Domain name
17123
+ * @param {*} [options] Override http request option.
17124
+ * @throws {RequiredError}
17125
+ */
17126
+ uninstallSSLV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
17127
+ // verify required parameter 'username' is not null or undefined
17128
+ assertParamExists('uninstallSSLV1', 'username', username);
17129
+ // verify required parameter 'domain' is not null or undefined
17130
+ assertParamExists('uninstallSSLV1', 'domain', domain);
17131
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl`
17132
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
17133
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
17134
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17135
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17136
+ let baseOptions;
17137
+ if (configuration) {
17138
+ baseOptions = configuration.baseOptions;
17139
+ }
17140
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
17141
+ const localVarHeaderParameter = {};
17142
+ const localVarQueryParameter = {};
17143
+ // authentication apiToken required
17144
+ // http bearer authentication required
17145
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
17146
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17147
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17148
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17149
+ return {
17150
+ url: toPathString(localVarUrlObj),
17151
+ options: localVarRequestOptions,
17152
+ };
17153
+ }),
17154
+ };
17155
+ };
17156
+ /**
17157
+ * HostingSSLApi - functional programming interface
17158
+ * @export
17159
+ */
17160
+ export const HostingSSLApiFp = function (configuration) {
17161
+ const localVarAxiosParamCreator = HostingSSLApiAxiosParamCreator(configuration);
17162
+ return {
17163
+ /**
17164
+ * Returns the SSL state of the website: the certificate `status` and `provider`, whether the certificate is a lifetime one managed by the platform, whether HTTP requests are redirected to HTTPS, when the certificate stops being valid and the last installation error. `installing` and `waiting_for_retry` mean an installation is in progress. `failed` means the last installation gave up, or the website was not updated for 60 minutes while `installing`; `last_error` holds the reason when it is a known message, otherwise it is null. `expired` means the assigned certificate\'s validity has ended. `not_installed` means no certificate is assigned. Free subdomains use a platform-managed certificate: with no installation recorded they report `active` with `provider` and `expires_at` null.
17165
+ * @summary Get SSL status
17166
+ * @param {string} username
17167
+ * @param {string} domain Domain name
17168
+ * @param {*} [options] Override http request option.
17169
+ * @throws {RequiredError}
17170
+ */
17171
+ getSSLStatusV1(username, domain, options) {
17172
+ return __awaiter(this, void 0, void 0, function* () {
17173
+ var _a, _b;
17174
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSSLStatusV1(username, domain, options);
17175
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingSSLApi.getSSLStatusV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17176
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17177
+ });
17178
+ },
17179
+ /**
17180
+ * Requests a lifetime SSL certificate for the website. The installation runs in the background; `Get SSL status` reports `active` or `failed` when it ends. An `active` lifetime certificate does not block the request: a new installation is requested, which is how a certificate is reinstalled. Returns 422 for free subdomains (their certificate is managed by the platform), while an installation is `installing` or `waiting_for_retry`, when the website\'s certificate was revoked (it cannot be reissued), and when an uploaded custom certificate is installed; that one has to be uninstalled first.
17181
+ * @summary Install SSL
17182
+ * @param {string} username
17183
+ * @param {string} domain Domain name
17184
+ * @param {*} [options] Override http request option.
17185
+ * @throws {RequiredError}
17186
+ */
17187
+ installSSLV1(username, domain, options) {
17188
+ return __awaiter(this, void 0, void 0, function* () {
17189
+ var _a, _b;
17190
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.installSSLV1(username, domain, options);
17191
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingSSLApi.installSSLV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17192
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17193
+ });
17194
+ },
17195
+ /**
17196
+ * Turns the HTTP to HTTPS redirect of the website on or off, based on `is_enabled`. Does nothing when the redirect is already in the requested state. Turning it on requires an installed certificate (`status` `active` or `expired` on `Get SSL status`) and returns 422 when there is none; turning it off is always accepted.
17197
+ * @summary Toggle HTTPS redirect
17198
+ * @param {string} username
17199
+ * @param {string} domain Domain name
17200
+ * @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
17201
+ * @param {*} [options] Override http request option.
17202
+ * @throws {RequiredError}
17203
+ */
17204
+ toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options) {
17205
+ return __awaiter(this, void 0, void 0, function* () {
17206
+ var _a, _b;
17207
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options);
17208
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingSSLApi.toggleHTTPSRedirectV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17209
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17210
+ });
17211
+ },
17212
+ /**
17213
+ * Removes the SSL certificate assigned to the website, turns the HTTPS redirect off and cancels a pending installation retry. The website serves plain HTTP until a new installation completes. `Get SSL status` reports `not_installed` as soon as the call returns; the call also succeeds when no certificate is assigned, so repeating it is safe. Returns 422 for free subdomains (their certificate is managed by the platform) and while an installation is `installing`.
17214
+ * @summary Uninstall SSL
17215
+ * @param {string} username
17216
+ * @param {string} domain Domain name
17217
+ * @param {*} [options] Override http request option.
17218
+ * @throws {RequiredError}
17219
+ */
17220
+ uninstallSSLV1(username, domain, options) {
17221
+ return __awaiter(this, void 0, void 0, function* () {
17222
+ var _a, _b;
17223
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.uninstallSSLV1(username, domain, options);
17224
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingSSLApi.uninstallSSLV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
17225
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17226
+ });
17227
+ },
17228
+ };
17229
+ };
17230
+ /**
17231
+ * HostingSSLApi - factory interface
17232
+ * @export
17233
+ */
17234
+ export const HostingSSLApiFactory = function (configuration, basePath, axios) {
17235
+ const localVarFp = HostingSSLApiFp(configuration);
17236
+ return {
17237
+ /**
17238
+ * Returns the SSL state of the website: the certificate `status` and `provider`, whether the certificate is a lifetime one managed by the platform, whether HTTP requests are redirected to HTTPS, when the certificate stops being valid and the last installation error. `installing` and `waiting_for_retry` mean an installation is in progress. `failed` means the last installation gave up, or the website was not updated for 60 minutes while `installing`; `last_error` holds the reason when it is a known message, otherwise it is null. `expired` means the assigned certificate\'s validity has ended. `not_installed` means no certificate is assigned. Free subdomains use a platform-managed certificate: with no installation recorded they report `active` with `provider` and `expires_at` null.
17239
+ * @summary Get SSL status
17240
+ * @param {string} username
17241
+ * @param {string} domain Domain name
17242
+ * @param {*} [options] Override http request option.
17243
+ * @throws {RequiredError}
17244
+ */
17245
+ getSSLStatusV1(username, domain, options) {
17246
+ return localVarFp.getSSLStatusV1(username, domain, options).then((request) => request(axios, basePath));
17247
+ },
17248
+ /**
17249
+ * Requests a lifetime SSL certificate for the website. The installation runs in the background; `Get SSL status` reports `active` or `failed` when it ends. An `active` lifetime certificate does not block the request: a new installation is requested, which is how a certificate is reinstalled. Returns 422 for free subdomains (their certificate is managed by the platform), while an installation is `installing` or `waiting_for_retry`, when the website\'s certificate was revoked (it cannot be reissued), and when an uploaded custom certificate is installed; that one has to be uninstalled first.
17250
+ * @summary Install SSL
17251
+ * @param {string} username
17252
+ * @param {string} domain Domain name
17253
+ * @param {*} [options] Override http request option.
17254
+ * @throws {RequiredError}
17255
+ */
17256
+ installSSLV1(username, domain, options) {
17257
+ return localVarFp.installSSLV1(username, domain, options).then((request) => request(axios, basePath));
17258
+ },
17259
+ /**
17260
+ * Turns the HTTP to HTTPS redirect of the website on or off, based on `is_enabled`. Does nothing when the redirect is already in the requested state. Turning it on requires an installed certificate (`status` `active` or `expired` on `Get SSL status`) and returns 422 when there is none; turning it off is always accepted.
17261
+ * @summary Toggle HTTPS redirect
17262
+ * @param {string} username
17263
+ * @param {string} domain Domain name
17264
+ * @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
17265
+ * @param {*} [options] Override http request option.
17266
+ * @throws {RequiredError}
17267
+ */
17268
+ toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options) {
17269
+ return localVarFp.toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options).then((request) => request(axios, basePath));
17270
+ },
17271
+ /**
17272
+ * Removes the SSL certificate assigned to the website, turns the HTTPS redirect off and cancels a pending installation retry. The website serves plain HTTP until a new installation completes. `Get SSL status` reports `not_installed` as soon as the call returns; the call also succeeds when no certificate is assigned, so repeating it is safe. Returns 422 for free subdomains (their certificate is managed by the platform) and while an installation is `installing`.
17273
+ * @summary Uninstall SSL
17274
+ * @param {string} username
17275
+ * @param {string} domain Domain name
17276
+ * @param {*} [options] Override http request option.
17277
+ * @throws {RequiredError}
17278
+ */
17279
+ uninstallSSLV1(username, domain, options) {
17280
+ return localVarFp.uninstallSSLV1(username, domain, options).then((request) => request(axios, basePath));
17281
+ },
17282
+ };
17283
+ };
17284
+ /**
17285
+ * HostingSSLApi - object-oriented interface
17286
+ * @export
17287
+ * @class HostingSSLApi
17288
+ * @extends {BaseAPI}
17289
+ */
17290
+ export class HostingSSLApi extends BaseAPI {
17291
+ /**
17292
+ * Returns the SSL state of the website: the certificate `status` and `provider`, whether the certificate is a lifetime one managed by the platform, whether HTTP requests are redirected to HTTPS, when the certificate stops being valid and the last installation error. `installing` and `waiting_for_retry` mean an installation is in progress. `failed` means the last installation gave up, or the website was not updated for 60 minutes while `installing`; `last_error` holds the reason when it is a known message, otherwise it is null. `expired` means the assigned certificate\'s validity has ended. `not_installed` means no certificate is assigned. Free subdomains use a platform-managed certificate: with no installation recorded they report `active` with `provider` and `expires_at` null.
17293
+ * @summary Get SSL status
17294
+ * @param {string} username
17295
+ * @param {string} domain Domain name
17296
+ * @param {*} [options] Override http request option.
17297
+ * @throws {RequiredError}
17298
+ * @memberof HostingSSLApi
17299
+ */
17300
+ getSSLStatusV1(username, domain, options) {
17301
+ return HostingSSLApiFp(this.configuration).getSSLStatusV1(username, domain, options).then((request) => request(this.axios, this.basePath));
17302
+ }
17303
+ /**
17304
+ * Requests a lifetime SSL certificate for the website. The installation runs in the background; `Get SSL status` reports `active` or `failed` when it ends. An `active` lifetime certificate does not block the request: a new installation is requested, which is how a certificate is reinstalled. Returns 422 for free subdomains (their certificate is managed by the platform), while an installation is `installing` or `waiting_for_retry`, when the website\'s certificate was revoked (it cannot be reissued), and when an uploaded custom certificate is installed; that one has to be uninstalled first.
17305
+ * @summary Install SSL
17306
+ * @param {string} username
17307
+ * @param {string} domain Domain name
17308
+ * @param {*} [options] Override http request option.
17309
+ * @throws {RequiredError}
17310
+ * @memberof HostingSSLApi
17311
+ */
17312
+ installSSLV1(username, domain, options) {
17313
+ return HostingSSLApiFp(this.configuration).installSSLV1(username, domain, options).then((request) => request(this.axios, this.basePath));
17314
+ }
17315
+ /**
17316
+ * Turns the HTTP to HTTPS redirect of the website on or off, based on `is_enabled`. Does nothing when the redirect is already in the requested state. Turning it on requires an installed certificate (`status` `active` or `expired` on `Get SSL status`) and returns 422 when there is none; turning it off is always accepted.
17317
+ * @summary Toggle HTTPS redirect
17318
+ * @param {string} username
17319
+ * @param {string} domain Domain name
17320
+ * @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
17321
+ * @param {*} [options] Override http request option.
17322
+ * @throws {RequiredError}
17323
+ * @memberof HostingSSLApi
17324
+ */
17325
+ toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options) {
17326
+ return HostingSSLApiFp(this.configuration).toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options).then((request) => request(this.axios, this.basePath));
17327
+ }
17328
+ /**
17329
+ * Removes the SSL certificate assigned to the website, turns the HTTPS redirect off and cancels a pending installation retry. The website serves plain HTTP until a new installation completes. `Get SSL status` reports `not_installed` as soon as the call returns; the call also succeeds when no certificate is assigned, so repeating it is safe. Returns 422 for free subdomains (their certificate is managed by the platform) and while an installation is `installing`.
17330
+ * @summary Uninstall SSL
17331
+ * @param {string} username
17332
+ * @param {string} domain Domain name
17333
+ * @param {*} [options] Override http request option.
17334
+ * @throws {RequiredError}
17335
+ * @memberof HostingSSLApi
17336
+ */
17337
+ uninstallSSLV1(username, domain, options) {
17338
+ return HostingSSLApiFp(this.configuration).uninstallSSLV1(username, domain, options).then((request) => request(this.axios, this.basePath));
17339
+ }
17340
+ }
16749
17341
  /**
16750
17342
  * HostingWebsitesApi - axios parameter creator
16751
17343
  * @export