hostinger-api-sdk 2.15.0 → 2.16.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/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.15.0
6
+ * API Version: 2.16.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
@@ -313,6 +313,22 @@ export const EcommerceV1StoreStoreCreationResourceSalesChannelTypeEnum = {
313
313
  export const EcommerceV1StoreStoreRequestSalesChannelTypeEnum = {
314
314
  Custom: 'custom'
315
315
  };
316
+ export const GPUV1ExposedServiceExposedServiceResourceProtocolEnum = {
317
+ Tcp: 'tcp',
318
+ Udp: 'udp'
319
+ };
320
+ export const GPUV1ExposedServiceExposedServiceResourceTypeEnum = {
321
+ Http: 'http',
322
+ Https: 'https'
323
+ };
324
+ export const GPUV1ExposedServiceStoreRequestProtocolEnum = {
325
+ Tcp: 'tcp',
326
+ Udp: 'udp'
327
+ };
328
+ export const GPUV1ExposedServiceStoreRequestTypeEnum = {
329
+ Http: 'http',
330
+ Https: 'https'
331
+ };
316
332
  export const GPUV1InstanceInstanceListResourceStatusEnum = {
317
333
  Created: 'created',
318
334
  Creating: 'creating',
@@ -12636,6 +12652,259 @@ export const GetPoolGroupsV1CurrencyEnum = {
12636
12652
  Vnd: 'VND',
12637
12653
  Zar: 'ZAR'
12638
12654
  };
12655
+ /**
12656
+ * GPUExposedServicesApi - axios parameter creator
12657
+ * @export
12658
+ */
12659
+ export const GPUExposedServicesApiAxiosParamCreator = function (configuration) {
12660
+ return {
12661
+ /**
12662
+ * Expose a service running on a specified GPU instance to the internet. The service is exposed asynchronously: a successful request returns immediately, and the service appears in the exposed services list once it gets its public hostname and external port. Fails when the instance already has the maximum of 4 exposed services. Use this endpoint to make an application on your GPU instance publicly reachable.
12663
+ * @summary Create exposed service
12664
+ * @param {number} instanceId GPU instance ID
12665
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
12666
+ * @param {*} [options] Override http request option.
12667
+ * @throws {RequiredError}
12668
+ */
12669
+ createExposedServiceV1: (instanceId_1, gPUV1ExposedServiceStoreRequest_1, ...args_1) => __awaiter(this, [instanceId_1, gPUV1ExposedServiceStoreRequest_1, ...args_1], void 0, function* (instanceId, gPUV1ExposedServiceStoreRequest, options = {}) {
12670
+ // verify required parameter 'instanceId' is not null or undefined
12671
+ assertParamExists('createExposedServiceV1', 'instanceId', instanceId);
12672
+ // verify required parameter 'gPUV1ExposedServiceStoreRequest' is not null or undefined
12673
+ assertParamExists('createExposedServiceV1', 'gPUV1ExposedServiceStoreRequest', gPUV1ExposedServiceStoreRequest);
12674
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}/exposed-services`
12675
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
12676
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12677
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12678
+ let baseOptions;
12679
+ if (configuration) {
12680
+ baseOptions = configuration.baseOptions;
12681
+ }
12682
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
12683
+ const localVarHeaderParameter = {};
12684
+ const localVarQueryParameter = {};
12685
+ // authentication apiToken required
12686
+ // http bearer authentication required
12687
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12688
+ localVarHeaderParameter['Content-Type'] = 'application/json';
12689
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12690
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12691
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12692
+ localVarRequestOptions.data = serializeDataIfNeeded(gPUV1ExposedServiceStoreRequest, localVarRequestOptions, configuration);
12693
+ return {
12694
+ url: toPathString(localVarUrlObj),
12695
+ options: localVarRequestOptions,
12696
+ };
12697
+ }),
12698
+ /**
12699
+ * Delete a specified exposed service of a GPU instance. The service is removed asynchronously: a successful request returns immediately and the service stops being reachable from the internet shortly after. Use this endpoint to close public access to a service on your GPU instance.
12700
+ * @summary Delete exposed service
12701
+ * @param {number} instanceId GPU instance ID
12702
+ * @param {number} exposedServiceId Exposed service ID
12703
+ * @param {*} [options] Override http request option.
12704
+ * @throws {RequiredError}
12705
+ */
12706
+ deleteExposedServiceV1: (instanceId_1, exposedServiceId_1, ...args_1) => __awaiter(this, [instanceId_1, exposedServiceId_1, ...args_1], void 0, function* (instanceId, exposedServiceId, options = {}) {
12707
+ // verify required parameter 'instanceId' is not null or undefined
12708
+ assertParamExists('deleteExposedServiceV1', 'instanceId', instanceId);
12709
+ // verify required parameter 'exposedServiceId' is not null or undefined
12710
+ assertParamExists('deleteExposedServiceV1', 'exposedServiceId', exposedServiceId);
12711
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}/exposed-services/{exposedServiceId}`
12712
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId))
12713
+ .replace(`{${"exposedServiceId"}}`, encodePathParam('exposedServiceId', exposedServiceId));
12714
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12715
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12716
+ let baseOptions;
12717
+ if (configuration) {
12718
+ baseOptions = configuration.baseOptions;
12719
+ }
12720
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
12721
+ const localVarHeaderParameter = {};
12722
+ const localVarQueryParameter = {};
12723
+ // authentication apiToken required
12724
+ // http bearer authentication required
12725
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12726
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12727
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12728
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12729
+ return {
12730
+ url: toPathString(localVarUrlObj),
12731
+ options: localVarRequestOptions,
12732
+ };
12733
+ }),
12734
+ /**
12735
+ * Retrieve the services exposed on a specified GPU instance. A newly created service is listed once it gets its public hostname and external port. Use this endpoint to find the public address of services running on your GPU instance.
12736
+ * @summary Get exposed services
12737
+ * @param {number} instanceId GPU instance ID
12738
+ * @param {*} [options] Override http request option.
12739
+ * @throws {RequiredError}
12740
+ */
12741
+ getExposedServicesV1: (instanceId_1, ...args_1) => __awaiter(this, [instanceId_1, ...args_1], void 0, function* (instanceId, options = {}) {
12742
+ // verify required parameter 'instanceId' is not null or undefined
12743
+ assertParamExists('getExposedServicesV1', 'instanceId', instanceId);
12744
+ const localVarPath = `/api/gpu/v1/instances/{instanceId}/exposed-services`
12745
+ .replace(`{${"instanceId"}}`, encodePathParam('instanceId', instanceId));
12746
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
12747
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
12748
+ let baseOptions;
12749
+ if (configuration) {
12750
+ baseOptions = configuration.baseOptions;
12751
+ }
12752
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
12753
+ const localVarHeaderParameter = {};
12754
+ const localVarQueryParameter = {};
12755
+ // authentication apiToken required
12756
+ // http bearer authentication required
12757
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
12758
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
12759
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
12760
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
12761
+ return {
12762
+ url: toPathString(localVarUrlObj),
12763
+ options: localVarRequestOptions,
12764
+ };
12765
+ }),
12766
+ };
12767
+ };
12768
+ /**
12769
+ * GPUExposedServicesApi - functional programming interface
12770
+ * @export
12771
+ */
12772
+ export const GPUExposedServicesApiFp = function (configuration) {
12773
+ const localVarAxiosParamCreator = GPUExposedServicesApiAxiosParamCreator(configuration);
12774
+ return {
12775
+ /**
12776
+ * Expose a service running on a specified GPU instance to the internet. The service is exposed asynchronously: a successful request returns immediately, and the service appears in the exposed services list once it gets its public hostname and external port. Fails when the instance already has the maximum of 4 exposed services. Use this endpoint to make an application on your GPU instance publicly reachable.
12777
+ * @summary Create exposed service
12778
+ * @param {number} instanceId GPU instance ID
12779
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
12780
+ * @param {*} [options] Override http request option.
12781
+ * @throws {RequiredError}
12782
+ */
12783
+ createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options) {
12784
+ return __awaiter(this, void 0, void 0, function* () {
12785
+ var _a, _b;
12786
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options);
12787
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUExposedServicesApi.createExposedServiceV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
12788
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12789
+ });
12790
+ },
12791
+ /**
12792
+ * Delete a specified exposed service of a GPU instance. The service is removed asynchronously: a successful request returns immediately and the service stops being reachable from the internet shortly after. Use this endpoint to close public access to a service on your GPU instance.
12793
+ * @summary Delete exposed service
12794
+ * @param {number} instanceId GPU instance ID
12795
+ * @param {number} exposedServiceId Exposed service ID
12796
+ * @param {*} [options] Override http request option.
12797
+ * @throws {RequiredError}
12798
+ */
12799
+ deleteExposedServiceV1(instanceId, exposedServiceId, options) {
12800
+ return __awaiter(this, void 0, void 0, function* () {
12801
+ var _a, _b;
12802
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteExposedServiceV1(instanceId, exposedServiceId, options);
12803
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUExposedServicesApi.deleteExposedServiceV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
12804
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12805
+ });
12806
+ },
12807
+ /**
12808
+ * Retrieve the services exposed on a specified GPU instance. A newly created service is listed once it gets its public hostname and external port. Use this endpoint to find the public address of services running on your GPU instance.
12809
+ * @summary Get exposed services
12810
+ * @param {number} instanceId GPU instance ID
12811
+ * @param {*} [options] Override http request option.
12812
+ * @throws {RequiredError}
12813
+ */
12814
+ getExposedServicesV1(instanceId, options) {
12815
+ return __awaiter(this, void 0, void 0, function* () {
12816
+ var _a, _b;
12817
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getExposedServicesV1(instanceId, options);
12818
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['GPUExposedServicesApi.getExposedServicesV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
12819
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12820
+ });
12821
+ },
12822
+ };
12823
+ };
12824
+ /**
12825
+ * GPUExposedServicesApi - factory interface
12826
+ * @export
12827
+ */
12828
+ export const GPUExposedServicesApiFactory = function (configuration, basePath, axios) {
12829
+ const localVarFp = GPUExposedServicesApiFp(configuration);
12830
+ return {
12831
+ /**
12832
+ * Expose a service running on a specified GPU instance to the internet. The service is exposed asynchronously: a successful request returns immediately, and the service appears in the exposed services list once it gets its public hostname and external port. Fails when the instance already has the maximum of 4 exposed services. Use this endpoint to make an application on your GPU instance publicly reachable.
12833
+ * @summary Create exposed service
12834
+ * @param {number} instanceId GPU instance ID
12835
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
12836
+ * @param {*} [options] Override http request option.
12837
+ * @throws {RequiredError}
12838
+ */
12839
+ createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options) {
12840
+ return localVarFp.createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options).then((request) => request(axios, basePath));
12841
+ },
12842
+ /**
12843
+ * Delete a specified exposed service of a GPU instance. The service is removed asynchronously: a successful request returns immediately and the service stops being reachable from the internet shortly after. Use this endpoint to close public access to a service on your GPU instance.
12844
+ * @summary Delete exposed service
12845
+ * @param {number} instanceId GPU instance ID
12846
+ * @param {number} exposedServiceId Exposed service ID
12847
+ * @param {*} [options] Override http request option.
12848
+ * @throws {RequiredError}
12849
+ */
12850
+ deleteExposedServiceV1(instanceId, exposedServiceId, options) {
12851
+ return localVarFp.deleteExposedServiceV1(instanceId, exposedServiceId, options).then((request) => request(axios, basePath));
12852
+ },
12853
+ /**
12854
+ * Retrieve the services exposed on a specified GPU instance. A newly created service is listed once it gets its public hostname and external port. Use this endpoint to find the public address of services running on your GPU instance.
12855
+ * @summary Get exposed services
12856
+ * @param {number} instanceId GPU instance ID
12857
+ * @param {*} [options] Override http request option.
12858
+ * @throws {RequiredError}
12859
+ */
12860
+ getExposedServicesV1(instanceId, options) {
12861
+ return localVarFp.getExposedServicesV1(instanceId, options).then((request) => request(axios, basePath));
12862
+ },
12863
+ };
12864
+ };
12865
+ /**
12866
+ * GPUExposedServicesApi - object-oriented interface
12867
+ * @export
12868
+ * @class GPUExposedServicesApi
12869
+ * @extends {BaseAPI}
12870
+ */
12871
+ export class GPUExposedServicesApi extends BaseAPI {
12872
+ /**
12873
+ * Expose a service running on a specified GPU instance to the internet. The service is exposed asynchronously: a successful request returns immediately, and the service appears in the exposed services list once it gets its public hostname and external port. Fails when the instance already has the maximum of 4 exposed services. Use this endpoint to make an application on your GPU instance publicly reachable.
12874
+ * @summary Create exposed service
12875
+ * @param {number} instanceId GPU instance ID
12876
+ * @param {GPUV1ExposedServiceStoreRequest} gPUV1ExposedServiceStoreRequest
12877
+ * @param {*} [options] Override http request option.
12878
+ * @throws {RequiredError}
12879
+ * @memberof GPUExposedServicesApi
12880
+ */
12881
+ createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options) {
12882
+ return GPUExposedServicesApiFp(this.configuration).createExposedServiceV1(instanceId, gPUV1ExposedServiceStoreRequest, options).then((request) => request(this.axios, this.basePath));
12883
+ }
12884
+ /**
12885
+ * Delete a specified exposed service of a GPU instance. The service is removed asynchronously: a successful request returns immediately and the service stops being reachable from the internet shortly after. Use this endpoint to close public access to a service on your GPU instance.
12886
+ * @summary Delete exposed service
12887
+ * @param {number} instanceId GPU instance ID
12888
+ * @param {number} exposedServiceId Exposed service ID
12889
+ * @param {*} [options] Override http request option.
12890
+ * @throws {RequiredError}
12891
+ * @memberof GPUExposedServicesApi
12892
+ */
12893
+ deleteExposedServiceV1(instanceId, exposedServiceId, options) {
12894
+ return GPUExposedServicesApiFp(this.configuration).deleteExposedServiceV1(instanceId, exposedServiceId, options).then((request) => request(this.axios, this.basePath));
12895
+ }
12896
+ /**
12897
+ * Retrieve the services exposed on a specified GPU instance. A newly created service is listed once it gets its public hostname and external port. Use this endpoint to find the public address of services running on your GPU instance.
12898
+ * @summary Get exposed services
12899
+ * @param {number} instanceId GPU instance ID
12900
+ * @param {*} [options] Override http request option.
12901
+ * @throws {RequiredError}
12902
+ * @memberof GPUExposedServicesApi
12903
+ */
12904
+ getExposedServicesV1(instanceId, options) {
12905
+ return GPUExposedServicesApiFp(this.configuration).getExposedServicesV1(instanceId, options).then((request) => request(this.axios, this.basePath));
12906
+ }
12907
+ }
12639
12908
  /**
12640
12909
  * GPUInstancesApi - axios parameter creator
12641
12910
  * @export
@@ -24877,6 +25146,83 @@ export const ReachCampaignsApiAxiosParamCreator = function (configuration) {
24877
25146
  options: localVarRequestOptions,
24878
25147
  };
24879
25148
  }),
25149
+ /**
25150
+ * Send a campaign now to the audience stored on it. This is irreversible: once accepted, the emails go out and cannot be recalled. Confirm with the customer before calling. The campaign needs a subject, sender, template and audience first - set them with the update endpoint. Delivery is asynchronous, so success means accepted, not delivered: the campaign moves to `sending` and later to `publish`, or to `failed`. Read the campaign to follow it. The request is rejected when the campaign has no recipients, its sender domain is not verified or is blocked, the plan\'s sending limits would be exceeded, or the campaign is already being sent.
25151
+ * @summary Send campaign
25152
+ * @param {string} profileUuid Profile uuid parameter
25153
+ * @param {string} campaignUuid Campaign uuid parameter
25154
+ * @param {*} [options] Override http request option.
25155
+ * @throws {RequiredError}
25156
+ */
25157
+ sendCampaignV1: (profileUuid_1, campaignUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, campaignUuid_1, ...args_1], void 0, function* (profileUuid, campaignUuid, options = {}) {
25158
+ // verify required parameter 'profileUuid' is not null or undefined
25159
+ assertParamExists('sendCampaignV1', 'profileUuid', profileUuid);
25160
+ // verify required parameter 'campaignUuid' is not null or undefined
25161
+ assertParamExists('sendCampaignV1', 'campaignUuid', campaignUuid);
25162
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}/send`
25163
+ .replace(`{${"profileUuid"}}`, encodePathParam('profileUuid', profileUuid))
25164
+ .replace(`{${"campaignUuid"}}`, encodePathParam('campaignUuid', campaignUuid));
25165
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25166
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25167
+ let baseOptions;
25168
+ if (configuration) {
25169
+ baseOptions = configuration.baseOptions;
25170
+ }
25171
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
25172
+ const localVarHeaderParameter = {};
25173
+ const localVarQueryParameter = {};
25174
+ // authentication apiToken required
25175
+ // http bearer authentication required
25176
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
25177
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25178
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25179
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
25180
+ return {
25181
+ url: toPathString(localVarUrlObj),
25182
+ options: localVarRequestOptions,
25183
+ };
25184
+ }),
25185
+ /**
25186
+ * Update a campaign\'s content, sender, template and audience. Only `draft`, `scheduled` and `failed` campaigns can be updated; a campaign that is sending or already sent is rejected. Updating a `failed` campaign moves it back to `draft`. Audience changes replace rather than merge: `all_contacts: true` targets every contact of the profile, while `segment_uuids` replaces the segments currently targeted. Leave both out to keep the audience as it is. This does not send the campaign - use the send endpoint for that.
25187
+ * @summary Update campaign
25188
+ * @param {string} profileUuid Profile uuid parameter
25189
+ * @param {string} campaignUuid Campaign uuid parameter
25190
+ * @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
25191
+ * @param {*} [options] Override http request option.
25192
+ * @throws {RequiredError}
25193
+ */
25194
+ updateCampaignV1: (profileUuid_1, campaignUuid_1, reachV1CampaignsUpdateRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, campaignUuid_1, reachV1CampaignsUpdateRequest_1, ...args_1], void 0, function* (profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options = {}) {
25195
+ // verify required parameter 'profileUuid' is not null or undefined
25196
+ assertParamExists('updateCampaignV1', 'profileUuid', profileUuid);
25197
+ // verify required parameter 'campaignUuid' is not null or undefined
25198
+ assertParamExists('updateCampaignV1', 'campaignUuid', campaignUuid);
25199
+ // verify required parameter 'reachV1CampaignsUpdateRequest' is not null or undefined
25200
+ assertParamExists('updateCampaignV1', 'reachV1CampaignsUpdateRequest', reachV1CampaignsUpdateRequest);
25201
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}`
25202
+ .replace(`{${"profileUuid"}}`, encodePathParam('profileUuid', profileUuid))
25203
+ .replace(`{${"campaignUuid"}}`, encodePathParam('campaignUuid', campaignUuid));
25204
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25205
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25206
+ let baseOptions;
25207
+ if (configuration) {
25208
+ baseOptions = configuration.baseOptions;
25209
+ }
25210
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
25211
+ const localVarHeaderParameter = {};
25212
+ const localVarQueryParameter = {};
25213
+ // authentication apiToken required
25214
+ // http bearer authentication required
25215
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
25216
+ localVarHeaderParameter['Content-Type'] = 'application/json';
25217
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25218
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25219
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
25220
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1CampaignsUpdateRequest, localVarRequestOptions, configuration);
25221
+ return {
25222
+ url: toPathString(localVarUrlObj),
25223
+ options: localVarRequestOptions,
25224
+ };
25225
+ }),
24880
25226
  };
