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/dist/api.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.2.0
4
+ * API Version: 1.2.1
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -1816,6 +1816,19 @@ export declare const EcommerceV1SalesChannelSalesChannelListResourceSalesChannel
1816
1816
  readonly Wordpress: "wordpress";
1817
1817
  };
1818
1818
  export type EcommerceV1SalesChannelSalesChannelListResourceSalesChannelsInnerTypeEnum = typeof EcommerceV1SalesChannelSalesChannelListResourceSalesChannelsInnerTypeEnum[keyof typeof EcommerceV1SalesChannelSalesChannelListResourceSalesChannelsInnerTypeEnum];
1819
+ /**
1820
+ *
1821
+ * @export
1822
+ * @interface EcommerceV1SalesChannelSalesChannelUpdateResource
1823
+ */
1824
+ export interface EcommerceV1SalesChannelSalesChannelUpdateResource {
1825
+ /**
1826
+ *
1827
+ * @type {EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannel}
1828
+ * @memberof EcommerceV1SalesChannelSalesChannelUpdateResource
1829
+ */
1830
+ 'sales_channel': EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannel;
1831
+ }
1819
1832
  /**
1820
1833
  *
1821
1834
  * @export
@@ -1845,6 +1858,25 @@ export declare const EcommerceV1SalesChannelStoreRequestTypeEnum: {
1845
1858
  readonly Custom: "custom";
1846
1859
  };
1847
1860
  export type EcommerceV1SalesChannelStoreRequestTypeEnum = typeof EcommerceV1SalesChannelStoreRequestTypeEnum[keyof typeof EcommerceV1SalesChannelStoreRequestTypeEnum];
1861
+ /**
1862
+ *
1863
+ * @export
1864
+ * @interface EcommerceV1SalesChannelUpdateRequest
1865
+ */
1866
+ export interface EcommerceV1SalesChannelUpdateRequest {
1867
+ /**
1868
+ * Merchant-facing custom name shown in the sales channels list. Pass null to clear it.
1869
+ * @type {string}
1870
+ * @memberof EcommerceV1SalesChannelUpdateRequest
1871
+ */
1872
+ 'name': string | null;
1873
+ /**
1874
+ * Public address where the custom sales channel lives. Pass null to clear it.
1875
+ * @type {string}
1876
+ * @memberof EcommerceV1SalesChannelUpdateRequest
1877
+ */
1878
+ 'url': string | null;
1879
+ }
1848
1880
  /**
1849
1881
  *
1850
1882
  * @export
@@ -2017,6 +2049,111 @@ export interface EcommerceV1StoreStoreDeleteResource {
2017
2049
  */
2018
2050
  'is_deleted': boolean;
2019
2051
  }
