hostinger-api-sdk 2.4.4 → 2.5.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 CHANGED
@@ -1,9 +1,9 @@
1
- ## @hostinger/sdk@2.4.4
1
+ ## @hostinger/sdk@2.5.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/sdk@2.4.4 --save
8
+ npm install @hostinger/sdk@2.5.1 --save
9
9
  ```
package/api.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.4.4
6
+ * API Version: 2.5.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
@@ -15813,6 +15813,56 @@ export interface ReachV1ProfilesSettingsUpdateRequest {
15813
15813
  */
15814
15814
  'sender_email': string | null;
15815
15815
  }
15816
+ /**
15817
+ *
15818
+ * @export
15819
+ * @interface ReachV1StoresConnectionResource
15820
+ */
15821
+ export interface ReachV1StoresConnectionResource {
15822
+ /**
15823
+ * UUID of the connection between the store and the profile.
15824
+ * @type {string}
15825
+ * @memberof ReachV1StoresConnectionResource
15826
+ */
15827
+ 'uuid': string;
15828
+ /**
15829
+ *
15830
+ * @type {string}
15831
+ * @memberof ReachV1StoresConnectionResource
15832
+ */
15833
+ 'store_id': string;
15834
+ /**
15835
+ *
15836
+ * @type {ReachV1StoresConnectionResourceStore}
15837
+ * @memberof ReachV1StoresConnectionResource
15838
+ */
15839
+ 'store': ReachV1StoresConnectionResourceStore | null;
15840
+ }
15841
+ /**
15842
+ * Reach store created for the connection.
15843
+ * @export
15844
+ * @interface ReachV1StoresConnectionResourceStore
15845
+ */
15846
+ export interface ReachV1StoresConnectionResourceStore {
15847
+ /**
15848
+ *
15849
+ * @type {string}
15850
+ * @memberof ReachV1StoresConnectionResourceStore
15851
+ */
15852
+ 'uuid': string;
15853
+ /**
15854
+ *
15855
+ * @type {string}
15856
+ * @memberof ReachV1StoresConnectionResourceStore
15857
+ */
15858
+ 'currency': string | null;
15859
+ /**
15860
+ *
15861
+ * @type {string}
15862
+ * @memberof ReachV1StoresConnectionResourceStore
15863
+ */
15864
+ 'synced_at': string | null;
15865
+ }
15816
15866
  /**
15817
15867
  *
15818
15868
  * @export
@@ -45445,6 +45495,48 @@ export const ReachIntegrationsApiAxiosParamCreator = function (configuration?: C
45445
45495
  options: localVarRequestOptions,
45446
45496
  };
45447
45497
  },
45498
+ /**
45499
+ * Connect one of the customer\'s eCommerce stores to the profile, so Reach receives its customers and orders. Take `store_id` from the list eCommerce stores endpoint. Fails with not found (`ECOMMERCE_STORE_NOT_FOUND`) when the store is not one of the customer\'s own stores, also when the eCommerce service cannot be reached. Fails with a conflict (`ECOMMERCE_CONNECTION_ALREADY_EXISTS`) when the store is connected to any profile or this profile already has a store - to move a store to another plan, disconnect it from the profile that holds it first.
45500
+ * @summary Connect Ecommerce store
45501
+ * @param {string} profileUuid Profile uuid parameter
45502
+ * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
45503
+ * @param {*} [options] Override http request option.
45504
+ * @throws {RequiredError}
45505
+ */
45506
+ connectEcommerceStoreV1: async (profileUuid: string, storeId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
45507
+ // verify required parameter 'profileUuid' is not null or undefined
45508
+ assertParamExists('connectEcommerceStoreV1', 'profileUuid', profileUuid)
45509
+ // verify required parameter 'storeId' is not null or undefined
45510
+ assertParamExists('connectEcommerceStoreV1', 'storeId', storeId)
45511
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/ecommerce/stores/{storeId}`
45512
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)))
45513
+ .replace(`{${"storeId"}}`, encodeURIComponent(String(storeId)));
45514
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
45515
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
45516
+ let baseOptions;
45517
+ if (configuration) {
45518
+ baseOptions = configuration.baseOptions;
45519
+ }
45520
+
45521
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
45522
+ const localVarHeaderParameter = {} as any;
45523
+ const localVarQueryParameter = {} as any;
45524
+
45525
+ // authentication apiToken required
45526
+ // http bearer authentication required
45527
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
45528
+
45529
+
45530
+
45531
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
45532
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
45533
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
45534
+
45535
+ return {
45536
+ url: toPathString(localVarUrlObj),
45537
+ options: localVarRequestOptions,
45538
+ };
45539
+ },
45448
45540
  /**
45449
45541
  * Disconnect an AI Website Builder site from the profile; the site stops sending subscribers to Reach. Take `domain` from the list connected websites endpoint. Works for a site that was already deleted in the builder. Fails with not found when the domain is not connected to this profile. Contacts and any connected eCommerce store stay. The site stays disconnected until it is connected again, so confirm the site and the plan with the customer before calling.
45450
45542
  * @summary Disconnect AI Website Builder site
@@ -45490,7 +45582,7 @@ export const ReachIntegrationsApiAxiosParamCreator = function (configuration?: C
45490
45582
  };
45491
45583
  },
45492
45584
  /**
45493
- * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. Confirm the store and the plan with the customer before calling.
45585
+ * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. To move the store to another plan, connect it to the new profile afterwards. Confirm the store and the plan with the customer before calling.
45494
45586
  * @summary Disconnect Ecommerce store
45495
45587
  * @param {string} profileUuid Profile uuid parameter
45496
45588
  * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
@@ -45614,7 +45706,7 @@ export const ReachIntegrationsApiAxiosParamCreator = function (configuration?: C
45614
45706
  };
45615
45707
  },
45616
45708
  /**
45617
- * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the disconnect eCommerce store endpoint. Connecting an AI Website Builder site connects the store selling on it.
45709
+ * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the connect or disconnect eCommerce store endpoint.
45618
45710
  * @summary List Ecommerce stores
45619
45711
  * @param {string} profileUuid Profile uuid parameter
45620
45712
  * @param {*} [options] Override http request option.
@@ -45674,6 +45766,19 @@ export const ReachIntegrationsApiFp = function(configuration?: Configuration) {
45674
45766
  const localVarOperationServerBasePath = operationServerMap['ReachIntegrationsApi.connectAIWebsiteBuilderSiteV1']?.[0]?.url;
45675
45767
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
45676
45768
  },
45769
+ /**
45770
+ * Connect one of the customer\'s eCommerce stores to the profile, so Reach receives its customers and orders. Take `store_id` from the list eCommerce stores endpoint. Fails with not found (`ECOMMERCE_STORE_NOT_FOUND`) when the store is not one of the customer\'s own stores, also when the eCommerce service cannot be reached. Fails with a conflict (`ECOMMERCE_CONNECTION_ALREADY_EXISTS`) when the store is connected to any profile or this profile already has a store - to move a store to another plan, disconnect it from the profile that holds it first.
45771
+ * @summary Connect Ecommerce store
45772
+ * @param {string} profileUuid Profile uuid parameter
45773
+ * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
45774
+ * @param {*} [options] Override http request option.
45775
+ * @throws {RequiredError}
45776
+ */
45777
+ async connectEcommerceStoreV1(profileUuid: string, storeId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1StoresConnectionResource>> {
45778
+ const localVarAxiosArgs = await localVarAxiosParamCreator.connectEcommerceStoreV1(profileUuid, storeId, options);
45779
+ const localVarOperationServerBasePath = operationServerMap['ReachIntegrationsApi.connectEcommerceStoreV1']?.[0]?.url;
45780
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
45781
+ },
45677
45782
  /**
45678
45783
  * Disconnect an AI Website Builder site from the profile; the site stops sending subscribers to Reach. Take `domain` from the list connected websites endpoint. Works for a site that was already deleted in the builder. Fails with not found when the domain is not connected to this profile. Contacts and any connected eCommerce store stay. The site stays disconnected until it is connected again, so confirm the site and the plan with the customer before calling.
45679
45784
  * @summary Disconnect AI Website Builder site
@@ -45688,7 +45793,7 @@ export const ReachIntegrationsApiFp = function(configuration?: Configuration) {
45688
45793
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
45689
45794
  },
45690
45795
  /**
45691
- * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. Confirm the store and the plan with the customer before calling.
45796
+ * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. To move the store to another plan, connect it to the new profile afterwards. Confirm the store and the plan with the customer before calling.
45692
45797
  * @summary Disconnect Ecommerce store
45693
45798
  * @param {string} profileUuid Profile uuid parameter
45694
45799
  * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
@@ -45726,7 +45831,7 @@ export const ReachIntegrationsApiFp = function(configuration?: Configuration) {
45726
45831
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
45727
45832
  },
45728
45833
  /**
45729
- * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the disconnect eCommerce store endpoint. Connecting an AI Website Builder site connects the store selling on it.
45834
+ * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the connect or disconnect eCommerce store endpoint.
45730
45835
  * @summary List Ecommerce stores
45731
45836
  * @param {string} profileUuid Profile uuid parameter
45732
45837
  * @param {*} [options] Override http request option.
@@ -45758,6 +45863,17 @@ export const ReachIntegrationsApiFactory = function (configuration?: Configurati
45758
45863
  connectAIWebsiteBuilderSiteV1(profileUuid: string, reachV1WebsitesWebsiteBuilderConnectRequest: ReachV1WebsitesWebsiteBuilderConnectRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
45759
45864
  return localVarFp.connectAIWebsiteBuilderSiteV1(profileUuid, reachV1WebsitesWebsiteBuilderConnectRequest, options).then((request) => request(axios, basePath));
45760
45865
  },
45866
+ /**
45867
+ * Connect one of the customer\'s eCommerce stores to the profile, so Reach receives its customers and orders. Take `store_id` from the list eCommerce stores endpoint. Fails with not found (`ECOMMERCE_STORE_NOT_FOUND`) when the store is not one of the customer\'s own stores, also when the eCommerce service cannot be reached. Fails with a conflict (`ECOMMERCE_CONNECTION_ALREADY_EXISTS`) when the store is connected to any profile or this profile already has a store - to move a store to another plan, disconnect it from the profile that holds it first.
45868
+ * @summary Connect Ecommerce store
45869
+ * @param {string} profileUuid Profile uuid parameter
45870
+ * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
45871
+ * @param {*} [options] Override http request option.
45872
+ * @throws {RequiredError}
45873
+ */
45874
+ connectEcommerceStoreV1(profileUuid: string, storeId: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1StoresConnectionResource> {
45875
+ return localVarFp.connectEcommerceStoreV1(profileUuid, storeId, options).then((request) => request(axios, basePath));
45876
+ },
45761
45877
  /**
45762
45878
  * Disconnect an AI Website Builder site from the profile; the site stops sending subscribers to Reach. Take `domain` from the list connected websites endpoint. Works for a site that was already deleted in the builder. Fails with not found when the domain is not connected to this profile. Contacts and any connected eCommerce store stay. The site stays disconnected until it is connected again, so confirm the site and the plan with the customer before calling.
45763
45879
  * @summary Disconnect AI Website Builder site
@@ -45770,7 +45886,7 @@ export const ReachIntegrationsApiFactory = function (configuration?: Configurati
45770
45886
  return localVarFp.disconnectAIWebsiteBuilderSiteV1(profileUuid, reachV1WebsitesWebsiteBuilderDisconnectRequest, options).then((request) => request(axios, basePath));
45771
45887
  },
45772
45888
  /**
45773
- * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. Confirm the store and the plan with the customer before calling.
45889
+ * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. To move the store to another plan, connect it to the new profile afterwards. Confirm the store and the plan with the customer before calling.
45774
45890
  * @summary Disconnect Ecommerce store
45775
45891
  * @param {string} profileUuid Profile uuid parameter
45776
45892
  * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
@@ -45802,7 +45918,7 @@ export const ReachIntegrationsApiFactory = function (configuration?: Configurati
45802
45918
  return localVarFp.listConnectedWebsitesV1(profileUuid, options).then((request) => request(axios, basePath));
45803
45919
  },
45804
45920
  /**
45805
- * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the disconnect eCommerce store endpoint. Connecting an AI Website Builder site connects the store selling on it.
45921
+ * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the connect or disconnect eCommerce store endpoint.
45806
45922
  * @summary List Ecommerce stores
45807
45923
  * @param {string} profileUuid Profile uuid parameter
45808
45924
  * @param {*} [options] Override http request option.
@@ -45834,6 +45950,19 @@ export class ReachIntegrationsApi extends BaseAPI {
45834
45950
  return ReachIntegrationsApiFp(this.configuration).connectAIWebsiteBuilderSiteV1(profileUuid, reachV1WebsitesWebsiteBuilderConnectRequest, options).then((request) => request(this.axios, this.basePath));
45835
45951
  }
45836
45952
 
45953
+ /**
45954
+ * Connect one of the customer\'s eCommerce stores to the profile, so Reach receives its customers and orders. Take `store_id` from the list eCommerce stores endpoint. Fails with not found (`ECOMMERCE_STORE_NOT_FOUND`) when the store is not one of the customer\'s own stores, also when the eCommerce service cannot be reached. Fails with a conflict (`ECOMMERCE_CONNECTION_ALREADY_EXISTS`) when the store is connected to any profile or this profile already has a store - to move a store to another plan, disconnect it from the profile that holds it first.
45955
+ * @summary Connect Ecommerce store
45956
+ * @param {string} profileUuid Profile uuid parameter
45957
+ * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
45958
+ * @param {*} [options] Override http request option.
45959
+ * @throws {RequiredError}
45960
+ * @memberof ReachIntegrationsApi
45961
+ */
45962
+ public connectEcommerceStoreV1(profileUuid: string, storeId: string, options?: RawAxiosRequestConfig) {
45963
+ return ReachIntegrationsApiFp(this.configuration).connectEcommerceStoreV1(profileUuid, storeId, options).then((request) => request(this.axios, this.basePath));
45964
+ }
45965
+
45837
45966
  /**
45838
45967
  * Disconnect an AI Website Builder site from the profile; the site stops sending subscribers to Reach. Take `domain` from the list connected websites endpoint. Works for a site that was already deleted in the builder. Fails with not found when the domain is not connected to this profile. Contacts and any connected eCommerce store stay. The site stays disconnected until it is connected again, so confirm the site and the plan with the customer before calling.
45839
45968
  * @summary Disconnect AI Website Builder site
@@ -45848,7 +45977,7 @@ export class ReachIntegrationsApi extends BaseAPI {
45848
45977
  }
45849
45978
 
45850
45979
  /**
45851
- * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. Confirm the store and the plan with the customer before calling.
45980
+ * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. To move the store to another plan, connect it to the new profile afterwards. Confirm the store and the plan with the customer before calling.
45852
45981
  * @summary Disconnect Ecommerce store
45853
45982
  * @param {string} profileUuid Profile uuid parameter
45854
45983
  * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
@@ -45886,7 +46015,7 @@ export class ReachIntegrationsApi extends BaseAPI {
45886
46015
  }
45887
46016
 
45888
46017
  /**
45889
- * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the disconnect eCommerce store endpoint. Connecting an AI Website Builder site connects the store selling on it.
46018
+ * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the connect or disconnect eCommerce store endpoint.
45890
46019
  * @summary List Ecommerce stores
45891
46020
  * @param {string} profileUuid Profile uuid parameter
45892
46021
  * @param {*} [options] Override http request option.
package/base.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.4.4
6
+ * API Version: 2.5.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: 2.4.4
6
+ * API Version: 2.5.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: 2.4.4
6
+ * API Version: 2.5.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/2.4.4",
51
+ 'User-Agent': "hostinger-typescript-sdk/2.5.1",
52
52
  ...param.baseOptions?.headers,
53
53
  },
54
54
  };
package/dist/api.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.4.4
4
+ * API Version: 2.5.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
@@ -15459,6 +15459,56 @@ export interface ReachV1ProfilesSettingsUpdateRequest {
15459
15459
  */
15460
15460
  'sender_email': string | null;
15461
15461
  }
15462
+ /**
15463
+ *
15464
+ * @export
15465
+ * @interface ReachV1StoresConnectionResource
15466
+ */
15467
+ export interface ReachV1StoresConnectionResource {
15468
+ /**
15469
+ * UUID of the connection between the store and the profile.
15470
+ * @type {string}
15471
+ * @memberof ReachV1StoresConnectionResource
15472
+ */
15473
+ 'uuid': string;
15474
+ /**
15475
+ *
15476
+ * @type {string}
15477
+ * @memberof ReachV1StoresConnectionResource
15478
+ */
15479
+ 'store_id': string;
15480
+ /**
15481
+ *
15482
+ * @type {ReachV1StoresConnectionResourceStore}
15483
+ * @memberof ReachV1StoresConnectionResource
15484
+ */
15485
+ 'store': ReachV1StoresConnectionResourceStore | null;
15486
+ }
15487
+ /**
15488
+ * Reach store created for the connection.
15489
+ * @export
15490
+ * @interface ReachV1StoresConnectionResourceStore
15491
+ */
15492
+ export interface ReachV1StoresConnectionResourceStore {
15493
+ /**
15494
+ *
15495
+ * @type {string}
15496
+ * @memberof ReachV1StoresConnectionResourceStore
15497
+ */
15498
+ 'uuid': string;
15499
+ /**
15500
+ *
15501
+ * @type {string}
15502
+ * @memberof ReachV1StoresConnectionResourceStore
15503
+ */
15504
+ 'currency': string | null;
15505
+ /**
15506
+ *
15507
+ * @type {string}
15508
+ * @memberof ReachV1StoresConnectionResourceStore
15509
+ */
15510
+ 'synced_at': string | null;
15511
+ }
15462
15512
  /**
15463
15513
  *
15464
15514
  * @export
@@ -31540,6 +31590,15 @@ export declare const ReachIntegrationsApiAxiosParamCreator: (configuration?: Con
31540
31590
  * @throws {RequiredError}
31541
31591
  */
31542
31592
  connectAIWebsiteBuilderSiteV1: (profileUuid: string, reachV1WebsitesWebsiteBuilderConnectRequest: ReachV1WebsitesWebsiteBuilderConnectRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
31593
+ /**
31594
+ * Connect one of the customer\'s eCommerce stores to the profile, so Reach receives its customers and orders. Take `store_id` from the list eCommerce stores endpoint. Fails with not found (`ECOMMERCE_STORE_NOT_FOUND`) when the store is not one of the customer\'s own stores, also when the eCommerce service cannot be reached. Fails with a conflict (`ECOMMERCE_CONNECTION_ALREADY_EXISTS`) when the store is connected to any profile or this profile already has a store - to move a store to another plan, disconnect it from the profile that holds it first.
31595
+ * @summary Connect Ecommerce store
31596
+ * @param {string} profileUuid Profile uuid parameter
31597
+ * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
31598
+ * @param {*} [options] Override http request option.
31599
+ * @throws {RequiredError}
31600
+ */
31601
+ connectEcommerceStoreV1: (profileUuid: string, storeId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
31543
31602
  /**
31544
31603
  * Disconnect an AI Website Builder site from the profile; the site stops sending subscribers to Reach. Take `domain` from the list connected websites endpoint. Works for a site that was already deleted in the builder. Fails with not found when the domain is not connected to this profile. Contacts and any connected eCommerce store stay. The site stays disconnected until it is connected again, so confirm the site and the plan with the customer before calling.
31545
31604
  * @summary Disconnect AI Website Builder site
@@ -31550,7 +31609,7 @@ export declare const ReachIntegrationsApiAxiosParamCreator: (configuration?: Con
31550
31609
  */
31551
31610
  disconnectAIWebsiteBuilderSiteV1: (profileUuid: string, reachV1WebsitesWebsiteBuilderDisconnectRequest: ReachV1WebsitesWebsiteBuilderDisconnectRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
31552
31611
  /**
31553
- * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. Confirm the store and the plan with the customer before calling.
31612
+ * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. To move the store to another plan, connect it to the new profile afterwards. Confirm the store and the plan with the customer before calling.
31554
31613
  * @summary Disconnect Ecommerce store
31555
31614
  * @param {string} profileUuid Profile uuid parameter
31556
31615
  * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
@@ -31576,7 +31635,7 @@ export declare const ReachIntegrationsApiAxiosParamCreator: (configuration?: Con
31576
31635
  */
31577
31636
  listConnectedWebsitesV1: (profileUuid: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
31578
31637
  /**
31579
- * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the disconnect eCommerce store endpoint. Connecting an AI Website Builder site connects the store selling on it.
31638
+ * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the connect or disconnect eCommerce store endpoint.
31580
31639
  * @summary List Ecommerce stores
31581
31640
  * @param {string} profileUuid Profile uuid parameter
31582
31641
  * @param {*} [options] Override http request option.
@@ -31598,6 +31657,15 @@ export declare const ReachIntegrationsApiFp: (configuration?: Configuration) =>
31598
31657
  * @throws {RequiredError}
31599
31658
  */
31600
31659
  connectAIWebsiteBuilderSiteV1(profileUuid: string, reachV1WebsitesWebsiteBuilderConnectRequest: ReachV1WebsitesWebsiteBuilderConnectRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>>;
31660
+ /**
31661
+ * Connect one of the customer\'s eCommerce stores to the profile, so Reach receives its customers and orders. Take `store_id` from the list eCommerce stores endpoint. Fails with not found (`ECOMMERCE_STORE_NOT_FOUND`) when the store is not one of the customer\'s own stores, also when the eCommerce service cannot be reached. Fails with a conflict (`ECOMMERCE_CONNECTION_ALREADY_EXISTS`) when the store is connected to any profile or this profile already has a store - to move a store to another plan, disconnect it from the profile that holds it first.
31662
+ * @summary Connect Ecommerce store
31663
+ * @param {string} profileUuid Profile uuid parameter
31664
+ * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
31665
+ * @param {*} [options] Override http request option.
31666
+ * @throws {RequiredError}
31667
+ */
31668
+ connectEcommerceStoreV1(profileUuid: string, storeId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReachV1StoresConnectionResource>>;
31601
31669
  /**
31602
31670
  * Disconnect an AI Website Builder site from the profile; the site stops sending subscribers to Reach. Take `domain` from the list connected websites endpoint. Works for a site that was already deleted in the builder. Fails with not found when the domain is not connected to this profile. Contacts and any connected eCommerce store stay. The site stays disconnected until it is connected again, so confirm the site and the plan with the customer before calling.
31603
31671
  * @summary Disconnect AI Website Builder site
@@ -31608,7 +31676,7 @@ export declare const ReachIntegrationsApiFp: (configuration?: Configuration) =>
31608
31676
  */
31609
31677
  disconnectAIWebsiteBuilderSiteV1(profileUuid: string, reachV1WebsitesWebsiteBuilderDisconnectRequest: ReachV1WebsitesWebsiteBuilderDisconnectRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>>;
31610
31678
  /**
31611
- * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. Confirm the store and the plan with the customer before calling.
31679
+ * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. To move the store to another plan, connect it to the new profile afterwards. Confirm the store and the plan with the customer before calling.
31612
31680
  * @summary Disconnect Ecommerce store
31613
31681
  * @param {string} profileUuid Profile uuid parameter
31614
31682
  * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
@@ -31634,7 +31702,7 @@ export declare const ReachIntegrationsApiFp: (configuration?: Configuration) =>
31634
31702
  */
31635
31703
  listConnectedWebsitesV1(profileUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ReachV1WebsitesWebsiteResource>>>;
31636
31704
  /**
31637
- * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the disconnect eCommerce store endpoint. Connecting an AI Website Builder site connects the store selling on it.
31705
+ * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the connect or disconnect eCommerce store endpoint.
31638
31706
  * @summary List Ecommerce stores
31639
31707
  * @param {string} profileUuid Profile uuid parameter
31640
31708
  * @param {*} [options] Override http request option.
@@ -31656,6 +31724,15 @@ export declare const ReachIntegrationsApiFactory: (configuration?: Configuration
31656
31724
  * @throws {RequiredError}
31657
31725
  */
31658
31726
  connectAIWebsiteBuilderSiteV1(profileUuid: string, reachV1WebsitesWebsiteBuilderConnectRequest: ReachV1WebsitesWebsiteBuilderConnectRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource>;
31727
+ /**
31728
+ * Connect one of the customer\'s eCommerce stores to the profile, so Reach receives its customers and orders. Take `store_id` from the list eCommerce stores endpoint. Fails with not found (`ECOMMERCE_STORE_NOT_FOUND`) when the store is not one of the customer\'s own stores, also when the eCommerce service cannot be reached. Fails with a conflict (`ECOMMERCE_CONNECTION_ALREADY_EXISTS`) when the store is connected to any profile or this profile already has a store - to move a store to another plan, disconnect it from the profile that holds it first.
31729
+ * @summary Connect Ecommerce store
31730
+ * @param {string} profileUuid Profile uuid parameter
31731
+ * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
31732
+ * @param {*} [options] Override http request option.
31733
+ * @throws {RequiredError}
31734
+ */
31735
+ connectEcommerceStoreV1(profileUuid: string, storeId: string, options?: RawAxiosRequestConfig): AxiosPromise<ReachV1StoresConnectionResource>;
31659
31736
  /**
31660
31737
  * Disconnect an AI Website Builder site from the profile; the site stops sending subscribers to Reach. Take `domain` from the list connected websites endpoint. Works for a site that was already deleted in the builder. Fails with not found when the domain is not connected to this profile. Contacts and any connected eCommerce store stay. The site stays disconnected until it is connected again, so confirm the site and the plan with the customer before calling.
31661
31738
  * @summary Disconnect AI Website Builder site
@@ -31666,7 +31743,7 @@ export declare const ReachIntegrationsApiFactory: (configuration?: Configuration
31666
31743
  */
31667
31744
  disconnectAIWebsiteBuilderSiteV1(profileUuid: string, reachV1WebsitesWebsiteBuilderDisconnectRequest: ReachV1WebsitesWebsiteBuilderDisconnectRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource>;
31668
31745
  /**
31669
- * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. Confirm the store and the plan with the customer before calling.
31746
+ * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. To move the store to another plan, connect it to the new profile afterwards. Confirm the store and the plan with the customer before calling.
31670
31747
  * @summary Disconnect Ecommerce store
31671
31748
  * @param {string} profileUuid Profile uuid parameter
31672
31749
  * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
@@ -31692,7 +31769,7 @@ export declare const ReachIntegrationsApiFactory: (configuration?: Configuration
31692
31769
  */
31693
31770
  listConnectedWebsitesV1(profileUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<ReachV1WebsitesWebsiteResource>>;
31694
31771
  /**
31695
- * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the disconnect eCommerce store endpoint. Connecting an AI Website Builder site connects the store selling on it.
31772
+ * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the connect or disconnect eCommerce store endpoint.
31696
31773
  * @summary List Ecommerce stores
31697
31774
  * @param {string} profileUuid Profile uuid parameter
31698
31775
  * @param {*} [options] Override http request option.
@@ -31717,6 +31794,16 @@ export declare class ReachIntegrationsApi extends BaseAPI {
31717
31794
  * @memberof ReachIntegrationsApi
31718
31795
  */
31719
31796
  connectAIWebsiteBuilderSiteV1(profileUuid: string, reachV1WebsitesWebsiteBuilderConnectRequest: ReachV1WebsitesWebsiteBuilderConnectRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CommonSuccessEmptyResource, any, {}, any>>;
31797
+ /**
31798
+ * Connect one of the customer\'s eCommerce stores to the profile, so Reach receives its customers and orders. Take `store_id` from the list eCommerce stores endpoint. Fails with not found (`ECOMMERCE_STORE_NOT_FOUND`) when the store is not one of the customer\'s own stores, also when the eCommerce service cannot be reached. Fails with a conflict (`ECOMMERCE_CONNECTION_ALREADY_EXISTS`) when the store is connected to any profile or this profile already has a store - to move a store to another plan, disconnect it from the profile that holds it first.
31799
+ * @summary Connect Ecommerce store
31800
+ * @param {string} profileUuid Profile uuid parameter
31801
+ * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
31802
+ * @param {*} [options] Override http request option.
31803
+ * @throws {RequiredError}
31804
+ * @memberof ReachIntegrationsApi
31805
+ */
31806
+ connectEcommerceStoreV1(profileUuid: string, storeId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ReachV1StoresConnectionResource, any, {}, any>>;
31720
31807
  /**
31721
31808
  * Disconnect an AI Website Builder site from the profile; the site stops sending subscribers to Reach. Take `domain` from the list connected websites endpoint. Works for a site that was already deleted in the builder. Fails with not found when the domain is not connected to this profile. Contacts and any connected eCommerce store stay. The site stays disconnected until it is connected again, so confirm the site and the plan with the customer before calling.
31722
31809
  * @summary Disconnect AI Website Builder site
@@ -31728,7 +31815,7 @@ export declare class ReachIntegrationsApi extends BaseAPI {
31728
31815
  */
31729
31816
  disconnectAIWebsiteBuilderSiteV1(profileUuid: string, reachV1WebsitesWebsiteBuilderDisconnectRequest: ReachV1WebsitesWebsiteBuilderDisconnectRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CommonSuccessEmptyResource, any, {}, any>>;
31730
31817
  /**
31731
- * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. Confirm the store and the plan with the customer before calling.
31818
+ * Disconnect an eCommerce store from the profile. Reach stops receiving the store\'s customers and orders, and its products and coupons are removed from Reach; contacts and past orders stay. Take `store_id` from the list eCommerce stores endpoint; for a store that is `connected_to_other_profile`, call this with that profile. Also succeeds when the store is not connected to this profile, so success is not proof that anything was disconnected. To move the store to another plan, connect it to the new profile afterwards. Confirm the store and the plan with the customer before calling.
31732
31819
  * @summary Disconnect Ecommerce store
31733
31820
  * @param {string} profileUuid Profile uuid parameter
31734
31821
  * @param {string} storeId Hostinger eCommerce store ID, as returned by the eCommerce stores list
@@ -31757,7 +31844,7 @@ export declare class ReachIntegrationsApi extends BaseAPI {
31757
31844
  */
31758
31845
  listConnectedWebsitesV1(profileUuid: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ReachV1WebsitesWebsiteResource[], any, {}, any>>;
31759
31846
  /**
31760
- * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the disconnect eCommerce store endpoint. Connecting an AI Website Builder site connects the store selling on it.
31847
+ * Get all of the customer\'s Hostinger eCommerce stores, each with its `store_id` and `connection_status` for the profile in the path. A store is connected to at most one profile. `connected_to_other_profile` does not name that profile - call this for each profile to find it. The list is empty, not an error, when the eCommerce service cannot be reached. Pass `store_id` to the connect or disconnect eCommerce store endpoint.
31761
31848
  * @summary List Ecommerce stores
31762
31849
  * @param {string} profileUuid Profile uuid parameter
31763
31850
  * @param {*} [options] Override http request option.