24881
25227
  };
24882
25228
  /**
@@ -24954,6 +25300,39 @@ export const ReachCampaignsApiFp = function (configuration) {
24954
25300
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
24955
25301
  });
24956
25302
  },
25303
+ /**
25304
+ * Send a campaign now to the audience stored on it. This is irreversible: once accepted, the emails go out and cannot be recalled. Confirm with the customer before calling. The campaign needs a subject, sender, template and audience first - set them with the update endpoint. Delivery is asynchronous, so success means accepted, not delivered: the campaign moves to `sending` and later to `publish`, or to `failed`. Read the campaign to follow it. The request is rejected when the campaign has no recipients, its sender domain is not verified or is blocked, the plan\'s sending limits would be exceeded, or the campaign is already being sent.
25305
+ * @summary Send campaign
25306
+ * @param {string} profileUuid Profile uuid parameter
25307
+ * @param {string} campaignUuid Campaign uuid parameter
25308
+ * @param {*} [options] Override http request option.
25309
+ * @throws {RequiredError}
25310
+ */
25311
+ sendCampaignV1(profileUuid, campaignUuid, options) {
25312
+ return __awaiter(this, void 0, void 0, function* () {
25313
+ var _a, _b;
25314
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.sendCampaignV1(profileUuid, campaignUuid, options);
25315
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachCampaignsApi.sendCampaignV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
25316
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25317
+ });
25318
+ },
25319
+ /**
25320
+ * Update a campaign\'s content, sender, template and audience. Only `draft`, `scheduled` and `failed` campaigns can be updated; a campaign that is sending or already sent is rejected. Updating a `failed` campaign moves it back to `draft`. Audience changes replace rather than merge: `all_contacts: true` targets every contact of the profile, while `segment_uuids` replaces the segments currently targeted. Leave both out to keep the audience as it is. This does not send the campaign - use the send endpoint for that.
25321
+ * @summary Update campaign
25322
+ * @param {string} profileUuid Profile uuid parameter
25323
+ * @param {string} campaignUuid Campaign uuid parameter
25324
+ * @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
25325
+ * @param {*} [options] Override http request option.
25326
+ * @throws {RequiredError}
25327
+ */
25328
+ updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options) {
25329
+ return __awaiter(this, void 0, void 0, function* () {
25330
+ var _a, _b;
25331
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options);
25332
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachCampaignsApi.updateCampaignV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
25333
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25334
+ });
25335
+ },
24957
25336
  };