2052
+ /**
2053
+ *
2054
+ * @export
2055
+ * @interface EcommerceV1StoreStoreMetadataResource
2056
+ */
2057
+ export interface EcommerceV1StoreStoreMetadataResource {
2058
+ /**
2059
+ *
2060
+ * @type {EcommerceV1StoreStoreMetadataResourceMetadata}
2061
+ * @memberof EcommerceV1StoreStoreMetadataResource
2062
+ */
2063
+ 'metadata': EcommerceV1StoreStoreMetadataResourceMetadata;
2064
+ }
2065
+ /**
2066
+ *
2067
+ * @export
2068
+ * @interface EcommerceV1StoreStoreMetadataResourceMetadata
2069
+ */
2070
+ export interface EcommerceV1StoreStoreMetadataResourceMetadata {
2071
+ /**
2072
+ * Whether the store has at least one payment method connected.
2073
+ * @type {boolean}
2074
+ * @memberof EcommerceV1StoreStoreMetadataResourceMetadata
2075
+ */
2076
+ 'has_payment_methods': boolean;
2077
+ /**
2078
+ * Whether the store has at least one shipping option configured.
2079
+ * @type {boolean}
2080
+ * @memberof EcommerceV1StoreStoreMetadataResourceMetadata
2081
+ */
2082
+ 'has_shipping': boolean;
2083
+ /**
2084
+ * The default currency code of the store.
2085
+ * @type {string}
2086
+ * @memberof EcommerceV1StoreStoreMetadataResourceMetadata
2087
+ */
2088
+ 'default_currency_code': string;
2089
+ /**
2090
+ *
2091
+ * @type {EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency}
2092
+ * @memberof EcommerceV1StoreStoreMetadataResourceMetadata
2093
+ */
2094
+ 'default_currency': EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency | null;
2095
+ }
2096
+ /**
2097
+ * The store\'s default currency, or null when unset.
2098
+ * @export
2099
+ * @interface EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
2100
+ */
2101
+ export interface EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency {
2102
+ /**
2103
+ *
2104
+ * @type {string}
2105
+ * @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
2106
+ */
2107
+ 'code': string;
2108
+ /**
2109
+ *
2110
+ * @type {string}
2111
+ * @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
2112
+ */
2113
+ 'symbol': string;
2114
+ /**
2115
+ *
2116
+ * @type {string}
2117
+ * @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
2118
+ */
2119
+ 'symbol_native': string;
2120
+ /**
2121
+ *
2122
+ * @type {string}
2123
+ * @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
2124
+ */
2125
+ 'name': string;
2126
+ /**
2127
+ *
2128
+ * @type {string}
2129
+ * @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
2130
+ */
2131
+ 'name_plural': string;
2132
+ /**
2133
+ *
2134
+ * @type {number}
2135
+ * @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
2136
+ */
2137
+ 'decimal_digits': number;
2138
+ /**
2139
+ *
2140
+ * @type {number}
2141
+ * @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
2142
+ */
2143
+ 'rounding': number;
2144
+ /**
2145
+ *
2146
+ * @type {string}
2147
+ * @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
2148
+ */
2149
+ 'template': string | null;
2150
+ /**
2151
+ *
2152
+ * @type {number}
2153
+ * @memberof EcommerceV1StoreStoreMetadataResourceMetadataDefaultCurrency
2154
+ */
2155
+ 'min_amount': number | null;
2156
+ }
2020
2157
  /**
2021
2158
  *
2022
2159
  * @export
@@ -7747,13 +7884,13 @@ export declare class EcommerceProductsApi extends BaseAPI {
7747
7884
  export declare const EcommerceSalesChannelsApiAxiosParamCreator: (configuration?: Configuration) => {
7748
7885
  /**
7749
7886
  * 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.
7750
- * @summary Create a custom sales channel
7887
+ * @summary Create custom sales channel
7751
7888
  * @param {string} storeId The ID of the store to create the sales channel for.
7752
7889
  * @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
7753
7890
  * @param {*} [options] Override http request option.
7754
7891
  * @throws {RequiredError}
7755
7892
  */
