hostinger-api-sdk 1.30.0 → 1.30.2
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 +714 -38
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +445 -30
- package/dist/api.js +500 -33
- 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 +445 -30
- package/dist/esm/api.js +487 -24
- 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/DomainsAvailabilityApi.md +113 -1
- package/docs/DomainsV1AvailabilityAlternativesFromDescriptionRequest.md +22 -0
- package/docs/DomainsV1AvailabilityAlternativesFromDomainRequest.md +22 -0
- package/docs/EcommerceProductsApi.md +62 -0
- package/docs/EcommerceV1ProductProductImageUploadResource.md +22 -0
- package/docs/EcommerceV1ProductUploadProductImageRequest.md +22 -0
- package/docs/HostingFilesApi.md +148 -0
- package/docs/{HostingV1WebsitesDeleteWebsiteRequest.md → HostingListWebsiteFilesAndDirectoriesV1FileTypesParameter.md} +3 -5
- package/docs/HostingV1FilesFileContentResource.md +28 -0
- package/docs/HostingV1FilesFilesResource.md +28 -0
- package/docs/HostingV1FilesFilesResourceItemsInner.md +26 -0
- package/docs/HostingWebsitesApi.md +5 -9
- package/index.ts +1 -1
- 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.
|
|
6
|
+
* API Version: 1.32.2
|
|
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
|
|
@@ -222,6 +222,12 @@ export const HostingV1DomainsParkedDomainResourceTypeEnum = {
|
|
|
222
222
|
Domain: 'domain',
|
|
223
223
|
Ip: 'ip'
|
|
224
224
|
};
|
|
225
|
+
export const HostingV1FilesFilesResourceItemsInnerTypeEnum = {
|
|
226
|
+
File: 'file',
|
|
227
|
+
Directory: 'directory',
|
|
228
|
+
Symlink: 'symlink',
|
|
229
|
+
Other: 'other'
|
|
230
|
+
};
|
|
225
231
|
export const HostingV1NodeJsBuildOptionsResourceAppTypeEnum = {
|
|
226
232
|
CreateReactApp: 'create-react-app',
|
|
227
233
|
Vite: 'vite',
|
|
@@ -4429,7 +4435,7 @@ export class DomainAccessVerifierVerificationsApi extends BaseAPI {
|
|
|
4429
4435
|
export const DomainsAvailabilityApiAxiosParamCreator = function (configuration) {
|
|
4430
4436
|
return {
|
|
4431
4437
|
/**
|
|
4432
|
-
* Check availability of domain names across multiple TLDs. Multiple TLDs can be checked at once. If you want alternative domains with response, provide only one TLD and set `with_alternatives` to `true`. TLDs should be provided without leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of
|
|
4438
|
+
* Check availability of domain names across multiple TLDs. Multiple TLDs can be checked at once. If you want alternative domains with response, provide only one TLD and set `with_alternatives` to `true`. TLDs should be provided without leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of 90 requests per minute. Use this endpoint to verify domain availability before purchase.
|
|
4433
4439
|
* @summary Check domain availability
|
|
4434
4440
|
* @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
|
|
4435
4441
|
* @param {*} [options] Override http request option.
|
|
@@ -4461,6 +4467,72 @@ export const DomainsAvailabilityApiAxiosParamCreator = function (configuration)
|
|
|
4461
4467
|
options: localVarRequestOptions,
|
|
4462
4468
|
};
|
|
4463
4469
|
}),
|
|
4470
|
+
/**
|
|
4471
|
+
* Suggest available domain names based on a free-text description of your project. Suggestions are generated by an AI model, so they differ between calls. Endpoint has rate limit of 90 requests per minute. Use this endpoint to find a domain name when you only know what the website is about.
|
|
4472
|
+
* @summary Suggest domain names from a description
|
|
4473
|
+
* @param {DomainsV1AvailabilityAlternativesFromDescriptionRequest} domainsV1AvailabilityAlternativesFromDescriptionRequest
|
|
4474
|
+
* @param {*} [options] Override http request option.
|
|
4475
|
+
* @throws {RequiredError}
|
|
4476
|
+
*/
|
|
4477
|
+
suggestDomainNamesFromADescriptionV1: (domainsV1AvailabilityAlternativesFromDescriptionRequest_1, ...args_1) => __awaiter(this, [domainsV1AvailabilityAlternativesFromDescriptionRequest_1, ...args_1], void 0, function* (domainsV1AvailabilityAlternativesFromDescriptionRequest, options = {}) {
|
|
4478
|
+
// verify required parameter 'domainsV1AvailabilityAlternativesFromDescriptionRequest' is not null or undefined
|
|
4479
|
+
assertParamExists('suggestDomainNamesFromADescriptionV1', 'domainsV1AvailabilityAlternativesFromDescriptionRequest', domainsV1AvailabilityAlternativesFromDescriptionRequest);
|
|
4480
|
+
const localVarPath = `/api/domains/v1/availability/alternatives-from-description`;
|
|
4481
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4482
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4483
|
+
let baseOptions;
|
|
4484
|
+
if (configuration) {
|
|
4485
|
+
baseOptions = configuration.baseOptions;
|
|
4486
|
+
}
|
|
4487
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
4488
|
+
const localVarHeaderParameter = {};
|
|
4489
|
+
const localVarQueryParameter = {};
|
|
4490
|
+
// authentication apiToken required
|
|
4491
|
+
// http bearer authentication required
|
|
4492
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4493
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4494
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4495
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4496
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4497
|
+
localVarRequestOptions.data = serializeDataIfNeeded(domainsV1AvailabilityAlternativesFromDescriptionRequest, localVarRequestOptions, configuration);
|
|
4498
|
+
return {
|
|
4499
|
+
url: toPathString(localVarUrlObj),
|
|
4500
|
+
options: localVarRequestOptions,
|
|
4501
|
+
};
|
|
4502
|
+
}),
|
|
4503
|
+
/**
|
|
4504
|
+
* Suggest available domain names based on a domain name you already have in mind. Suggestions are generated by an AI model, so they differ between calls. Endpoint has rate limit of 90 requests per minute. Use this endpoint when the domain you wanted is taken and you need close alternatives.
|
|
4505
|
+
* @summary Suggest domain names from a domain
|
|
4506
|
+
* @param {DomainsV1AvailabilityAlternativesFromDomainRequest} domainsV1AvailabilityAlternativesFromDomainRequest
|
|
4507
|
+
* @param {*} [options] Override http request option.
|
|
4508
|
+
* @throws {RequiredError}
|
|
4509
|
+
*/
|
|
4510
|
+
suggestDomainNamesFromADomainV1: (domainsV1AvailabilityAlternativesFromDomainRequest_1, ...args_1) => __awaiter(this, [domainsV1AvailabilityAlternativesFromDomainRequest_1, ...args_1], void 0, function* (domainsV1AvailabilityAlternativesFromDomainRequest, options = {}) {
|
|
4511
|
+
// verify required parameter 'domainsV1AvailabilityAlternativesFromDomainRequest' is not null or undefined
|
|
4512
|
+
assertParamExists('suggestDomainNamesFromADomainV1', 'domainsV1AvailabilityAlternativesFromDomainRequest', domainsV1AvailabilityAlternativesFromDomainRequest);
|
|
4513
|
+
const localVarPath = `/api/domains/v1/availability/alternatives-from-domain`;
|
|
4514
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4515
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4516
|
+
let baseOptions;
|
|
4517
|
+
if (configuration) {
|
|
4518
|
+
baseOptions = configuration.baseOptions;
|
|
4519
|
+
}
|
|
4520
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
4521
|
+
const localVarHeaderParameter = {};
|
|
4522
|
+
const localVarQueryParameter = {};
|
|
4523
|
+
// authentication apiToken required
|
|
4524
|
+
// http bearer authentication required
|
|
4525
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4526
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4527
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4528
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4529
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4530
|
+
localVarRequestOptions.data = serializeDataIfNeeded(domainsV1AvailabilityAlternativesFromDomainRequest, localVarRequestOptions, configuration);
|
|
4531
|
+
return {
|
|
4532
|
+
url: toPathString(localVarUrlObj),
|
|
4533
|
+
options: localVarRequestOptions,
|
|
4534
|
+
};
|
|
4535
|
+
}),
|
|
4464
4536
|
};
|
|
4465
4537
|
};
|
|
4466
4538
|
/**
|
|
@@ -4471,7 +4543,7 @@ export const DomainsAvailabilityApiFp = function (configuration) {
|
|
|
4471
4543
|
const localVarAxiosParamCreator = DomainsAvailabilityApiAxiosParamCreator(configuration);
|
|
4472
4544
|
return {
|
|
4473
4545
|
/**
|
|
4474
|
-
* Check availability of domain names across multiple TLDs. Multiple TLDs can be checked at once. If you want alternative domains with response, provide only one TLD and set `with_alternatives` to `true`. TLDs should be provided without leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of
|
|
4546
|
+
* Check availability of domain names across multiple TLDs. Multiple TLDs can be checked at once. If you want alternative domains with response, provide only one TLD and set `with_alternatives` to `true`. TLDs should be provided without leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of 90 requests per minute. Use this endpoint to verify domain availability before purchase.
|
|
4475
4547
|
* @summary Check domain availability
|
|
4476
4548
|
* @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
|
|
4477
4549
|
* @param {*} [options] Override http request option.
|
|
@@ -4485,6 +4557,36 @@ export const DomainsAvailabilityApiFp = function (configuration) {
|
|
|
4485
4557
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4486
4558
|
});
|
|
4487
4559
|
},
|
|
4560
|
+
/**
|
|
4561
|
+
* Suggest available domain names based on a free-text description of your project. Suggestions are generated by an AI model, so they differ between calls. Endpoint has rate limit of 90 requests per minute. Use this endpoint to find a domain name when you only know what the website is about.
|
|
4562
|
+
* @summary Suggest domain names from a description
|
|
4563
|
+
* @param {DomainsV1AvailabilityAlternativesFromDescriptionRequest} domainsV1AvailabilityAlternativesFromDescriptionRequest
|
|
4564
|
+
* @param {*} [options] Override http request option.
|
|
4565
|
+
* @throws {RequiredError}
|
|
4566
|
+
*/
|
|
4567
|
+
suggestDomainNamesFromADescriptionV1(domainsV1AvailabilityAlternativesFromDescriptionRequest, options) {
|
|
4568
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4569
|
+
var _a, _b;
|
|
4570
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.suggestDomainNamesFromADescriptionV1(domainsV1AvailabilityAlternativesFromDescriptionRequest, options);
|
|
4571
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['DomainsAvailabilityApi.suggestDomainNamesFromADescriptionV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
4572
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4573
|
+
});
|
|
4574
|
+
},
|
|
4575
|
+
/**
|
|
4576
|
+
* Suggest available domain names based on a domain name you already have in mind. Suggestions are generated by an AI model, so they differ between calls. Endpoint has rate limit of 90 requests per minute. Use this endpoint when the domain you wanted is taken and you need close alternatives.
|
|
4577
|
+
* @summary Suggest domain names from a domain
|
|
4578
|
+
* @param {DomainsV1AvailabilityAlternativesFromDomainRequest} domainsV1AvailabilityAlternativesFromDomainRequest
|
|
4579
|
+
* @param {*} [options] Override http request option.
|
|
4580
|
+
* @throws {RequiredError}
|
|
4581
|
+
*/
|
|
4582
|
+
suggestDomainNamesFromADomainV1(domainsV1AvailabilityAlternativesFromDomainRequest, options) {
|
|
4583
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4584
|
+
var _a, _b;
|
|
4585
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.suggestDomainNamesFromADomainV1(domainsV1AvailabilityAlternativesFromDomainRequest, options);
|
|
4586
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['DomainsAvailabilityApi.suggestDomainNamesFromADomainV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
4587
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4588
|
+
});
|
|
4589
|
+
},
|
|
4488
4590
|
};
|
|
4489
4591
|
};
|
|
4490
4592
|
/**
|
|
@@ -4495,7 +4597,7 @@ export const DomainsAvailabilityApiFactory = function (configuration, basePath,
|
|
|
4495
4597
|
const localVarFp = DomainsAvailabilityApiFp(configuration);
|
|
4496
4598
|
return {
|
|
4497
4599
|
/**
|
|
4498
|
-
* Check availability of domain names across multiple TLDs. Multiple TLDs can be checked at once. If you want alternative domains with response, provide only one TLD and set `with_alternatives` to `true`. TLDs should be provided without leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of
|
|
4600
|
+
* Check availability of domain names across multiple TLDs. Multiple TLDs can be checked at once. If you want alternative domains with response, provide only one TLD and set `with_alternatives` to `true`. TLDs should be provided without leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of 90 requests per minute. Use this endpoint to verify domain availability before purchase.
|
|
4499
4601
|
* @summary Check domain availability
|
|
4500
4602
|
* @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
|
|
4501
4603
|
* @param {*} [options] Override http request option.
|
|
@@ -4504,6 +4606,26 @@ export const DomainsAvailabilityApiFactory = function (configuration, basePath,
|
|
|
4504
4606
|
checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options) {
|
|
4505
4607
|
return localVarFp.checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options).then((request) => request(axios, basePath));
|
|
4506
4608
|
},
|
|
4609
|
+
/**
|
|
4610
|
+
* Suggest available domain names based on a free-text description of your project. Suggestions are generated by an AI model, so they differ between calls. Endpoint has rate limit of 90 requests per minute. Use this endpoint to find a domain name when you only know what the website is about.
|
|
4611
|
+
* @summary Suggest domain names from a description
|
|
4612
|
+
* @param {DomainsV1AvailabilityAlternativesFromDescriptionRequest} domainsV1AvailabilityAlternativesFromDescriptionRequest
|
|
4613
|
+
* @param {*} [options] Override http request option.
|
|
4614
|
+
* @throws {RequiredError}
|
|
4615
|
+
*/
|
|
4616
|
+
suggestDomainNamesFromADescriptionV1(domainsV1AvailabilityAlternativesFromDescriptionRequest, options) {
|
|
4617
|
+
return localVarFp.suggestDomainNamesFromADescriptionV1(domainsV1AvailabilityAlternativesFromDescriptionRequest, options).then((request) => request(axios, basePath));
|
|
4618
|
+
},
|
|
4619
|
+
/**
|
|
4620
|
+
* Suggest available domain names based on a domain name you already have in mind. Suggestions are generated by an AI model, so they differ between calls. Endpoint has rate limit of 90 requests per minute. Use this endpoint when the domain you wanted is taken and you need close alternatives.
|
|
4621
|
+
* @summary Suggest domain names from a domain
|
|
4622
|
+
* @param {DomainsV1AvailabilityAlternativesFromDomainRequest} domainsV1AvailabilityAlternativesFromDomainRequest
|
|
4623
|
+
* @param {*} [options] Override http request option.
|
|
4624
|
+
* @throws {RequiredError}
|
|
4625
|
+
*/
|
|
4626
|
+
suggestDomainNamesFromADomainV1(domainsV1AvailabilityAlternativesFromDomainRequest, options) {
|
|
4627
|
+
return localVarFp.suggestDomainNamesFromADomainV1(domainsV1AvailabilityAlternativesFromDomainRequest, options).then((request) => request(axios, basePath));
|
|
4628
|
+
},
|
|
4507
4629
|
};
|
|
4508
4630
|
};
|
|
4509
4631
|
/**
|
|
@@ -4514,7 +4636,7 @@ export const DomainsAvailabilityApiFactory = function (configuration, basePath,
|
|
|
4514
4636
|
*/
|
|
4515
4637
|
export class DomainsAvailabilityApi extends BaseAPI {
|
|
4516
4638
|
/**
|
|
4517
|
-
* Check availability of domain names across multiple TLDs. Multiple TLDs can be checked at once. If you want alternative domains with response, provide only one TLD and set `with_alternatives` to `true`. TLDs should be provided without leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of
|
|
4639
|
+
* Check availability of domain names across multiple TLDs. Multiple TLDs can be checked at once. If you want alternative domains with response, provide only one TLD and set `with_alternatives` to `true`. TLDs should be provided without leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of 90 requests per minute. Use this endpoint to verify domain availability before purchase.
|
|
4518
4640
|
* @summary Check domain availability
|
|
4519
4641
|
* @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
|
|
4520
4642
|
* @param {*} [options] Override http request option.
|
|
@@ -4524,6 +4646,28 @@ export class DomainsAvailabilityApi extends BaseAPI {
|
|
|
4524
4646
|
checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options) {
|
|
4525
4647
|
return DomainsAvailabilityApiFp(this.configuration).checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4526
4648
|
}
|
|
4649
|
+
/**
|
|
4650
|
+
* Suggest available domain names based on a free-text description of your project. Suggestions are generated by an AI model, so they differ between calls. Endpoint has rate limit of 90 requests per minute. Use this endpoint to find a domain name when you only know what the website is about.
|
|
4651
|
+
* @summary Suggest domain names from a description
|
|
4652
|
+
* @param {DomainsV1AvailabilityAlternativesFromDescriptionRequest} domainsV1AvailabilityAlternativesFromDescriptionRequest
|
|
4653
|
+
* @param {*} [options] Override http request option.
|
|
4654
|
+
* @throws {RequiredError}
|
|
4655
|
+
* @memberof DomainsAvailabilityApi
|
|
4656
|
+
*/
|
|
4657
|
+
suggestDomainNamesFromADescriptionV1(domainsV1AvailabilityAlternativesFromDescriptionRequest, options) {
|
|
4658
|
+
return DomainsAvailabilityApiFp(this.configuration).suggestDomainNamesFromADescriptionV1(domainsV1AvailabilityAlternativesFromDescriptionRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4659
|
+
}
|
|
4660
|
+
/**
|
|
4661
|
+
* Suggest available domain names based on a domain name you already have in mind. Suggestions are generated by an AI model, so they differ between calls. Endpoint has rate limit of 90 requests per minute. Use this endpoint when the domain you wanted is taken and you need close alternatives.
|
|
4662
|
+
* @summary Suggest domain names from a domain
|
|
4663
|
+
* @param {DomainsV1AvailabilityAlternativesFromDomainRequest} domainsV1AvailabilityAlternativesFromDomainRequest
|
|
4664
|
+
* @param {*} [options] Override http request option.
|
|
4665
|
+
* @throws {RequiredError}
|
|
4666
|
+
* @memberof DomainsAvailabilityApi
|
|
4667
|
+
*/
|
|
4668
|
+
suggestDomainNamesFromADomainV1(domainsV1AvailabilityAlternativesFromDomainRequest, options) {
|
|
4669
|
+
return DomainsAvailabilityApiFp(this.configuration).suggestDomainNamesFromADomainV1(domainsV1AvailabilityAlternativesFromDomainRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4670
|
+
}
|
|
4527
4671
|
}
|
|
4528
4672
|
/**
|
|
4529
4673
|
* DomainsForwardingApi - axios parameter creator
|
|
@@ -7445,6 +7589,47 @@ export const EcommerceProductsApiAxiosParamCreator = function (configuration) {
|
|
|
7445
7589
|
options: localVarRequestOptions,
|
|
7446
7590
|
};
|
|
7447
7591
|
}),
|
|
7592
|
+
/**
|
|
7593
|
+
* Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
|
|
7594
|
+
* @summary Upload and attach a product image
|
|
7595
|
+
* @param {string} storeId The ID of the store the product belongs to.
|
|
7596
|
+
* @param {string} productId The ID of the product to attach the image to.
|
|
7597
|
+
* @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
|
|
7598
|
+
* @param {*} [options] Override http request option.
|
|
7599
|
+
* @throws {RequiredError}
|
|
7600
|
+
*/
|
|
7601
|
+
uploadAndAttachAProductImageV1: (storeId_1, productId_1, ecommerceV1ProductUploadProductImageRequest_1, ...args_1) => __awaiter(this, [storeId_1, productId_1, ecommerceV1ProductUploadProductImageRequest_1, ...args_1], void 0, function* (storeId, productId, ecommerceV1ProductUploadProductImageRequest, options = {}) {
|
|
7602
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
7603
|
+
assertParamExists('uploadAndAttachAProductImageV1', 'storeId', storeId);
|
|
7604
|
+
// verify required parameter 'productId' is not null or undefined
|
|
7605
|
+
assertParamExists('uploadAndAttachAProductImageV1', 'productId', productId);
|
|
7606
|
+
// verify required parameter 'ecommerceV1ProductUploadProductImageRequest' is not null or undefined
|
|
7607
|
+
assertParamExists('uploadAndAttachAProductImageV1', 'ecommerceV1ProductUploadProductImageRequest', ecommerceV1ProductUploadProductImageRequest);
|
|
7608
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/products/{product_id}/images`
|
|
7609
|
+
.replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
|
|
7610
|
+
.replace(`{${"product_id"}}`, encodeURIComponent(String(productId)));
|
|
7611
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
7612
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
7613
|
+
let baseOptions;
|
|
7614
|
+
if (configuration) {
|
|
7615
|
+
baseOptions = configuration.baseOptions;
|
|
7616
|
+
}
|
|
7617
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
7618
|
+
const localVarHeaderParameter = {};
|
|
7619
|
+
const localVarQueryParameter = {};
|
|
7620
|
+
// authentication apiToken required
|
|
7621
|
+
// http bearer authentication required
|
|
7622
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
7623
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
7624
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
7625
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
7626
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
7627
|
+
localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1ProductUploadProductImageRequest, localVarRequestOptions, configuration);
|
|
7628
|
+
return {
|
|
7629
|
+
url: toPathString(localVarUrlObj),
|
|
7630
|
+
options: localVarRequestOptions,
|
|
7631
|
+
};
|
|
7632
|
+
}),
|
|
7448
7633
|
};
|
|
7449
7634
|
};
|
|
7450
7635
|
/**
|
|
@@ -7486,6 +7671,23 @@ export const EcommerceProductsApiFp = function (configuration) {
|
|
|
7486
7671
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
7487
7672
|
});
|
|
7488
7673
|
},
|
|
7674
|
+
/**
|
|
7675
|
+
* Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
|
|
7676
|
+
* @summary Upload and attach a product image
|
|
7677
|
+
* @param {string} storeId The ID of the store the product belongs to.
|
|
7678
|
+
* @param {string} productId The ID of the product to attach the image to.
|
|
7679
|
+
* @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
|
|
7680
|
+
* @param {*} [options] Override http request option.
|
|
7681
|
+
* @throws {RequiredError}
|
|
7682
|
+
*/
|
|
7683
|
+
uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options) {
|
|
7684
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7685
|
+
var _a, _b;
|
|
7686
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options);
|
|
7687
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceProductsApi.uploadAndAttachAProductImageV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
7688
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
7689
|
+
});
|
|
7690
|
+
},
|
|
7489
7691
|
};
|
|
7490
7692
|
};
|
|
7491
7693
|
/**
|
|
@@ -7517,6 +7719,18 @@ export const EcommerceProductsApiFactory = function (configuration, basePath, ax
|
|
|
7517
7719
|
createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options) {
|
|
7518
7720
|
return localVarFp.createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(axios, basePath));
|
|
7519
7721
|
},
|
|
7722
|
+
/**
|
|
7723
|
+
* Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
|
|
7724
|
+
* @summary Upload and attach a product image
|
|
7725
|
+
* @param {string} storeId The ID of the store the product belongs to.
|
|
7726
|
+
* @param {string} productId The ID of the product to attach the image to.
|
|
7727
|
+
* @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
|
|
7728
|
+
* @param {*} [options] Override http request option.
|
|
7729
|
+
* @throws {RequiredError}
|
|
7730
|
+
*/
|
|
7731
|
+
uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options) {
|
|
7732
|
+
return localVarFp.uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options).then((request) => request(axios, basePath));
|
|
7733
|
+
},
|
|
7520
7734
|
};
|
|
7521
7735
|
};
|
|
7522
7736
|
/**
|
|
@@ -7550,6 +7764,19 @@ export class EcommerceProductsApi extends BaseAPI {
|
|
|
7550
7764
|
createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options) {
|
|
7551
7765
|
return EcommerceProductsApiFp(this.configuration).createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(this.axios, this.basePath));
|
|
7552
7766
|
}
|
|
7767
|
+
/**
|
|
7768
|
+
* Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
|
|
7769
|
+
* @summary Upload and attach a product image
|
|
7770
|
+
* @param {string} storeId The ID of the store the product belongs to.
|
|
7771
|
+
* @param {string} productId The ID of the product to attach the image to.
|
|
7772
|
+
* @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
|
|
7773
|
+
* @param {*} [options] Override http request option.
|
|
7774
|
+
* @throws {RequiredError}
|
|
7775
|
+
* @memberof EcommerceProductsApi
|
|
7776
|
+
*/
|
|
7777
|
+
uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options) {
|
|
7778
|
+
return EcommerceProductsApiFp(this.configuration).uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options).then((request) => request(this.axios, this.basePath));
|
|
7779
|
+
}
|
|
7553
7780
|
}
|
|
7554
7781
|
/**
|
|
7555
7782
|
* EcommerceSalesChannelsApi - axios parameter creator
|
|
@@ -10521,6 +10748,250 @@ export class HostingDomainsApi extends BaseAPI {
|
|
|
10521
10748
|
return HostingDomainsApiFp(this.configuration).verifyDomainOwnershipV1(hostingV1DomainsVerifyOwnershipRequest, options).then((request) => request(this.axios, this.basePath));
|
|
10522
10749
|
}
|
|
10523
10750
|
}
|
|
10751
|
+
/**
|
|
10752
|
+
* HostingFilesApi - axios parameter creator
|
|
10753
|
+
* @export
|
|
10754
|
+
*/
|
|
10755
|
+
export const HostingFilesApiAxiosParamCreator = function (configuration) {
|
|
10756
|
+
return {
|
|
10757
|
+
/**
|
|
10758
|
+
* Get a single file\'s content, relative to a website\'s document root. Read-only; refuses symlinks, oversized files, non-text file types, and files identified as containing secrets (e.g. credential files) — none of these are returned by this endpoint.
|
|
10759
|
+
* @summary Get website file content
|
|
10760
|
+
* @param {string} username
|
|
10761
|
+
* @param {string} domain Domain name
|
|
10762
|
+
* @param {string} path File path, relative to the document root.
|
|
10763
|
+
* @param {number | null} [fromLine] Line offset to start reading from.
|
|
10764
|
+
* @param {number | null} [maxLines] Max number of lines to return.
|
|
10765
|
+
* @param {*} [options] Override http request option.
|
|
10766
|
+
* @throws {RequiredError}
|
|
10767
|
+
*/
|
|
10768
|
+
getWebsiteFileContentV1: (username_1, domain_1, path_1, fromLine_1, maxLines_1, ...args_1) => __awaiter(this, [username_1, domain_1, path_1, fromLine_1, maxLines_1, ...args_1], void 0, function* (username, domain, path, fromLine, maxLines, options = {}) {
|
|
10769
|
+
// verify required parameter 'username' is not null or undefined
|
|
10770
|
+
assertParamExists('getWebsiteFileContentV1', 'username', username);
|
|
10771
|
+
// verify required parameter 'domain' is not null or undefined
|
|
10772
|
+
assertParamExists('getWebsiteFileContentV1', 'domain', domain);
|
|
10773
|
+
// verify required parameter 'path' is not null or undefined
|
|
10774
|
+
assertParamExists('getWebsiteFileContentV1', 'path', path);
|
|
10775
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/domains/{domain}/files/content`
|
|
10776
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
10777
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
10778
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
10779
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
10780
|
+
let baseOptions;
|
|
10781
|
+
if (configuration) {
|
|
10782
|
+
baseOptions = configuration.baseOptions;
|
|
10783
|
+
}
|
|
10784
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
10785
|
+
const localVarHeaderParameter = {};
|
|
10786
|
+
const localVarQueryParameter = {};
|
|
10787
|
+
// authentication apiToken required
|
|
10788
|
+
// http bearer authentication required
|
|
10789
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
10790
|
+
if (path !== undefined) {
|
|
10791
|
+
localVarQueryParameter['path'] = path;
|
|
10792
|
+
}
|
|
10793
|
+
if (fromLine !== undefined) {
|
|
10794
|
+
localVarQueryParameter['from_line'] = fromLine;
|
|
10795
|
+
}
|
|
10796
|
+
if (maxLines !== undefined) {
|
|
10797
|
+
localVarQueryParameter['max_lines'] = maxLines;
|
|
10798
|
+
}
|
|
10799
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
10800
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
10801
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
10802
|
+
return {
|
|
10803
|
+
url: toPathString(localVarUrlObj),
|
|
10804
|
+
options: localVarRequestOptions,
|
|
10805
|
+
};
|
|
10806
|
+
}),
|
|
10807
|
+
/**
|
|
10808
|
+
* List files and directories under a website\'s document root. Use `directory` to browse a subdirectory relative to the document root. Symlinked entries are listed but never traversed into or resolved.
|
|
10809
|
+
* @summary List website files and directories
|
|
10810
|
+
* @param {string} username
|
|
10811
|
+
* @param {string} domain Domain name
|
|
10812
|
+
* @param {string} [directory] Directory path to check
|
|
10813
|
+
* @param {number | null} [maxDepth] How many directory levels deep to recurse.
|
|
10814
|
+
* @param {number | null} [maxItems] Max number of entries to return in this page.
|
|
10815
|
+
* @param {number | null} [offset] Number of entries to skip. Page with offset + item count until reaching total_items.
|
|
10816
|
+
* @param {HostingListWebsiteFilesAndDirectoriesV1FileTypesParameter} [fileTypes] Filter by entry type, e.g. file,directory. Array or comma-separated. Omit for all types.
|
|
10817
|
+
* @param {*} [options] Override http request option.
|
|
10818
|
+
* @throws {RequiredError}
|
|
10819
|
+
*/
|
|
10820
|
+
listWebsiteFilesAndDirectoriesV1: (username_1, domain_1, directory_1, maxDepth_1, maxItems_1, offset_1, fileTypes_1, ...args_1) => __awaiter(this, [username_1, domain_1, directory_1, maxDepth_1, maxItems_1, offset_1, fileTypes_1, ...args_1], void 0, function* (username, domain, directory, maxDepth, maxItems, offset, fileTypes, options = {}) {
|
|
10821
|
+
// verify required parameter 'username' is not null or undefined
|
|
10822
|
+
assertParamExists('listWebsiteFilesAndDirectoriesV1', 'username', username);
|
|
10823
|
+
// verify required parameter 'domain' is not null or undefined
|
|
10824
|
+
assertParamExists('listWebsiteFilesAndDirectoriesV1', 'domain', domain);
|
|
10825
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/domains/{domain}/files`
|
|
10826
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
10827
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
10828
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
10829
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
10830
|
+
let baseOptions;
|
|
10831
|
+
if (configuration) {
|
|
10832
|
+
baseOptions = configuration.baseOptions;
|
|
10833
|
+
}
|
|
10834
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
10835
|
+
const localVarHeaderParameter = {};
|
|
10836
|
+
const localVarQueryParameter = {};
|
|
10837
|
+
// authentication apiToken required
|
|
10838
|
+
// http bearer authentication required
|
|
10839
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
10840
|
+
if (directory !== undefined) {
|
|
10841
|
+
localVarQueryParameter['directory'] = directory;
|
|
10842
|
+
}
|
|
10843
|
+
if (maxDepth !== undefined) {
|
|
10844
|
+
localVarQueryParameter['max_depth'] = maxDepth;
|
|
10845
|
+
}
|
|
10846
|
+
if (maxItems !== undefined) {
|
|
10847
|
+
localVarQueryParameter['max_items'] = maxItems;
|
|
10848
|
+
}
|
|
10849
|
+
if (offset !== undefined) {
|
|
10850
|
+
localVarQueryParameter['offset'] = offset;
|
|
10851
|
+
}
|
|
10852
|
+
if (fileTypes !== undefined) {
|
|
10853
|
+
for (const [key, value] of Object.entries(fileTypes)) {
|
|
10854
|
+
localVarQueryParameter[key] = value;
|
|
10855
|
+
}
|
|
10856
|
+
}
|
|
10857
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
10858
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
10859
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
10860
|
+
return {
|
|
10861
|
+
url: toPathString(localVarUrlObj),
|
|
10862
|
+
options: localVarRequestOptions,
|
|
10863
|
+
};
|
|
10864
|
+
}),
|
|
10865
|
+
};
|
|
10866
|
+
};
|
|
10867
|
+
/**
|
|
10868
|
+
* HostingFilesApi - functional programming interface
|
|
10869
|
+
* @export
|
|
10870
|
+
*/
|
|
10871
|
+
export const HostingFilesApiFp = function (configuration) {
|
|
10872
|
+
const localVarAxiosParamCreator = HostingFilesApiAxiosParamCreator(configuration);
|
|
10873
|
+
return {
|
|
10874
|
+
/**
|
|
10875
|
+
* Get a single file\'s content, relative to a website\'s document root. Read-only; refuses symlinks, oversized files, non-text file types, and files identified as containing secrets (e.g. credential files) — none of these are returned by this endpoint.
|
|
10876
|
+
* @summary Get website file content
|
|
10877
|
+
* @param {string} username
|
|
10878
|
+
* @param {string} domain Domain name
|
|
10879
|
+
* @param {string} path File path, relative to the document root.
|
|
10880
|
+
* @param {number | null} [fromLine] Line offset to start reading from.
|
|
10881
|
+
* @param {number | null} [maxLines] Max number of lines to return.
|
|
10882
|
+
* @param {*} [options] Override http request option.
|
|
10883
|
+
* @throws {RequiredError}
|
|
10884
|
+
*/
|
|
10885
|
+
getWebsiteFileContentV1(username, domain, path, fromLine, maxLines, options) {
|
|
10886
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10887
|
+
var _a, _b;
|
|
10888
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getWebsiteFileContentV1(username, domain, path, fromLine, maxLines, options);
|
|
10889
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingFilesApi.getWebsiteFileContentV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
10890
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
10891
|
+
});
|
|
10892
|
+
},
|
|
10893
|
+
/**
|
|
10894
|
+
* List files and directories under a website\'s document root. Use `directory` to browse a subdirectory relative to the document root. Symlinked entries are listed but never traversed into or resolved.
|
|
10895
|
+
* @summary List website files and directories
|
|
10896
|
+
* @param {string} username
|
|
10897
|
+
* @param {string} domain Domain name
|
|
10898
|
+
* @param {string} [directory] Directory path to check
|
|
10899
|
+
* @param {number | null} [maxDepth] How many directory levels deep to recurse.
|
|
10900
|
+
* @param {number | null} [maxItems] Max number of entries to return in this page.
|
|
10901
|
+
* @param {number | null} [offset] Number of entries to skip. Page with offset + item count until reaching total_items.
|
|
10902
|
+
* @param {HostingListWebsiteFilesAndDirectoriesV1FileTypesParameter} [fileTypes] Filter by entry type, e.g. file,directory. Array or comma-separated. Omit for all types.
|
|
10903
|
+
* @param {*} [options] Override http request option.
|
|
10904
|
+
* @throws {RequiredError}
|
|
10905
|
+
*/
|
|
10906
|
+
listWebsiteFilesAndDirectoriesV1(username, domain, directory, maxDepth, maxItems, offset, fileTypes, options) {
|
|
10907
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10908
|
+
var _a, _b;
|
|
10909
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listWebsiteFilesAndDirectoriesV1(username, domain, directory, maxDepth, maxItems, offset, fileTypes, options);
|
|
10910
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingFilesApi.listWebsiteFilesAndDirectoriesV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
10911
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
10912
|
+
});
|
|
10913
|
+
},
|
|
10914
|
+
};
|
|
10915
|
+
};
|
|
10916
|
+
/**
|
|
10917
|
+
* HostingFilesApi - factory interface
|
|
10918
|
+
* @export
|
|
10919
|
+
*/
|
|
10920
|
+
export const HostingFilesApiFactory = function (configuration, basePath, axios) {
|
|
10921
|
+
const localVarFp = HostingFilesApiFp(configuration);
|
|
10922
|
+
return {
|
|
10923
|
+
/**
|
|
10924
|
+
* Get a single file\'s content, relative to a website\'s document root. Read-only; refuses symlinks, oversized files, non-text file types, and files identified as containing secrets (e.g. credential files) — none of these are returned by this endpoint.
|
|
10925
|
+
* @summary Get website file content
|
|
10926
|
+
* @param {string} username
|
|
10927
|
+
* @param {string} domain Domain name
|
|
10928
|
+
* @param {string} path File path, relative to the document root.
|
|
10929
|
+
* @param {number | null} [fromLine] Line offset to start reading from.
|
|
10930
|
+
* @param {number | null} [maxLines] Max number of lines to return.
|
|
10931
|
+
* @param {*} [options] Override http request option.
|
|
10932
|
+
* @throws {RequiredError}
|
|
10933
|
+
*/
|
|
10934
|
+
getWebsiteFileContentV1(username, domain, path, fromLine, maxLines, options) {
|
|
10935
|
+
return localVarFp.getWebsiteFileContentV1(username, domain, path, fromLine, maxLines, options).then((request) => request(axios, basePath));
|
|
10936
|
+
},
|
|
10937
|
+
/**
|
|
10938
|
+
* List files and directories under a website\'s document root. Use `directory` to browse a subdirectory relative to the document root. Symlinked entries are listed but never traversed into or resolved.
|
|
10939
|
+
* @summary List website files and directories
|
|
10940
|
+
* @param {string} username
|
|
10941
|
+
* @param {string} domain Domain name
|
|
10942
|
+
* @param {string} [directory] Directory path to check
|
|
10943
|
+
* @param {number | null} [maxDepth] How many directory levels deep to recurse.
|
|
10944
|
+
* @param {number | null} [maxItems] Max number of entries to return in this page.
|
|
10945
|
+
* @param {number | null} [offset] Number of entries to skip. Page with offset + item count until reaching total_items.
|
|
10946
|
+
* @param {HostingListWebsiteFilesAndDirectoriesV1FileTypesParameter} [fileTypes] Filter by entry type, e.g. file,directory. Array or comma-separated. Omit for all types.
|
|
10947
|
+
* @param {*} [options] Override http request option.
|
|
10948
|
+
* @throws {RequiredError}
|
|
10949
|
+
*/
|
|
10950
|
+
listWebsiteFilesAndDirectoriesV1(username, domain, directory, maxDepth, maxItems, offset, fileTypes, options) {
|
|
10951
|
+
return localVarFp.listWebsiteFilesAndDirectoriesV1(username, domain, directory, maxDepth, maxItems, offset, fileTypes, options).then((request) => request(axios, basePath));
|
|
10952
|
+
},
|
|
10953
|
+
};
|
|
10954
|
+
};
|
|
10955
|
+
/**
|
|
10956
|
+
* HostingFilesApi - object-oriented interface
|
|
10957
|
+
* @export
|
|
10958
|
+
* @class HostingFilesApi
|
|
10959
|
+
* @extends {BaseAPI}
|
|
10960
|
+
*/
|
|
10961
|
+
export class HostingFilesApi extends BaseAPI {
|
|
10962
|
+
/**
|
|
10963
|
+
* Get a single file\'s content, relative to a website\'s document root. Read-only; refuses symlinks, oversized files, non-text file types, and files identified as containing secrets (e.g. credential files) — none of these are returned by this endpoint.
|
|
10964
|
+
* @summary Get website file content
|
|
10965
|
+
* @param {string} username
|
|
10966
|
+
* @param {string} domain Domain name
|
|
10967
|
+
* @param {string} path File path, relative to the document root.
|
|
10968
|
+
* @param {number | null} [fromLine] Line offset to start reading from.
|
|
10969
|
+
* @param {number | null} [maxLines] Max number of lines to return.
|
|
10970
|
+
* @param {*} [options] Override http request option.
|
|
10971
|
+
* @throws {RequiredError}
|
|
10972
|
+
* @memberof HostingFilesApi
|
|
10973
|
+
*/
|
|
10974
|
+
getWebsiteFileContentV1(username, domain, path, fromLine, maxLines, options) {
|
|
10975
|
+
return HostingFilesApiFp(this.configuration).getWebsiteFileContentV1(username, domain, path, fromLine, maxLines, options).then((request) => request(this.axios, this.basePath));
|
|
10976
|
+
}
|
|
10977
|
+
/**
|
|
10978
|
+
* List files and directories under a website\'s document root. Use `directory` to browse a subdirectory relative to the document root. Symlinked entries are listed but never traversed into or resolved.
|
|
10979
|
+
* @summary List website files and directories
|
|
10980
|
+
* @param {string} username
|
|
10981
|
+
* @param {string} domain Domain name
|
|
10982
|
+
* @param {string} [directory] Directory path to check
|
|
10983
|
+
* @param {number | null} [maxDepth] How many directory levels deep to recurse.
|
|
10984
|
+
* @param {number | null} [maxItems] Max number of entries to return in this page.
|
|
10985
|
+
* @param {number | null} [offset] Number of entries to skip. Page with offset + item count until reaching total_items.
|
|
10986
|
+
* @param {HostingListWebsiteFilesAndDirectoriesV1FileTypesParameter} [fileTypes] Filter by entry type, e.g. file,directory. Array or comma-separated. Omit for all types.
|
|
10987
|
+
* @param {*} [options] Override http request option.
|
|
10988
|
+
* @throws {RequiredError}
|
|
10989
|
+
* @memberof HostingFilesApi
|
|
10990
|
+
*/
|
|
10991
|
+
listWebsiteFilesAndDirectoriesV1(username, domain, directory, maxDepth, maxItems, offset, fileTypes, options) {
|
|
10992
|
+
return HostingFilesApiFp(this.configuration).listWebsiteFilesAndDirectoriesV1(username, domain, directory, maxDepth, maxItems, offset, fileTypes, options).then((request) => request(this.axios, this.basePath));
|
|
10993
|
+
}
|
|
10994
|
+
}
|
|
10524
10995
|
/**
|
|
10525
10996
|
* HostingNodeJSApi - axios parameter creator
|
|
10526
10997
|
* @export
|
|
@@ -11762,18 +12233,15 @@ export const HostingWebsitesApiAxiosParamCreator = function (configuration) {
|
|
|
11762
12233
|
};
|
|
11763
12234
|
}),
|
|
11764
12235
|
/**
|
|
11765
|
-
*
|
|
12236
|
+
* This endpoint permanently removes a website and all of its data. This action cannot be undone. Before calling it, make sure the user understands the consequences and explicitly confirms that they want to proceed. All website files, databases and related configuration will be removed. The hosting plan itself is kept, so a new website can be created on it afterwards. Supported websites: main and addon domain websites on web hosting plans, and Website Builder websites. Parked domains and subdomains cannot be deleted with this endpoint. The domain must be the exact website domain, not a preview domain or an alias. Returns 404 when the domain does not exist or does not belong to the authenticated client. Website removal is processed asynchronously and can take a few minutes to complete. The response returns before the removal finishes.
|
|
11766
12237
|
* @summary Delete website
|
|
11767
12238
|
* @param {string} domain Domain name
|
|
11768
|
-
* @param {HostingV1WebsitesDeleteWebsiteRequest} hostingV1WebsitesDeleteWebsiteRequest
|
|
11769
12239
|
* @param {*} [options] Override http request option.
|
|
11770
12240
|
* @throws {RequiredError}
|
|
11771
12241
|
*/
|
|
11772
|
-
deleteWebsiteV1: (domain_1,
|
|
12242
|
+
deleteWebsiteV1: (domain_1, ...args_1) => __awaiter(this, [domain_1, ...args_1], void 0, function* (domain, options = {}) {
|
|
11773
12243
|
// verify required parameter 'domain' is not null or undefined
|
|
11774
12244
|
assertParamExists('deleteWebsiteV1', 'domain', domain);
|
|
11775
|
-
// verify required parameter 'hostingV1WebsitesDeleteWebsiteRequest' is not null or undefined
|
|
11776
|
-
assertParamExists('deleteWebsiteV1', 'hostingV1WebsitesDeleteWebsiteRequest', hostingV1WebsitesDeleteWebsiteRequest);
|
|
11777
12245
|
const localVarPath = `/api/hosting/v1/websites/{domain}`
|
|
11778
12246
|
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
11779
12247
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -11788,11 +12256,9 @@ export const HostingWebsitesApiAxiosParamCreator = function (configuration) {
|
|
|
11788
12256
|
// authentication apiToken required
|
|
11789
12257
|
// http bearer authentication required
|
|
11790
12258
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
11791
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
11792
12259
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
11793
12260
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
11794
12261
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
11795
|
-
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1WebsitesDeleteWebsiteRequest, localVarRequestOptions, configuration);
|
|
11796
12262
|
return {
|
|
11797
12263
|
url: toPathString(localVarUrlObj),
|
|
11798
12264
|
options: localVarRequestOptions,
|
|
@@ -11875,17 +12341,16 @@ export const HostingWebsitesApiFp = function (configuration) {
|
|
|
11875
12341
|
});
|
|
11876
12342
|
},
|
|
11877
12343
|
/**
|
|
11878
|
-
*
|
|
12344
|
+
* This endpoint permanently removes a website and all of its data. This action cannot be undone. Before calling it, make sure the user understands the consequences and explicitly confirms that they want to proceed. All website files, databases and related configuration will be removed. The hosting plan itself is kept, so a new website can be created on it afterwards. Supported websites: main and addon domain websites on web hosting plans, and Website Builder websites. Parked domains and subdomains cannot be deleted with this endpoint. The domain must be the exact website domain, not a preview domain or an alias. Returns 404 when the domain does not exist or does not belong to the authenticated client. Website removal is processed asynchronously and can take a few minutes to complete. The response returns before the removal finishes.
|
|
11879
12345
|
* @summary Delete website
|
|
11880
12346
|
* @param {string} domain Domain name
|
|
11881
|
-
* @param {HostingV1WebsitesDeleteWebsiteRequest} hostingV1WebsitesDeleteWebsiteRequest
|
|
11882
12347
|
* @param {*} [options] Override http request option.
|
|
11883
12348
|
* @throws {RequiredError}
|
|
11884
12349
|
*/
|
|
11885
|
-
deleteWebsiteV1(domain,
|
|
12350
|
+
deleteWebsiteV1(domain, options) {
|
|
11886
12351
|
return __awaiter(this, void 0, void 0, function* () {
|
|
11887
12352
|
var _a, _b;
|
|
11888
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteWebsiteV1(domain,
|
|
12353
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteWebsiteV1(domain, options);
|
|
11889
12354
|
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingWebsitesApi.deleteWebsiteV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
11890
12355
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
11891
12356
|
});
|
|
@@ -11930,15 +12395,14 @@ export const HostingWebsitesApiFactory = function (configuration, basePath, axio
|
|
|
11930
12395
|
return localVarFp.createWebsiteV1(hostingV1WebsitesCreateWebsiteRequest, options).then((request) => request(axios, basePath));
|
|
11931
12396
|
},
|
|
11932
12397
|
/**
|
|
11933
|
-
*
|
|
12398
|
+
* This endpoint permanently removes a website and all of its data. This action cannot be undone. Before calling it, make sure the user understands the consequences and explicitly confirms that they want to proceed. All website files, databases and related configuration will be removed. The hosting plan itself is kept, so a new website can be created on it afterwards. Supported websites: main and addon domain websites on web hosting plans, and Website Builder websites. Parked domains and subdomains cannot be deleted with this endpoint. The domain must be the exact website domain, not a preview domain or an alias. Returns 404 when the domain does not exist or does not belong to the authenticated client. Website removal is processed asynchronously and can take a few minutes to complete. The response returns before the removal finishes.
|
|
11934
12399
|
* @summary Delete website
|
|
11935
12400
|
* @param {string} domain Domain name
|
|
11936
|
-
* @param {HostingV1WebsitesDeleteWebsiteRequest} hostingV1WebsitesDeleteWebsiteRequest
|
|
11937
12401
|
* @param {*} [options] Override http request option.
|
|
11938
12402
|
* @throws {RequiredError}
|
|
11939
12403
|
*/
|
|
11940
|
-
deleteWebsiteV1(domain,
|
|
11941
|
-
return localVarFp.deleteWebsiteV1(domain,
|
|
12404
|
+
deleteWebsiteV1(domain, options) {
|
|
12405
|
+
return localVarFp.deleteWebsiteV1(domain, options).then((request) => request(axios, basePath));
|
|
11942
12406
|
},
|
|
11943
12407
|
/**
|
|
11944
12408
|
* Retrieve a paginated list of websites (main and addon types) accessible to the authenticated client. This endpoint returns websites from your hosting accounts as well as websites from other client hosting accounts that have shared access with you. Use the available query parameters to filter results by username, order ID, enabled status, or domain name for more targeted results.
|
|
@@ -11976,16 +12440,15 @@ export class HostingWebsitesApi extends BaseAPI {
|
|
|
11976
12440
|
return HostingWebsitesApiFp(this.configuration).createWebsiteV1(hostingV1WebsitesCreateWebsiteRequest, options).then((request) => request(this.axios, this.basePath));
|
|
11977
12441
|
}
|
|
11978
12442
|
/**
|
|
11979
|
-
*
|
|
12443
|
+
* This endpoint permanently removes a website and all of its data. This action cannot be undone. Before calling it, make sure the user understands the consequences and explicitly confirms that they want to proceed. All website files, databases and related configuration will be removed. The hosting plan itself is kept, so a new website can be created on it afterwards. Supported websites: main and addon domain websites on web hosting plans, and Website Builder websites. Parked domains and subdomains cannot be deleted with this endpoint. The domain must be the exact website domain, not a preview domain or an alias. Returns 404 when the domain does not exist or does not belong to the authenticated client. Website removal is processed asynchronously and can take a few minutes to complete. The response returns before the removal finishes.
|
|
11980
12444
|
* @summary Delete website
|
|
11981
12445
|
* @param {string} domain Domain name
|
|
11982
|
-
* @param {HostingV1WebsitesDeleteWebsiteRequest} hostingV1WebsitesDeleteWebsiteRequest
|
|
11983
12446
|
* @param {*} [options] Override http request option.
|
|
11984
12447
|
* @throws {RequiredError}
|
|
11985
12448
|
* @memberof HostingWebsitesApi
|
|
11986
12449
|
*/
|
|
11987
|
-
deleteWebsiteV1(domain,
|
|
11988
|
-
return HostingWebsitesApiFp(this.configuration).deleteWebsiteV1(domain,
|
|
12450
|
+
deleteWebsiteV1(domain, options) {
|
|
12451
|
+
return HostingWebsitesApiFp(this.configuration).deleteWebsiteV1(domain, options).then((request) => request(this.axios, this.basePath));
|
|
11989
12452
|
}
|
|
11990
12453
|
/**
|
|
11991
12454
|
* Retrieve a paginated list of websites (main and addon types) accessible to the authenticated client. This endpoint returns websites from your hosting accounts as well as websites from other client hosting accounts that have shared access with you. Use the available query parameters to filter results by username, order ID, enabled status, or domain name for more targeted results.
|