24958
25337
  };
24959
25338
  /**
@@ -25011,6 +25390,29 @@ export const ReachCampaignsApiFactory = function (configuration, basePath, axios
25011
25390
  listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options) {
25012
25391
  return localVarFp.listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options).then((request) => request(axios, basePath));
25013
25392
  },
25393
+ /**
25394
+ * Send a campaign now to the audience stored on it. This is irreversible: once accepted, the emails go out and cannot be recalled. Confirm with the customer before calling. The campaign needs a subject, sender, template and audience first - set them with the update endpoint. Delivery is asynchronous, so success means accepted, not delivered: the campaign moves to `sending` and later to `publish`, or to `failed`. Read the campaign to follow it. The request is rejected when the campaign has no recipients, its sender domain is not verified or is blocked, the plan\'s sending limits would be exceeded, or the campaign is already being sent.
25395
+ * @summary Send campaign
25396
+ * @param {string} profileUuid Profile uuid parameter
25397
+ * @param {string} campaignUuid Campaign uuid parameter
25398
+ * @param {*} [options] Override http request option.
25399
+ * @throws {RequiredError}
25400
+ */
25401
+ sendCampaignV1(profileUuid, campaignUuid, options) {
25402
+ return localVarFp.sendCampaignV1(profileUuid, campaignUuid, options).then((request) => request(axios, basePath));
25403
+ },
25404
+ /**
25405
+ * Update a campaign\'s content, sender, template and audience. Only `draft`, `scheduled` and `failed` campaigns can be updated; a campaign that is sending or already sent is rejected. Updating a `failed` campaign moves it back to `draft`. Audience changes replace rather than merge: `all_contacts: true` targets every contact of the profile, while `segment_uuids` replaces the segments currently targeted. Leave both out to keep the audience as it is. This does not send the campaign - use the send endpoint for that.
25406
+ * @summary Update campaign
25407
+ * @param {string} profileUuid Profile uuid parameter
25408
+ * @param {string} campaignUuid Campaign uuid parameter
25409
+ * @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
25410
+ * @param {*} [options] Override http request option.
25411
+ * @throws {RequiredError}
25412
+ */
25413
+ updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options) {
25414
+ return localVarFp.updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options).then((request) => request(axios, basePath));
25415
+ },
25014
25416
  };