7756
- createACustomSalesChannelV1: (storeId: string, ecommerceV1SalesChannelStoreRequest: EcommerceV1SalesChannelStoreRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
7893
+ createCustomSalesChannelV1: (storeId: string, ecommerceV1SalesChannelStoreRequest: EcommerceV1SalesChannelStoreRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
7757
7894
  /**
7758
7895
  * List a store\'s active sales channels with their full metadata.
7759
7896
  * @summary List sales channels
@@ -7762,6 +7899,16 @@ export declare const EcommerceSalesChannelsApiAxiosParamCreator: (configuration?
7762
7899
  * @throws {RequiredError}
7763
7900
  */
7764
7901
  listSalesChannelsV1: (storeId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
7902
+ /**
7903
+ * 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.
7904
+ * @summary Update sales channel
7905
+ * @param {string} storeId The ID of the store that owns the sales channel.
7906
+ * @param {string} salesChannelId The ID of the sales channel to update.
7907
+ * @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
7908
+ * @param {*} [options] Override http request option.
7909
+ * @throws {RequiredError}
7910
+ */
7911
+ updateSalesChannelV1: (storeId: string, salesChannelId: string, ecommerceV1SalesChannelUpdateRequest: EcommerceV1SalesChannelUpdateRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
7765
7912
  };
7766
7913
  /**
7767
7914
  * EcommerceSalesChannelsApi - functional programming interface
@@ -7770,13 +7917,13 @@ export declare const EcommerceSalesChannelsApiAxiosParamCreator: (configuration?
7770
7917
  export declare const EcommerceSalesChannelsApiFp: (configuration?: Configuration) => {
7771
7918
  /**
7772
7919
  * 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.
7773
- * @summary Create a custom sales channel
7920
+ * @summary Create custom sales channel
7774
7921
  * @param {string} storeId The ID of the store to create the sales channel for.
7775
7922
  * @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
7776
7923
  * @param {*} [options] Override http request option.
7777
7924
  * @throws {RequiredError}
7778
7925
  */
7779
- createACustomSalesChannelV1(storeId: string, ecommerceV1SalesChannelStoreRequest: EcommerceV1SalesChannelStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1SalesChannelSalesChannelCreationResource>>;
7926
+ createCustomSalesChannelV1(storeId: string, ecommerceV1SalesChannelStoreRequest: EcommerceV1SalesChannelStoreRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1SalesChannelSalesChannelCreationResource>>;
7780
7927
  /**
7781
7928
  * List a store\'s active sales channels with their full metadata.
7782
7929
  * @summary List sales channels
@@ -7785,6 +7932,16 @@ export declare const EcommerceSalesChannelsApiFp: (configuration?: Configuration
7785
7932
  * @throws {RequiredError}
7786
7933
  */
7787
7934
  listSalesChannelsV1(storeId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1SalesChannelSalesChannelListResource>>;
7935
+ /**
7936
+ * 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.
7937
+ * @summary Update sales channel
7938
+ * @param {string} storeId The ID of the store that owns the sales channel.
7939
+ * @param {string} salesChannelId The ID of the sales channel to update.
7940
+ * @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
7941
+ * @param {*} [options] Override http request option.
7942
+ * @throws {RequiredError}
7943
+ */
7944
+ updateSalesChannelV1(storeId: string, salesChannelId: string, ecommerceV1SalesChannelUpdateRequest: EcommerceV1SalesChannelUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1SalesChannelSalesChannelUpdateResource>>;
7788
7945
  };
7789
7946
  /**
7790
7947
  * EcommerceSalesChannelsApi - factory interface
@@ -7793,13 +7950,13 @@ export declare const EcommerceSalesChannelsApiFp: (configuration?: Configuration
7793
7950
  export declare const EcommerceSalesChannelsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
7794
7951
  /**
7795
7952
  * 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.
7796
- * @summary Create a custom sales channel
7953
+ * @summary Create custom sales channel
7797
7954
  * @param {string} storeId The ID of the store to create the sales channel for.
7798
7955
  * @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
7799
7956
  * @param {*} [options] Override http request option.
7800
7957
  * @throws {RequiredError}
7801
7958
  */
7802
- createACustomSalesChannelV1(storeId: string, ecommerceV1SalesChannelStoreRequest: EcommerceV1SalesChannelStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1SalesChannelSalesChannelCreationResource>;
7959
+ createCustomSalesChannelV1(storeId: string, ecommerceV1SalesChannelStoreRequest: EcommerceV1SalesChannelStoreRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1SalesChannelSalesChannelCreationResource>;
7803
7960
  /**
7804
7961
  * List a store\'s active sales channels with their full metadata.
7805
7962
  * @summary List sales channels
@@ -7808,6 +7965,16 @@ export declare const EcommerceSalesChannelsApiFactory: (configuration?: Configur
7808
7965
  * @throws {RequiredError}
7809
7966
  */
7810
7967
  listSalesChannelsV1(storeId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1SalesChannelSalesChannelListResource>;
7968
+ /**
7969
+ * 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.
7970
+ * @summary Update sales channel
7971
+ * @param {string} storeId The ID of the store that owns the sales channel.
7972
+ * @param {string} salesChannelId The ID of the sales channel to update.
7973
+ * @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
7974
+ * @param {*} [options] Override http request option.
7975
+ * @throws {RequiredError}
7976
+ */
7977
+ updateSalesChannelV1(storeId: string, salesChannelId: string, ecommerceV1SalesChannelUpdateRequest: EcommerceV1SalesChannelUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1SalesChannelSalesChannelUpdateResource>;
7811
7978
  };
7812
7979
  /**
7813
7980
  * EcommerceSalesChannelsApi - object-oriented interface
@@ -7818,14 +7985,14 @@ export declare const EcommerceSalesChannelsApiFactory: (configuration?: Configur
7818
7985
  export declare class EcommerceSalesChannelsApi extends BaseAPI {
7819
7986
  /**
7820
7987
  * 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.
7821
- * @summary Create a custom sales channel
7988
+ * @summary Create custom sales channel
7822
7989
  * @param {string} storeId The ID of the store to create the sales channel for.
7823
7990
  * @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
7824
7991
  * @param {*} [options] Override http request option.
7825
7992
  * @throws {RequiredError}
7826
7993
  * @memberof EcommerceSalesChannelsApi
7827
7994
  */
7828
- createACustomSalesChannelV1(storeId: string, ecommerceV1SalesChannelStoreRequest: EcommerceV1SalesChannelStoreRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceV1SalesChannelSalesChannelCreationResource, any, {}>>;
7995
+ createCustomSalesChannelV1(storeId: string, ecommerceV1SalesChannelStoreRequest: EcommerceV1SalesChannelStoreRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceV1SalesChannelSalesChannelCreationResource, any, {}>>;
7829
7996
  /**
7830
7997
  * List a store\'s active sales channels with their full metadata.
7831
7998
  * @summary List sales channels
@@ -7835,6 +8002,17 @@ export declare class EcommerceSalesChannelsApi extends BaseAPI {
7835
8002
  * @memberof EcommerceSalesChannelsApi
7836
8003
  */
7837
8004
  listSalesChannelsV1(storeId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceV1SalesChannelSalesChannelListResource, any, {}>>;
8005
+ /**
8006
+ * 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.
8007
+ * @summary Update sales channel
8008
+ * @param {string} storeId The ID of the store that owns the sales channel.
8009
+ * @param {string} salesChannelId The ID of the sales channel to update.
8010
+ * @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
8011
+ * @param {*} [options] Override http request option.
8012
+ * @throws {RequiredError}
8013
+ * @memberof EcommerceSalesChannelsApi
8014
+ */
8015
+ updateSalesChannelV1(storeId: string, salesChannelId: string, ecommerceV1SalesChannelUpdateRequest: EcommerceV1SalesChannelUpdateRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceV1SalesChannelSalesChannelUpdateResource, any, {}>>;
7838
8016
  }
7839
8017
  /**
7840
8018
  * EcommerceShippingApi - axios parameter creator
@@ -7920,6 +8098,14 @@ export declare const EcommerceStoresApiAxiosParamCreator: (configuration?: Confi
7920
8098
  * @throws {RequiredError}
7921
8099
  */
7922
8100
  deleteStoreV1: (storeId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
8101
+ /**
8102
+ * 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.
8103
+ * @summary Get store metadata
8104
+ * @param {string} storeId The ID of the store to read metadata for.
8105
+ * @param {*} [options] Override http request option.
8106
+ * @throws {RequiredError}
8107
+ */
8108
+ getStoreMetadataV1: (storeId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
7923
8109
  /**
7924
8110
  * Retrieve the stores associated with your account.
7925
8111
  * @summary Get stores
@@ -7950,6 +8136,14 @@ export declare const EcommerceStoresApiFp: (configuration?: Configuration) => {
7950
8136
  * @throws {RequiredError}
7951
8137
  */
7952
8138
  deleteStoreV1(storeId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1StoreStoreDeleteResource>>;
8139
+ /**
8140
+ * 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.
8141
+ * @summary Get store metadata
8142
+ * @param {string} storeId The ID of the store to read metadata for.
8143
+ * @param {*} [options] Override http request option.
8144
+ * @throws {RequiredError}
8145
+ */
8146
+ getStoreMetadataV1(storeId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1StoreStoreMetadataResource>>;
7953
8147
  /**
7954
8148
  * Retrieve the stores associated with your account.
7955
8149
  * @summary Get stores
@@ -7980,6 +8174,14 @@ export declare const EcommerceStoresApiFactory: (configuration?: Configuration,
7980
8174
  * @throws {RequiredError}
7981
8175
  */
7982
8176
  deleteStoreV1(storeId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1StoreStoreDeleteResource>;
8177
+ /**
8178
+ * 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.
8179
+ * @summary Get store metadata
8180
+ * @param {string} storeId The ID of the store to read metadata for.
8181
+ * @param {*} [options] Override http request option.
8182
+ * @throws {RequiredError}
8183
+ */
8184
+ getStoreMetadataV1(storeId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1StoreStoreMetadataResource>;
7983
8185
  /**
7984
8186
  * Retrieve the stores associated with your account.
7985
8187
  * @summary Get stores
@@ -8014,6 +8216,15 @@ export declare class EcommerceStoresApi extends BaseAPI {
8014
8216
  * @memberof EcommerceStoresApi
8015
8217
  */
8016
8218
  deleteStoreV1(storeId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceV1StoreStoreDeleteResource, any, {}>>;
8219
+ /**
8220
+ * 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.
8221
+ * @summary Get store metadata
8222
+ * @param {string} storeId The ID of the store to read metadata for.
8223
+ * @param {*} [options] Override http request option.
8224
+ * @throws {RequiredError}
8225
+ * @memberof EcommerceStoresApi
8226
+ */
8227
+ getStoreMetadataV1(storeId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceV1StoreStoreMetadataResource, any, {}>>;
8017
8228
  /**
8018
8229
  * Retrieve the stores associated with your account.
8019
8230
  * @summary Get stores
package/dist/api.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.2.0
7
+ * API Version: 1.2.1
8
8
  *
9
9
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
10
10
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3525,17 +3525,17 @@ const EcommerceSalesChannelsApiAxiosParamCreator = function (configuration) {
3525
3525
  return {
3526
3526
  /**
3527
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
3528
+ * @summary Create custom sales channel
3529
3529
  * @param {string} storeId The ID of the store to create the sales channel for.
3530
3530
  * @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
3531
3531
  * @param {*} [options] Override http request option.
3532
3532
  * @throws {RequiredError}
3533
3533
  */
3534
- createACustomSalesChannelV1: (storeId_1, ecommerceV1SalesChannelStoreRequest_1, ...args_1) => __awaiter(this, [storeId_1, ecommerceV1SalesChannelStoreRequest_1, ...args_1], void 0, function* (storeId, ecommerceV1SalesChannelStoreRequest, options = {}) {
3534
+ createCustomSalesChannelV1: (storeId_1, ecommerceV1SalesChannelStoreRequest_1, ...args_1) => __awaiter(this, [storeId_1, ecommerceV1SalesChannelStoreRequest_1, ...args_1], void 0, function* (storeId, ecommerceV1SalesChannelStoreRequest, options = {}) {
3535
3535
  // verify required parameter 'storeId' is not null or undefined
3536
- (0, common_1.assertParamExists)('createACustomSalesChannelV1', 'storeId', storeId);
3536
+ (0, common_1.assertParamExists)('createCustomSalesChannelV1', 'storeId', storeId);
3537
3537
  // verify required parameter 'ecommerceV1SalesChannelStoreRequest' is not null or undefined
3538
- (0, common_1.assertParamExists)('createACustomSalesChannelV1', 'ecommerceV1SalesChannelStoreRequest', ecommerceV1SalesChannelStoreRequest);
3538
+ (0, common_1.assertParamExists)('createCustomSalesChannelV1', 'ecommerceV1SalesChannelStoreRequest', ecommerceV1SalesChannelStoreRequest);
3539
3539
  const localVarPath = `/api/ecommerce/v1/stores/{store_id}/sales-channels`
3540
3540
  .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
3541
3541
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -3592,6 +3592,47 @@ const EcommerceSalesChannelsApiAxiosParamCreator = function (configuration) {
3592
3592
  options: localVarRequestOptions,
3593
3593
  };
3594
3594
  }),
3595
+ /**
3596
+ * 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.
3597
+ * @summary Update sales channel
3598
+ * @param {string} storeId The ID of the store that owns the sales channel.
3599
+ * @param {string} salesChannelId The ID of the sales channel to update.
3600
+ * @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
3601
+ * @param {*} [options] Override http request option.
3602
+ * @throws {RequiredError}
3603
+ */
3604
+ updateSalesChannelV1: (storeId_1, salesChannelId_1, ecommerceV1SalesChannelUpdateRequest_1, ...args_1) => __awaiter(this, [storeId_1, salesChannelId_1, ecommerceV1SalesChannelUpdateRequest_1, ...args_1], void 0, function* (storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options = {}) {
3605
+ // verify required parameter 'storeId' is not null or undefined
3606
+ (0, common_1.assertParamExists)('updateSalesChannelV1', 'storeId', storeId);
3607
+ // verify required parameter 'salesChannelId' is not null or undefined
3608
+ (0, common_1.assertParamExists)('updateSalesChannelV1', 'salesChannelId', salesChannelId);
3609
+ // verify required parameter 'ecommerceV1SalesChannelUpdateRequest' is not null or undefined
3610
+ (0, common_1.assertParamExists)('updateSalesChannelV1', 'ecommerceV1SalesChannelUpdateRequest', ecommerceV1SalesChannelUpdateRequest);
3611
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/sales-channels/{sales_channel_id}`
3612
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
3613
+ .replace(`{${"sales_channel_id"}}`, encodeURIComponent(String(salesChannelId)));
3614
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3615
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3616
+ let baseOptions;
3617
+ if (configuration) {
3618
+ baseOptions = configuration.baseOptions;
3619
+ }
3620
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
3621
+ const localVarHeaderParameter = {};
3622
+ const localVarQueryParameter = {};
3623
+ // authentication apiToken required
3624
+ // http bearer authentication required
3625
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3626
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3627
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3628
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3629
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3630
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(ecommerceV1SalesChannelUpdateRequest, localVarRequestOptions, configuration);
3631
+ return {
3632
+ url: (0, common_1.toPathString)(localVarUrlObj),
3633
+ options: localVarRequestOptions,
3634
+ };
3635
+ }),
3595
3636
  };
3596
3637
  };
3597
3638
  exports.EcommerceSalesChannelsApiAxiosParamCreator = EcommerceSalesChannelsApiAxiosParamCreator;
@@ -3604,17 +3645,17 @@ const EcommerceSalesChannelsApiFp = function (configuration) {
3604
3645
  return {
3605
3646
  /**
3606
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.
3607
- * @summary Create a custom sales channel
3648
+ * @summary Create custom sales channel
3608
3649
  * @param {string} storeId The ID of the store to create the sales channel for.
3609
3650
  * @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
3610
3651
  * @param {*} [options] Override http request option.
3611
3652
  * @throws {RequiredError}
3612
3653
  */
3613
- createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
3654
+ createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
3614
3655
  return __awaiter(this, void 0, void 0, function* () {
3615
3656
  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;
3657
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options);
3658
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['EcommerceSalesChannelsApi.createCustomSalesChannelV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
3618
3659
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3619
3660
  });
3620
3661
  },
@@ -3633,6 +3674,23 @@ const EcommerceSalesChannelsApiFp = function (configuration) {
3633
3674
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3634
3675
  });
3635
3676
  },
3677
+ /**
3678
+ * 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.
3679
+ * @summary Update sales channel
3680
+ * @param {string} storeId The ID of the store that owns the sales channel.
3681
+ * @param {string} salesChannelId The ID of the sales channel to update.
3682
+ * @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
3683
+ * @param {*} [options] Override http request option.
3684
+ * @throws {RequiredError}
3685
+ */
3686
+ updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options) {
3687
+ return __awaiter(this, void 0, void 0, function* () {
3688
+ var _a, _b;
3689
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options);
3690
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['EcommerceSalesChannelsApi.updateSalesChannelV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
3691
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3692
+ });
3693
+ },
3636
3694
  };
3637
3695
  };
3638
3696
  exports.EcommerceSalesChannelsApiFp = EcommerceSalesChannelsApiFp;
@@ -3645,14 +3703,14 @@ const EcommerceSalesChannelsApiFactory = function (configuration, basePath, axio
3645
3703
  return {
3646
3704
  /**
3647
3705
  * 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
3706
+ * @summary Create custom sales channel
3649
3707
  * @param {string} storeId The ID of the store to create the sales channel for.
3650
3708
  * @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
3651
3709
  * @param {*} [options] Override http request option.
3652
3710
  * @throws {RequiredError}
3653
3711
  */
3654
- createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
3655
- return localVarFp.createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(axios, basePath));
3712
+ createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
3713
+ return localVarFp.createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(axios, basePath));
3656
3714
  },
3657
3715
  /**
3658
3716
  * List a store\'s active sales channels with their full metadata.
@@ -3664,6 +3722,18 @@ const EcommerceSalesChannelsApiFactory = function (configuration, basePath, axio
3664
3722
  listSalesChannelsV1(storeId, options) {
3665
3723
  return localVarFp.listSalesChannelsV1(storeId, options).then((request) => request(axios, basePath));
3666
3724
  },
3725
+ /**
3726
+ * 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.
3727
+ * @summary Update sales channel
3728
+ * @param {string} storeId The ID of the store that owns the sales channel.
3729
+ * @param {string} salesChannelId The ID of the sales channel to update.
3730
+ * @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
3731
+ * @param {*} [options] Override http request option.
3732
+ * @throws {RequiredError}
3733
+ */
3734
+ updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options) {
3735
+ return localVarFp.updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options).then((request) => request(axios, basePath));
3736
+ },
3667
3737
  };
3668
3738
  };
3669
3739
  exports.EcommerceSalesChannelsApiFactory = EcommerceSalesChannelsApiFactory;
@@ -3676,15 +3746,15 @@ exports.EcommerceSalesChannelsApiFactory = EcommerceSalesChannelsApiFactory;
3676
3746
  class EcommerceSalesChannelsApi extends base_1.BaseAPI {
3677
3747
  /**
3678
3748
  * 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
3749
+ * @summary Create custom sales channel
3680
3750
  * @param {string} storeId The ID of the store to create the sales channel for.
3681
3751
  * @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
3682
3752
  * @param {*} [options] Override http request option.
3683
3753
  * @throws {RequiredError}
3684
3754
  * @memberof EcommerceSalesChannelsApi
3685
3755
  */
3686
- createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
3687
- return (0, exports.EcommerceSalesChannelsApiFp)(this.configuration).createACustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(this.axios, this.basePath));
3756
+ createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
3757
+ return (0, exports.EcommerceSalesChannelsApiFp)(this.configuration).createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(this.axios, this.basePath));
3688
3758
  }
3689
3759
  /**
3690
3760
  * List a store\'s active sales channels with their full metadata.
@@ -3697,6 +3767,19 @@ class EcommerceSalesChannelsApi extends base_1.BaseAPI {
3697
3767
  listSalesChannelsV1(storeId, options) {
3698
3768
  return (0, exports.EcommerceSalesChannelsApiFp)(this.configuration).listSalesChannelsV1(storeId, options).then((request) => request(this.axios, this.basePath));
3699
3769
  }
3770
+ /**
3771
+ * 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.
3772
+ * @summary Update sales channel
3773
+ * @param {string} storeId The ID of the store that owns the sales channel.
3774
+ * @param {string} salesChannelId The ID of the sales channel to update.
3775
+ * @param {EcommerceV1SalesChannelUpdateRequest} ecommerceV1SalesChannelUpdateRequest
3776
+ * @param {*} [options] Override http request option.
3777
+ * @throws {RequiredError}
3778
+ * @memberof EcommerceSalesChannelsApi
3779
+ */
3780
+ updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options) {
3781
+ return (0, exports.EcommerceSalesChannelsApiFp)(this.configuration).updateSalesChannelV1(storeId, salesChannelId, ecommerceV1SalesChannelUpdateRequest, options).then((request) => request(this.axios, this.basePath));
3782
+ }
3700
3783
  }
3701
3784
  exports.EcommerceSalesChannelsApi = EcommerceSalesChannelsApi;
3702
3785
  /**
@@ -3884,6 +3967,38 @@ const EcommerceStoresApiAxiosParamCreator = function (configuration) {
3884
3967
  options: localVarRequestOptions,
3885
3968
  };
3886
3969
  }),
3970
+ /**
3971
+ * 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.
3972
+ * @summary Get store metadata
3973
+ * @param {string} storeId The ID of the store to read metadata for.
3974
+ * @param {*} [options] Override http request option.
3975
+ * @throws {RequiredError}
3976
+ */
3977
+ getStoreMetadataV1: (storeId_1, ...args_1) => __awaiter(this, [storeId_1, ...args_1], void 0, function* (storeId, options = {}) {
3978
+ // verify required parameter 'storeId' is not null or undefined
3979
+ (0, common_1.assertParamExists)('getStoreMetadataV1', 'storeId', storeId);
3980
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/metadata`
3981
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
3982
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3983
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3984
+ let baseOptions;
3985
+ if (configuration) {
3986
+ baseOptions = configuration.baseOptions;
3987
+ }
3988
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3989
+ const localVarHeaderParameter = {};
3990
+ const localVarQueryParameter = {};
3991
+ // authentication apiToken required
3992
+ // http bearer authentication required
3993
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3994
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3995
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3996
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3997
+ return {
3998
+ url: (0, common_1.toPathString)(localVarUrlObj),
3999
+ options: localVarRequestOptions,
4000
+ };
4001
+ }),
3887
4002
  /**
3888
4003
  * Retrieve the stores associated with your account.
3889
4004
  * @summary Get stores
@@ -3956,6 +4071,21 @@ const EcommerceStoresApiFp = function (configuration) {
3956
4071
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3957
4072
  });
3958
4073
  },
4074
+ /**
4075
+ * 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.
4076
+ * @summary Get store metadata
4077
+ * @param {string} storeId The ID of the store to read metadata for.
4078
+ * @param {*} [options] Override http request option.
4079
+ * @throws {RequiredError}
4080
+ */
4081
+ getStoreMetadataV1(storeId, options) {
4082
+ return __awaiter(this, void 0, void 0, function* () {
4083
+ var _a, _b;
4084
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getStoreMetadataV1(storeId, options);
4085
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['EcommerceStoresApi.getStoreMetadataV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
4086
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4087
+ });
4088
+ },
3959
4089
  /**
3960
4090
  * Retrieve the stores associated with your account.
3961
4091
  * @summary Get stores
@@ -4001,6 +4131,16 @@ const EcommerceStoresApiFactory = function (configuration, basePath, axios) {
4001
4131
  deleteStoreV1(storeId, options) {
4002
4132
  return localVarFp.deleteStoreV1(storeId, options).then((request) => request(axios, basePath));
4003
4133
  },
4134
+ /**
4135
+ * 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.
4136
+ * @summary Get store metadata
4137
+ * @param {string} storeId The ID of the store to read metadata for.
4138
+ * @param {*} [options] Override http request option.
4139
+ * @throws {RequiredError}
4140
+ */
4141
+ getStoreMetadataV1(storeId, options) {
4142
+ return localVarFp.getStoreMetadataV1(storeId, options).then((request) => request(axios, basePath));
4143
+ },
4004
4144
  /**
4005
4145
  * Retrieve the stores associated with your account.
4006
4146
  * @summary Get stores
@@ -4043,6 +4183,17 @@ class EcommerceStoresApi extends base_1.BaseAPI {
4043
4183
  deleteStoreV1(storeId, options) {
4044
4184
  return (0, exports.EcommerceStoresApiFp)(this.configuration).deleteStoreV1(storeId, options).then((request) => request(this.axios, this.basePath));
4045
4185
  }
4186
+ /**
4187
+ * 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.
4188
+ * @summary Get store metadata
4189
+ * @param {string} storeId The ID of the store to read metadata for.
4190
+ * @param {*} [options] Override http request option.
4191
+ * @throws {RequiredError}
4192
+ * @memberof EcommerceStoresApi
4193
+ */
4194
+ getStoreMetadataV1(storeId, options) {
4195
+ return (0, exports.EcommerceStoresApiFp)(this.configuration).getStoreMetadataV1(storeId, options).then((request) => request(this.axios, this.basePath));
4196
+ }
4046
4197
  /**
4047
4198
  * Retrieve the stores associated with your account.
4048
4199
  * @summary Get stores
package/dist/base.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.2.0
4
+ * API Version: 1.2.1
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api