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/api.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
|
|
@@ -19,11 +19,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.WordPressThemesApi = exports.WordPressThemesApiFactory = exports.WordPressThemesApiFp = exports.WordPressThemesApiAxiosParamCreator = exports.ListInstalledWordPressPluginsV1CategoryEnum = exports.WordPressPluginsApi = exports.WordPressPluginsApiFactory = exports.WordPressPluginsApiFp = exports.WordPressPluginsApiAxiosParamCreator = exports.ListWordPressInstallationsV1OwnershipEnum = exports.WordPressInstallationsApi = exports.WordPressInstallationsApiFactory = exports.WordPressInstallationsApiFp = exports.WordPressInstallationsApiAxiosParamCreator = exports.VPSVirtualMachineApi = exports.VPSVirtualMachineApiFactory = exports.VPSVirtualMachineApiFp = exports.VPSVirtualMachineApiAxiosParamCreator = exports.VPSSnapshotsApi = exports.VPSSnapshotsApiFactory = exports.VPSSnapshotsApiFp = exports.VPSSnapshotsApiAxiosParamCreator = exports.VPSRecoveryApi = void 0;
|
|
22
|
+
exports.VPSV1VirtualMachineVirtualMachineResourceActionsLockEnum = exports.VPSV1VirtualMachineVirtualMachineResourceStateEnum = exports.VPSV1FirewallRulesStoreRequestSourceEnum = exports.VPSV1FirewallRulesStoreRequestProtocolEnum = exports.VPSV1FirewallFirewallRuleResourceProtocolEnum = exports.VPSV1FirewallFirewallRuleResourceActionEnum = exports.VPSV1DockerManagerProjectResourceStateEnum = exports.VPSV1DockerManagerContainerResourceHealthEnum = exports.VPSV1DockerManagerContainerResourceStateEnum = exports.VPSV1DockerManagerContainerPortResourceProtocolEnum = exports.VPSV1DockerManagerContainerPortResourceTypeEnum = exports.VPSV1ActionActionResourceStateEnum = exports.ReachV1ContactsSegmentsStoreRequestConditionsInnerAttributeEnum = exports.ReachV1ContactsSegmentsStoreRequestConditionsInnerOperatorEnum = exports.ReachV1ContactsSegmentsStoreRequestLogicEnum = exports.ReachV1ContactsSegmentsSegmentationContactResourceSourceEnum = exports.ReachV1ContactsSegmentsSegmentationContactResourceSubscriptionStatusEnum = exports.ReachV1ContactsContactResourceSourceEnum = exports.ReachV1ContactsContactResourceSubscriptionStatusEnum = exports.HostingV1WebsitesWebsiteResourceVhostTypeEnum = exports.HostingV1NodeJsCreateFromArchiveRequestPackageManagerEnum = exports.HostingV1NodeJsCreateFromArchiveRequestAppTypeEnum = exports.HostingV1NodeJsCreateFromArchiveRequestNodeVersionEnum = exports.HostingV1NodeJsBuildResourceStateEnum = exports.HostingV1NodeJsBuildOptionsResourceSourceTypeEnum = exports.HostingV1NodeJsBuildOptionsResourcePackageManagerEnum = exports.HostingV1NodeJsBuildOptionsResourceAppTypeEnum = exports.HostingV1DomainsParkedDomainResourceTypeEnum = exports.HorizonsV1WebsitesCreateWebsiteRequestMessageInnerTypeEnum = exports.EcommerceV1StoreStoreRequestSalesChannelTypeEnum = exports.EcommerceV1StoreStoreCreationResourceSalesChannelTypeEnum = exports.EcommerceV1SalesChannelStoreRequestTypeEnum = exports.EcommerceV1SalesChannelSalesChannelListResourceSalesChannelsInnerTypeEnum = exports.EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannelTypeEnum = exports.EcommerceV1ProductProductCreationResourceProductTypeEnum = exports.DomainsV1WHOISStoreRequestEntityTypeEnum = exports.DomainsV1WHOISProfileResourceEntityTypeEnum = exports.DomainsV1ForwardingStoreRequestRedirectTypeEnum = exports.DomainsV1ForwardingForwardingResourceRedirectTypeEnum = exports.DomainsV1DomainDomainResourceStatusEnum = exports.DomainsV1DomainDomainResourceTypeEnum = exports.DomainsV1DomainDomainExtendedResourceStatusEnum = exports.DNSV1ZoneUpdateRequestZoneInnerTypeEnum = exports.DNSV1ZoneRecordResourceTypeEnum = exports.DNSV1ZoneDestroyRequestFiltersInnerTypeEnum = exports.BillingV1SubscriptionSubscriptionResourceStatusEnum = exports.BillingV1SubscriptionCancelRequestCancelOptionEnum = exports.BillingV1SubscriptionCancelRequestReasonCodeEnum = exports.BillingV1OrderOrderResourceStatusEnum = exports.BillingV1CatalogCatalogItemPriceResourcePeriodUnitEnum = void 0;
|
|
23
|
+
exports.EcommerceMiscellaneousApiFactory = exports.EcommerceMiscellaneousApiFp = exports.EcommerceMiscellaneousApiAxiosParamCreator = exports.DomainsWHOISApi = exports.DomainsWHOISApiFactory = exports.DomainsWHOISApiFp = exports.DomainsWHOISApiAxiosParamCreator = exports.DomainsPortfolioApi = exports.DomainsPortfolioApiFactory = exports.DomainsPortfolioApiFp = exports.DomainsPortfolioApiAxiosParamCreator = exports.DomainsForwardingApi = exports.DomainsForwardingApiFactory = exports.DomainsForwardingApiFp = exports.DomainsForwardingApiAxiosParamCreator = exports.DomainsAvailabilityApi = exports.DomainsAvailabilityApiFactory = exports.DomainsAvailabilityApiFp = exports.DomainsAvailabilityApiAxiosParamCreator = exports.DomainAccessVerifierVerificationsApi = exports.DomainAccessVerifierVerificationsApiFactory = exports.DomainAccessVerifierVerificationsApiFp = exports.DomainAccessVerifierVerificationsApiAxiosParamCreator = exports.DNSZoneApi = exports.DNSZoneApiFactory = exports.DNSZoneApiFp = exports.DNSZoneApiAxiosParamCreator = exports.DNSSnapshotApi = exports.DNSSnapshotApiFactory = exports.DNSSnapshotApiFp = exports.DNSSnapshotApiAxiosParamCreator = exports.BillingSubscriptionsApi = exports.BillingSubscriptionsApiFactory = exports.BillingSubscriptionsApiFp = exports.BillingSubscriptionsApiAxiosParamCreator = exports.BillingPaymentMethodsApi = exports.BillingPaymentMethodsApiFactory = exports.BillingPaymentMethodsApiFp = exports.BillingPaymentMethodsApiAxiosParamCreator = exports.GetCatalogItemListV1CategoryEnum = exports.BillingCatalogApi = exports.BillingCatalogApiFactory = exports.BillingCatalogApiFp = exports.BillingCatalogApiAxiosParamCreator = exports.WordPressV1ThemesInstalledThemeResourceStatusEnum = exports.WordPressV1ThemesInstallThemeRequestFontEnum = exports.WordPressV1PluginsUpdateHostingerPluginRequestSlugEnum = exports.WordPressV1PluginsSuggestedPluginGroupResourceWebsiteTypeEnum = exports.WordPressV1PluginsInstalledPluginResourceStatusEnum = exports.WordPressV1InstallationsInstallWordPressRequestAutoUpdatesEnum = void 0;
|
|
24
|
+
exports.HostingOrdersApi = exports.HostingOrdersApiFactory = exports.HostingOrdersApiFp = exports.HostingOrdersApiAxiosParamCreator = exports.ListNodeJSBuildsV1StatesEnum = exports.HostingNodeJSApi = exports.HostingNodeJSApiFactory = exports.HostingNodeJSApiFp = exports.HostingNodeJSApiAxiosParamCreator = exports.HostingDomainsApi = exports.HostingDomainsApiFactory = exports.HostingDomainsApiFp = exports.HostingDomainsApiAxiosParamCreator = exports.HostingDatacentersApi = exports.HostingDatacentersApiFactory = exports.HostingDatacentersApiFp = exports.HostingDatacentersApiAxiosParamCreator = exports.HostingDatabasesApi = exports.HostingDatabasesApiFactory = exports.HostingDatabasesApiFp = exports.HostingDatabasesApiAxiosParamCreator = exports.HostingCronJobsApi = exports.HostingCronJobsApiFactory = exports.HostingCronJobsApiFp = exports.HostingCronJobsApiAxiosParamCreator = exports.HorizonsWebsitesApi = exports.HorizonsWebsitesApiFactory = exports.HorizonsWebsitesApiFp = exports.HorizonsWebsitesApiAxiosParamCreator = exports.EcommerceStoresApi = exports.EcommerceStoresApiFactory = exports.EcommerceStoresApiFp = exports.EcommerceStoresApiAxiosParamCreator = exports.EcommerceShippingApi = exports.EcommerceShippingApiFactory = exports.EcommerceShippingApiFp = exports.EcommerceShippingApiAxiosParamCreator = exports.EcommerceSalesChannelsApi = exports.EcommerceSalesChannelsApiFactory = exports.EcommerceSalesChannelsApiFp = exports.EcommerceSalesChannelsApiAxiosParamCreator = exports.EcommerceProductsApi = exports.EcommerceProductsApiFactory = exports.EcommerceProductsApiFp = exports.EcommerceProductsApiAxiosParamCreator = exports.EcommercePaymentsApi = exports.EcommercePaymentsApiFactory = exports.EcommercePaymentsApiFp = exports.EcommercePaymentsApiAxiosParamCreator = exports.EcommerceMiscellaneousApi = void 0;
|
|
25
|
+
exports.VPSPTRRecordsApi = exports.VPSPTRRecordsApiFactory = exports.VPSPTRRecordsApiFp = exports.VPSPTRRecordsApiAxiosParamCreator = exports.VPSOSTemplatesApi = exports.VPSOSTemplatesApiFactory = exports.VPSOSTemplatesApiFp = exports.VPSOSTemplatesApiAxiosParamCreator = exports.VPSMalwareScannerApi = exports.VPSMalwareScannerApiFactory = exports.VPSMalwareScannerApiFp = exports.VPSMalwareScannerApiAxiosParamCreator = exports.VPSFirewallApi = exports.VPSFirewallApiFactory = exports.VPSFirewallApiFp = exports.VPSFirewallApiAxiosParamCreator = exports.VPSDockerManagerApi = exports.VPSDockerManagerApiFactory = exports.VPSDockerManagerApiFp = exports.VPSDockerManagerApiAxiosParamCreator = exports.VPSDataCentersApi = exports.VPSDataCentersApiFactory = exports.VPSDataCentersApiFp = exports.VPSDataCentersApiAxiosParamCreator = exports.VPSBackupsApi = exports.VPSBackupsApiFactory = exports.VPSBackupsApiFp = exports.VPSBackupsApiAxiosParamCreator = exports.VPSActionsApi = exports.VPSActionsApiFactory = exports.VPSActionsApiFp = exports.VPSActionsApiAxiosParamCreator = exports.ReachSegmentsApi = exports.ReachSegmentsApiFactory = exports.ReachSegmentsApiFp = exports.ReachSegmentsApiAxiosParamCreator = exports.ReachProfilesApi = exports.ReachProfilesApiFactory = exports.ReachProfilesApiFp = exports.ReachProfilesApiAxiosParamCreator = exports.ListContactsV1SubscriptionStatusEnum = exports.ReachContactsApi = exports.ReachContactsApiFactory = exports.ReachContactsApiFp = exports.ReachContactsApiAxiosParamCreator = exports.HostingWebsitesApi = exports.HostingWebsitesApiFactory = exports.HostingWebsitesApiFp = exports.HostingWebsitesApiAxiosParamCreator = exports.ListOrdersV1StatusesEnum = void 0;
|
|
26
|
+
exports.WordPressThemesApi = exports.WordPressThemesApiFactory = exports.WordPressThemesApiFp = exports.WordPressThemesApiAxiosParamCreator = exports.ListInstalledWordPressPluginsV1CategoryEnum = exports.WordPressPluginsApi = exports.WordPressPluginsApiFactory = exports.WordPressPluginsApiFp = exports.WordPressPluginsApiAxiosParamCreator = exports.ListWordPressInstallationsV1OwnershipEnum = exports.WordPressInstallationsApi = exports.WordPressInstallationsApiFactory = exports.WordPressInstallationsApiFp = exports.WordPressInstallationsApiAxiosParamCreator = exports.VPSVirtualMachineApi = exports.VPSVirtualMachineApiFactory = exports.VPSVirtualMachineApiFp = exports.VPSVirtualMachineApiAxiosParamCreator = exports.VPSSnapshotsApi = exports.VPSSnapshotsApiFactory = exports.VPSSnapshotsApiFp = exports.VPSSnapshotsApiAxiosParamCreator = exports.VPSRecoveryApi = exports.VPSRecoveryApiFactory = exports.VPSRecoveryApiFp = exports.VPSRecoveryApiAxiosParamCreator = exports.VPSPublicKeysApi = exports.VPSPublicKeysApiFactory = exports.VPSPublicKeysApiFp = exports.VPSPublicKeysApiAxiosParamCreator = exports.VPSPostInstallScriptsApi = exports.VPSPostInstallScriptsApiFactory = exports.VPSPostInstallScriptsApiFp = exports.VPSPostInstallScriptsApiAxiosParamCreator = void 0;
|
|
27
27
|
const axios_1 = require("axios");
|
|
28
28
|
// Some imports not used depending on template conditions
|
|
29
29
|
// @ts-ignore
|
|
@@ -145,6 +145,25 @@ exports.EcommerceV1ProductProductCreationResourceProductTypeEnum = {
|
|
|
145
145
|
Physical: 'physical',
|
|
146
146
|
Digital: 'digital'
|
|
147
147
|
};
|
|
148
|
+
exports.EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannelTypeEnum = {
|
|
149
|
+
Builder: 'builder',
|
|
150
|
+
Horizons: 'horizons',
|
|
151
|
+
Tiktok: 'tiktok',
|
|
152
|
+
Custom: 'custom',
|
|
153
|
+
QuickLink: 'quick-link',
|
|
154
|
+
Wordpress: 'wordpress'
|
|
155
|
+
};
|
|
156
|
+
exports.EcommerceV1SalesChannelSalesChannelListResourceSalesChannelsInnerTypeEnum = {
|
|
157
|
+
Builder: 'builder',
|
|
158
|
+
Horizons: 'horizons',
|
|
159
|
+
Tiktok: 'tiktok',
|
|
160
|
+
Custom: 'custom',
|
|
161
|
+
QuickLink: 'quick-link',
|
|
162
|
+
Wordpress: 'wordpress'
|
|
163
|
+
};
|
|
164
|
+
exports.EcommerceV1SalesChannelStoreRequestTypeEnum = {
|
|
165
|
+
Custom: 'custom'
|
|
166
|
+
};
|
|
148
167
|
exports.EcommerceV1StoreStoreCreationResourceSalesChannelTypeEnum = {
|
|
149
168
|
Builder: 'builder',
|
|
150
169
|
Horizons: 'horizons',
|
|
@@ -3095,6 +3114,105 @@ class DomainsWHOISApi extends base_1.BaseAPI {
|
|
|
3095
3114
|
}
|
|
3096
3115
|
}
|
|
3097
3116
|
exports.DomainsWHOISApi = DomainsWHOISApi;
|
|
3117
|
+
/**
|
|
3118
|
+
* EcommerceMiscellaneousApi - axios parameter creator
|
|
3119
|
+
* @export
|
|
3120
|
+
*/
|
|
3121
|
+
const EcommerceMiscellaneousApiAxiosParamCreator = function (configuration) {
|
|
3122
|
+
return {
|
|
3123
|
+
/**
|
|
3124
|
+
* 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.
|
|
3125
|
+
* @summary Get custom storefront setup instructions
|
|
3126
|
+
* @param {*} [options] Override http request option.
|
|
3127
|
+
* @throws {RequiredError}
|
|
3128
|
+
*/
|
|
3129
|
+
getCustomStorefrontSetupInstructionsV1: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
3130
|
+
const localVarPath = `/api/ecommerce/v1/miscellaneous/custom-storefront-instructions`;
|
|
3131
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3132
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3133
|
+
let baseOptions;
|
|
3134
|
+
if (configuration) {
|
|
3135
|
+
baseOptions = configuration.baseOptions;
|
|
3136
|
+
}
|
|
3137
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3138
|
+
const localVarHeaderParameter = {};
|
|
3139
|
+
const localVarQueryParameter = {};
|
|
3140
|
+
// authentication apiToken required
|
|
3141
|
+
// http bearer authentication required
|
|
3142
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3143
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3144
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3145
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3146
|
+
return {
|
|
3147
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3148
|
+
options: localVarRequestOptions,
|
|
3149
|
+
};
|
|
3150
|
+
}),
|
|
3151
|
+
};
|
|
3152
|
+
};
|
|
3153
|
+
exports.EcommerceMiscellaneousApiAxiosParamCreator = EcommerceMiscellaneousApiAxiosParamCreator;
|
|
3154
|
+
/**
|
|
3155
|
+
* EcommerceMiscellaneousApi - functional programming interface
|
|
3156
|
+
* @export
|
|
3157
|
+
*/
|
|
3158
|
+
const EcommerceMiscellaneousApiFp = function (configuration) {
|
|
3159
|
+
const localVarAxiosParamCreator = (0, exports.EcommerceMiscellaneousApiAxiosParamCreator)(configuration);
|
|
3160
|
+
return {
|
|
3161
|
+
/**
|
|
3162
|
+
* 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.
|
|
3163
|
+
* @summary Get custom storefront setup instructions
|
|
3164
|
+
* @param {*} [options] Override http request option.
|
|
3165
|
+
* @throws {RequiredError}
|
|
3166
|
+
*/
|
|
3167
|
+
getCustomStorefrontSetupInstructionsV1(options) {
|
|
3168
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3169
|
+
var _a, _b;
|
|
3170
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCustomStorefrontSetupInstructionsV1(options);
|
|
3171
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['EcommerceMiscellaneousApi.getCustomStorefrontSetupInstructionsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
3172
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3173
|
+
});
|
|
3174
|
+
},
|
|
3175
|
+
};
|
|
3176
|
+
};
|
|
3177
|
+
exports.EcommerceMiscellaneousApiFp = EcommerceMiscellaneousApiFp;
|
|
3178
|
+
/**
|
|
3179
|
+
* EcommerceMiscellaneousApi - factory interface
|
|
3180
|
+
* @export
|
|
3181
|
+
*/
|
|
3182
|
+
const EcommerceMiscellaneousApiFactory = function (configuration, basePath, axios) {
|
|
3183
|
+
const localVarFp = (0, exports.EcommerceMiscellaneousApiFp)(configuration);
|
|
3184
|
+
return {
|
|
3185
|
+
/**
|
|
3186
|
+
* 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.
|
|
3187
|
+
* @summary Get custom storefront setup instructions
|
|
3188
|
+
* @param {*} [options] Override http request option.
|
|
3189
|
+
* @throws {RequiredError}
|
|
3190
|
+
*/
|
|
3191
|
+
getCustomStorefrontSetupInstructionsV1(options) {
|
|
3192
|
+
return localVarFp.getCustomStorefrontSetupInstructionsV1(options).then((request) => request(axios, basePath));
|
|
3193
|
+
},
|
|
3194
|
+
};
|
|
3195
|
+
};
|
|
3196
|
+
exports.EcommerceMiscellaneousApiFactory = EcommerceMiscellaneousApiFactory;
|
|
3197
|
+
/**
|
|
3198
|
+
* EcommerceMiscellaneousApi - object-oriented interface
|
|
3199
|
+
* @export
|
|
3200
|
+
* @class EcommerceMiscellaneousApi
|
|
3201
|
+
* @extends {BaseAPI}
|
|
3202
|
+
*/
|
|
3203
|
+
class EcommerceMiscellaneousApi extends base_1.BaseAPI {
|
|
3204
|
+
/**
|
|
3205
|
+
* 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.
|
|
3206
|
+
* @summary Get custom storefront setup instructions
|
|
3207
|
+
* @param {*} [options] Override http request option.
|
|
3208
|
+
* @throws {RequiredError}
|
|
3209
|
+
* @memberof EcommerceMiscellaneousApi
|
|
3210
|
+
*/
|
|
3211
|
+
getCustomStorefrontSetupInstructionsV1(options) {
|
|
3212
|
+
return (0, exports.EcommerceMiscellaneousApiFp)(this.configuration).getCustomStorefrontSetupInstructionsV1(options).then((request) => request(this.axios, this.basePath));
|
|
3213
|
+
}
|
|
3214
|
+
}
|
|
3215
|
+
exports.EcommerceMiscellaneousApi = EcommerceMiscellaneousApi;
|
|
3098
3216
|
/**
|
|
3099
3217
|
* EcommercePaymentsApi - axios parameter creator
|
|
3100
3218
|
* @export
|
|
@@ -3399,6 +3517,188 @@ class EcommerceProductsApi extends base_1.BaseAPI {
|
|
|
3399
3517
|
}
|
|
3400
3518
|
}
|
|
3401
3519
|
exports.EcommerceProductsApi = EcommerceProductsApi;
|
|
3520
|
+
/**
|
|
3521
|
+
* EcommerceSalesChannelsApi - axios parameter creator
|
|
3522
|
+
* @export
|
|
3523
|
+
*/
|
|
3524
|
+
const EcommerceSalesChannelsApiAxiosParamCreator = function (configuration) {
|
|
3525
|
+
return {
|
|
3526
|
+
/**
|
|
3527
|
+
* 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.
|
|
3528
|
+
* @summary Create a custom sales channel
|
|
3529
|
+
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
3530
|
+
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
3531
|
+
* @param {*} [options] Override http request option.
|
|
3532
|
+
* @throws {RequiredError}
|
|
3533
|
+
*/
|
|
3534
|
+
createACustomSalesChannelV1: (storeId_1, ecommerceV1SalesChannelStoreRequest_1, ...args_1) => __awaiter(this, [storeId_1, ecommerceV1SalesChannelStoreRequest_1, ...args_1], void 0, function* (storeId, ecommerceV1SalesChannelStoreRequest, options = {}) {
|
|
3535
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
3536
|
+
(0, common_1.assertParamExists)('createACustomSalesChannelV1', 'storeId', storeId);
|
|
3537
|
+
// verify required parameter 'ecommerceV1SalesChannelStoreRequest' is not null or undefined
|
|
3538
|
+
(0, common_1.assertParamExists)('createACustomSalesChannelV1', 'ecommerceV1SalesChannelStoreRequest', ecommerceV1SalesChannelStoreRequest);
|
|
3539
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/sales-channels`
|
|
3540
|
+
.replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
|
|
3541
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3542
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3543
|
+
let baseOptions;
|
|
3544
|
+
if (configuration) {
|
|
3545
|
+
baseOptions = configuration.baseOptions;
|
|
3546
|
+
}
|
|
3547
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
3548
|
+
const localVarHeaderParameter = {};
|
|
3549
|
+
const localVarQueryParameter = {};
|
|
3550
|
+
// authentication apiToken required
|
|
3551
|
+
// http bearer authentication required
|
|
3552
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3553
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3554
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3555
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3556
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3557
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(ecommerceV1SalesChannelStoreRequest, localVarRequestOptions, configuration);
|
|
3558
|
+
return {
|
|
3559
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3560
|
+
options: localVarRequestOptions,
|
|
3561
|
+
};
|
|
3562
|
+
}),
|
|
3563
|
+
/**
|
|
3564
|
+
* List a store\'s active sales channels with their full metadata.
|
|
3565
|
+
* @summary List sales channels
|
|
3566
|
+
* @param {string} storeId The ID of the store to list sales channels for.
|
|
3567
|
+
* @param {*} [options] Override http request option.
|
|
3568
|
+
* @throws {RequiredError}
|
|
3569
|
+
*/
|
|
3570
|
+
listSalesChannelsV1: (storeId_1, ...args_1) => __awaiter(this, [storeId_1, ...args_1], void 0, function* (storeId, options = {}) {
|
|
3571
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
3572
|
+
(0, common_1.assertParamExists)('listSalesChannelsV1', 'storeId', storeId);
|
|
3573
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/sales-channels`
|
|
3574
|
+
.replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
|
|
3575
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3576
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3577
|
+
let baseOptions;
|
|
3578
|
+
if (configuration) {
|
|
3579
|
+
baseOptions = configuration.baseOptions;
|
|
3580
|
+
}
|
|
3581
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3582
|
+
const localVarHeaderParameter = {};
|
|
3583
|
+
const localVarQueryParameter = {};
|
|
3584
|
+
// authentication apiToken required
|
|
3585
|
+
// http bearer authentication required
|
|
3586
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3587
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3588
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3589
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3590
|
+
return {
|
|
3591
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3592
|
+
options: localVarRequestOptions,
|
|
3593
|
+
};
|
|
3594
|
+
}),
|
|
3595
|
+
};
|
|
3596
|
+
};
|
|
3597
|
+
exports.EcommerceSalesChannelsApiAxiosParamCreator = EcommerceSalesChannelsApiAxiosParamCreator;
|
|
3598
|
+
/**
|
|
3599
|
+
* EcommerceSalesChannelsApi - functional programming interface
|
|
3600
|
+
* @export
|
|
3601
|
+
*/
|
|
3602
|
+
const EcommerceSalesChannelsApiFp = function (configuration) {
|
|
3603
|
+
const localVarAxiosParamCreator = (0, exports.EcommerceSalesChannelsApiAxiosParamCreator)(configuration);
|
|
3604
|
+
return {
|
|
3605
|
+
/**
|
|
3606
|
+
* 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.
|
|
3607
|
+
* @summary Create a custom sales channel
|
|
3608
|
+
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
3609
|
+
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
3610
|
+
* @param {*} [options] Override http request option.
|
|
3611
|
+
* @throws {RequiredError}
|
|
3612
|
+
*/
|
|
3613
|
+
createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
|
|
3614
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3615
|
+
var _a, _b;
|
|
3616
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options);
|
|
3617
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['EcommerceSalesChannelsApi.createACustomSalesChannelV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
3618
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3619
|
+
});
|
|
3620
|
+
},
|
|
3621
|
+
/**
|
|
3622
|
+
* List a store\'s active sales channels with their full metadata.
|
|
3623
|
+
* @summary List sales channels
|
|
3624
|
+
* @param {string} storeId The ID of the store to list sales channels for.
|
|
3625
|
+
* @param {*} [options] Override http request option.
|
|
3626
|
+
* @throws {RequiredError}
|
|
3627
|
+
*/
|
|
3628
|
+
listSalesChannelsV1(storeId, options) {
|
|
3629
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3630
|
+
var _a, _b;
|
|
3631
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listSalesChannelsV1(storeId, options);
|
|
3632
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['EcommerceSalesChannelsApi.listSalesChannelsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
3633
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3634
|
+
});
|
|
3635
|
+
},
|
|
3636
|
+
};
|
|
3637
|
+
};
|
|
3638
|
+
exports.EcommerceSalesChannelsApiFp = EcommerceSalesChannelsApiFp;
|
|
3639
|
+
/**
|
|
3640
|
+
* EcommerceSalesChannelsApi - factory interface
|
|
3641
|
+
* @export
|
|
3642
|
+
*/
|
|
3643
|
+
const EcommerceSalesChannelsApiFactory = function (configuration, basePath, axios) {
|
|
3644
|
+
const localVarFp = (0, exports.EcommerceSalesChannelsApiFp)(configuration);
|
|
3645
|
+
return {
|
|
3646
|
+
/**
|
|
3647
|
+
* 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.
|
|
3648
|
+
* @summary Create a custom sales channel
|
|
3649
|
+
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
3650
|
+
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
3651
|
+
* @param {*} [options] Override http request option.
|
|
3652
|
+
* @throws {RequiredError}
|
|
3653
|
+
*/
|
|
3654
|
+
createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
|
|
3655
|
+
return localVarFp.createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(axios, basePath));
|
|
3656
|
+
},
|
|
3657
|
+
/**
|
|
3658
|
+
* List a store\'s active sales channels with their full metadata.
|
|
3659
|
+
* @summary List sales channels
|
|
3660
|
+
* @param {string} storeId The ID of the store to list sales channels for.
|
|
3661
|
+
* @param {*} [options] Override http request option.
|
|
3662
|
+
* @throws {RequiredError}
|
|
3663
|
+
*/
|
|
3664
|
+
listSalesChannelsV1(storeId, options) {
|
|
3665
|
+
return localVarFp.listSalesChannelsV1(storeId, options).then((request) => request(axios, basePath));
|
|
3666
|
+
},
|
|
3667
|
+
};
|
|
3668
|
+
};
|
|
3669
|
+
exports.EcommerceSalesChannelsApiFactory = EcommerceSalesChannelsApiFactory;
|
|
3670
|
+
/**
|
|
3671
|
+
* EcommerceSalesChannelsApi - object-oriented interface
|
|
3672
|
+
* @export
|
|
3673
|
+
* @class EcommerceSalesChannelsApi
|
|
3674
|
+
* @extends {BaseAPI}
|
|
3675
|
+
*/
|
|
3676
|
+
class EcommerceSalesChannelsApi extends base_1.BaseAPI {
|
|
3677
|
+
/**
|
|
3678
|
+
* 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.
|
|
3679
|
+
* @summary Create a custom sales channel
|
|
3680
|
+
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
3681
|
+
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
3682
|
+
* @param {*} [options] Override http request option.
|
|
3683
|
+
* @throws {RequiredError}
|
|
3684
|
+
* @memberof EcommerceSalesChannelsApi
|
|
3685
|
+
*/
|
|
3686
|
+
createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
|
|
3687
|
+
return (0, exports.EcommerceSalesChannelsApiFp)(this.configuration).createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3688
|
+
}
|
|
3689
|
+
/**
|
|
3690
|
+
* List a store\'s active sales channels with their full metadata.
|
|
3691
|
+
* @summary List sales channels
|
|
3692
|
+
* @param {string} storeId The ID of the store to list sales channels for.
|
|
3693
|
+
* @param {*} [options] Override http request option.
|
|
3694
|
+
* @throws {RequiredError}
|
|
3695
|
+
* @memberof EcommerceSalesChannelsApi
|
|
3696
|
+
*/
|
|
3697
|
+
listSalesChannelsV1(storeId, options) {
|
|
3698
|
+
return (0, exports.EcommerceSalesChannelsApiFp)(this.configuration).listSalesChannelsV1(storeId, options).then((request) => request(this.axios, this.basePath));
|
|
3699
|
+
}
|
|
3700
|
+
}
|
|
3701
|
+
exports.EcommerceSalesChannelsApi = EcommerceSalesChannelsApi;
|
|
3402
3702
|
/**
|
|
3403
3703
|
* EcommerceShippingApi - axios parameter creator
|
|
3404
3704
|
* @export
|
package/dist/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/base.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
|
package/dist/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/common.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
|
package/dist/configuration.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/configuration.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
|
|
@@ -16,7 +16,7 @@ class Configuration {
|
|
|
16
16
|
var _a;
|
|
17
17
|
this.accessToken = param.accessToken;
|
|
18
18
|
this.basePath = param.basePath;
|
|
19
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.1.
|
|
19
|
+
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) });
|
|
20
20
|
this.formDataCtor = param.formDataCtor;
|
|
21
21
|
}
|
|
22
22
|
/**
|