@hostinger/sdk 1.58.0 → 1.58.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/api.ts +431 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +264 -1
- package/dist/api.js +295 -1
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +264 -1
- package/dist/esm/api.js +295 -1
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/HostingGitApi.md +228 -0
- package/docs/HostingV1GitDeployWebsiteGitRepositoryRequest.md +24 -0
- package/docs/HostingV1GitGitDeployOutputResource.md +23 -0
- package/docs/HostingV1GitGitSshKeyResource.md +21 -0
- package/docs/HostingV1GitWebsiteGitRepositoryResource.md +27 -0
- package/docs/HostingV1GitWebsiteGitRepositoryWebhookResource.md +27 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.58.
|
|
7
|
+
* API Version: 1.58.1
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -15042,6 +15042,79 @@ const HostingGitApiAxiosParamCreator = function (configuration) {
|
|
|
15042
15042
|
options: localVarRequestOptions,
|
|
15043
15043
|
};
|
|
15044
15044
|
}),
|
|
15045
|
+
/**
|
|
15046
|
+
* Clones a Git repository into a directory of the website, or pulls it again. An empty or missing directory gets a clone of the branch. A directory that already holds this repository and branch is reset to its last commit and pulled: changes made on the server to files the repository tracks are discarded, files it does not track stay. A directory that holds other files, including another repository or another branch of this one, is rejected. `composer install` runs after the clone or pull when the repository has a `composer.json`. The call waits for the deployment and returns its log. `is_success` false means Git or composer failed and the log says why. A second call for the same directory is rejected while the first is still waiting for the server. If the request times out, the deployment may still finish on the server; calling again later with the same repository and branch pulls. Private repositories need an SSH URL and the account\'s Git SSH key from `Generate Git SSH key`, added to the repository as a deploy key.
|
|
15047
|
+
* @summary Deploy website Git repository
|
|
15048
|
+
* @param {string} username
|
|
15049
|
+
* @param {string} domain Domain name
|
|
15050
|
+
* @param {HostingV1GitDeployWebsiteGitRepositoryRequest} hostingV1GitDeployWebsiteGitRepositoryRequest
|
|
15051
|
+
* @param {*} [options] Override http request option.
|
|
15052
|
+
* @throws {RequiredError}
|
|
15053
|
+
*/
|
|
15054
|
+
deployWebsiteGitRepositoryV1: (username_1, domain_1, hostingV1GitDeployWebsiteGitRepositoryRequest_1, ...args_1) => __awaiter(this, [username_1, domain_1, hostingV1GitDeployWebsiteGitRepositoryRequest_1, ...args_1], void 0, function* (username, domain, hostingV1GitDeployWebsiteGitRepositoryRequest, options = {}) {
|
|
15055
|
+
// verify required parameter 'username' is not null or undefined
|
|
15056
|
+
(0, common_1.assertParamExists)('deployWebsiteGitRepositoryV1', 'username', username);
|
|
15057
|
+
// verify required parameter 'domain' is not null or undefined
|
|
15058
|
+
(0, common_1.assertParamExists)('deployWebsiteGitRepositoryV1', 'domain', domain);
|
|
15059
|
+
// verify required parameter 'hostingV1GitDeployWebsiteGitRepositoryRequest' is not null or undefined
|
|
15060
|
+
(0, common_1.assertParamExists)('deployWebsiteGitRepositoryV1', 'hostingV1GitDeployWebsiteGitRepositoryRequest', hostingV1GitDeployWebsiteGitRepositoryRequest);
|
|
15061
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/git/repositories/deploy`
|
|
15062
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
15063
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
15064
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
15065
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
15066
|
+
let baseOptions;
|
|
15067
|
+
if (configuration) {
|
|
15068
|
+
baseOptions = configuration.baseOptions;
|
|
15069
|
+
}
|
|
15070
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
15071
|
+
const localVarHeaderParameter = {};
|
|
15072
|
+
const localVarQueryParameter = {};
|
|
15073
|
+
// authentication apiToken required
|
|
15074
|
+
// http bearer authentication required
|
|
15075
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
15076
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
15077
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
15078
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
15079
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
15080
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(hostingV1GitDeployWebsiteGitRepositoryRequest, localVarRequestOptions, configuration);
|
|
15081
|
+
return {
|
|
15082
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
15083
|
+
options: localVarRequestOptions,
|
|
15084
|
+
};
|
|
15085
|
+
}),
|
|
15086
|
+
/**
|
|
15087
|
+
* Creates the SSH key pair of the hosting account and returns the public key. When the account already has a key, returns that key unchanged. One key serves every website of the account; add the public key to a private repository as a deploy key before deploying it.
|
|
15088
|
+
* @summary Generate Git SSH key
|
|
15089
|
+
* @param {string} username
|
|
15090
|
+
* @param {*} [options] Override http request option.
|
|
15091
|
+
* @throws {RequiredError}
|
|
15092
|
+
*/
|
|
15093
|
+
generateGitSSHKeyV1: (username_1, ...args_1) => __awaiter(this, [username_1, ...args_1], void 0, function* (username, options = {}) {
|
|
15094
|
+
// verify required parameter 'username' is not null or undefined
|
|
15095
|
+
(0, common_1.assertParamExists)('generateGitSSHKeyV1', 'username', username);
|
|
15096
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/git/ssh-key`
|
|
15097
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)));
|
|
15098
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
15099
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
15100
|
+
let baseOptions;
|
|
15101
|
+
if (configuration) {
|
|
15102
|
+
baseOptions = configuration.baseOptions;
|
|
15103
|
+
}
|
|
15104
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
15105
|
+
const localVarHeaderParameter = {};
|
|
15106
|
+
const localVarQueryParameter = {};
|
|
15107
|
+
// authentication apiToken required
|
|
15108
|
+
// http bearer authentication required
|
|
15109
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
15110
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
15111
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
15112
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
15113
|
+
return {
|
|
15114
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
15115
|
+
options: localVarRequestOptions,
|
|
15116
|
+
};
|
|
15117
|
+
}),
|
|
15045
15118
|
/**
|
|
15046
15119
|
* 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`.
|
|
15047
15120
|
* @summary Get Git auto-deployment settings
|
|
@@ -15078,6 +15151,38 @@ const HostingGitApiAxiosParamCreator = function (configuration) {
|
|
|
15078
15151
|
options: localVarRequestOptions,
|
|
15079
15152
|
};
|
|
15080
15153
|
}),
|
|
15154
|
+
/**
|
|
15155
|
+
* Returns the public SSH key of the hosting account. `Deploy website Git repository` uses this key to clone and pull over SSH, so a private repository works once the key is added to it as a deploy key on the Git host. `public_key` is null when the account has no key yet.
|
|
15156
|
+
* @summary Get Git SSH public key
|
|
15157
|
+
* @param {string} username
|
|
15158
|
+
* @param {*} [options] Override http request option.
|
|
15159
|
+
* @throws {RequiredError}
|
|
15160
|
+
*/
|
|
15161
|
+
getGitSSHPublicKeyV1: (username_1, ...args_1) => __awaiter(this, [username_1, ...args_1], void 0, function* (username, options = {}) {
|
|
15162
|
+
// verify required parameter 'username' is not null or undefined
|
|
15163
|
+
(0, common_1.assertParamExists)('getGitSSHPublicKeyV1', 'username', username);
|
|
15164
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/git/ssh-key`
|
|
15165
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)));
|
|
15166
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
15167
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
15168
|
+
let baseOptions;
|
|
15169
|
+
if (configuration) {
|
|
15170
|
+
baseOptions = configuration.baseOptions;
|
|
15171
|
+
}
|
|
15172
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
15173
|
+
const localVarHeaderParameter = {};
|
|
15174
|
+
const localVarQueryParameter = {};
|
|
15175
|
+
// authentication apiToken required
|
|
15176
|
+
// http bearer authentication required
|
|
15177
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
15178
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
15179
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
15180
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
15181
|
+
return {
|
|
15182
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
15183
|
+
options: localVarRequestOptions,
|
|
15184
|
+
};
|
|
15185
|
+
}),
|
|
15081
15186
|
/**
|
|
15082
15187
|
* 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).
|
|
15083
15188
|
* @summary List Git installation repositories
|
|
@@ -15146,6 +15251,42 @@ const HostingGitApiAxiosParamCreator = function (configuration) {
|
|
|
15146
15251
|
options: localVarRequestOptions,
|
|
15147
15252
|
};
|
|
15148
15253
|
}),
|
|
15254
|
+
/**
|
|
15255
|
+
* Lists the Git repositories linked to directories of the website, with `Deploy website Git repository` or in the Git section of hPanel: clone URL, branch and directory of each one. A repository whose clone failed stays listed; deploying it again retries the clone. GitHub and GitLab auto-deployments are not listed here; see `Get Git auto-deployment settings`.
|
|
15256
|
+
* @summary List website Git repositories
|
|
15257
|
+
* @param {string} username
|
|
15258
|
+
* @param {string} domain Domain name
|
|
15259
|
+
* @param {*} [options] Override http request option.
|
|
15260
|
+
* @throws {RequiredError}
|
|
15261
|
+
*/
|
|
15262
|
+
listWebsiteGitRepositoriesV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
15263
|
+
// verify required parameter 'username' is not null or undefined
|
|
15264
|
+
(0, common_1.assertParamExists)('listWebsiteGitRepositoriesV1', 'username', username);
|
|
15265
|
+
// verify required parameter 'domain' is not null or undefined
|
|
15266
|
+
(0, common_1.assertParamExists)('listWebsiteGitRepositoriesV1', 'domain', domain);
|
|
15267
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/git/repositories`
|
|
15268
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
15269
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
15270
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
15271
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
15272
|
+
let baseOptions;
|
|
15273
|
+
if (configuration) {
|
|
15274
|
+
baseOptions = configuration.baseOptions;
|
|
15275
|
+
}
|
|
15276
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
15277
|
+
const localVarHeaderParameter = {};
|
|
15278
|
+
const localVarQueryParameter = {};
|
|
15279
|
+
// authentication apiToken required
|
|
15280
|
+
// http bearer authentication required
|
|
15281
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
15282
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
15283
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
15284
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
15285
|
+
return {
|
|
15286
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
15287
|
+
options: localVarRequestOptions,
|
|
15288
|
+
};
|
|
15289
|
+
}),
|
|
15149
15290
|
/**
|
|
15150
15291
|
* 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.
|
|
15151
15292
|
* @summary Update Git auto-deployment settings
|
|
@@ -15213,6 +15354,38 @@ const HostingGitApiFp = function (configuration) {
|
|
|
15213
15354
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
15214
15355
|
});
|
|
15215
15356
|
},
|
|
15357
|
+
/**
|
|
15358
|
+
* Clones a Git repository into a directory of the website, or pulls it again. An empty or missing directory gets a clone of the branch. A directory that already holds this repository and branch is reset to its last commit and pulled: changes made on the server to files the repository tracks are discarded, files it does not track stay. A directory that holds other files, including another repository or another branch of this one, is rejected. `composer install` runs after the clone or pull when the repository has a `composer.json`. The call waits for the deployment and returns its log. `is_success` false means Git or composer failed and the log says why. A second call for the same directory is rejected while the first is still waiting for the server. If the request times out, the deployment may still finish on the server; calling again later with the same repository and branch pulls. Private repositories need an SSH URL and the account\'s Git SSH key from `Generate Git SSH key`, added to the repository as a deploy key.
|
|
15359
|
+
* @summary Deploy website Git repository
|
|
15360
|
+
* @param {string} username
|
|
15361
|
+
* @param {string} domain Domain name
|
|
15362
|
+
* @param {HostingV1GitDeployWebsiteGitRepositoryRequest} hostingV1GitDeployWebsiteGitRepositoryRequest
|
|
15363
|
+
* @param {*} [options] Override http request option.
|
|
15364
|
+
* @throws {RequiredError}
|
|
15365
|
+
*/
|
|
15366
|
+
deployWebsiteGitRepositoryV1(username, domain, hostingV1GitDeployWebsiteGitRepositoryRequest, options) {
|
|
15367
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15368
|
+
var _a, _b;
|
|
15369
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deployWebsiteGitRepositoryV1(username, domain, hostingV1GitDeployWebsiteGitRepositoryRequest, options);
|
|
15370
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['HostingGitApi.deployWebsiteGitRepositoryV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
15371
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
15372
|
+
});
|
|
15373
|
+
},
|
|
15374
|
+
/**
|
|
15375
|
+
* Creates the SSH key pair of the hosting account and returns the public key. When the account already has a key, returns that key unchanged. One key serves every website of the account; add the public key to a private repository as a deploy key before deploying it.
|
|
15376
|
+
* @summary Generate Git SSH key
|
|
15377
|
+
* @param {string} username
|
|
15378
|
+
* @param {*} [options] Override http request option.
|
|
15379
|
+
* @throws {RequiredError}
|
|
15380
|
+
*/
|
|
15381
|
+
generateGitSSHKeyV1(username, options) {
|
|
15382
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15383
|
+
var _a, _b;
|
|
15384
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.generateGitSSHKeyV1(username, options);
|
|
15385
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['HostingGitApi.generateGitSSHKeyV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
15386
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
15387
|
+
});
|
|
15388
|
+
},
|
|
15216
15389
|
/**
|
|
15217
15390
|
* 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`.
|
|
15218
15391
|
* @summary Get Git auto-deployment settings
|
|
@@ -15229,6 +15402,21 @@ const HostingGitApiFp = function (configuration) {
|
|
|
15229
15402
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
15230
15403
|
});
|
|
15231
15404
|
},
|
|
15405
|
+
/**
|
|
15406
|
+
* Returns the public SSH key of the hosting account. `Deploy website Git repository` uses this key to clone and pull over SSH, so a private repository works once the key is added to it as a deploy key on the Git host. `public_key` is null when the account has no key yet.
|
|
15407
|
+
* @summary Get Git SSH public key
|
|
15408
|
+
* @param {string} username
|
|
15409
|
+
* @param {*} [options] Override http request option.
|
|
15410
|
+
* @throws {RequiredError}
|
|
15411
|
+
*/
|
|
15412
|
+
getGitSSHPublicKeyV1(username, options) {
|
|
15413
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15414
|
+
var _a, _b;
|
|
15415
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getGitSSHPublicKeyV1(username, options);
|
|
15416
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['HostingGitApi.getGitSSHPublicKeyV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
15417
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
15418
|
+
});
|
|
15419
|
+
},
|
|
15232
15420
|
/**
|
|
15233
15421
|
* 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).
|
|
15234
15422
|
* @summary List Git installation repositories
|
|
@@ -15260,6 +15448,22 @@ const HostingGitApiFp = function (configuration) {
|
|
|
15260
15448
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
15261
15449
|
});
|
|
15262
15450
|
},
|
|
15451
|
+
/**
|
|
15452
|
+
* Lists the Git repositories linked to directories of the website, with `Deploy website Git repository` or in the Git section of hPanel: clone URL, branch and directory of each one. A repository whose clone failed stays listed; deploying it again retries the clone. GitHub and GitLab auto-deployments are not listed here; see `Get Git auto-deployment settings`.
|
|
15453
|
+
* @summary List website Git repositories
|
|
15454
|
+
* @param {string} username
|
|
15455
|
+
* @param {string} domain Domain name
|
|
15456
|
+
* @param {*} [options] Override http request option.
|
|
15457
|
+
* @throws {RequiredError}
|
|
15458
|
+
*/
|
|
15459
|
+
listWebsiteGitRepositoriesV1(username, domain, options) {
|
|
15460
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15461
|
+
var _a, _b;
|
|
15462
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listWebsiteGitRepositoriesV1(username, domain, options);
|
|
15463
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['HostingGitApi.listWebsiteGitRepositoriesV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
15464
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
15465
|
+
});
|
|
15466
|
+
},
|
|
15263
15467
|
/**
|
|
15264
15468
|
* 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.
|
|
15265
15469
|
* @summary Update Git auto-deployment settings
|
|
@@ -15298,6 +15502,28 @@ const HostingGitApiFactory = function (configuration, basePath, axios) {
|
|
|
15298
15502
|
deleteGitAutoDeploymentSettingsV1(username, domain, options) {
|
|
15299
15503
|
return localVarFp.deleteGitAutoDeploymentSettingsV1(username, domain, options).then((request) => request(axios, basePath));
|
|
15300
15504
|
},
|
|
15505
|
+
/**
|
|
15506
|
+
* Clones a Git repository into a directory of the website, or pulls it again. An empty or missing directory gets a clone of the branch. A directory that already holds this repository and branch is reset to its last commit and pulled: changes made on the server to files the repository tracks are discarded, files it does not track stay. A directory that holds other files, including another repository or another branch of this one, is rejected. `composer install` runs after the clone or pull when the repository has a `composer.json`. The call waits for the deployment and returns its log. `is_success` false means Git or composer failed and the log says why. A second call for the same directory is rejected while the first is still waiting for the server. If the request times out, the deployment may still finish on the server; calling again later with the same repository and branch pulls. Private repositories need an SSH URL and the account\'s Git SSH key from `Generate Git SSH key`, added to the repository as a deploy key.
|
|
15507
|
+
* @summary Deploy website Git repository
|
|
15508
|
+
* @param {string} username
|
|
15509
|
+
* @param {string} domain Domain name
|
|
15510
|
+
* @param {HostingV1GitDeployWebsiteGitRepositoryRequest} hostingV1GitDeployWebsiteGitRepositoryRequest
|
|
15511
|
+
* @param {*} [options] Override http request option.
|
|
15512
|
+
* @throws {RequiredError}
|
|
15513
|
+
*/
|
|
15514
|
+
deployWebsiteGitRepositoryV1(username, domain, hostingV1GitDeployWebsiteGitRepositoryRequest, options) {
|
|
15515
|
+
return localVarFp.deployWebsiteGitRepositoryV1(username, domain, hostingV1GitDeployWebsiteGitRepositoryRequest, options).then((request) => request(axios, basePath));
|
|
15516
|
+
},
|
|
15517
|
+
/**
|
|
15518
|
+
* Creates the SSH key pair of the hosting account and returns the public key. When the account already has a key, returns that key unchanged. One key serves every website of the account; add the public key to a private repository as a deploy key before deploying it.
|
|
15519
|
+
* @summary Generate Git SSH key
|
|
15520
|
+
* @param {string} username
|
|
15521
|
+
* @param {*} [options] Override http request option.
|
|
15522
|
+
* @throws {RequiredError}
|
|
15523
|
+
*/
|
|
15524
|
+
generateGitSSHKeyV1(username, options) {
|
|
15525
|
+
return localVarFp.generateGitSSHKeyV1(username, options).then((request) => request(axios, basePath));
|
|
15526
|
+
},
|
|
15301
15527
|
/**
|
|
15302
15528
|
* 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`.
|
|
15303
15529
|
* @summary Get Git auto-deployment settings
|
|
@@ -15309,6 +15535,16 @@ const HostingGitApiFactory = function (configuration, basePath, axios) {
|
|
|
15309
15535
|
getGitAutoDeploymentSettingsV1(username, domain, options) {
|
|
15310
15536
|
return localVarFp.getGitAutoDeploymentSettingsV1(username, domain, options).then((request) => request(axios, basePath));
|
|
15311
15537
|
},
|
|
15538
|
+
/**
|
|
15539
|
+
* Returns the public SSH key of the hosting account. `Deploy website Git repository` uses this key to clone and pull over SSH, so a private repository works once the key is added to it as a deploy key on the Git host. `public_key` is null when the account has no key yet.
|
|
15540
|
+
* @summary Get Git SSH public key
|
|
15541
|
+
* @param {string} username
|
|
15542
|
+
* @param {*} [options] Override http request option.
|
|
15543
|
+
* @throws {RequiredError}
|
|
15544
|
+
*/
|
|
15545
|
+
getGitSSHPublicKeyV1(username, options) {
|
|
15546
|
+
return localVarFp.getGitSSHPublicKeyV1(username, options).then((request) => request(axios, basePath));
|
|
15547
|
+
},
|
|
15312
15548
|
/**
|
|
15313
15549
|
* 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).
|
|
15314
15550
|
* @summary List Git installation repositories
|
|
@@ -15330,6 +15566,17 @@ const HostingGitApiFactory = function (configuration, basePath, axios) {
|
|
|
15330
15566
|
listGitInstallationsV1(provider, status, options) {
|
|
15331
15567
|
return localVarFp.listGitInstallationsV1(provider, status, options).then((request) => request(axios, basePath));
|
|
15332
15568
|
},
|
|
15569
|
+
/**
|
|
15570
|
+
* Lists the Git repositories linked to directories of the website, with `Deploy website Git repository` or in the Git section of hPanel: clone URL, branch and directory of each one. A repository whose clone failed stays listed; deploying it again retries the clone. GitHub and GitLab auto-deployments are not listed here; see `Get Git auto-deployment settings`.
|
|
15571
|
+
* @summary List website Git repositories
|
|
15572
|
+
* @param {string} username
|
|
15573
|
+
* @param {string} domain Domain name
|
|
15574
|
+
* @param {*} [options] Override http request option.
|
|
15575
|
+
* @throws {RequiredError}
|
|
15576
|
+
*/
|
|
15577
|
+
listWebsiteGitRepositoriesV1(username, domain, options) {
|
|
15578
|
+
return localVarFp.listWebsiteGitRepositoriesV1(username, domain, options).then((request) => request(axios, basePath));
|
|
15579
|
+
},
|
|
15333
15580
|
/**
|
|
15334
15581
|
* 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.
|
|
15335
15582
|
* @summary Update Git auto-deployment settings
|
|
@@ -15364,6 +15611,30 @@ class HostingGitApi extends base_1.BaseAPI {
|
|
|
15364
15611
|
deleteGitAutoDeploymentSettingsV1(username, domain, options) {
|
|
15365
15612
|
return (0, exports.HostingGitApiFp)(this.configuration).deleteGitAutoDeploymentSettingsV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
15366
15613
|
}
|
|
15614
|
+
/**
|
|
15615
|
+
* Clones a Git repository into a directory of the website, or pulls it again. An empty or missing directory gets a clone of the branch. A directory that already holds this repository and branch is reset to its last commit and pulled: changes made on the server to files the repository tracks are discarded, files it does not track stay. A directory that holds other files, including another repository or another branch of this one, is rejected. `composer install` runs after the clone or pull when the repository has a `composer.json`. The call waits for the deployment and returns its log. `is_success` false means Git or composer failed and the log says why. A second call for the same directory is rejected while the first is still waiting for the server. If the request times out, the deployment may still finish on the server; calling again later with the same repository and branch pulls. Private repositories need an SSH URL and the account\'s Git SSH key from `Generate Git SSH key`, added to the repository as a deploy key.
|
|
15616
|
+
* @summary Deploy website Git repository
|
|
15617
|
+
* @param {string} username
|
|
15618
|
+
* @param {string} domain Domain name
|
|
15619
|
+
* @param {HostingV1GitDeployWebsiteGitRepositoryRequest} hostingV1GitDeployWebsiteGitRepositoryRequest
|
|
15620
|
+
* @param {*} [options] Override http request option.
|
|
15621
|
+
* @throws {RequiredError}
|
|
15622
|
+
* @memberof HostingGitApi
|
|
15623
|
+
*/
|
|
15624
|
+
deployWebsiteGitRepositoryV1(username, domain, hostingV1GitDeployWebsiteGitRepositoryRequest, options) {
|
|
15625
|
+
return (0, exports.HostingGitApiFp)(this.configuration).deployWebsiteGitRepositoryV1(username, domain, hostingV1GitDeployWebsiteGitRepositoryRequest, options).then((request) => request(this.axios, this.basePath));
|
|
15626
|
+
}
|
|
15627
|
+
/**
|
|
15628
|
+
* Creates the SSH key pair of the hosting account and returns the public key. When the account already has a key, returns that key unchanged. One key serves every website of the account; add the public key to a private repository as a deploy key before deploying it.
|
|
15629
|
+
* @summary Generate Git SSH key
|
|
15630
|
+
* @param {string} username
|
|
15631
|
+
* @param {*} [options] Override http request option.
|
|
15632
|
+
* @throws {RequiredError}
|
|
15633
|
+
* @memberof HostingGitApi
|
|
15634
|
+
*/
|
|
15635
|
+
generateGitSSHKeyV1(username, options) {
|
|
15636
|
+
return (0, exports.HostingGitApiFp)(this.configuration).generateGitSSHKeyV1(username, options).then((request) => request(this.axios, this.basePath));
|
|
15637
|
+
}
|
|
15367
15638
|
/**
|
|
15368
15639
|
* 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`.
|
|
15369
15640
|
* @summary Get Git auto-deployment settings
|
|
@@ -15376,6 +15647,17 @@ class HostingGitApi extends base_1.BaseAPI {
|
|
|
15376
15647
|
getGitAutoDeploymentSettingsV1(username, domain, options) {
|
|
15377
15648
|
return (0, exports.HostingGitApiFp)(this.configuration).getGitAutoDeploymentSettingsV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
15378
15649
|
}
|
|
15650
|
+
/**
|
|
15651
|
+
* Returns the public SSH key of the hosting account. `Deploy website Git repository` uses this key to clone and pull over SSH, so a private repository works once the key is added to it as a deploy key on the Git host. `public_key` is null when the account has no key yet.
|
|
15652
|
+
* @summary Get Git SSH public key
|
|
15653
|
+
* @param {string} username
|
|
15654
|
+
* @param {*} [options] Override http request option.
|
|
15655
|
+
* @throws {RequiredError}
|
|
15656
|
+
* @memberof HostingGitApi
|
|
15657
|
+
*/
|
|
15658
|
+
getGitSSHPublicKeyV1(username, options) {
|
|
15659
|
+
return (0, exports.HostingGitApiFp)(this.configuration).getGitSSHPublicKeyV1(username, options).then((request) => request(this.axios, this.basePath));
|
|
15660
|
+
}
|
|
15379
15661
|
/**
|
|
15380
15662
|
* 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).
|
|
15381
15663
|
* @summary List Git installation repositories
|
|
@@ -15399,6 +15681,18 @@ class HostingGitApi extends base_1.BaseAPI {
|
|
|
15399
15681
|
listGitInstallationsV1(provider, status, options) {
|
|
15400
15682
|
return (0, exports.HostingGitApiFp)(this.configuration).listGitInstallationsV1(provider, status, options).then((request) => request(this.axios, this.basePath));
|
|
15401
15683
|
}
|
|
15684
|
+
/**
|
|
15685
|
+
* Lists the Git repositories linked to directories of the website, with `Deploy website Git repository` or in the Git section of hPanel: clone URL, branch and directory of each one. A repository whose clone failed stays listed; deploying it again retries the clone. GitHub and GitLab auto-deployments are not listed here; see `Get Git auto-deployment settings`.
|
|
15686
|
+
* @summary List website Git repositories
|
|
15687
|
+
* @param {string} username
|
|
15688
|
+
* @param {string} domain Domain name
|
|
15689
|
+
* @param {*} [options] Override http request option.
|
|
15690
|
+
* @throws {RequiredError}
|
|
15691
|
+
* @memberof HostingGitApi
|
|
15692
|
+
*/
|
|
15693
|
+
listWebsiteGitRepositoriesV1(username, domain, options) {
|
|
15694
|
+
return (0, exports.HostingGitApiFp)(this.configuration).listWebsiteGitRepositoriesV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
15695
|
+
}
|
|
15402
15696
|
/**
|
|
15403
15697
|
* 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.
|
|
15404
15698
|
* @summary Update Git auto-deployment settings
|
package/dist/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.58.
|
|
4
|
+
* API Version: 1.58.1
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/base.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.58.
|
|
7
|
+
* API Version: 1.58.1
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.58.
|
|
4
|
+
* API Version: 1.58.1
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/common.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.58.
|
|
7
|
+
* API Version: 1.58.1
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/configuration.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.58.
|
|
4
|
+
* API Version: 1.58.1
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/configuration.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.58.
|
|
7
|
+
* API Version: 1.58.1
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -16,7 +16,7 @@ class Configuration {
|
|
|
16
16
|
var _a;
|
|
17
17
|
this.accessToken = param.accessToken;
|
|
18
18
|
this.basePath = param.basePath;
|
|
19
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.58.
|
|
19
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.58.1" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
20
20
|
this.formDataCtor = param.formDataCtor;
|
|
21
21
|
}
|
|
22
22
|
/**
|