25015
25417
  };
25016
25418
  /**
@@ -25072,6 +25474,31 @@ export class ReachCampaignsApi extends BaseAPI {
25072
25474
  listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options) {
25073
25475
  return ReachCampaignsApiFp(this.configuration).listCampaignsV1(profileUuid, status, type, sortDirection, page, perPage, options).then((request) => request(this.axios, this.basePath));
25074
25476
  }
25477
+ /**
25478
+ * Send a campaign now to the audience stored on it. This is irreversible: once accepted, the emails go out and cannot be recalled. Confirm with the customer before calling. The campaign needs a subject, sender, template and audience first - set them with the update endpoint. Delivery is asynchronous, so success means accepted, not delivered: the campaign moves to `sending` and later to `publish`, or to `failed`. Read the campaign to follow it. The request is rejected when the campaign has no recipients, its sender domain is not verified or is blocked, the plan\'s sending limits would be exceeded, or the campaign is already being sent.
25479
+ * @summary Send campaign
25480
+ * @param {string} profileUuid Profile uuid parameter
25481
+ * @param {string} campaignUuid Campaign uuid parameter
25482
+ * @param {*} [options] Override http request option.
25483
+ * @throws {RequiredError}
25484
+ * @memberof ReachCampaignsApi
25485
+ */
25486
+ sendCampaignV1(profileUuid, campaignUuid, options) {
25487
+ return ReachCampaignsApiFp(this.configuration).sendCampaignV1(profileUuid, campaignUuid, options).then((request) => request(this.axios, this.basePath));
25488
+ }
25489
+ /**
25490
+ * Update a campaign\'s content, sender, template and audience. Only `draft`, `scheduled` and `failed` campaigns can be updated; a campaign that is sending or already sent is rejected. Updating a `failed` campaign moves it back to `draft`. Audience changes replace rather than merge: `all_contacts: true` targets every contact of the profile, while `segment_uuids` replaces the segments currently targeted. Leave both out to keep the audience as it is. This does not send the campaign - use the send endpoint for that.
25491
+ * @summary Update campaign
25492
+ * @param {string} profileUuid Profile uuid parameter
25493
+ * @param {string} campaignUuid Campaign uuid parameter
25494
+ * @param {ReachV1CampaignsUpdateRequest} reachV1CampaignsUpdateRequest
25495
+ * @param {*} [options] Override http request option.
25496
+ * @throws {RequiredError}
25497
+ * @memberof ReachCampaignsApi
25498
+ */
25499
+ updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options) {
25500
+ return ReachCampaignsApiFp(this.configuration).updateCampaignV1(profileUuid, campaignUuid, reachV1CampaignsUpdateRequest, options).then((request) => request(this.axios, this.basePath));
25501
+ }
25075
25502
  }
25076
25503
  /**
25077
25504
  * @export
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.15.0
4
+ * API Version: 2.16.1
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/base.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.15.0
6
+ * API Version: 2.16.1
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.15.0
4
+ * API Version: 2.16.1
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.15.0
6
+ * API Version: 2.16.1
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.15.0
4
+ * API Version: 2.16.1
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.15.0
6
+ * API Version: 2.16.1
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -13,7 +13,7 @@ export class Configuration {
13
13
  var _a;
14
14
  this.accessToken = param.accessToken;
15
15
  this.basePath = param.basePath;
16
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.15.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
16
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.16.1" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
17
17
  this.formDataCtor = param.formDataCtor;
18
18
  }
19
19
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.15.0
4
+ * API Version: 2.16.1
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 2.15.0
6
+ * API Version: 2.16.1
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.15.0
4
+ * API Version: 2.16.1
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 2.15.0
7
+ * API Version: 2.16.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