hostinger-api-sdk 1.2.0 → 1.2.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 +312 -15
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +220 -9
- package/dist/api.js +166 -15
- 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 +220 -9
- package/dist/esm/api.js +166 -15
- 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/EcommerceSalesChannelsApi.md +66 -4
- package/docs/EcommerceStoresApi.md +54 -0
- package/docs/EcommerceV1SalesChannelSalesChannelUpdateResource.md +20 -0
- package/docs/EcommerceV1SalesChannelUpdateRequest.md +22 -0
- package/docs/EcommerceV1StoreStoreMetadataResource.md +20 -0
- package/docs/EcommerceV1StoreStoreMetadataResourceMetadata.md +26 -0
- package/docs/EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency.md +37 -0
- 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.2.
|
|
6
|
+
* API Version: 1.2.1
|
|
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
|
|
@@ -3466,17 +3466,17 @@ export const EcommerceSalesChannelsApiAxiosParamCreator = function (configuratio
|
|
|
3466
3466
|
return {
|
|
3467
3467
|
/**
|
|
3468
3468
|
* Create a custom sales channel for a store. Build your own frontend and keep your catalog, orders, shipping and payments in sync through the Ecommerce API.
|
|
3469
|
-
* @summary Create
|
|
3469
|
+
* @summary Create custom sales channel
|
|
3470
3470
|
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
3471
3471
|
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
3472
3472
|
* @param {*} [options] Override http request option.
|
|
3473
3473
|
* @throws {RequiredError}
|
|
3474
3474
|
*/
|
|
3475
|
-
|
|
3475
|
+
createCustomSalesChannelV1: (storeId_1, ecommerceV1SalesChannelStoreRequest_1, ...args_1) => __awaiter(this, [storeId_1, ecommerceV1SalesChannelStoreRequest_1, ...args_1], void 0, function* (storeId, ecommerceV1SalesChannelStoreRequest, options = {}) {
|
|
3476
3476
|
// verify required parameter 'storeId' is not null or undefined
|
|
3477
|
-
assertParamExists('
|
|
3477
|
+
assertParamExists('createCustomSalesChannelV1', 'storeId', storeId);
|
|
3478
3478
|
// verify required parameter 'ecommerceV1SalesChannelStoreRequest' is not null or undefined
|
|
3479
|
-
assertParamExists('
|
|
3479
|
+
assertParamExists('createCustomSalesChannelV1', 'ecommerceV1SalesChannelStoreRequest', ecommerceV1SalesChannelStoreRequest);
|
|
3480
3480
|
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/sales-channels`
|
|
3481
3481
|
.replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
|
|
3482
3482
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -3533,6 +3533,47 @@ export const EcommerceSalesChannelsApiAxiosParamCreator = function (configuratio
|
|
|
3533
3533
|
options: localVarRequestOptions,
|
|
3534
3534
|
};
|
|
3535
3535
|
}),
|
|
3536
|
+
/**
|
|
3537
|
+
* Update a custom sales channel. The merchant-facing `name` and the public `url` (returned as the channel `domain`) can be changed. Pass `null` to clear a value.
|
|
3538
|
+
* @summary Update sales channel
|
|
3539
|
+
* @param {string} storeId The ID of the store that owns the sales channel.
|
|
3540
|
+
* @param {string} salesChannelId The ID of the sales channel to update.
|
|
3541
|
+
* @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
|
|
3542
|
+
* @param {*} [options] Override http request option.
|
|
3543
|
+
* @throws {RequiredError}
|
|
3544
|
+
*/
|
|
3545
|
+
updateSalesChannelV1: (storeId_1, salesChannelId_1, ecommerceV1SalesChannelUpdateRequest_1, ...args_1) => __awaiter(this, [storeId_1, salesChannelId_1, ecommerceV1SalesChannelUpdateRequest_1, ...args_1], void 0, function* (storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options = {}) {
|
|
3546
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
3547
|
+
assertParamExists('updateSalesChannelV1', 'storeId', storeId);
|
|
3548
|
+
// verify required parameter 'salesChannelId' is not null or undefined
|
|
3549
|
+
assertParamExists('updateSalesChannelV1', 'salesChannelId', salesChannelId);
|
|
3550
|
+
// verify required parameter 'ecommerceV1SalesChannelUpdateRequest' is not null or undefined
|
|
3551
|
+
assertParamExists('updateSalesChannelV1', 'ecommerceV1SalesChannelUpdateRequest', ecommerceV1SalesChannelUpdateRequest);
|
|
3552
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/sales-channels/{sales_channel_id}`
|
|
3553
|
+
.replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
|
|
3554
|
+
.replace(`{${"sales_channel_id"}}`, encodeURIComponent(String(salesChannelId)));
|
|
3555
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3556
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3557
|
+
let baseOptions;
|
|
3558
|
+
if (configuration) {
|
|
3559
|
+
baseOptions = configuration.baseOptions;
|
|
3560
|
+
}
|
|
3561
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
3562
|
+
const localVarHeaderParameter = {};
|
|
3563
|
+
const localVarQueryParameter = {};
|
|
3564
|
+
// authentication apiToken required
|
|
3565
|
+
// http bearer authentication required
|
|
3566
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3567
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3568
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3569
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3570
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3571
|
+
localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1SalesChannelUpdateRequest, localVarRequestOptions, configuration);
|
|
3572
|
+
return {
|
|
3573
|
+
url: toPathString(localVarUrlObj),
|
|
3574
|
+
options: localVarRequestOptions,
|
|
3575
|
+
};
|
|
3576
|
+
}),
|
|
3536
3577
|
};
|
|
3537
3578
|
};
|
|
3538
3579
|
/**
|
|
@@ -3544,17 +3585,17 @@ export const EcommerceSalesChannelsApiFp = function (configuration) {
|
|
|
3544
3585
|
return {
|
|
3545
3586
|
/**
|
|
3546
3587
|
* Create a custom sales channel for a store. Build your own frontend and keep your catalog, orders, shipping and payments in sync through the Ecommerce API.
|
|
3547
|
-
* @summary Create
|
|
3588
|
+
* @summary Create custom sales channel
|
|
3548
3589
|
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
3549
3590
|
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
3550
3591
|
* @param {*} [options] Override http request option.
|
|
3551
3592
|
* @throws {RequiredError}
|
|
3552
3593
|
*/
|
|
3553
|
-
|
|
3594
|
+
createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
|
|
3554
3595
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3555
3596
|
var _a, _b;
|
|
3556
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
3557
|
-
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceSalesChannelsApi.
|
|
3597
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options);
|
|
3598
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceSalesChannelsApi.createCustomSalesChannelV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
3558
3599
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3559
3600
|
});
|
|
3560
3601
|
},
|
|
@@ -3573,6 +3614,23 @@ export const EcommerceSalesChannelsApiFp = function (configuration) {
|
|
|
3573
3614
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3574
3615
|
});
|
|
3575
3616
|
},
|
|
3617
|
+
/**
|
|
3618
|
+
* Update a custom sales channel. The merchant-facing `name` and the public `url` (returned as the channel `domain`) can be changed. Pass `null` to clear a value.
|
|
3619
|
+
* @summary Update sales channel
|
|
3620
|
+
* @param {string} storeId The ID of the store that owns the sales channel.
|
|
3621
|
+
* @param {string} salesChannelId The ID of the sales channel to update.
|
|
3622
|
+
* @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
|
|
3623
|
+
* @param {*} [options] Override http request option.
|
|
3624
|
+
* @throws {RequiredError}
|
|
3625
|
+
*/
|
|
3626
|
+
updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options) {
|
|
3627
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3628
|
+
var _a, _b;
|
|
3629
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options);
|
|
3630
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceSalesChannelsApi.updateSalesChannelV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
3631
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3632
|
+
});
|
|
3633
|
+
},
|
|
3576
3634
|
};
|
|
3577
3635
|
};
|
|
3578
3636
|
/**
|
|
@@ -3584,14 +3642,14 @@ export const EcommerceSalesChannelsApiFactory = function (configuration, basePat
|
|
|
3584
3642
|
return {
|
|
3585
3643
|
/**
|
|
3586
3644
|
* Create a custom sales channel for a store. Build your own frontend and keep your catalog, orders, shipping and payments in sync through the Ecommerce API.
|
|
3587
|
-
* @summary Create
|
|
3645
|
+
* @summary Create custom sales channel
|
|
3588
3646
|
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
3589
3647
|
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
3590
3648
|
* @param {*} [options] Override http request option.
|
|
3591
3649
|
* @throws {RequiredError}
|
|
3592
3650
|
*/
|
|
3593
|
-
|
|
3594
|
-
return localVarFp.
|
|
3651
|
+
createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
|
|
3652
|
+
return localVarFp.createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(axios, basePath));
|
|
3595
3653
|
},
|
|
3596
3654
|
/**
|
|
3597
3655
|
* List a store\'s active sales channels with their full metadata.
|
|
@@ -3603,6 +3661,18 @@ export const EcommerceSalesChannelsApiFactory = function (configuration, basePat
|
|
|
3603
3661
|
listSalesChannelsV1(storeId, options) {
|
|
3604
3662
|
return localVarFp.listSalesChannelsV1(storeId, options).then((request) => request(axios, basePath));
|
|
3605
3663
|
},
|
|
3664
|
+
/**
|
|
3665
|
+
* Update a custom sales channel. The merchant-facing `name` and the public `url` (returned as the channel `domain`) can be changed. Pass `null` to clear a value.
|
|
3666
|
+
* @summary Update sales channel
|
|
3667
|
+
* @param {string} storeId The ID of the store that owns the sales channel.
|
|
3668
|
+
* @param {string} salesChannelId The ID of the sales channel to update.
|
|
3669
|
+
* @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
|
|
3670
|
+
* @param {*} [options] Override http request option.
|
|
3671
|
+
* @throws {RequiredError}
|
|
3672
|
+
*/
|
|
3673
|
+
updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options) {
|
|
3674
|
+
return localVarFp.updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options).then((request) => request(axios, basePath));
|
|
3675
|
+
},
|
|
3606
3676
|
};
|
|
3607
3677
|
};
|
|
3608
3678
|
/**
|
|
@@ -3614,15 +3684,15 @@ export const EcommerceSalesChannelsApiFactory = function (configuration, basePat
|
|
|
3614
3684
|
export class EcommerceSalesChannelsApi extends BaseAPI {
|
|
3615
3685
|
/**
|
|
3616
3686
|
* Create a custom sales channel for a store. Build your own frontend and keep your catalog, orders, shipping and payments in sync through the Ecommerce API.
|
|
3617
|
-
* @summary Create
|
|
3687
|
+
* @summary Create custom sales channel
|
|
3618
3688
|
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
3619
3689
|
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
3620
3690
|
* @param {*} [options] Override http request option.
|
|
3621
3691
|
* @throws {RequiredError}
|
|
3622
3692
|
* @memberof EcommerceSalesChannelsApi
|
|
3623
3693
|
*/
|
|
3624
|
-
|
|
3625
|
-
return EcommerceSalesChannelsApiFp(this.configuration).
|
|
3694
|
+
createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
|
|
3695
|
+
return EcommerceSalesChannelsApiFp(this.configuration).createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3626
3696
|
}
|
|
3627
3697
|
/**
|
|
3628
3698
|
* List a store\'s active sales channels with their full metadata.
|
|
@@ -3635,6 +3705,19 @@ export class EcommerceSalesChannelsApi extends BaseAPI {
|
|
|
3635
3705
|
listSalesChannelsV1(storeId, options) {
|
|
3636
3706
|
return EcommerceSalesChannelsApiFp(this.configuration).listSalesChannelsV1(storeId, options).then((request) => request(this.axios, this.basePath));
|
|
3637
3707
|
}
|
|
3708
|
+
/**
|
|
3709
|
+
* Update a custom sales channel. The merchant-facing `name` and the public `url` (returned as the channel `domain`) can be changed. Pass `null` to clear a value.
|
|
3710
|
+
* @summary Update sales channel
|
|
3711
|
+
* @param {string} storeId The ID of the store that owns the sales channel.
|
|
3712
|
+
* @param {string} salesChannelId The ID of the sales channel to update.
|
|
3713
|
+
* @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
|
|
3714
|
+
* @param {*} [options] Override http request option.
|
|
3715
|
+
* @throws {RequiredError}
|
|
3716
|
+
* @memberof EcommerceSalesChannelsApi
|
|
3717
|
+
*/
|
|
3718
|
+
updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options) {
|
|
3719
|
+
return EcommerceSalesChannelsApiFp(this.configuration).updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3720
|
+
}
|
|
3638
3721
|
}
|
|
3639
3722
|
/**
|
|
3640
3723
|
* EcommerceShippingApi - axios parameter creator
|
|
@@ -3817,6 +3900,38 @@ export const EcommerceStoresApiAxiosParamCreator = function (configuration) {
|
|
|
3817
3900
|
options: localVarRequestOptions,
|
|
3818
3901
|
};
|
|
3819
3902
|
}),
|
|
3903
|
+
/**
|
|
3904
|
+
* Get a store\'s readiness metadata: whether payment methods and shipping are configured, plus its default currency. Useful to verify prerequisites before building a storefront.
|
|
3905
|
+
* @summary Get store metadata
|
|
3906
|
+
* @param {string} storeId The ID of the store to read metadata for.
|
|
3907
|
+
* @param {*} [options] Override http request option.
|
|
3908
|
+
* @throws {RequiredError}
|
|
3909
|
+
*/
|
|
3910
|
+
getStoreMetadataV1: (storeId_1, ...args_1) => __awaiter(this, [storeId_1, ...args_1], void 0, function* (storeId, options = {}) {
|
|
3911
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
3912
|
+
assertParamExists('getStoreMetadataV1', 'storeId', storeId);
|
|
3913
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/metadata`
|
|
3914
|
+
.replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
|
|
3915
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3916
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3917
|
+
let baseOptions;
|
|
3918
|
+
if (configuration) {
|
|
3919
|
+
baseOptions = configuration.baseOptions;
|
|
3920
|
+
}
|
|
3921
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3922
|
+
const localVarHeaderParameter = {};
|
|
3923
|
+
const localVarQueryParameter = {};
|
|
3924
|
+
// authentication apiToken required
|
|
3925
|
+
// http bearer authentication required
|
|
3926
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3927
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3928
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3929
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3930
|
+
return {
|
|
3931
|
+
url: toPathString(localVarUrlObj),
|
|
3932
|
+
options: localVarRequestOptions,
|
|
3933
|
+
};
|
|
3934
|
+
}),
|
|
3820
3935
|
/**
|
|
3821
3936
|
* Retrieve the stores associated with your account.
|
|
3822
3937
|
* @summary Get stores
|
|
@@ -3888,6 +4003,21 @@ export const EcommerceStoresApiFp = function (configuration) {
|
|
|
3888
4003
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3889
4004
|
});
|
|
3890
4005
|
},
|
|
4006
|
+
/**
|
|
4007
|
+
* Get a store\'s readiness metadata: whether payment methods and shipping are configured, plus its default currency. Useful to verify prerequisites before building a storefront.
|
|
4008
|
+
* @summary Get store metadata
|
|
4009
|
+
* @param {string} storeId The ID of the store to read metadata for.
|
|
4010
|
+
* @param {*} [options] Override http request option.
|
|
4011
|
+
* @throws {RequiredError}
|
|
4012
|
+
*/
|
|
4013
|
+
getStoreMetadataV1(storeId, options) {
|
|
4014
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4015
|
+
var _a, _b;
|
|
4016
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getStoreMetadataV1(storeId, options);
|
|
4017
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceStoresApi.getStoreMetadataV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
4018
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4019
|
+
});
|
|
4020
|
+
},
|
|
3891
4021
|
/**
|
|
3892
4022
|
* Retrieve the stores associated with your account.
|
|
3893
4023
|
* @summary Get stores
|
|
@@ -3932,6 +4062,16 @@ export const EcommerceStoresApiFactory = function (configuration, basePath, axio
|
|
|
3932
4062
|
deleteStoreV1(storeId, options) {
|
|
3933
4063
|
return localVarFp.deleteStoreV1(storeId, options).then((request) => request(axios, basePath));
|
|
3934
4064
|
},
|
|
4065
|
+
/**
|
|
4066
|
+
* Get a store\'s readiness metadata: whether payment methods and shipping are configured, plus its default currency. Useful to verify prerequisites before building a storefront.
|
|
4067
|
+
* @summary Get store metadata
|
|
4068
|
+
* @param {string} storeId The ID of the store to read metadata for.
|
|
4069
|
+
* @param {*} [options] Override http request option.
|
|
4070
|
+
* @throws {RequiredError}
|
|
4071
|
+
*/
|
|
4072
|
+
getStoreMetadataV1(storeId, options) {
|
|
4073
|
+
return localVarFp.getStoreMetadataV1(storeId, options).then((request) => request(axios, basePath));
|
|
4074
|
+
},
|
|
3935
4075
|
/**
|
|
3936
4076
|
* Retrieve the stores associated with your account.
|
|
3937
4077
|
* @summary Get stores
|
|
@@ -3973,6 +4113,17 @@ export class EcommerceStoresApi extends BaseAPI {
|
|
|
3973
4113
|
deleteStoreV1(storeId, options) {
|
|
3974
4114
|
return EcommerceStoresApiFp(this.configuration).deleteStoreV1(storeId, options).then((request) => request(this.axios, this.basePath));
|
|
3975
4115
|
}
|
|
4116
|
+
/**
|
|
4117
|
+
* Get a store\'s readiness metadata: whether payment methods and shipping are configured, plus its default currency. Useful to verify prerequisites before building a storefront.
|
|
4118
|
+
* @summary Get store metadata
|
|
4119
|
+
* @param {string} storeId The ID of the store to read metadata for.
|
|
4120
|
+
* @param {*} [options] Override http request option.
|
|
4121
|
+
* @throws {RequiredError}
|
|
4122
|
+
* @memberof EcommerceStoresApi
|
|
4123
|
+
*/
|
|
4124
|
+
getStoreMetadataV1(storeId, options) {
|
|
4125
|
+
return EcommerceStoresApiFp(this.configuration).getStoreMetadataV1(storeId, options).then((request) => request(this.axios, this.basePath));
|
|
4126
|
+
}
|
|
3976
4127
|
/**
|
|
3977
4128
|
* Retrieve the stores associated with your account.
|
|
3978
4129
|
* @summary Get stores
|
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.2.
|
|
4
|
+
* API Version: 1.2.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/esm/base.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.2.
|
|
6
|
+
* API Version: 1.2.1
|
|
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
|
package/dist/esm/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.2.
|
|
4
|
+
* API Version: 1.2.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/esm/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.2.
|
|
6
|
+
* API Version: 1.2.1
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.2.
|
|
4
|
+
* API Version: 1.2.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
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.2.
|
|
6
|
+
* API Version: 1.2.1
|
|
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
|
|
@@ -13,7 +13,7 @@ export class Configuration {
|
|
|
13
13
|
var _a;
|
|
14
14
|
this.accessToken = param.accessToken;
|
|
15
15
|
this.basePath = param.basePath;
|
|
16
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.2.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.2.1" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
17
17
|
this.formDataCtor = param.formDataCtor;
|
|
18
18
|
}
|
|
19
19
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.2.
|
|
4
|
+
* API Version: 1.2.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/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.2.
|
|
6
|
+
* API Version: 1.2.1
|
|
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
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.2.
|
|
4
|
+
* API Version: 1.2.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/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.2.
|
|
7
|
+
* API Version: 1.2.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
|
|
@@ -4,11 +4,12 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
4
4
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
-
|[**
|
|
7
|
+
|[**createCustomSalesChannelV1**](#createcustomsaleschannelv1) | **POST** /api/ecommerce/v1/stores/{store_id}/sales-channels | Create custom sales channel|
|
|
8
8
|
|[**listSalesChannelsV1**](#listsaleschannelsv1) | **GET** /api/ecommerce/v1/stores/{store_id}/sales-channels | List sales channels|
|
|
9
|
+
|[**updateSalesChannelV1**](#updatesaleschannelv1) | **PATCH** /api/ecommerce/v1/stores/{store_id}/sales-channels/{sales_channel_id} | Update sales channel|
|
|
9
10
|
|
|
10
|
-
# **
|
|
11
|
-
> EcommerceV1SalesChannelSalesChannelCreationResource
|
|
11
|
+
# **createCustomSalesChannelV1**
|
|
12
|
+
> EcommerceV1SalesChannelSalesChannelCreationResource createCustomSalesChannelV1(ecommerceV1SalesChannelStoreRequest)
|
|
12
13
|
|
|
13
14
|
Create a custom sales channel for a store. Build your own frontend and keep your catalog, orders, shipping and payments in sync through the Ecommerce API.
|
|
14
15
|
|
|
@@ -27,7 +28,7 @@ const apiInstance = new EcommerceSalesChannelsApi(configuration);
|
|
|
27
28
|
let storeId: string; //The ID of the store to create the sales channel for. (default to undefined)
|
|
28
29
|
let ecommerceV1SalesChannelStoreRequest: EcommerceV1SalesChannelStoreRequest; //
|
|
29
30
|
|
|
30
|
-
const { status, data } = await apiInstance.
|
|
31
|
+
const { status, data } = await apiInstance.createCustomSalesChannelV1(
|
|
31
32
|
storeId,
|
|
32
33
|
ecommerceV1SalesChannelStoreRequest
|
|
33
34
|
);
|
|
@@ -118,3 +119,64 @@ const { status, data } = await apiInstance.listSalesChannelsV1(
|
|
|
118
119
|
|
|
119
120
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
120
121
|
|
|
122
|
+
# **updateSalesChannelV1**
|
|
123
|
+
> EcommerceV1SalesChannelSalesChannelUpdateResource updateSalesChannelV1(ecommerceV1SalesChannelUpdateRequest)
|
|
124
|
+
|
|
125
|
+
Update a custom sales channel. The merchant-facing `name` and the public `url` (returned as the channel `domain`) can be changed. Pass `null` to clear a value.
|
|
126
|
+
|
|
127
|
+
### Example
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
import {
|
|
131
|
+
EcommerceSalesChannelsApi,
|
|
132
|
+
Configuration,
|
|
133
|
+
EcommerceV1SalesChannelUpdateRequest
|
|
134
|
+
} from 'hostinger-api-sdk';
|
|
135
|
+
|
|
136
|
+
const configuration = new Configuration();
|
|
137
|
+
const apiInstance = new EcommerceSalesChannelsApi(configuration);
|
|
138
|
+
|
|
139
|
+
let storeId: string; //The ID of the store that owns the sales channel. (default to undefined)
|
|
140
|
+
let salesChannelId: string; //The ID of the sales channel to update. (default to undefined)
|
|
141
|
+
let ecommerceV1SalesChannelUpdateRequest: EcommerceV1SalesChannelUpdateRequest; //
|
|
142
|
+
|
|
143
|
+
const { status, data } = await apiInstance.updateSalesChannelV1(
|
|
144
|
+
storeId,
|
|
145
|
+
salesChannelId,
|
|
146
|
+
ecommerceV1SalesChannelUpdateRequest
|
|
147
|
+
);
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Parameters
|
|
151
|
+
|
|
152
|
+
|Name | Type | Description | Notes|
|
|
153
|
+
|------------- | ------------- | ------------- | -------------|
|
|
154
|
+
| **ecommerceV1SalesChannelUpdateRequest** | **EcommerceV1SalesChannelUpdateRequest**| | |
|
|
155
|
+
| **storeId** | [**string**] | The ID of the store that owns the sales channel. | defaults to undefined|
|
|
156
|
+
| **salesChannelId** | [**string**] | The ID of the sales channel to update. | defaults to undefined|
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
### Return type
|
|
160
|
+
|
|
161
|
+
**EcommerceV1SalesChannelSalesChannelUpdateResource**
|
|
162
|
+
|
|
163
|
+
### Authorization
|
|
164
|
+
|
|
165
|
+
[apiToken](../README.md#apiToken)
|
|
166
|
+
|
|
167
|
+
### HTTP request headers
|
|
168
|
+
|
|
169
|
+
- **Content-Type**: application/json
|
|
170
|
+
- **Accept**: application/json
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
### HTTP response details
|
|
174
|
+
| Status code | Description | Response headers |
|
|
175
|
+
|-------------|-------------|------------------|
|
|
176
|
+
|**200** | Success response | - |
|
|
177
|
+
|**422** | Validation error response | - |
|
|
178
|
+
|**401** | Unauthenticated response | - |
|
|
179
|
+
|**500** | Error response | - |
|
|
180
|
+
|
|
181
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
182
|
+
|
|
@@ -6,6 +6,7 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
|[**createStoreV1**](#createstorev1) | **POST** /api/ecommerce/v1/stores | Create store|
|
|
8
8
|
|[**deleteStoreV1**](#deletestorev1) | **DELETE** /api/ecommerce/v1/stores/{store_id} | Delete store|
|
|
9
|
+
|[**getStoreMetadataV1**](#getstoremetadatav1) | **GET** /api/ecommerce/v1/stores/{store_id}/metadata | Get store metadata|
|
|
9
10
|
|[**getStoresV1**](#getstoresv1) | **GET** /api/ecommerce/v1/stores | Get stores|
|
|
10
11
|
|
|
11
12
|
# **createStoreV1**
|
|
@@ -107,6 +108,59 @@ const { status, data } = await apiInstance.deleteStoreV1(
|
|
|
107
108
|
- **Accept**: application/json
|
|
108
109
|
|
|
109
110
|
|
|
111
|
+
### HTTP response details
|
|
112
|
+
| Status code | Description | Response headers |
|
|
113
|
+
|-------------|-------------|------------------|
|
|
114
|
+
|**200** | Success response | - |
|
|
115
|
+
|**401** | Unauthenticated response | - |
|
|
116
|
+
|**500** | Error response | - |
|
|
117
|
+
|
|
118
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
119
|
+
|
|
120
|
+
# **getStoreMetadataV1**
|
|
121
|
+
> EcommerceV1StoreStoreMetadataResource getStoreMetadataV1()
|
|
122
|
+
|
|
123
|
+
Get a store\'s readiness metadata: whether payment methods and shipping are configured, plus its default currency. Useful to verify prerequisites before building a storefront.
|
|
124
|
+
|
|
125
|
+
### Example
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
import {
|
|
129
|
+
EcommerceStoresApi,
|
|
130
|
+
Configuration
|
|
131
|
+
} from 'hostinger-api-sdk';
|
|
132
|
+
|
|
133
|
+
const configuration = new Configuration();
|
|
134
|
+
const apiInstance = new EcommerceStoresApi(configuration);
|
|
135
|
+
|
|
136
|
+
let storeId: string; //The ID of the store to read metadata for. (default to undefined)
|
|
137
|
+
|
|
138
|
+
const { status, data } = await apiInstance.getStoreMetadataV1(
|
|
139
|
+
storeId
|
|
140
|
+
);
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Parameters
|
|
144
|
+
|
|
145
|
+
|Name | Type | Description | Notes|
|
|
146
|
+
|------------- | ------------- | ------------- | -------------|
|
|
147
|
+
| **storeId** | [**string**] | The ID of the store to read metadata for. | defaults to undefined|
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
### Return type
|
|
151
|
+
|
|
152
|
+
**EcommerceV1StoreStoreMetadataResource**
|
|
153
|
+
|
|
154
|
+
### Authorization
|
|
155
|
+
|
|
156
|
+
[apiToken](../README.md#apiToken)
|
|
157
|
+
|
|
158
|
+
### HTTP request headers
|
|
159
|
+
|
|
160
|
+
- **Content-Type**: Not defined
|
|
161
|
+
- **Accept**: application/json
|
|
162
|
+
|
|
163
|
+
|
|
110
164
|
### HTTP response details
|
|
111
165
|
| Status code | Description | Response headers |
|
|
112
166
|
|-------------|-------------|------------------|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# EcommerceV1SalesChannelSalesChannelUpdateResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**sales_channel** | [**EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannel**](EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannel.md) | | [optional] [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { EcommerceV1SalesChannelSalesChannelUpdateResource } from 'hostinger-api-sdk';
|
|
14
|
+
|
|
15
|
+
const instance: EcommerceV1SalesChannelSalesChannelUpdateResource = {
|
|
16
|
+
sales_channel,
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# EcommerceV1SalesChannelUpdateRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**name** | **string** | Merchant-facing custom name shown in the sales channels list. Pass null to clear it. | [optional] [default to undefined]
|
|
9
|
+
**url** | **string** | Public address where the custom sales channel lives. Pass null to clear it. | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { EcommerceV1SalesChannelUpdateRequest } from 'hostinger-api-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: EcommerceV1SalesChannelUpdateRequest = {
|
|
17
|
+
name,
|
|
18
|
+
url,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# EcommerceV1StoreStoreMetadataResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**metadata** | [**EcommerceV1StoreStoreMetadataResourceMetadata**](EcommerceV1StoreStoreMetadataResourceMetadata.md) | | [optional] [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { EcommerceV1StoreStoreMetadataResource } from 'hostinger-api-sdk';
|
|
14
|
+
|
|
15
|
+
const instance: EcommerceV1StoreStoreMetadataResource = {
|
|
16
|
+
metadata,
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# EcommerceV1StoreStoreMetadataResourceMetadata
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**has_payment_methods** | **boolean** | Whether the store has at least one payment method connected. | [optional] [default to undefined]
|
|
9
|
+
**has_shipping** | **boolean** | Whether the store has at least one shipping option configured. | [optional] [default to undefined]
|
|
10
|
+
**default_currency_code** | **string** | The default currency code of the store. | [optional] [default to undefined]
|
|
11
|
+
**default_currency** | [**EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency**](EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency.md) | | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { EcommerceV1StoreStoreMetadataResourceMetadata } from 'hostinger-api-sdk';
|
|
17
|
+
|
|
18
|
+
const instance: EcommerceV1StoreStoreMetadataResourceMetadata = {
|
|
19
|
+
has_payment_methods,
|
|
20
|
+
has_shipping,
|
|
21
|
+
default_currency_code,
|
|
22
|
+
default_currency,
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|