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/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
## hostinger-api-sdk@1.2.
|
|
1
|
+
## hostinger-api-sdk@1.2.1
|
|
2
2
|
|
|
3
3
|
For more information, please visit [https://developers.hostinger.com](https://developers.hostinger.com).
|
|
4
4
|
|
|
5
5
|
### Usage
|
|
6
6
|
|
|
7
7
|
```
|
|
8
|
-
npm install hostinger-api-sdk@1.2.
|
|
8
|
+
npm install hostinger-api-sdk@1.2.1 --save
|
|
9
9
|
```
|
package/api.ts
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
|
|
@@ -1876,6 +1876,19 @@ export const EcommerceV1SalesChannelSalesChannelListResourceSalesChannelsInnerTy
|
|
|
1876
1876
|
|
|
1877
1877
|
export type EcommerceV1SalesChannelSalesChannelListResourceSalesChannelsInnerTypeEnum = typeof EcommerceV1SalesChannelSalesChannelListResourceSalesChannelsInnerTypeEnum[keyof typeof EcommerceV1SalesChannelSalesChannelListResourceSalesChannelsInnerTypeEnum];
|
|
1878
1878
|
|
|
1879
|
+
/**
|
|
1880
|
+
*
|
|
1881
|
+
* @export
|
|
1882
|
+
* @interface EcommerceV1SalesChannelSalesChannelUpdateResource
|
|
1883
|
+
*/
|
|
1884
|
+
export interface EcommerceV1SalesChannelSalesChannelUpdateResource {
|
|
1885
|
+
/**
|
|
1886
|
+
*
|
|
1887
|
+
* @type {EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannel}
|
|
1888
|
+
* @memberof EcommerceV1SalesChannelSalesChannelUpdateResource
|
|
1889
|
+
*/
|
|
1890
|
+
'sales_channel': EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannel;
|
|
1891
|
+
}
|
|
1879
1892
|
/**
|
|
1880
1893
|
*
|
|
1881
1894
|
* @export
|
|
@@ -1908,6 +1921,25 @@ export const EcommerceV1SalesChannelStoreRequestTypeEnum = {
|
|
|
1908
1921
|
|
|
1909
1922
|
export type EcommerceV1SalesChannelStoreRequestTypeEnum = typeof EcommerceV1SalesChannelStoreRequestTypeEnum[keyof typeof EcommerceV1SalesChannelStoreRequestTypeEnum];
|
|
1910
1923
|
|
|
1924
|
+
/**
|
|
1925
|
+
*
|
|
1926
|
+
* @export
|
|
1927
|
+
* @interface EcommerceV1SalesChannelUpdateRequest
|
|
1928
|
+
*/
|
|
1929
|
+
export interface EcommerceV1SalesChannelUpdateRequest {
|
|
1930
|
+
/**
|
|
1931
|
+
* Merchant-facing custom name shown in the sales channels list. Pass null to clear it.
|
|
1932
|
+
* @type {string}
|
|
1933
|
+
* @memberof EcommerceV1SalesChannelUpdateRequest
|
|
1934
|
+
*/
|
|
1935
|
+
'name': string | null;
|
|
1936
|
+
/**
|
|
1937
|
+
* Public address where the custom sales channel lives. Pass null to clear it.
|
|
1938
|
+
* @type {string}
|
|
1939
|
+
* @memberof EcommerceV1SalesChannelUpdateRequest
|
|
1940
|
+
*/
|
|
1941
|
+
'url': string | null;
|
|
1942
|
+
}
|
|
1911
1943
|
/**
|
|
1912
1944
|
*
|
|
1913
1945
|
* @export
|
|
@@ -2083,6 +2115,111 @@ export interface EcommerceV1StoreStoreDeleteResource {
|
|
|
2083
2115
|
*/
|
|
2084
2116
|
'is_deleted': boolean;
|
|
2085
2117
|
}
|
|
2118
|
+
/**
|
|
2119
|
+
*
|
|
2120
|
+
* @export
|
|
2121
|
+
* @interface EcommerceV1StoreStoreMetadataResource
|
|
2122
|
+
*/
|
|
2123
|
+
export interface EcommerceV1StoreStoreMetadataResource {
|
|
2124
|
+
/**
|
|
2125
|
+
*
|
|
2126
|
+
* @type {EcommerceV1StoreStoreMetadataResourceMetadata}
|
|
2127
|
+
* @memberof EcommerceV1StoreStoreMetadataResource
|
|
2128
|
+
*/
|
|
2129
|
+
'metadata': EcommerceV1StoreStoreMetadataResourceMetadata;
|
|
2130
|
+
}
|
|
2131
|
+
/**
|
|
2132
|
+
*
|
|
2133
|
+
* @export
|
|
2134
|
+
* @interface EcommerceV1StoreStoreMetadataResourceMetadata
|
|
2135
|
+
*/
|
|
2136
|
+
export interface EcommerceV1StoreStoreMetadataResourceMetadata {
|
|
2137
|
+
/**
|
|
2138
|
+
* Whether the store has at least one payment method connected.
|
|
2139
|
+
* @type {boolean}
|
|
2140
|
+
* @memberof EcommerceV1StoreStoreMetadataResourceMetadata
|
|
2141
|
+
*/
|
|
2142
|
+
'has_payment_methods': boolean;
|
|
2143
|
+
/**
|
|
2144
|
+
* Whether the store has at least one shipping option configured.
|
|
2145
|
+
* @type {boolean}
|
|
2146
|
+
* @memberof EcommerceV1StoreStoreMetadataResourceMetadata
|
|
2147
|
+
*/
|
|
2148
|
+
'has_shipping': boolean;
|
|
2149
|
+
/**
|
|
2150
|
+
* The default currency code of the store.
|
|
2151
|
+
* @type {string}
|
|
2152
|
+
* @memberof EcommerceV1StoreStoreMetadataResourceMetadata
|
|
2153
|
+
*/
|
|
2154
|
+
'default_currency_code': string;
|
|
2155
|
+
/**
|
|
2156
|
+
*
|
|
2157
|
+
* @type {EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency}
|
|
2158
|
+
* @memberof EcommerceV1StoreStoreMetadataResourceMetadata
|
|
2159
|
+
*/
|
|
2160
|
+
'default_currency': EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency | null;
|
|
2161
|
+
}
|
|
2162
|
+
/**
|
|
2163
|
+
* The store\'s default currency, or null when unset.
|
|
2164
|
+
* @export
|
|
2165
|
+
* @interface EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
|
|
2166
|
+
*/
|
|
2167
|
+
export interface EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency {
|
|
2168
|
+
/**
|
|
2169
|
+
*
|
|
2170
|
+
* @type {string}
|
|
2171
|
+
* @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
|
|
2172
|
+
*/
|
|
2173
|
+
'code': string;
|
|
2174
|
+
/**
|
|
2175
|
+
*
|
|
2176
|
+
* @type {string}
|
|
2177
|
+
* @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
|
|
2178
|
+
*/
|
|
2179
|
+
'symbol': string;
|
|
2180
|
+
/**
|
|
2181
|
+
*
|
|
2182
|
+
* @type {string}
|
|
2183
|
+
* @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
|
|
2184
|
+
*/
|
|
2185
|
+
'symbol_native': string;
|
|
2186
|
+
/**
|
|
2187
|
+
*
|
|
2188
|
+
* @type {string}
|
|
2189
|
+
* @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
|
|
2190
|
+
*/
|
|
2191
|
+
'name': string;
|
|
2192
|
+
/**
|
|
2193
|
+
*
|
|
2194
|
+
* @type {string}
|
|
2195
|
+
* @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
|
|
2196
|
+
*/
|
|
2197
|
+
'name_plural': string;
|
|
2198
|
+
/**
|
|
2199
|
+
*
|
|
2200
|
+
* @type {number}
|
|
2201
|
+
* @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
|
|
2202
|
+
*/
|
|
2203
|
+
'decimal_digits': number;
|
|
2204
|
+
/**
|
|
2205
|
+
*
|
|
2206
|
+
* @type {number}
|
|
2207
|
+
* @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
|
|
2208
|
+
*/
|
|
2209
|
+
'rounding': number;
|
|
2210
|
+
/**
|
|
2211
|
+
*
|
|
2212
|
+
* @type {string}
|
|
2213
|
+
* @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
|
|
2214
|
+
*/
|
|
2215
|
+
'template': string | null;
|
|
2216
|
+
/**
|
|
2217
|
+
*
|
|
2218
|
+
* @type {number}
|
|
2219
|
+
* @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
|
|
2220
|
+
*/
|
|
2221
|
+
'min_amount': number | null;
|
|
2222
|
+
}
|
|
2086
2223
|
/**
|
|
2087
2224
|
*
|
|
2088
2225
|
* @export
|
|
@@ -9559,17 +9696,17 @@ export const EcommerceSalesChannelsApiAxiosParamCreator = function (configuratio
|
|
|
9559
9696
|
return {
|
|
9560
9697
|
/**
|
|
9561
9698
|
* 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.
|
|
9562
|
-
* @summary Create
|
|
9699
|
+
* @summary Create custom sales channel
|
|
9563
9700
|
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
9564
9701
|
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
9565
9702
|
* @param {*} [options] Override http request option.
|
|
9566
9703
|
* @throws {RequiredError}
|
|
9567
9704
|
*/
|
|
9568
|
-
|
|
9705
|
+
createCustomSalesChannelV1: async (storeId: string, ecommerceV1SalesChannelStoreRequest: EcommerceV1SalesChannelStoreRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9569
9706
|
// verify required parameter 'storeId' is not null or undefined
|
|
9570
|
-
assertParamExists('
|
|
9707
|
+
assertParamExists('createCustomSalesChannelV1', 'storeId', storeId)
|
|
9571
9708
|
// verify required parameter 'ecommerceV1SalesChannelStoreRequest' is not null or undefined
|
|
9572
|
-
assertParamExists('
|
|
9709
|
+
assertParamExists('createCustomSalesChannelV1', 'ecommerceV1SalesChannelStoreRequest', ecommerceV1SalesChannelStoreRequest)
|
|
9573
9710
|
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/sales-channels`
|
|
9574
9711
|
.replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
|
|
9575
9712
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -9634,6 +9771,54 @@ export const EcommerceSalesChannelsApiAxiosParamCreator = function (configuratio
|
|
|
9634
9771
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9635
9772
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9636
9773
|
|
|
9774
|
+
return {
|
|
9775
|
+
url: toPathString(localVarUrlObj),
|
|
9776
|
+
options: localVarRequestOptions,
|
|
9777
|
+
};
|
|
9778
|
+
},
|
|
9779
|
+
/**
|
|
9780
|
+
* 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.
|
|
9781
|
+
* @summary Update sales channel
|
|
9782
|
+
* @param {string} storeId The ID of the store that owns the sales channel.
|
|
9783
|
+
* @param {string} salesChannelId The ID of the sales channel to update.
|
|
9784
|
+
* @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
|
|
9785
|
+
* @param {*} [options] Override http request option.
|
|
9786
|
+
* @throws {RequiredError}
|
|
9787
|
+
*/
|
|
9788
|
+
updateSalesChannelV1: async (storeId: string, salesChannelId: string, ecommerceV1SalesChannelUpdateRequest: EcommerceV1SalesChannelUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9789
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
9790
|
+
assertParamExists('updateSalesChannelV1', 'storeId', storeId)
|
|
9791
|
+
// verify required parameter 'salesChannelId' is not null or undefined
|
|
9792
|
+
assertParamExists('updateSalesChannelV1', 'salesChannelId', salesChannelId)
|
|
9793
|
+
// verify required parameter 'ecommerceV1SalesChannelUpdateRequest' is not null or undefined
|
|
9794
|
+
assertParamExists('updateSalesChannelV1', 'ecommerceV1SalesChannelUpdateRequest', ecommerceV1SalesChannelUpdateRequest)
|
|
9795
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/sales-channels/{sales_channel_id}`
|
|
9796
|
+
.replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
|
|
9797
|
+
.replace(`{${"sales_channel_id"}}`, encodeURIComponent(String(salesChannelId)));
|
|
9798
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9799
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9800
|
+
let baseOptions;
|
|
9801
|
+
if (configuration) {
|
|
9802
|
+
baseOptions = configuration.baseOptions;
|
|
9803
|
+
}
|
|
9804
|
+
|
|
9805
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
9806
|
+
const localVarHeaderParameter = {} as any;
|
|
9807
|
+
const localVarQueryParameter = {} as any;
|
|
9808
|
+
|
|
9809
|
+
// authentication apiToken required
|
|
9810
|
+
// http bearer authentication required
|
|
9811
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
9812
|
+
|
|
9813
|
+
|
|
9814
|
+
|
|
9815
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
9816
|
+
|
|
9817
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9818
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9819
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9820
|
+
localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1SalesChannelUpdateRequest, localVarRequestOptions, configuration)
|
|
9821
|
+
|
|
9637
9822
|
return {
|
|
9638
9823
|
url: toPathString(localVarUrlObj),
|
|
9639
9824
|
options: localVarRequestOptions,
|
|
@@ -9651,15 +9836,15 @@ export const EcommerceSalesChannelsApiFp = function(configuration?: Configuratio
|
|
|
9651
9836
|
return {
|
|
9652
9837
|
/**
|
|
9653
9838
|
* 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.
|
|
9654
|
-
* @summary Create
|
|
9839
|
+
* @summary Create custom sales channel
|
|
9655
9840
|
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
9656
9841
|
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
9657
9842
|
* @param {*} [options] Override http request option.
|
|
9658
9843
|
* @throws {RequiredError}
|
|
9659
9844
|
*/
|
|
9660
|
-
async
|
|
9661
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
9662
|
-
const localVarOperationServerBasePath = operationServerMap['EcommerceSalesChannelsApi.
|
|
9845
|
+
async createCustomSalesChannelV1(storeId: string, ecommerceV1SalesChannelStoreRequest: EcommerceV1SalesChannelStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1SalesChannelSalesChannelCreationResource>> {
|
|
9846
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options);
|
|
9847
|
+
const localVarOperationServerBasePath = operationServerMap['EcommerceSalesChannelsApi.createCustomSalesChannelV1']?.[0]?.url;
|
|
9663
9848
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9664
9849
|
},
|
|
9665
9850
|
/**
|
|
@@ -9674,6 +9859,20 @@ export const EcommerceSalesChannelsApiFp = function(configuration?: Configuratio
|
|
|
9674
9859
|
const localVarOperationServerBasePath = operationServerMap['EcommerceSalesChannelsApi.listSalesChannelsV1']?.[0]?.url;
|
|
9675
9860
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9676
9861
|
},
|
|
9862
|
+
/**
|
|
9863
|
+
* 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.
|
|
9864
|
+
* @summary Update sales channel
|
|
9865
|
+
* @param {string} storeId The ID of the store that owns the sales channel.
|
|
9866
|
+
* @param {string} salesChannelId The ID of the sales channel to update.
|
|
9867
|
+
* @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
|
|
9868
|
+
* @param {*} [options] Override http request option.
|
|
9869
|
+
* @throws {RequiredError}
|
|
9870
|
+
*/
|
|
9871
|
+
async updateSalesChannelV1(storeId: string, salesChannelId: string, ecommerceV1SalesChannelUpdateRequest: EcommerceV1SalesChannelUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1SalesChannelSalesChannelUpdateResource>> {
|
|
9872
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options);
|
|
9873
|
+
const localVarOperationServerBasePath = operationServerMap['EcommerceSalesChannelsApi.updateSalesChannelV1']?.[0]?.url;
|
|
9874
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9875
|
+
},
|
|
9677
9876
|
}
|
|
9678
9877
|
};
|
|
9679
9878
|
|
|
@@ -9686,14 +9885,14 @@ export const EcommerceSalesChannelsApiFactory = function (configuration?: Config
|
|
|
9686
9885
|
return {
|
|
9687
9886
|
/**
|
|
9688
9887
|
* 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.
|
|
9689
|
-
* @summary Create
|
|
9888
|
+
* @summary Create custom sales channel
|
|
9690
9889
|
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
9691
9890
|
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
9692
9891
|
* @param {*} [options] Override http request option.
|
|
9693
9892
|
* @throws {RequiredError}
|
|
9694
9893
|
*/
|
|
9695
|
-
|
|
9696
|
-
return localVarFp.
|
|
9894
|
+
createCustomSalesChannelV1(storeId: string, ecommerceV1SalesChannelStoreRequest: EcommerceV1SalesChannelStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1SalesChannelSalesChannelCreationResource> {
|
|
9895
|
+
return localVarFp.createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(axios, basePath));
|
|
9697
9896
|
},
|
|
9698
9897
|
/**
|
|
9699
9898
|
* List a store\'s active sales channels with their full metadata.
|
|
@@ -9705,6 +9904,18 @@ export const EcommerceSalesChannelsApiFactory = function (configuration?: Config
|
|
|
9705
9904
|
listSalesChannelsV1(storeId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1SalesChannelSalesChannelListResource> {
|
|
9706
9905
|
return localVarFp.listSalesChannelsV1(storeId, options).then((request) => request(axios, basePath));
|
|
9707
9906
|
},
|
|
9907
|
+
/**
|
|
9908
|
+
* 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.
|
|
9909
|
+
* @summary Update sales channel
|
|
9910
|
+
* @param {string} storeId The ID of the store that owns the sales channel.
|
|
9911
|
+
* @param {string} salesChannelId The ID of the sales channel to update.
|
|
9912
|
+
* @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
|
|
9913
|
+
* @param {*} [options] Override http request option.
|
|
9914
|
+
* @throws {RequiredError}
|
|
9915
|
+
*/
|
|
9916
|
+
updateSalesChannelV1(storeId: string, salesChannelId: string, ecommerceV1SalesChannelUpdateRequest: EcommerceV1SalesChannelUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1SalesChannelSalesChannelUpdateResource> {
|
|
9917
|
+
return localVarFp.updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options).then((request) => request(axios, basePath));
|
|
9918
|
+
},
|
|
9708
9919
|
};
|
|
9709
9920
|
};
|
|
9710
9921
|
|
|
@@ -9717,15 +9928,15 @@ export const EcommerceSalesChannelsApiFactory = function (configuration?: Config
|
|
|
9717
9928
|
export class EcommerceSalesChannelsApi extends BaseAPI {
|
|
9718
9929
|
/**
|
|
9719
9930
|
* 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.
|
|
9720
|
-
* @summary Create
|
|
9931
|
+
* @summary Create custom sales channel
|
|
9721
9932
|
* @param {string} storeId The ID of the store to create the sales channel for.
|
|
9722
9933
|
* @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
|
|
9723
9934
|
* @param {*} [options] Override http request option.
|
|
9724
9935
|
* @throws {RequiredError}
|
|
9725
9936
|
* @memberof EcommerceSalesChannelsApi
|
|
9726
9937
|
*/
|
|
9727
|
-
public
|
|
9728
|
-
return EcommerceSalesChannelsApiFp(this.configuration).
|
|
9938
|
+
public createCustomSalesChannelV1(storeId: string, ecommerceV1SalesChannelStoreRequest: EcommerceV1SalesChannelStoreRequest, options?: RawAxiosRequestConfig) {
|
|
9939
|
+
return EcommerceSalesChannelsApiFp(this.configuration).createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
9729
9940
|
}
|
|
9730
9941
|
|
|
9731
9942
|
/**
|
|
@@ -9739,6 +9950,20 @@ export class EcommerceSalesChannelsApi extends BaseAPI {
|
|
|
9739
9950
|
public listSalesChannelsV1(storeId: string, options?: RawAxiosRequestConfig) {
|
|
9740
9951
|
return EcommerceSalesChannelsApiFp(this.configuration).listSalesChannelsV1(storeId, options).then((request) => request(this.axios, this.basePath));
|
|
9741
9952
|
}
|
|
9953
|
+
|
|
9954
|
+
/**
|
|
9955
|
+
* 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.
|
|
9956
|
+
* @summary Update sales channel
|
|
9957
|
+
* @param {string} storeId The ID of the store that owns the sales channel.
|
|
9958
|
+
* @param {string} salesChannelId The ID of the sales channel to update.
|
|
9959
|
+
* @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
|
|
9960
|
+
* @param {*} [options] Override http request option.
|
|
9961
|
+
* @throws {RequiredError}
|
|
9962
|
+
* @memberof EcommerceSalesChannelsApi
|
|
9963
|
+
*/
|
|
9964
|
+
public updateSalesChannelV1(storeId: string, salesChannelId: string, ecommerceV1SalesChannelUpdateRequest: EcommerceV1SalesChannelUpdateRequest, options?: RawAxiosRequestConfig) {
|
|
9965
|
+
return EcommerceSalesChannelsApiFp(this.configuration).updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
9966
|
+
}
|
|
9742
9967
|
}
|
|
9743
9968
|
|
|
9744
9969
|
|
|
@@ -9938,6 +10163,44 @@ export const EcommerceStoresApiAxiosParamCreator = function (configuration?: Con
|
|
|
9938
10163
|
|
|
9939
10164
|
|
|
9940
10165
|
|
|
10166
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
10167
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
10168
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
10169
|
+
|
|
10170
|
+
return {
|
|
10171
|
+
url: toPathString(localVarUrlObj),
|
|
10172
|
+
options: localVarRequestOptions,
|
|
10173
|
+
};
|
|
10174
|
+
},
|
|
10175
|
+
/**
|
|
10176
|
+
* 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.
|
|
10177
|
+
* @summary Get store metadata
|
|
10178
|
+
* @param {string} storeId The ID of the store to read metadata for.
|
|
10179
|
+
* @param {*} [options] Override http request option.
|
|
10180
|
+
* @throws {RequiredError}
|
|
10181
|
+
*/
|
|
10182
|
+
getStoreMetadataV1: async (storeId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
10183
|
+
// verify required parameter 'storeId' is not null or undefined
|
|
10184
|
+
assertParamExists('getStoreMetadataV1', 'storeId', storeId)
|
|
10185
|
+
const localVarPath = `/api/ecommerce/v1/stores/{store_id}/metadata`
|
|
10186
|
+
.replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
|
|
10187
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
10188
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
10189
|
+
let baseOptions;
|
|
10190
|
+
if (configuration) {
|
|
10191
|
+
baseOptions = configuration.baseOptions;
|
|
10192
|
+
}
|
|
10193
|
+
|
|
10194
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
10195
|
+
const localVarHeaderParameter = {} as any;
|
|
10196
|
+
const localVarQueryParameter = {} as any;
|
|
10197
|
+
|
|
10198
|
+
// authentication apiToken required
|
|
10199
|
+
// http bearer authentication required
|
|
10200
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
10201
|
+
|
|
10202
|
+
|
|
10203
|
+
|
|
9941
10204
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9942
10205
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9943
10206
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -10020,6 +10283,18 @@ export const EcommerceStoresApiFp = function(configuration?: Configuration) {
|
|
|
10020
10283
|
const localVarOperationServerBasePath = operationServerMap['EcommerceStoresApi.deleteStoreV1']?.[0]?.url;
|
|
10021
10284
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
10022
10285
|
},
|
|
10286
|
+
/**
|
|
10287
|
+
* 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.
|
|
10288
|
+
* @summary Get store metadata
|
|
10289
|
+
* @param {string} storeId The ID of the store to read metadata for.
|
|
10290
|
+
* @param {*} [options] Override http request option.
|
|
10291
|
+
* @throws {RequiredError}
|
|
10292
|
+
*/
|
|
10293
|
+
async getStoreMetadataV1(storeId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1StoreStoreMetadataResource>> {
|
|
10294
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getStoreMetadataV1(storeId, options);
|
|
10295
|
+
const localVarOperationServerBasePath = operationServerMap['EcommerceStoresApi.getStoreMetadataV1']?.[0]?.url;
|
|
10296
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
10297
|
+
},
|
|
10023
10298
|
/**
|
|
10024
10299
|
* Retrieve the stores associated with your account.
|
|
10025
10300
|
* @summary Get stores
|
|
@@ -10062,6 +10337,16 @@ export const EcommerceStoresApiFactory = function (configuration?: Configuration
|
|
|
10062
10337
|
deleteStoreV1(storeId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1StoreStoreDeleteResource> {
|
|
10063
10338
|
return localVarFp.deleteStoreV1(storeId, options).then((request) => request(axios, basePath));
|
|
10064
10339
|
},
|
|
10340
|
+
/**
|
|
10341
|
+
* 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.
|
|
10342
|
+
* @summary Get store metadata
|
|
10343
|
+
* @param {string} storeId The ID of the store to read metadata for.
|
|
10344
|
+
* @param {*} [options] Override http request option.
|
|
10345
|
+
* @throws {RequiredError}
|
|
10346
|
+
*/
|
|
10347
|
+
getStoreMetadataV1(storeId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1StoreStoreMetadataResource> {
|
|
10348
|
+
return localVarFp.getStoreMetadataV1(storeId, options).then((request) => request(axios, basePath));
|
|
10349
|
+
},
|
|
10065
10350
|
/**
|
|
10066
10351
|
* Retrieve the stores associated with your account.
|
|
10067
10352
|
* @summary Get stores
|
|
@@ -10106,6 +10391,18 @@ export class EcommerceStoresApi extends BaseAPI {
|
|
|
10106
10391
|
return EcommerceStoresApiFp(this.configuration).deleteStoreV1(storeId, options).then((request) => request(this.axios, this.basePath));
|
|
10107
10392
|
}
|
|
10108
10393
|
|
|
10394
|
+
/**
|
|
10395
|
+
* 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.
|
|
10396
|
+
* @summary Get store metadata
|
|
10397
|
+
* @param {string} storeId The ID of the store to read metadata for.
|
|
10398
|
+
* @param {*} [options] Override http request option.
|
|
10399
|
+
* @throws {RequiredError}
|
|
10400
|
+
* @memberof EcommerceStoresApi
|
|
10401
|
+
*/
|
|
10402
|
+
public getStoreMetadataV1(storeId: string, options?: RawAxiosRequestConfig) {
|
|
10403
|
+
return EcommerceStoresApiFp(this.configuration).getStoreMetadataV1(storeId, options).then((request) => request(this.axios, this.basePath));
|
|
10404
|
+
}
|
|
10405
|
+
|
|
10109
10406
|
/**
|
|
10110
10407
|
* Retrieve the stores associated with your account.
|
|
10111
10408
|
* @summary Get stores
|
package/base.ts
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/common.ts
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/configuration.ts
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
|
|
@@ -48,7 +48,7 @@ export class Configuration {
|
|
|
48
48
|
this.baseOptions = {
|
|
49
49
|
...param.baseOptions,
|
|
50
50
|
headers: {
|
|
51
|
-
'User-Agent': "hostinger-typescript-sdk/1.2.
|
|
51
|
+
'User-Agent': "hostinger-typescript-sdk/1.2.1",
|
|
52
52
|
...param.baseOptions?.headers,
|
|
53
53
|
},
|
|
54
54
|
};
|