hostinger-api-sdk 0.0.22 → 0.0.24

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: 0.19.4
6
+ * API Version: 0.21.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
@@ -3832,6 +3832,334 @@ export class HorizonsWebsitesApi extends BaseAPI {
3832
3832
  return HorizonsWebsitesApiFp(this.configuration).getWebsiteV1(websiteId, options).then((request) => request(this.axios, this.basePath));
3833
3833
  }
3834
3834
  }
3835
+ /**
3836
+ * HostingCronJobsApi - axios parameter creator
3837
+ * @export
3838
+ */
3839
+ export const HostingCronJobsApiAxiosParamCreator = function (configuration) {
3840
+ return {
3841
+ /**
3842
+ * Creates a cron job for the specified account from a schedule expression and a command. Returns the created cron job, including its uid, which is required to delete the cron job or fetch its output.
3843
+ * @summary Create account cron job
3844
+ * @param {string} username
3845
+ * @param {HostingV1CronJobsCreateCronJobRequest} hostingV1CronJobsCreateCronJobRequest
3846
+ * @param {*} [options] Override http request option.
3847
+ * @throws {RequiredError}
3848
+ */
3849
+ createAccountCronJobV1: (username_1, hostingV1CronJobsCreateCronJobRequest_1, ...args_1) => __awaiter(this, [username_1, hostingV1CronJobsCreateCronJobRequest_1, ...args_1], void 0, function* (username, hostingV1CronJobsCreateCronJobRequest, options = {}) {
3850
+ // verify required parameter 'username' is not null or undefined
3851
+ assertParamExists('createAccountCronJobV1', 'username', username);
3852
+ // verify required parameter 'hostingV1CronJobsCreateCronJobRequest' is not null or undefined
3853
+ assertParamExists('createAccountCronJobV1', 'hostingV1CronJobsCreateCronJobRequest', hostingV1CronJobsCreateCronJobRequest);
3854
+ const localVarPath = `/api/hosting/v1/accounts/{username}/cron-jobs`
3855
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)));
3856
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3857
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3858
+ let baseOptions;
3859
+ if (configuration) {
3860
+ baseOptions = configuration.baseOptions;
3861
+ }
3862
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3863
+ const localVarHeaderParameter = {};
3864
+ const localVarQueryParameter = {};
3865
+ // authentication apiToken required
3866
+ // http bearer authentication required
3867
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3868
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3869
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3870
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3871
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3872
+ localVarRequestOptions.data = serializeDataIfNeeded(hostingV1CronJobsCreateCronJobRequest, localVarRequestOptions, configuration);
3873
+ return {
3874
+ url: toPathString(localVarUrlObj),
3875
+ options: localVarRequestOptions,
3876
+ };
3877
+ }),
3878
+ /**
3879
+ * Permanently deletes the cron job identified by its uid. The uid is returned by the list cron jobs endpoint.
3880
+ * @summary Delete account cron job
3881
+ * @param {string} username
3882
+ * @param {string} uid Unique identifier of the cron job as returned by the list cron jobs endpoint.
3883
+ * @param {*} [options] Override http request option.
3884
+ * @throws {RequiredError}
3885
+ */
3886
+ deleteAccountCronJobV1: (username_1, uid_1, ...args_1) => __awaiter(this, [username_1, uid_1, ...args_1], void 0, function* (username, uid, options = {}) {
3887
+ // verify required parameter 'username' is not null or undefined
3888
+ assertParamExists('deleteAccountCronJobV1', 'username', username);
3889
+ // verify required parameter 'uid' is not null or undefined
3890
+ assertParamExists('deleteAccountCronJobV1', 'uid', uid);
3891
+ const localVarPath = `/api/hosting/v1/accounts/{username}/cron-jobs/{uid}`
3892
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
3893
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
3894
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3895
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3896
+ let baseOptions;
3897
+ if (configuration) {
3898
+ baseOptions = configuration.baseOptions;
3899
+ }
3900
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
3901
+ const localVarHeaderParameter = {};
3902
+ const localVarQueryParameter = {};
3903
+ // authentication apiToken required
3904
+ // http bearer authentication required
3905
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3906
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3907
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3908
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3909
+ return {
3910
+ url: toPathString(localVarUrlObj),
3911
+ options: localVarRequestOptions,
3912
+ };
3913
+ }),
3914
+ /**
3915
+ * Returns the output captured from the last execution of the cron job identified by its uid. The uid is returned by the list cron jobs endpoint.
3916
+ * @summary Get cron job output
3917
+ * @param {string} username
3918
+ * @param {string} uid Unique identifier of the cron job as returned by the list cron jobs endpoint.
3919
+ * @param {*} [options] Override http request option.
3920
+ * @throws {RequiredError}
3921
+ */
3922
+ getCronJobOutputV1: (username_1, uid_1, ...args_1) => __awaiter(this, [username_1, uid_1, ...args_1], void 0, function* (username, uid, options = {}) {
3923
+ // verify required parameter 'username' is not null or undefined
3924
+ assertParamExists('getCronJobOutputV1', 'username', username);
3925
+ // verify required parameter 'uid' is not null or undefined
3926
+ assertParamExists('getCronJobOutputV1', 'uid', uid);
3927
+ const localVarPath = `/api/hosting/v1/accounts/{username}/cron-jobs/{uid}/output`
3928
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
3929
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
3930
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3931
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3932
+ let baseOptions;
3933
+ if (configuration) {
3934
+ baseOptions = configuration.baseOptions;
3935
+ }
3936
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3937
+ const localVarHeaderParameter = {};
3938
+ const localVarQueryParameter = {};
3939
+ // authentication apiToken required
3940
+ // http bearer authentication required
3941
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3942
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3943
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3944
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3945
+ return {
3946
+ url: toPathString(localVarUrlObj),
3947
+ options: localVarRequestOptions,
3948
+ };
3949
+ }),
3950
+ /**
3951
+ * Returns the list of cron jobs configured for the specified account, including their schedule and command.
3952
+ * @summary List account cron jobs
3953
+ * @param {string} username
3954
+ * @param {*} [options] Override http request option.
3955
+ * @throws {RequiredError}
3956
+ */
3957
+ listAccountCronJobsV1: (username_1, ...args_1) => __awaiter(this, [username_1, ...args_1], void 0, function* (username, options = {}) {
3958
+ // verify required parameter 'username' is not null or undefined
3959
+ assertParamExists('listAccountCronJobsV1', 'username', username);
3960
+ const localVarPath = `/api/hosting/v1/accounts/{username}/cron-jobs`
3961
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)));
3962
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3963
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3964
+ let baseOptions;
3965
+ if (configuration) {
3966
+ baseOptions = configuration.baseOptions;
3967
+ }
3968
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3969
+ const localVarHeaderParameter = {};
3970
+ const localVarQueryParameter = {};
3971
+ // authentication apiToken required
3972
+ // http bearer authentication required
3973
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3974
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3975
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3976
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3977
+ return {
3978
+ url: toPathString(localVarUrlObj),
3979
+ options: localVarRequestOptions,
3980
+ };
3981
+ }),
3982
+ };
3983
+ };
3984
+ /**
3985
+ * HostingCronJobsApi - functional programming interface
3986
+ * @export
3987
+ */
3988
+ export const HostingCronJobsApiFp = function (configuration) {
3989
+ const localVarAxiosParamCreator = HostingCronJobsApiAxiosParamCreator(configuration);
3990
+ return {
3991
+ /**
3992
+ * Creates a cron job for the specified account from a schedule expression and a command. Returns the created cron job, including its uid, which is required to delete the cron job or fetch its output.
3993
+ * @summary Create account cron job
3994
+ * @param {string} username
3995
+ * @param {HostingV1CronJobsCreateCronJobRequest} hostingV1CronJobsCreateCronJobRequest
3996
+ * @param {*} [options] Override http request option.
3997
+ * @throws {RequiredError}
3998
+ */
3999
+ createAccountCronJobV1(username, hostingV1CronJobsCreateCronJobRequest, options) {
4000
+ return __awaiter(this, void 0, void 0, function* () {
4001
+ var _a, _b;
4002
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createAccountCronJobV1(username, hostingV1CronJobsCreateCronJobRequest, options);
4003
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCronJobsApi.createAccountCronJobV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
4004
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4005
+ });
4006
+ },
4007
+ /**
4008
+ * Permanently deletes the cron job identified by its uid. The uid is returned by the list cron jobs endpoint.
4009
+ * @summary Delete account cron job
4010
+ * @param {string} username
4011
+ * @param {string} uid Unique identifier of the cron job as returned by the list cron jobs endpoint.
4012
+ * @param {*} [options] Override http request option.
4013
+ * @throws {RequiredError}
4014
+ */
4015
+ deleteAccountCronJobV1(username, uid, options) {
4016
+ return __awaiter(this, void 0, void 0, function* () {
4017
+ var _a, _b;
4018
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteAccountCronJobV1(username, uid, options);
4019
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCronJobsApi.deleteAccountCronJobV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
4020
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4021
+ });
4022
+ },
4023
+ /**
4024
+ * Returns the output captured from the last execution of the cron job identified by its uid. The uid is returned by the list cron jobs endpoint.
4025
+ * @summary Get cron job output
4026
+ * @param {string} username
4027
+ * @param {string} uid Unique identifier of the cron job as returned by the list cron jobs endpoint.
4028
+ * @param {*} [options] Override http request option.
4029
+ * @throws {RequiredError}
4030
+ */
4031
+ getCronJobOutputV1(username, uid, options) {
4032
+ return __awaiter(this, void 0, void 0, function* () {
4033
+ var _a, _b;
4034
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCronJobOutputV1(username, uid, options);
4035
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCronJobsApi.getCronJobOutputV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
4036
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4037
+ });
4038
+ },
4039
+ /**
4040
+ * Returns the list of cron jobs configured for the specified account, including their schedule and command.
4041
+ * @summary List account cron jobs
4042
+ * @param {string} username
4043
+ * @param {*} [options] Override http request option.
4044
+ * @throws {RequiredError}
4045
+ */
4046
+ listAccountCronJobsV1(username, options) {
4047
+ return __awaiter(this, void 0, void 0, function* () {
4048
+ var _a, _b;
4049
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAccountCronJobsV1(username, options);
4050
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCronJobsApi.listAccountCronJobsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
4051
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4052
+ });
4053
+ },
4054
+ };
4055
+ };
4056
+ /**
4057
+ * HostingCronJobsApi - factory interface
4058
+ * @export
4059
+ */
4060
+ export const HostingCronJobsApiFactory = function (configuration, basePath, axios) {
4061
+ const localVarFp = HostingCronJobsApiFp(configuration);
4062
+ return {
4063
+ /**
4064
+ * Creates a cron job for the specified account from a schedule expression and a command. Returns the created cron job, including its uid, which is required to delete the cron job or fetch its output.
4065
+ * @summary Create account cron job
4066
+ * @param {string} username
4067
+ * @param {HostingV1CronJobsCreateCronJobRequest} hostingV1CronJobsCreateCronJobRequest
4068
+ * @param {*} [options] Override http request option.
4069
+ * @throws {RequiredError}
4070
+ */
4071
+ createAccountCronJobV1(username, hostingV1CronJobsCreateCronJobRequest, options) {
4072
+ return localVarFp.createAccountCronJobV1(username, hostingV1CronJobsCreateCronJobRequest, options).then((request) => request(axios, basePath));
4073
+ },
4074
+ /**
4075
+ * Permanently deletes the cron job identified by its uid. The uid is returned by the list cron jobs endpoint.
4076
+ * @summary Delete account cron job
4077
+ * @param {string} username
4078
+ * @param {string} uid Unique identifier of the cron job as returned by the list cron jobs endpoint.
4079
+ * @param {*} [options] Override http request option.
4080
+ * @throws {RequiredError}
4081
+ */
4082
+ deleteAccountCronJobV1(username, uid, options) {
4083
+ return localVarFp.deleteAccountCronJobV1(username, uid, options).then((request) => request(axios, basePath));
4084
+ },
4085
+ /**
4086
+ * Returns the output captured from the last execution of the cron job identified by its uid. The uid is returned by the list cron jobs endpoint.
4087
+ * @summary Get cron job output
4088
+ * @param {string} username
4089
+ * @param {string} uid Unique identifier of the cron job as returned by the list cron jobs endpoint.
4090
+ * @param {*} [options] Override http request option.
4091
+ * @throws {RequiredError}
4092
+ */
4093
+ getCronJobOutputV1(username, uid, options) {
4094
+ return localVarFp.getCronJobOutputV1(username, uid, options).then((request) => request(axios, basePath));
4095
+ },
4096
+ /**
4097
+ * Returns the list of cron jobs configured for the specified account, including their schedule and command.
4098
+ * @summary List account cron jobs
4099
+ * @param {string} username
4100
+ * @param {*} [options] Override http request option.
4101
+ * @throws {RequiredError}
4102
+ */
4103
+ listAccountCronJobsV1(username, options) {
4104
+ return localVarFp.listAccountCronJobsV1(username, options).then((request) => request(axios, basePath));
4105
+ },
4106
+ };
4107
+ };
4108
+ /**
4109
+ * HostingCronJobsApi - object-oriented interface
4110
+ * @export
4111
+ * @class HostingCronJobsApi
4112
+ * @extends {BaseAPI}
4113
+ */
4114
+ export class HostingCronJobsApi extends BaseAPI {
4115
+ /**
4116
+ * Creates a cron job for the specified account from a schedule expression and a command. Returns the created cron job, including its uid, which is required to delete the cron job or fetch its output.
4117
+ * @summary Create account cron job
4118
+ * @param {string} username
4119
+ * @param {HostingV1CronJobsCreateCronJobRequest} hostingV1CronJobsCreateCronJobRequest
4120
+ * @param {*} [options] Override http request option.
4121
+ * @throws {RequiredError}
4122
+ * @memberof HostingCronJobsApi
4123
+ */
4124
+ createAccountCronJobV1(username, hostingV1CronJobsCreateCronJobRequest, options) {
4125
+ return HostingCronJobsApiFp(this.configuration).createAccountCronJobV1(username, hostingV1CronJobsCreateCronJobRequest, options).then((request) => request(this.axios, this.basePath));
4126
+ }
4127
+ /**
4128
+ * Permanently deletes the cron job identified by its uid. The uid is returned by the list cron jobs endpoint.
4129
+ * @summary Delete account cron job
4130
+ * @param {string} username
4131
+ * @param {string} uid Unique identifier of the cron job as returned by the list cron jobs endpoint.
4132
+ * @param {*} [options] Override http request option.
4133
+ * @throws {RequiredError}
4134
+ * @memberof HostingCronJobsApi
4135
+ */
4136
+ deleteAccountCronJobV1(username, uid, options) {
4137
+ return HostingCronJobsApiFp(this.configuration).deleteAccountCronJobV1(username, uid, options).then((request) => request(this.axios, this.basePath));
4138
+ }
4139
+ /**
4140
+ * Returns the output captured from the last execution of the cron job identified by its uid. The uid is returned by the list cron jobs endpoint.
4141
+ * @summary Get cron job output
4142
+ * @param {string} username
4143
+ * @param {string} uid Unique identifier of the cron job as returned by the list cron jobs endpoint.
4144
+ * @param {*} [options] Override http request option.
4145
+ * @throws {RequiredError}
4146
+ * @memberof HostingCronJobsApi
4147
+ */
4148
+ getCronJobOutputV1(username, uid, options) {
4149
+ return HostingCronJobsApiFp(this.configuration).getCronJobOutputV1(username, uid, options).then((request) => request(this.axios, this.basePath));
4150
+ }
4151
+ /**
4152
+ * Returns the list of cron jobs configured for the specified account, including their schedule and command.
4153
+ * @summary List account cron jobs
4154
+ * @param {string} username
4155
+ * @param {*} [options] Override http request option.
4156
+ * @throws {RequiredError}
4157
+ * @memberof HostingCronJobsApi
4158
+ */
4159
+ listAccountCronJobsV1(username, options) {
4160
+ return HostingCronJobsApiFp(this.configuration).listAccountCronJobsV1(username, options).then((request) => request(this.axios, this.basePath));
4161
+ }
4162
+ }
3835
4163
  /**
3836
4164
  * HostingDatabasesApi - axios parameter creator
3837
4165
  * @export
@@ -3879,6 +4207,47 @@ export const HostingDatabasesApiAxiosParamCreator = function (configuration) {
3879
4207
  options: localVarRequestOptions,
3880
4208
  };
3881
4209
  }),
4210
+ /**
4211
+ * Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint.
4212
+ * @summary Create account database remote connection
4213
+ * @param {string} username
4214
+ * @param {string} name Full database name as returned by the list databases endpoint.
4215
+ * @param {HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest} hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest
4216
+ * @param {*} [options] Override http request option.
4217
+ * @throws {RequiredError}
4218
+ */
4219
+ createAccountDatabaseRemoteConnectionV1: (username_1, name_1, hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest_1, ...args_1) => __awaiter(this, [username_1, name_1, hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest_1, ...args_1], void 0, function* (username, name, hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest, options = {}) {
4220
+ // verify required parameter 'username' is not null or undefined
4221
+ assertParamExists('createAccountDatabaseRemoteConnectionV1', 'username', username);
4222
+ // verify required parameter 'name' is not null or undefined
4223
+ assertParamExists('createAccountDatabaseRemoteConnectionV1', 'name', name);
4224
+ // verify required parameter 'hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest' is not null or undefined
4225
+ assertParamExists('createAccountDatabaseRemoteConnectionV1', 'hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest', hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest);
4226
+ const localVarPath = `/api/hosting/v1/accounts/{username}/databases/{name}/remote-connections`
4227
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
4228
+ .replace(`{${"name"}}`, encodeURIComponent(String(name)));
4229
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4230
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4231
+ let baseOptions;
4232
+ if (configuration) {
4233
+ baseOptions = configuration.baseOptions;
4234
+ }
4235
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
4236
+ const localVarHeaderParameter = {};
4237
+ const localVarQueryParameter = {};
4238
+ // authentication apiToken required
4239
+ // http bearer authentication required
4240
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
4241
+ localVarHeaderParameter['Content-Type'] = 'application/json';
4242
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4243
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4244
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4245
+ localVarRequestOptions.data = serializeDataIfNeeded(hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest, localVarRequestOptions, configuration);
4246
+ return {
4247
+ url: toPathString(localVarUrlObj),
4248
+ options: localVarRequestOptions,
4249
+ };
4250
+ }),
3882
4251
  /**
3883
4252
  * Creates a database with a database user and password for the specified account. The database name and user are automatically prefixed with the account username when needed.
3884
4253
  * @summary Create account database
@@ -3916,6 +4285,48 @@ export const HostingDatabasesApiAxiosParamCreator = function (configuration) {
3916
4285
  options: localVarRequestOptions,
3917
4286
  };
3918
4287
  }),
4288
+ /**
4289
+ * Permanently removes a remote-access rule, revoking the given host\'s remote access to the database. Identify the rule with the required ip query parameter (the IPv4/IPv6 address, or \"%\", exactly as returned by the list remote connections endpoint). The database name must be the full name returned by the list databases endpoint.
4290
+ * @summary Delete account database remote connection
4291
+ * @param {string} username
4292
+ * @param {string} name Full database name as returned by the list databases endpoint.
4293
+ * @param {string} ip Remote host to revoke: the IPv4/IPv6 address, or \"%\", exactly as returned by the list remote connections endpoint.
4294
+ * @param {*} [options] Override http request option.
4295
+ * @throws {RequiredError}
4296
+ */
4297
+ deleteAccountDatabaseRemoteConnectionV1: (username_1, name_1, ip_1, ...args_1) => __awaiter(this, [username_1, name_1, ip_1, ...args_1], void 0, function* (username, name, ip, options = {}) {
4298
+ // verify required parameter 'username' is not null or undefined
4299
+ assertParamExists('deleteAccountDatabaseRemoteConnectionV1', 'username', username);
4300
+ // verify required parameter 'name' is not null or undefined
4301
+ assertParamExists('deleteAccountDatabaseRemoteConnectionV1', 'name', name);
4302
+ // verify required parameter 'ip' is not null or undefined
4303
+ assertParamExists('deleteAccountDatabaseRemoteConnectionV1', 'ip', ip);
4304
+ const localVarPath = `/api/hosting/v1/accounts/{username}/databases/{name}/remote-connections`
4305
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
4306
+ .replace(`{${"name"}}`, encodeURIComponent(String(name)));
4307
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4308
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4309
+ let baseOptions;
4310
+ if (configuration) {
4311
+ baseOptions = configuration.baseOptions;
4312
+ }
4313
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
4314
+ const localVarHeaderParameter = {};
4315
+ const localVarQueryParameter = {};
4316
+ // authentication apiToken required
4317
+ // http bearer authentication required
4318
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
4319
+ if (ip !== undefined) {
4320
+ localVarQueryParameter['ip'] = ip;
4321
+ }
4322
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4323
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4324
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4325
+ return {
4326
+ url: toPathString(localVarUrlObj),
4327
+ options: localVarRequestOptions,
4328
+ };
4329
+ }),
3919
4330
  /**
3920
4331
  * Permanently deletes a database and its remote connections. The database name must be the full name returned by the list databases endpoint.
3921
4332
  * @summary Delete account database
@@ -3988,6 +4399,42 @@ export const HostingDatabasesApiAxiosParamCreator = function (configuration) {
3988
4399
  options: localVarRequestOptions,
3989
4400
  };
3990
4401
  }),
4402
+ /**
4403
+ * Returns the remote-access rules for the specified account: the remote hosts (IPv4/IPv6 addresses, or \"%\" for any host) allowed to connect to the account databases. Use the domain filter to only return rules for databases assigned to a specific domain.
4404
+ * @summary List account database remote connections
4405
+ * @param {string} username
4406
+ * @param {string | null} [domain] Filter remote connections by the domain the database is assigned to. Rules for databases not assigned to any domain are always included.
4407
+ * @param {*} [options] Override http request option.
4408
+ * @throws {RequiredError}
4409
+ */
4410
+ listAccountDatabaseRemoteConnectionsV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
4411
+ // verify required parameter 'username' is not null or undefined
4412
+ assertParamExists('listAccountDatabaseRemoteConnectionsV1', 'username', username);
4413
+ const localVarPath = `/api/hosting/v1/accounts/{username}/databases/remote-connections`
4414
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)));
4415
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4416
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4417
+ let baseOptions;
4418
+ if (configuration) {
4419
+ baseOptions = configuration.baseOptions;
4420
+ }
4421
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4422
+ const localVarHeaderParameter = {};
4423
+ const localVarQueryParameter = {};
4424
+ // authentication apiToken required
4425
+ // http bearer authentication required
4426
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
4427
+ if (domain !== undefined) {
4428
+ localVarQueryParameter['domain'] = domain;
4429
+ }
4430
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4431
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4432
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4433
+ return {
4434
+ url: toPathString(localVarUrlObj),
4435
+ options: localVarRequestOptions,
4436
+ };
4437
+ }),
3991
4438
  /**
3992
4439
  * Returns a paginated list of databases for the specified account. Use the domain and is_assigned filters to find databases assigned to a specific domain.
3993
4440
  * @summary List account databases
@@ -4102,6 +4549,23 @@ export const HostingDatabasesApiFp = function (configuration) {
4102
4549
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4103
4550
  });
4104
4551
  },
4552
+ /**
4553
+ * Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint.
4554
+ * @summary Create account database remote connection
4555
+ * @param {string} username
4556
+ * @param {string} name Full database name as returned by the list databases endpoint.
4557
+ * @param {HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest} hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest
4558
+ * @param {*} [options] Override http request option.
4559
+ * @throws {RequiredError}
4560
+ */
4561
+ createAccountDatabaseRemoteConnectionV1(username, name, hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest, options) {
4562
+ return __awaiter(this, void 0, void 0, function* () {
4563
+ var _a, _b;
4564
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createAccountDatabaseRemoteConnectionV1(username, name, hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest, options);
4565
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingDatabasesApi.createAccountDatabaseRemoteConnectionV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
4566
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4567
+ });
4568
+ },
4105
4569
  /**
4106
4570
  * Creates a database with a database user and password for the specified account. The database name and user are automatically prefixed with the account username when needed.
4107
4571
  * @summary Create account database
@@ -4118,6 +4582,23 @@ export const HostingDatabasesApiFp = function (configuration) {
4118
4582
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4119
4583
  });
4120
4584
  },
4585
+ /**
4586
+ * Permanently removes a remote-access rule, revoking the given host\'s remote access to the database. Identify the rule with the required ip query parameter (the IPv4/IPv6 address, or \"%\", exactly as returned by the list remote connections endpoint). The database name must be the full name returned by the list databases endpoint.
4587
+ * @summary Delete account database remote connection
4588
+ * @param {string} username
4589
+ * @param {string} name Full database name as returned by the list databases endpoint.
4590
+ * @param {string} ip Remote host to revoke: the IPv4/IPv6 address, or \"%\", exactly as returned by the list remote connections endpoint.
4591
+ * @param {*} [options] Override http request option.
4592
+ * @throws {RequiredError}
4593
+ */
4594
+ deleteAccountDatabaseRemoteConnectionV1(username, name, ip, options) {
4595
+ return __awaiter(this, void 0, void 0, function* () {
4596
+ var _a, _b;
4597
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteAccountDatabaseRemoteConnectionV1(username, name, ip, options);
4598
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingDatabasesApi.deleteAccountDatabaseRemoteConnectionV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
4599
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4600
+ });
4601
+ },
4121
4602
  /**
4122
4603
  * Permanently deletes a database and its remote connections. The database name must be the full name returned by the list databases endpoint.
4123
4604
  * @summary Delete account database
@@ -4150,6 +4631,22 @@ export const HostingDatabasesApiFp = function (configuration) {
4150
4631
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4151
4632
  });
4152
4633
  },
4634
+ /**
4635
+ * Returns the remote-access rules for the specified account: the remote hosts (IPv4/IPv6 addresses, or \"%\" for any host) allowed to connect to the account databases. Use the domain filter to only return rules for databases assigned to a specific domain.
4636
+ * @summary List account database remote connections
4637
+ * @param {string} username
4638
+ * @param {string | null} [domain] Filter remote connections by the domain the database is assigned to. Rules for databases not assigned to any domain are always included.
4639
+ * @param {*} [options] Override http request option.
4640
+ * @throws {RequiredError}
4641
+ */
4642
+ listAccountDatabaseRemoteConnectionsV1(username, domain, options) {
4643
+ return __awaiter(this, void 0, void 0, function* () {
4644
+ var _a, _b;
4645
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAccountDatabaseRemoteConnectionsV1(username, domain, options);
4646
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingDatabasesApi.listAccountDatabaseRemoteConnectionsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
4647
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4648
+ });
4649
+ },
4153
4650
  /**
4154
4651
  * Returns a paginated list of databases for the specified account. Use the domain and is_assigned filters to find databases assigned to a specific domain.
4155
4652
  * @summary List account databases
@@ -4207,6 +4704,18 @@ export const HostingDatabasesApiFactory = function (configuration, basePath, axi
4207
4704
  changeDatabasePasswordV1(username, name, hostingV1DatabasesChangeDatabasePasswordRequest, options) {
4208
4705
  return localVarFp.changeDatabasePasswordV1(username, name, hostingV1DatabasesChangeDatabasePasswordRequest, options).then((request) => request(axios, basePath));
4209
4706
  },
4707
+ /**
4708
+ * Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint.
4709
+ * @summary Create account database remote connection
4710
+ * @param {string} username
4711
+ * @param {string} name Full database name as returned by the list databases endpoint.
4712
+ * @param {HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest} hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest
4713
+ * @param {*} [options] Override http request option.
4714
+ * @throws {RequiredError}
4715
+ */
4716
+ createAccountDatabaseRemoteConnectionV1(username, name, hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest, options) {
4717
+ return localVarFp.createAccountDatabaseRemoteConnectionV1(username, name, hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest, options).then((request) => request(axios, basePath));
4718
+ },
4210
4719
  /**
4211
4720
  * Creates a database with a database user and password for the specified account. The database name and user are automatically prefixed with the account username when needed.
4212
4721
  * @summary Create account database
@@ -4218,6 +4727,18 @@ export const HostingDatabasesApiFactory = function (configuration, basePath, axi
4218
4727
  createAccountDatabaseV1(username, hostingV1DatabasesCreateDatabaseRequest, options) {
4219
4728
  return localVarFp.createAccountDatabaseV1(username, hostingV1DatabasesCreateDatabaseRequest, options).then((request) => request(axios, basePath));
4220
4729
  },
4730
+ /**
4731
+ * Permanently removes a remote-access rule, revoking the given host\'s remote access to the database. Identify the rule with the required ip query parameter (the IPv4/IPv6 address, or \"%\", exactly as returned by the list remote connections endpoint). The database name must be the full name returned by the list databases endpoint.
4732
+ * @summary Delete account database remote connection
4733
+ * @param {string} username
4734
+ * @param {string} name Full database name as returned by the list databases endpoint.
4735
+ * @param {string} ip Remote host to revoke: the IPv4/IPv6 address, or \"%\", exactly as returned by the list remote connections endpoint.
4736
+ * @param {*} [options] Override http request option.
4737
+ * @throws {RequiredError}
4738
+ */
4739
+ deleteAccountDatabaseRemoteConnectionV1(username, name, ip, options) {
4740
+ return localVarFp.deleteAccountDatabaseRemoteConnectionV1(username, name, ip, options).then((request) => request(axios, basePath));
4741
+ },
4221
4742
  /**
4222
4743
  * Permanently deletes a database and its remote connections. The database name must be the full name returned by the list databases endpoint.
4223
4744
  * @summary Delete account database
@@ -4240,6 +4761,17 @@ export const HostingDatabasesApiFactory = function (configuration, basePath, axi
4240
4761
  getPhpMyAdminLinkV1(username, name, options) {
4241
4762
  return localVarFp.getPhpMyAdminLinkV1(username, name, options).then((request) => request(axios, basePath));
4242
4763
  },
4764
+ /**
4765
+ * Returns the remote-access rules for the specified account: the remote hosts (IPv4/IPv6 addresses, or \"%\" for any host) allowed to connect to the account databases. Use the domain filter to only return rules for databases assigned to a specific domain.
4766
+ * @summary List account database remote connections
4767
+ * @param {string} username
4768
+ * @param {string | null} [domain] Filter remote connections by the domain the database is assigned to. Rules for databases not assigned to any domain are always included.
4769
+ * @param {*} [options] Override http request option.
4770
+ * @throws {RequiredError}
4771
+ */
4772
+ listAccountDatabaseRemoteConnectionsV1(username, domain, options) {
4773
+ return localVarFp.listAccountDatabaseRemoteConnectionsV1(username, domain, options).then((request) => request(axios, basePath));
4774
+ },
4243
4775
  /**
4244
4776
  * Returns a paginated list of databases for the specified account. Use the domain and is_assigned filters to find databases assigned to a specific domain.
4245
4777
  * @summary List account databases
@@ -4288,6 +4820,19 @@ export class HostingDatabasesApi extends BaseAPI {
4288
4820
  changeDatabasePasswordV1(username, name, hostingV1DatabasesChangeDatabasePasswordRequest, options) {
4289
4821
  return HostingDatabasesApiFp(this.configuration).changeDatabasePasswordV1(username, name, hostingV1DatabasesChangeDatabasePasswordRequest, options).then((request) => request(this.axios, this.basePath));
4290
4822
  }
4823
+ /**
4824
+ * Allows a remote host to connect to the specified database. Provide an IPv4/IPv6 address, or \"%\" to allow any host. The database name must be the full name returned by the list databases endpoint.
4825
+ * @summary Create account database remote connection
4826
+ * @param {string} username
4827
+ * @param {string} name Full database name as returned by the list databases endpoint.
4828
+ * @param {HostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest} hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest
4829
+ * @param {*} [options] Override http request option.
4830
+ * @throws {RequiredError}
4831
+ * @memberof HostingDatabasesApi
4832
+ */
4833
+ createAccountDatabaseRemoteConnectionV1(username, name, hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest, options) {
4834
+ return HostingDatabasesApiFp(this.configuration).createAccountDatabaseRemoteConnectionV1(username, name, hostingV1DatabasesRemoteConnectionsCreateRemoteConnectionRequest, options).then((request) => request(this.axios, this.basePath));
4835
+ }
4291
4836
  /**
4292
4837
  * Creates a database with a database user and password for the specified account. The database name and user are automatically prefixed with the account username when needed.
4293
4838
  * @summary Create account database
@@ -4300,6 +4845,19 @@ export class HostingDatabasesApi extends BaseAPI {
4300
4845
  createAccountDatabaseV1(username, hostingV1DatabasesCreateDatabaseRequest, options) {
4301
4846
  return HostingDatabasesApiFp(this.configuration).createAccountDatabaseV1(username, hostingV1DatabasesCreateDatabaseRequest, options).then((request) => request(this.axios, this.basePath));
4302
4847
  }
4848
+ /**
4849
+ * Permanently removes a remote-access rule, revoking the given host\'s remote access to the database. Identify the rule with the required ip query parameter (the IPv4/IPv6 address, or \"%\", exactly as returned by the list remote connections endpoint). The database name must be the full name returned by the list databases endpoint.
4850
+ * @summary Delete account database remote connection
4851
+ * @param {string} username
4852
+ * @param {string} name Full database name as returned by the list databases endpoint.
4853
+ * @param {string} ip Remote host to revoke: the IPv4/IPv6 address, or \"%\", exactly as returned by the list remote connections endpoint.
4854
+ * @param {*} [options] Override http request option.
4855
+ * @throws {RequiredError}
4856
+ * @memberof HostingDatabasesApi
4857
+ */
4858
+ deleteAccountDatabaseRemoteConnectionV1(username, name, ip, options) {
4859
+ return HostingDatabasesApiFp(this.configuration).deleteAccountDatabaseRemoteConnectionV1(username, name, ip, options).then((request) => request(this.axios, this.basePath));
4860
+ }
4303
4861
  /**
4304
4862
  * Permanently deletes a database and its remote connections. The database name must be the full name returned by the list databases endpoint.
4305
4863
  * @summary Delete account database
@@ -4324,6 +4882,18 @@ export class HostingDatabasesApi extends BaseAPI {
4324
4882
  getPhpMyAdminLinkV1(username, name, options) {
4325
4883
  return HostingDatabasesApiFp(this.configuration).getPhpMyAdminLinkV1(username, name, options).then((request) => request(this.axios, this.basePath));
4326
4884
  }
4885
+ /**
4886
+ * Returns the remote-access rules for the specified account: the remote hosts (IPv4/IPv6 addresses, or \"%\" for any host) allowed to connect to the account databases. Use the domain filter to only return rules for databases assigned to a specific domain.
4887
+ * @summary List account database remote connections
4888
+ * @param {string} username
4889
+ * @param {string | null} [domain] Filter remote connections by the domain the database is assigned to. Rules for databases not assigned to any domain are always included.
4890
+ * @param {*} [options] Override http request option.
4891
+ * @throws {RequiredError}
4892
+ * @memberof HostingDatabasesApi
4893
+ */
4894
+ listAccountDatabaseRemoteConnectionsV1(username, domain, options) {
4895
+ return HostingDatabasesApiFp(this.configuration).listAccountDatabaseRemoteConnectionsV1(username, domain, options).then((request) => request(this.axios, this.basePath));
4896
+ }
4327
4897
  /**
4328
4898
  * Returns a paginated list of databases for the specified account. Use the domain and is_assigned filters to find databases assigned to a specific domain.
4329
4899
  * @summary List account databases