hostinger-api-sdk 1.1.0 → 1.1.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 +490 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +336 -1
- package/dist/api.js +306 -6
- 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 +336 -1
- package/dist/esm/api.js +293 -1
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/EcommerceMiscellaneousApi.md +54 -0
- package/docs/EcommerceSalesChannelsApi.md +120 -0
- package/docs/EcommerceV1MiscellaneousCustomStorefrontInstructionsResource.md +20 -0
- package/docs/EcommerceV1SalesChannelSalesChannelCreationResource.md +20 -0
- package/docs/EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannel.md +32 -0
- package/docs/EcommerceV1SalesChannelSalesChannelListResource.md +20 -0
- package/docs/EcommerceV1SalesChannelSalesChannelListResourceSalesChannelsInner.md +32 -0
- package/docs/EcommerceV1SalesChannelStoreRequest.md +24 -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.1.
|
|
6
|
+
* API Version: 1.1.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
|
|
@@ -138,6 +138,25 @@ export const EcommerceV1ProductProductCreationResourceProductTypeEnum = {
|
|
|
138
138
|
Physical: 'physical',
|
|
139
139
|
Digital: 'digital'
|
|
140
140
|
};
|
|
141
|
+
export const EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannelTypeEnum = {
|
|
142
|
+
Builder: 'builder',
|
|
143
|
+
Horizons: 'horizons',
|
|
144
|
+
Tiktok: 'tiktok',
|
|
145
|
+
Custom: 'custom',
|
|
146
|
+
QuickLink: 'quick-link',
|
|
147
|
+
Wordpress: 'wordpress'
|
|
148
|
+
};
|
|
149
|
+
export const EcommerceV1SalesChannelSalesChannelListResourceSalesChannelsInnerTypeEnum = {
|
|
150
|
+
Builder: 'builder',
|
|
151
|
+
Horizons: 'horizons',
|
|
152
|
+
Tiktok: 'tiktok',
|
|
153
|
+
Custom: 'custom',
|
|
154
|
+
QuickLink: 'quick-link',
|
|
155
|
+
Wordpress: 'wordpress'
|
|
156
|
+
};
|
|
157
|
+
export const EcommerceV1SalesChannelStoreRequestTypeEnum = {
|
|
158
|
+
Custom: 'custom'
|
|
159
|
+
};
|
|
141
160
|
export const EcommerceV1StoreStoreCreationResourceSalesChannelTypeEnum = {
|
|
142
161
|
Builder: 'builder',
|
|
143
162
|
Horizons: 'horizons',
|
|
@@ -3048,6 +3067,101 @@ export class DomainsWHOISApi extends BaseAPI {
|
|
|
3048
3067
|
return DomainsWHOISApiFp(this.configuration).getWHOISProfileV1(whoisId, options).then((request) => request(this.axios, this.basePath));
|
|
3049
3068
|
}
|
|
3050
3069
|
}
|
|
3070
|
+
/**
|
|
3071
|
+
* EcommerceMiscellaneousApi - axios parameter creator
|
|
3072
|
+
* @export
|
|
3073
|
+
*/
|
|
3074
|
+
export const EcommerceMiscellaneousApiAxiosParamCreator = function (configuration) {
|
|
3075
|
+
return {
|
|
3076
|
+
/**
|
|
3077
|
+
* Retrieve step-by-step setup instructions, formatted as Markdown, for connecting a custom sales channel to your store and keeping your catalog, orders, shipping and payments in sync through the Ecommerce API.
|
|
3078
|
+
* @summary Get custom storefront setup instructions
|
|
3079
|
+
* @param {*} [options] Override http request option.
|
|
3080
|
+
* @throws {RequiredError}
|
|
3081
|
+
*/
|
|
3082
|
+
getCustomStorefrontSetupInstructionsV1: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
3083
|
+
const localVarPath = `/api/ecommerce/v1/miscellaneous/custom-storefront-instructions`;
|
|
3084
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3085
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3086
|
+
let baseOptions;
|
|
3087
|
+
if (configuration) {
|
|
3088
|
+
baseOptions = configuration.baseOptions;
|
|
3089
|
+
}
|
|
3090
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3091
|
+
const localVarHeaderParameter = {};
|
|
3092
|
+
const localVarQueryParameter = {};
|
|
3093
|
+
// authentication apiToken required
|
|
3094
|
+
// http bearer authentication required
|
|
3095
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3096
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3097
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3098
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3099
|
+
return {
|
|
3100
|
+
url: toPathString(localVarUrlObj),
|
|
3101
|
+
options: localVarRequestOptions,
|
|
3102
|
+
};
|
|
3103
|
+
}),
|
|
3104
|
+
};
|
|
3105
|
+
};
|
|
3106
|
+
/**
|
|
3107
|
+
* EcommerceMiscellaneousApi - functional programming interface
|
|
3108
|
+
* @export
|
|
3109
|
+
*/
|
|
3110
|
+
export const EcommerceMiscellaneousApiFp = function (configuration) {
|
|
3111
|
+
const localVarAxiosParamCreator = EcommerceMiscellaneousApiAxiosParamCreator(configuration);
|
|
3112
|
+
return {
|
|
3113
|
+
/**
|
|
3114
|
+
* Retrieve step-by-step setup instructions, formatted as Markdown, for connecting a custom sales channel to your store and keeping your catalog, orders, shipping and payments in sync through the Ecommerce API.
|
|
3115
|
+
* @summary Get custom storefront setup instructions
|
|
3116
|
+
* @param {*} [options] Override http request option.
|
|
3117
|
+
* @throws {RequiredError}
|
|
3118
|
+
*/
|
|
3119
|
+
getCustomStorefrontSetupInstructionsV1(options) {
|
|
3120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3121
|
+
var _a, _b;
|
|
3122
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCustomStorefrontSetupInstructionsV1(options);
|
|
3123
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceMiscellaneousApi.getCustomStorefrontSetupInstructionsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
3124
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3125
|
+
});
|
|
3126
|
+
},
|
|
3127
|
+
};
|
|
3128
|
+
};
|
|
3129
|
+
/**
|
|
3130
|
+
* EcommerceMiscellaneousApi - factory interface
|
|
3131
|
+
* @export
|
|
3132
|
+
*/
|
|
3133
|
+
export const EcommerceMiscellaneousApiFactory = function (configuration, basePath, axios) {
|
|
3134
|
+
const localVarFp = EcommerceMiscellaneousApiFp(configuration);
|
|
3135
|
+
return {
|
|
3136
|
+
/**
|
|
3137
|
+
* Retrieve step-by-step setup instructions, formatted as Markdown, for connecting a custom sales channel to your store and keeping your catalog, orders, shipping and payments in sync through the Ecommerce API.
|
|
3138
|
+
* @summary Get custom storefront setup instructions
|
|
3139
|
+
* @param {*} [options] Override http request option.
|
|
3140
|
+
* @throws {RequiredError}
|
|
3141
|
+
*/
|
|
3142
|
+
getCustomStorefrontSetupInstructionsV1(options) {
|
|
3143
|
+
return localVarFp.getCustomStorefrontSetupInstructionsV1(options).then((request) => request(axios, basePath));
|
|
3144
|
+
},
|
|
3145
|
+
};
|
|
3146
|
+
};
|
|
3147
|
+
/**
|
|
3148
|
+
* EcommerceMiscellaneousApi - object-oriented interface
|
|
3149
|
+
* @export
|
|
3150
|
+
* @class EcommerceMiscellaneousApi
|
|
3151
|
+
* @extends {BaseAPI}
|
|
3152
|
+
*/
|
|
3153
|
+
export class EcommerceMiscellaneousApi extends BaseAPI {
|
|
3154
|
+
/**
|
|
3155
|
+
* Retrieve step-by-step setup instructions, formatted as Markdown, for connecting a custom sales channel to your store and keeping your catalog, orders, shipping and payments in sync through the Ecommerce API.
|
|
3156
|
+
* @summary Get custom storefront setup instructions
|
|
3157
|
+
* @param {*} [options] Override http request option.
|
|
3158
|
+
* @throws {RequiredError}
|
|
3159
|
+
* @memberof EcommerceMiscellaneousApi
|
|
3160
|
+
*/
|
|
3161
|
+
getCustomStorefrontSetupInstructionsV1(options) {
|
|
3162
|
+
return EcommerceMiscellaneousApiFp(this.configuration).getCustomStorefrontSetupInstructionsV1(options).then((request) => request(this.axios, this.basePath));
|
|
3163
|
+
}
|
|
3164
|
+
}
|
|
3051
3165
|
/**
|
|
3052
3166
|
* EcommercePaymentsApi - axios parameter creator
|
|
3053
3167
|
* @export
|
|
@@ -3344,6 +3458,184 @@ export class EcommerceProductsApi extends BaseAPI {
|
|
|
3344
3458
|
return EcommerceProductsApiFp(this.configuration).createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3345
3459
|
}
|
|
3346
3460
|
}
|
|
3461
|
+
/**
|
|
3462
|
+
* EcommerceSalesChannelsApi - axios parameter creator
|
|
3463
|
+
* @export
|
|
3464
|
+
*/
|
|
3465
|
+
export const EcommerceSalesChannelsApiAxiosParamCreator = function (configuration) {
|
|
3466
|
+
return {
|
|
3467
|
+
/**
|
|
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 a custom sales channel
|
|
3470
|
+
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
3471
|
+
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
3472
|
+
* @param {*} [options] Override http request option.
|
|
3473
|
+
* @throws {RequiredError}
|
|
3474
|
+
*/
|
|
3475
|
+
createACustomSalesChannelV1: (storeId_1, ecommerceV1SalesChannelStoreRequest_1, ...args_1) => __awaiter(this, [storeId_1, ecommerceV1SalesChannelStoreRequest_1, ...args_1], void 0, function* (storeId, ecommerceV1SalesChannelStoreRequest, options = {}) {
|
|
3476
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
3477
|
+
assertParamExists('createACustomSalesChannelV1', 'storeId', storeId);
|
|
3478
|
+
// verify required parameter 'ecommerceV1SalesChannelStoreRequest' is not null or undefined
|
|
3479
|
+
assertParamExists('createACustomSalesChannelV1', 'ecommerceV1SalesChannelStoreRequest', ecommerceV1SalesChannelStoreRequest);
|
|
3480
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/sales-channels`
|
|
3481
|
+
.replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
|
|
3482
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3483
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3484
|
+
let baseOptions;
|
|
3485
|
+
if (configuration) {
|
|
3486
|
+
baseOptions = configuration.baseOptions;
|
|
3487
|
+
}
|
|
3488
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
3489
|
+
const localVarHeaderParameter = {};
|
|
3490
|
+
const localVarQueryParameter = {};
|
|
3491
|
+
// authentication apiToken required
|
|
3492
|
+
// http bearer authentication required
|
|
3493
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3494
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3495
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3496
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3497
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3498
|
+
localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1SalesChannelStoreRequest, localVarRequestOptions, configuration);
|
|
3499
|
+
return {
|
|
3500
|
+
url: toPathString(localVarUrlObj),
|
|
3501
|
+
options: localVarRequestOptions,
|
|
3502
|
+
};
|
|
3503
|
+
}),
|
|
3504
|
+
/**
|
|
3505
|
+
* List a store\'s active sales channels with their full metadata.
|
|
3506
|
+
* @summary List sales channels
|
|
3507
|
+
* @param {string} storeId The ID of the store to list sales channels for.
|
|
3508
|
+
* @param {*} [options] Override http request option.
|
|
3509
|
+
* @throws {RequiredError}
|
|
3510
|
+
*/
|
|
3511
|
+
listSalesChannelsV1: (storeId_1, ...args_1) => __awaiter(this, [storeId_1, ...args_1], void 0, function* (storeId, options = {}) {
|
|
3512
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
3513
|
+
assertParamExists('listSalesChannelsV1', 'storeId', storeId);
|
|
3514
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/sales-channels`
|
|
3515
|
+
.replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
|
|
3516
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3517
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3518
|
+
let baseOptions;
|
|
3519
|
+
if (configuration) {
|
|
3520
|
+
baseOptions = configuration.baseOptions;
|
|
3521
|
+
}
|
|
3522
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3523
|
+
const localVarHeaderParameter = {};
|
|
3524
|
+
const localVarQueryParameter = {};
|
|
3525
|
+
// authentication apiToken required
|
|
3526
|
+
// http bearer authentication required
|
|
3527
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3528
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3529
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3530
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3531
|
+
return {
|
|
3532
|
+
url: toPathString(localVarUrlObj),
|
|
3533
|
+
options: localVarRequestOptions,
|
|
3534
|
+
};
|
|
3535
|
+
}),
|
|
3536
|
+
};
|
|
3537
|
+
};
|
|
3538
|
+
/**
|
|
3539
|
+
* EcommerceSalesChannelsApi - functional programming interface
|
|
3540
|
+
* @export
|
|
3541
|
+
*/
|
|
3542
|
+
export const EcommerceSalesChannelsApiFp = function (configuration) {
|
|
3543
|
+
const localVarAxiosParamCreator = EcommerceSalesChannelsApiAxiosParamCreator(configuration);
|
|
3544
|
+
return {
|
|
3545
|
+
/**
|
|
3546
|
+
* 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 a custom sales channel
|
|
3548
|
+
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
3549
|
+
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
3550
|
+
* @param {*} [options] Override http request option.
|
|
3551
|
+
* @throws {RequiredError}
|
|
3552
|
+
*/
|
|
3553
|
+
createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
|
|
3554
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3555
|
+
var _a, _b;
|
|
3556
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options);
|
|
3557
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceSalesChannelsApi.createACustomSalesChannelV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
3558
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3559
|
+
});
|
|
3560
|
+
},
|
|
3561
|
+
/**
|
|
3562
|
+
* List a store\'s active sales channels with their full metadata.
|
|
3563
|
+
* @summary List sales channels
|
|
3564
|
+
* @param {string} storeId The ID of the store to list sales channels for.
|
|
3565
|
+
* @param {*} [options] Override http request option.
|
|
3566
|
+
* @throws {RequiredError}
|
|
3567
|
+
*/
|
|
3568
|
+
listSalesChannelsV1(storeId, options) {
|
|
3569
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3570
|
+
var _a, _b;
|
|
3571
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listSalesChannelsV1(storeId, options);
|
|
3572
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceSalesChannelsApi.listSalesChannelsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
3573
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3574
|
+
});
|
|
3575
|
+
},
|
|
3576
|
+
};
|
|
3577
|
+
};
|
|
3578
|
+
/**
|
|
3579
|
+
* EcommerceSalesChannelsApi - factory interface
|
|
3580
|
+
* @export
|
|
3581
|
+
*/
|
|
3582
|
+
export const EcommerceSalesChannelsApiFactory = function (configuration, basePath, axios) {
|
|
3583
|
+
const localVarFp = EcommerceSalesChannelsApiFp(configuration);
|
|
3584
|
+
return {
|
|
3585
|
+
/**
|
|
3586
|
+
* 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 a custom sales channel
|
|
3588
|
+
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
3589
|
+
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
3590
|
+
* @param {*} [options] Override http request option.
|
|
3591
|
+
* @throws {RequiredError}
|
|
3592
|
+
*/
|
|
3593
|
+
createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
|
|
3594
|
+
return localVarFp.createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(axios, basePath));
|
|
3595
|
+
},
|
|
3596
|
+
/**
|
|
3597
|
+
* List a store\'s active sales channels with their full metadata.
|
|
3598
|
+
* @summary List sales channels
|
|
3599
|
+
* @param {string} storeId The ID of the store to list sales channels for.
|
|
3600
|
+
* @param {*} [options] Override http request option.
|
|
3601
|
+
* @throws {RequiredError}
|
|
3602
|
+
*/
|
|
3603
|
+
listSalesChannelsV1(storeId, options) {
|
|
3604
|
+
return localVarFp.listSalesChannelsV1(storeId, options).then((request) => request(axios, basePath));
|
|
3605
|
+
},
|
|
3606
|
+
};
|
|
3607
|
+
};
|
|
3608
|
+
/**
|
|
3609
|
+
* EcommerceSalesChannelsApi - object-oriented interface
|
|
3610
|
+
* @export
|
|
3611
|
+
* @class EcommerceSalesChannelsApi
|
|
3612
|
+
* @extends {BaseAPI}
|
|
3613
|
+
*/
|
|
3614
|
+
export class EcommerceSalesChannelsApi extends BaseAPI {
|
|
3615
|
+
/**
|
|
3616
|
+
* 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 a custom sales channel
|
|
3618
|
+
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
3619
|
+
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
3620
|
+
* @param {*} [options] Override http request option.
|
|
3621
|
+
* @throws {RequiredError}
|
|
3622
|
+
* @memberof EcommerceSalesChannelsApi
|
|
3623
|
+
*/
|
|
3624
|
+
createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
|
|
3625
|
+
return EcommerceSalesChannelsApiFp(this.configuration).createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3626
|
+
}
|
|
3627
|
+
/**
|
|
3628
|
+
* List a store\'s active sales channels with their full metadata.
|
|
3629
|
+
* @summary List sales channels
|
|
3630
|
+
* @param {string} storeId The ID of the store to list sales channels for.
|
|
3631
|
+
* @param {*} [options] Override http request option.
|
|
3632
|
+
* @throws {RequiredError}
|
|
3633
|
+
* @memberof EcommerceSalesChannelsApi
|
|
3634
|
+
*/
|
|
3635
|
+
listSalesChannelsV1(storeId, options) {
|
|
3636
|
+
return EcommerceSalesChannelsApiFp(this.configuration).listSalesChannelsV1(storeId, options).then((request) => request(this.axios, this.basePath));
|
|
3637
|
+
}
|
|
3638
|
+
}
|
|
3347
3639
|
/**
|
|
3348
3640
|
* EcommerceShippingApi - axios parameter creator
|
|
3349
3641
|
* @export
|
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.1.
|
|
4
|
+
* API Version: 1.1.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.1.
|
|
6
|
+
* API Version: 1.1.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.1.
|
|
4
|
+
* API Version: 1.1.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.1.
|
|
6
|
+
* API Version: 1.1.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.1.
|
|
4
|
+
* API Version: 1.1.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.1.
|
|
6
|
+
* API Version: 1.1.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.1.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.1.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.1.
|
|
4
|
+
* API Version: 1.1.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.1.
|
|
6
|
+
* API Version: 1.1.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.1.
|
|
4
|
+
* API Version: 1.1.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.1.
|
|
7
|
+
* API Version: 1.1.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
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# EcommerceMiscellaneousApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://developers.hostinger.com*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**getCustomStorefrontSetupInstructionsV1**](#getcustomstorefrontsetupinstructionsv1) | **GET** /api/ecommerce/v1/miscellaneous/custom-storefront-instructions | Get custom storefront setup instructions|
|
|
8
|
+
|
|
9
|
+
# **getCustomStorefrontSetupInstructionsV1**
|
|
10
|
+
> EcommerceV1MiscellaneousCustomStorefrontInstructionsResource getCustomStorefrontSetupInstructionsV1()
|
|
11
|
+
|
|
12
|
+
Retrieve step-by-step setup instructions, formatted as Markdown, for connecting a custom sales channel to your store and keeping your catalog, orders, shipping and payments in sync through the Ecommerce API.
|
|
13
|
+
|
|
14
|
+
### Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import {
|
|
18
|
+
EcommerceMiscellaneousApi,
|
|
19
|
+
Configuration
|
|
20
|
+
} from 'hostinger-api-sdk';
|
|
21
|
+
|
|
22
|
+
const configuration = new Configuration();
|
|
23
|
+
const apiInstance = new EcommerceMiscellaneousApi(configuration);
|
|
24
|
+
|
|
25
|
+
const { status, data } = await apiInstance.getCustomStorefrontSetupInstructionsV1();
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Parameters
|
|
29
|
+
This endpoint does not have any parameters.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Return type
|
|
33
|
+
|
|
34
|
+
**EcommerceV1MiscellaneousCustomStorefrontInstructionsResource**
|
|
35
|
+
|
|
36
|
+
### Authorization
|
|
37
|
+
|
|
38
|
+
[apiToken](../README.md#apiToken)
|
|
39
|
+
|
|
40
|
+
### HTTP request headers
|
|
41
|
+
|
|
42
|
+
- **Content-Type**: Not defined
|
|
43
|
+
- **Accept**: application/json
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### HTTP response details
|
|
47
|
+
| Status code | Description | Response headers |
|
|
48
|
+
|-------------|-------------|------------------|
|
|
49
|
+
|**200** | Success response | - |
|
|
50
|
+
|**401** | Unauthenticated response | - |
|
|
51
|
+
|**500** | Error response | - |
|
|
52
|
+
|
|
53
|
+
[[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)
|
|
54
|
+
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# EcommerceSalesChannelsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://developers.hostinger.com*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**createACustomSalesChannelV1**](#createacustomsaleschannelv1) | **POST** /api/ecommerce/v1/stores/{store_id}/sales-channels | Create a custom sales channel|
|
|
8
|
+
|[**listSalesChannelsV1**](#listsaleschannelsv1) | **GET** /api/ecommerce/v1/stores/{store_id}/sales-channels | List sales channels|
|
|
9
|
+
|
|
10
|
+
# **createACustomSalesChannelV1**
|
|
11
|
+
> EcommerceV1SalesChannelSalesChannelCreationResource createACustomSalesChannelV1(ecommerceV1SalesChannelStoreRequest)
|
|
12
|
+
|
|
13
|
+
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
|
+
### Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import {
|
|
19
|
+
EcommerceSalesChannelsApi,
|
|
20
|
+
Configuration,
|
|
21
|
+
EcommerceV1SalesChannelStoreRequest
|
|
22
|
+
} from 'hostinger-api-sdk';
|
|
23
|
+
|
|
24
|
+
const configuration = new Configuration();
|
|
25
|
+
const apiInstance = new EcommerceSalesChannelsApi(configuration);
|
|
26
|
+
|
|
27
|
+
let storeId: string; //The ID of the store to create the sales channel for. (default to undefined)
|
|
28
|
+
let ecommerceV1SalesChannelStoreRequest: EcommerceV1SalesChannelStoreRequest; //
|
|
29
|
+
|
|
30
|
+
const { status, data } = await apiInstance.createACustomSalesChannelV1(
|
|
31
|
+
storeId,
|
|
32
|
+
ecommerceV1SalesChannelStoreRequest
|
|
33
|
+
);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Parameters
|
|
37
|
+
|
|
38
|
+
|Name | Type | Description | Notes|
|
|
39
|
+
|------------- | ------------- | ------------- | -------------|
|
|
40
|
+
| **ecommerceV1SalesChannelStoreRequest** | **EcommerceV1SalesChannelStoreRequest**| | |
|
|
41
|
+
| **storeId** | [**string**] | The ID of the store to create the sales channel for. | defaults to undefined|
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Return type
|
|
45
|
+
|
|
46
|
+
**EcommerceV1SalesChannelSalesChannelCreationResource**
|
|
47
|
+
|
|
48
|
+
### Authorization
|
|
49
|
+
|
|
50
|
+
[apiToken](../README.md#apiToken)
|
|
51
|
+
|
|
52
|
+
### HTTP request headers
|
|
53
|
+
|
|
54
|
+
- **Content-Type**: application/json
|
|
55
|
+
- **Accept**: application/json
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### HTTP response details
|
|
59
|
+
| Status code | Description | Response headers |
|
|
60
|
+
|-------------|-------------|------------------|
|
|
61
|
+
|**201** | Created response | - |
|
|
62
|
+
|**422** | Validation error response | - |
|
|
63
|
+
|**401** | Unauthenticated response | - |
|
|
64
|
+
|**500** | Error response | - |
|
|
65
|
+
|
|
66
|
+
[[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)
|
|
67
|
+
|
|
68
|
+
# **listSalesChannelsV1**
|
|
69
|
+
> EcommerceV1SalesChannelSalesChannelListResource listSalesChannelsV1()
|
|
70
|
+
|
|
71
|
+
List a store\'s active sales channels with their full metadata.
|
|
72
|
+
|
|
73
|
+
### Example
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
import {
|
|
77
|
+
EcommerceSalesChannelsApi,
|
|
78
|
+
Configuration
|
|
79
|
+
} from 'hostinger-api-sdk';
|
|
80
|
+
|
|
81
|
+
const configuration = new Configuration();
|
|
82
|
+
const apiInstance = new EcommerceSalesChannelsApi(configuration);
|
|
83
|
+
|
|
84
|
+
let storeId: string; //The ID of the store to list sales channels for. (default to undefined)
|
|
85
|
+
|
|
86
|
+
const { status, data } = await apiInstance.listSalesChannelsV1(
|
|
87
|
+
storeId
|
|
88
|
+
);
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Parameters
|
|
92
|
+
|
|
93
|
+
|Name | Type | Description | Notes|
|
|
94
|
+
|------------- | ------------- | ------------- | -------------|
|
|
95
|
+
| **storeId** | [**string**] | The ID of the store to list sales channels for. | defaults to undefined|
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Return type
|
|
99
|
+
|
|
100
|
+
**EcommerceV1SalesChannelSalesChannelListResource**
|
|
101
|
+
|
|
102
|
+
### Authorization
|
|
103
|
+
|
|
104
|
+
[apiToken](../README.md#apiToken)
|
|
105
|
+
|
|
106
|
+
### HTTP request headers
|
|
107
|
+
|
|
108
|
+
- **Content-Type**: Not defined
|
|
109
|
+
- **Accept**: application/json
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### HTTP response details
|
|
113
|
+
| Status code | Description | Response headers |
|
|
114
|
+
|-------------|-------------|------------------|
|
|
115
|
+
|**200** | Success response | - |
|
|
116
|
+
|**401** | Unauthenticated response | - |
|
|
117
|
+
|**500** | Error response | - |
|
|
118
|
+
|
|
119
|
+
[[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
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# EcommerceV1MiscellaneousCustomStorefrontInstructionsResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**instructions** | **string** | Markdown setup instructions for connecting a custom sales channel to your store. | [optional] [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { EcommerceV1MiscellaneousCustomStorefrontInstructionsResource } from 'hostinger-api-sdk';
|
|
14
|
+
|
|
15
|
+
const instance: EcommerceV1MiscellaneousCustomStorefrontInstructionsResource = {
|
|
16
|
+
instructions,
|
|
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,20 @@
|
|
|
1
|
+
# EcommerceV1SalesChannelSalesChannelCreationResource
|
|
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 { EcommerceV1SalesChannelSalesChannelCreationResource } from 'hostinger-api-sdk';
|
|
14
|
+
|
|
15
|
+
const instance: EcommerceV1SalesChannelSalesChannelCreationResource = {
|
|
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)
|