@hostinger/sdk 1.45.0 → 1.46.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@1.45.0
1
+ ## @hostinger/sdk@1.46.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@1.45.0 --save
8
+ npm install @hostinger/sdk@1.46.1 --save
9
9
  ```
package/api.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.45.0
6
+ * API Version: 1.46.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
@@ -13851,6 +13851,25 @@ export interface VPSV1FirewallListResponse {
13851
13851
  */
13852
13852
  'meta': CommonSchemaPaginationMetaSchema;
13853
13853
  }
13854
+ /**
13855
+ *
13856
+ * @export
13857
+ * @interface VPSV1FirewallRulesReplaceRequest
13858
+ */
13859
+ export interface VPSV1FirewallRulesReplaceRequest {
13860
+ /**
13861
+ * The complete set of firewall rules that atomically replaces all existing rules in the group
13862
+ * @type {Array<VPSV1FirewallRulesStoreRequest>}
13863
+ * @memberof VPSV1FirewallRulesReplaceRequest
13864
+ */
13865
+ 'rules': Array<VPSV1FirewallRulesStoreRequest>;
13866
+ /**
13867
+ * Synchronize the firewall group to all its virtual machines after replacing the rules
13868
+ * @type {boolean}
13869
+ * @memberof VPSV1FirewallRulesReplaceRequest
13870
+ */
13871
+ 'sync': boolean;
13872
+ }
13854
13873
  /**
13855
13874
  *
13856
13875
  * @export
@@ -41842,6 +41861,50 @@ export const VPSFirewallApiAxiosParamCreator = function (configuration?: Configu
41842
41861
  options: localVarRequestOptions,
41843
41862
  };
41844
41863
  },
41864
+ /**
41865
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
41866
+ * @summary Replace all firewall rules in group
41867
+ * @param {number} firewallId Firewall ID
41868
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
41869
+ * @param {*} [options] Override http request option.
41870
+ * @throws {RequiredError}
41871
+ */
41872
+ replaceAllFirewallRulesInGroupV1: async (firewallId: number, vPSV1FirewallRulesReplaceRequest: VPSV1FirewallRulesReplaceRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
41873
+ // verify required parameter 'firewallId' is not null or undefined
41874
+ assertParamExists('replaceAllFirewallRulesInGroupV1', 'firewallId', firewallId)
41875
+ // verify required parameter 'vPSV1FirewallRulesReplaceRequest' is not null or undefined
41876
+ assertParamExists('replaceAllFirewallRulesInGroupV1', 'vPSV1FirewallRulesReplaceRequest', vPSV1FirewallRulesReplaceRequest)
41877
+ const localVarPath = `/api/vps/v1/firewall/{firewallId}/rules`
41878
+ .replace(`{${"firewallId"}}`, encodeURIComponent(String(firewallId)));
41879
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
41880
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
41881
+ let baseOptions;
41882
+ if (configuration) {
41883
+ baseOptions = configuration.baseOptions;
41884
+ }
41885
+
41886
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
41887
+ const localVarHeaderParameter = {} as any;
41888
+ const localVarQueryParameter = {} as any;
41889
+
41890
+ // authentication apiToken required
41891
+ // http bearer authentication required
41892
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
41893
+
41894
+
41895
+
41896
+ localVarHeaderParameter['Content-Type'] = 'application/json';
41897
+
41898
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
41899
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
41900
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
41901
+ localVarRequestOptions.data = serializeDataIfNeeded(vPSV1FirewallRulesReplaceRequest, localVarRequestOptions, configuration)
41902
+
41903
+ return {
41904
+ url: toPathString(localVarUrlObj),
41905
+ options: localVarRequestOptions,
41906
+ };
41907
+ },
41845
41908
  /**
41846
41909
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
41847
41910
  * @summary Sync firewall
@@ -42042,6 +42105,19 @@ export const VPSFirewallApiFp = function(configuration?: Configuration) {
42042
42105
  const localVarOperationServerBasePath = operationServerMap['VPSFirewallApi.getFirewallListV1']?.[0]?.url;
42043
42106
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
42044
42107
  },
42108
+ /**
42109
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
42110
+ * @summary Replace all firewall rules in group
42111
+ * @param {number} firewallId Firewall ID
42112
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
42113
+ * @param {*} [options] Override http request option.
42114
+ * @throws {RequiredError}
42115
+ */
42116
+ async replaceAllFirewallRulesInGroupV1(firewallId: number, vPSV1FirewallRulesReplaceRequest: VPSV1FirewallRulesReplaceRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VPSV1FirewallFirewallResource>> {
42117
+ const localVarAxiosArgs = await localVarAxiosParamCreator.replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options);
42118
+ const localVarOperationServerBasePath = operationServerMap['VPSFirewallApi.replaceAllFirewallRulesInGroupV1']?.[0]?.url;
42119
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
42120
+ },
42045
42121
  /**
42046
42122
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
42047
42123
  * @summary Sync firewall
@@ -42163,6 +42239,17 @@ export const VPSFirewallApiFactory = function (configuration?: Configuration, ba
42163
42239
  getFirewallListV1(page?: number, options?: RawAxiosRequestConfig): AxiosPromise<VPSV1FirewallListResponse> {
42164
42240
  return localVarFp.getFirewallListV1(page, options).then((request) => request(axios, basePath));
42165
42241
  },
42242
+ /**
42243
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
42244
+ * @summary Replace all firewall rules in group
42245
+ * @param {number} firewallId Firewall ID
42246
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
42247
+ * @param {*} [options] Override http request option.
42248
+ * @throws {RequiredError}
42249
+ */
42250
+ replaceAllFirewallRulesInGroupV1(firewallId: number, vPSV1FirewallRulesReplaceRequest: VPSV1FirewallRulesReplaceRequest, options?: RawAxiosRequestConfig): AxiosPromise<VPSV1FirewallFirewallResource> {
42251
+ return localVarFp.replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options).then((request) => request(axios, basePath));
42252
+ },
42166
42253
  /**
42167
42254
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
42168
42255
  * @summary Sync firewall
@@ -42296,6 +42383,19 @@ export class VPSFirewallApi extends BaseAPI {
42296
42383
  return VPSFirewallApiFp(this.configuration).getFirewallListV1(page, options).then((request) => request(this.axios, this.basePath));
42297
42384
  }
42298
42385
 
42386
+ /**
42387
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
42388
+ * @summary Replace all firewall rules in group
42389
+ * @param {number} firewallId Firewall ID
42390
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
42391
+ * @param {*} [options] Override http request option.
42392
+ * @throws {RequiredError}
42393
+ * @memberof VPSFirewallApi
42394
+ */
42395
+ public replaceAllFirewallRulesInGroupV1(firewallId: number, vPSV1FirewallRulesReplaceRequest: VPSV1FirewallRulesReplaceRequest, options?: RawAxiosRequestConfig) {
42396
+ return VPSFirewallApiFp(this.configuration).replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options).then((request) => request(this.axios, this.basePath));
42397
+ }
42398
+
42299
42399
  /**
42300
42400
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
42301
42401
  * @summary Sync firewall
package/base.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.45.0
6
+ * API Version: 1.46.1
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/common.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.45.0
6
+ * API Version: 1.46.1
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/configuration.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.45.0
6
+ * API Version: 1.46.1
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -48,7 +48,7 @@ export class Configuration {
48
48
  this.baseOptions = {
49
49
  ...param.baseOptions,
50
50
  headers: {
51
- 'User-Agent': "hostinger-typescript-sdk/1.45.0",
51
+ 'User-Agent': "hostinger-typescript-sdk/1.46.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: 1.45.0
4
+ * API Version: 1.46.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
@@ -13540,6 +13540,25 @@ export interface VPSV1FirewallListResponse {
13540
13540
  */
13541
13541
  'meta': CommonSchemaPaginationMetaSchema;
13542
13542
  }
13543
+ /**
13544
+ *
13545
+ * @export
13546
+ * @interface VPSV1FirewallRulesReplaceRequest
13547
+ */
13548
+ export interface VPSV1FirewallRulesReplaceRequest {
13549
+ /**
13550
+ * The complete set of firewall rules that atomically replaces all existing rules in the group
13551
+ * @type {Array<VPSV1FirewallRulesStoreRequest>}
13552
+ * @memberof VPSV1FirewallRulesReplaceRequest
13553
+ */
13554
+ 'rules': Array<VPSV1FirewallRulesStoreRequest>;
13555
+ /**
13556
+ * Synchronize the firewall group to all its virtual machines after replacing the rules
13557
+ * @type {boolean}
13558
+ * @memberof VPSV1FirewallRulesReplaceRequest
13559
+ */
13560
+ 'sync': boolean;
13561
+ }
13543
13562
  /**
13544
13563
  *
13545
13564
  * @export
@@ -28194,6 +28213,15 @@ export declare const VPSFirewallApiAxiosParamCreator: (configuration?: Configura
28194
28213
  * @throws {RequiredError}
28195
28214
  */
28196
28215
  getFirewallListV1: (page?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
28216
+ /**
28217
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
28218
+ * @summary Replace all firewall rules in group
28219
+ * @param {number} firewallId Firewall ID
28220
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
28221
+ * @param {*} [options] Override http request option.
28222
+ * @throws {RequiredError}
28223
+ */
28224
+ replaceAllFirewallRulesInGroupV1: (firewallId: number, vPSV1FirewallRulesReplaceRequest: VPSV1FirewallRulesReplaceRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
28197
28225
  /**
28198
28226
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
28199
28227
  * @summary Sync firewall
@@ -28287,6 +28315,15 @@ export declare const VPSFirewallApiFp: (configuration?: Configuration) => {
28287
28315
  * @throws {RequiredError}
28288
28316
  */
28289
28317
  getFirewallListV1(page?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VPSV1FirewallListResponse>>;
28318
+ /**
28319
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
28320
+ * @summary Replace all firewall rules in group
28321
+ * @param {number} firewallId Firewall ID
28322
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
28323
+ * @param {*} [options] Override http request option.
28324
+ * @throws {RequiredError}
28325
+ */
28326
+ replaceAllFirewallRulesInGroupV1(firewallId: number, vPSV1FirewallRulesReplaceRequest: VPSV1FirewallRulesReplaceRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VPSV1FirewallFirewallResource>>;
28290
28327
  /**
28291
28328
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
28292
28329
  * @summary Sync firewall
@@ -28380,6 +28417,15 @@ export declare const VPSFirewallApiFactory: (configuration?: Configuration, base
28380
28417
  * @throws {RequiredError}
28381
28418
  */
28382
28419
  getFirewallListV1(page?: number, options?: RawAxiosRequestConfig): AxiosPromise<VPSV1FirewallListResponse>;
28420
+ /**
28421
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
28422
+ * @summary Replace all firewall rules in group
28423
+ * @param {number} firewallId Firewall ID
28424
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
28425
+ * @param {*} [options] Override http request option.
28426
+ * @throws {RequiredError}
28427
+ */
28428
+ replaceAllFirewallRulesInGroupV1(firewallId: number, vPSV1FirewallRulesReplaceRequest: VPSV1FirewallRulesReplaceRequest, options?: RawAxiosRequestConfig): AxiosPromise<VPSV1FirewallFirewallResource>;
28383
28429
  /**
28384
28430
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
28385
28431
  * @summary Sync firewall
@@ -28483,6 +28529,16 @@ export declare class VPSFirewallApi extends BaseAPI {
28483
28529
  * @memberof VPSFirewallApi
28484
28530
  */
28485
28531
  getFirewallListV1(page?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<VPSV1FirewallListResponse, any, {}, any>>;
28532
+ /**
28533
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
28534
+ * @summary Replace all firewall rules in group
28535
+ * @param {number} firewallId Firewall ID
28536
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
28537
+ * @param {*} [options] Override http request option.
28538
+ * @throws {RequiredError}
28539
+ * @memberof VPSFirewallApi
28540
+ */
28541
+ replaceAllFirewallRulesInGroupV1(firewallId: number, vPSV1FirewallRulesReplaceRequest: VPSV1FirewallRulesReplaceRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<VPSV1FirewallFirewallResource, any, {}, any>>;
28486
28542
  /**
28487
28543
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
28488
28544
  * @summary Sync firewall
package/dist/api.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.45.0
7
+ * API Version: 1.46.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
@@ -25434,6 +25434,43 @@ const VPSFirewallApiAxiosParamCreator = function (configuration) {
25434
25434
  options: localVarRequestOptions,
25435
25435
  };
25436
25436
  }),
25437
+ /**
25438
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
25439
+ * @summary Replace all firewall rules in group
25440
+ * @param {number} firewallId Firewall ID
25441
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
25442
+ * @param {*} [options] Override http request option.
25443
+ * @throws {RequiredError}
25444
+ */
25445
+ replaceAllFirewallRulesInGroupV1: (firewallId_1, vPSV1FirewallRulesReplaceRequest_1, ...args_1) => __awaiter(this, [firewallId_1, vPSV1FirewallRulesReplaceRequest_1, ...args_1], void 0, function* (firewallId, vPSV1FirewallRulesReplaceRequest, options = {}) {
25446
+ // verify required parameter 'firewallId' is not null or undefined
25447
+ (0, common_1.assertParamExists)('replaceAllFirewallRulesInGroupV1', 'firewallId', firewallId);
25448
+ // verify required parameter 'vPSV1FirewallRulesReplaceRequest' is not null or undefined
25449
+ (0, common_1.assertParamExists)('replaceAllFirewallRulesInGroupV1', 'vPSV1FirewallRulesReplaceRequest', vPSV1FirewallRulesReplaceRequest);
25450
+ const localVarPath = `/api/vps/v1/firewall/{firewallId}/rules`
25451
+ .replace(`{${"firewallId"}}`, encodeURIComponent(String(firewallId)));
25452
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25453
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
25454
+ let baseOptions;
25455
+ if (configuration) {
25456
+ baseOptions = configuration.baseOptions;
25457
+ }
25458
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
25459
+ const localVarHeaderParameter = {};
25460
+ const localVarQueryParameter = {};
25461
+ // authentication apiToken required
25462
+ // http bearer authentication required
25463
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
25464
+ localVarHeaderParameter['Content-Type'] = 'application/json';
25465
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
25466
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25467
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
25468
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(vPSV1FirewallRulesReplaceRequest, localVarRequestOptions, configuration);
25469
+ return {
25470
+ url: (0, common_1.toPathString)(localVarUrlObj),
25471
+ options: localVarRequestOptions,
25472
+ };
25473
+ }),
25437
25474
  /**
25438
25475
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
25439
25476
  * @summary Sync firewall
@@ -25645,6 +25682,22 @@ const VPSFirewallApiFp = function (configuration) {
25645
25682
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25646
25683
  });
25647
25684
  },
25685
+ /**
25686
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
25687
+ * @summary Replace all firewall rules in group
25688
+ * @param {number} firewallId Firewall ID
25689
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
25690
+ * @param {*} [options] Override http request option.
25691
+ * @throws {RequiredError}
25692
+ */
25693
+ replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options) {
25694
+ return __awaiter(this, void 0, void 0, function* () {
25695
+ var _a, _b;
25696
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options);
25697
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['VPSFirewallApi.replaceAllFirewallRulesInGroupV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
25698
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25699
+ });
25700
+ },
25648
25701
  /**
25649
25702
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
25650
25703
  * @summary Sync firewall
@@ -25772,6 +25825,17 @@ const VPSFirewallApiFactory = function (configuration, basePath, axios) {
25772
25825
  getFirewallListV1(page, options) {
25773
25826
  return localVarFp.getFirewallListV1(page, options).then((request) => request(axios, basePath));
25774
25827
  },
25828
+ /**
25829
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
25830
+ * @summary Replace all firewall rules in group
25831
+ * @param {number} firewallId Firewall ID
25832
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
25833
+ * @param {*} [options] Override http request option.
25834
+ * @throws {RequiredError}
25835
+ */
25836
+ replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options) {
25837
+ return localVarFp.replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options).then((request) => request(axios, basePath));
25838
+ },
25775
25839
  /**
25776
25840
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
25777
25841
  * @summary Sync firewall
@@ -25897,6 +25961,18 @@ class VPSFirewallApi extends base_1.BaseAPI {
25897
25961
  getFirewallListV1(page, options) {
25898
25962
  return (0, exports.VPSFirewallApiFp)(this.configuration).getFirewallListV1(page, options).then((request) => request(this.axios, this.basePath));
25899
25963
  }
25964
+ /**
25965
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
25966
+ * @summary Replace all firewall rules in group
25967
+ * @param {number} firewallId Firewall ID
25968
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
25969
+ * @param {*} [options] Override http request option.
25970
+ * @throws {RequiredError}
25971
+ * @memberof VPSFirewallApi
25972
+ */
25973
+ replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options) {
25974
+ return (0, exports.VPSFirewallApiFp)(this.configuration).replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options).then((request) => request(this.axios, this.basePath));
25975
+ }
25900
25976
  /**
25901
25977
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
25902
25978
  * @summary Sync firewall
package/dist/base.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.45.0
4
+ * API Version: 1.46.1
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/base.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.45.0
7
+ * API Version: 1.46.1
8
8
  *
9
9
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
10
10
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/common.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.45.0
4
+ * API Version: 1.46.1
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/common.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.45.0
7
+ * API Version: 1.46.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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.45.0
4
+ * API Version: 1.46.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
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.45.0
7
+ * API Version: 1.46.1
8
8
  *
9
9
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
10
10
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -16,7 +16,7 @@ class Configuration {
16
16
  var _a;
17
17
  this.accessToken = param.accessToken;
18
18
  this.basePath = param.basePath;
19
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.45.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
19
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.46.1" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
20
20
  this.formDataCtor = param.formDataCtor;
21
21
  }
22
22
  /**
package/dist/esm/api.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.45.0
4
+ * API Version: 1.46.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
@@ -13540,6 +13540,25 @@ export interface VPSV1FirewallListResponse {
13540
13540
  */
13541
13541
  'meta': CommonSchemaPaginationMetaSchema;
13542
13542
  }
13543
+ /**
13544
+ *
13545
+ * @export
13546
+ * @interface VPSV1FirewallRulesReplaceRequest
13547
+ */
13548
+ export interface VPSV1FirewallRulesReplaceRequest {
13549
+ /**
13550
+ * The complete set of firewall rules that atomically replaces all existing rules in the group
13551
+ * @type {Array<VPSV1FirewallRulesStoreRequest>}
13552
+ * @memberof VPSV1FirewallRulesReplaceRequest
13553
+ */
13554
+ 'rules': Array<VPSV1FirewallRulesStoreRequest>;
13555
+ /**
13556
+ * Synchronize the firewall group to all its virtual machines after replacing the rules
13557
+ * @type {boolean}
13558
+ * @memberof VPSV1FirewallRulesReplaceRequest
13559
+ */
13560
+ 'sync': boolean;
13561
+ }
13543
13562
  /**
13544
13563
  *
13545
13564
  * @export
@@ -28194,6 +28213,15 @@ export declare const VPSFirewallApiAxiosParamCreator: (configuration?: Configura
28194
28213
  * @throws {RequiredError}
28195
28214
  */
28196
28215
  getFirewallListV1: (page?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
28216
+ /**
28217
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
28218
+ * @summary Replace all firewall rules in group
28219
+ * @param {number} firewallId Firewall ID
28220
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
28221
+ * @param {*} [options] Override http request option.
28222
+ * @throws {RequiredError}
28223
+ */
28224
+ replaceAllFirewallRulesInGroupV1: (firewallId: number, vPSV1FirewallRulesReplaceRequest: VPSV1FirewallRulesReplaceRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
28197
28225
  /**
28198
28226
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
28199
28227
  * @summary Sync firewall
@@ -28287,6 +28315,15 @@ export declare const VPSFirewallApiFp: (configuration?: Configuration) => {
28287
28315
  * @throws {RequiredError}
28288
28316
  */
28289
28317
  getFirewallListV1(page?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VPSV1FirewallListResponse>>;
28318
+ /**
28319
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
28320
+ * @summary Replace all firewall rules in group
28321
+ * @param {number} firewallId Firewall ID
28322
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
28323
+ * @param {*} [options] Override http request option.
28324
+ * @throws {RequiredError}
28325
+ */
28326
+ replaceAllFirewallRulesInGroupV1(firewallId: number, vPSV1FirewallRulesReplaceRequest: VPSV1FirewallRulesReplaceRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VPSV1FirewallFirewallResource>>;
28290
28327
  /**
28291
28328
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
28292
28329
  * @summary Sync firewall
@@ -28380,6 +28417,15 @@ export declare const VPSFirewallApiFactory: (configuration?: Configuration, base
28380
28417
  * @throws {RequiredError}
28381
28418
  */
28382
28419
  getFirewallListV1(page?: number, options?: RawAxiosRequestConfig): AxiosPromise<VPSV1FirewallListResponse>;
28420
+ /**
28421
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
28422
+ * @summary Replace all firewall rules in group
28423
+ * @param {number} firewallId Firewall ID
28424
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
28425
+ * @param {*} [options] Override http request option.
28426
+ * @throws {RequiredError}
28427
+ */
28428
+ replaceAllFirewallRulesInGroupV1(firewallId: number, vPSV1FirewallRulesReplaceRequest: VPSV1FirewallRulesReplaceRequest, options?: RawAxiosRequestConfig): AxiosPromise<VPSV1FirewallFirewallResource>;
28383
28429
  /**
28384
28430
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
28385
28431
  * @summary Sync firewall
@@ -28483,6 +28529,16 @@ export declare class VPSFirewallApi extends BaseAPI {
28483
28529
  * @memberof VPSFirewallApi
28484
28530
  */
28485
28531
  getFirewallListV1(page?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<VPSV1FirewallListResponse, any, {}, any>>;
28532
+ /**
28533
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
28534
+ * @summary Replace all firewall rules in group
28535
+ * @param {number} firewallId Firewall ID
28536
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
28537
+ * @param {*} [options] Override http request option.
28538
+ * @throws {RequiredError}
28539
+ * @memberof VPSFirewallApi
28540
+ */
28541
+ replaceAllFirewallRulesInGroupV1(firewallId: number, vPSV1FirewallRulesReplaceRequest: VPSV1FirewallRulesReplaceRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<VPSV1FirewallFirewallResource, any, {}, any>>;
28486
28542
  /**
28487
28543
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
28488
28544
  * @summary Sync firewall
package/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.45.0
6
+ * API Version: 1.46.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
@@ -25153,6 +25153,43 @@ export const VPSFirewallApiAxiosParamCreator = function (configuration) {
25153
25153
  options: localVarRequestOptions,
25154
25154
  };
25155
25155
  }),
25156
+ /**
25157
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
25158
+ * @summary Replace all firewall rules in group
25159
+ * @param {number} firewallId Firewall ID
25160
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
25161
+ * @param {*} [options] Override http request option.
25162
+ * @throws {RequiredError}
25163
+ */
25164
+ replaceAllFirewallRulesInGroupV1: (firewallId_1, vPSV1FirewallRulesReplaceRequest_1, ...args_1) => __awaiter(this, [firewallId_1, vPSV1FirewallRulesReplaceRequest_1, ...args_1], void 0, function* (firewallId, vPSV1FirewallRulesReplaceRequest, options = {}) {
25165
+ // verify required parameter 'firewallId' is not null or undefined
25166
+ assertParamExists('replaceAllFirewallRulesInGroupV1', 'firewallId', firewallId);
25167
+ // verify required parameter 'vPSV1FirewallRulesReplaceRequest' is not null or undefined
25168
+ assertParamExists('replaceAllFirewallRulesInGroupV1', 'vPSV1FirewallRulesReplaceRequest', vPSV1FirewallRulesReplaceRequest);
25169
+ const localVarPath = `/api/vps/v1/firewall/{firewallId}/rules`
25170
+ .replace(`{${"firewallId"}}`, encodeURIComponent(String(firewallId)));
25171
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25172
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25173
+ let baseOptions;
25174
+ if (configuration) {
25175
+ baseOptions = configuration.baseOptions;
25176
+ }
25177
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
25178
+ const localVarHeaderParameter = {};
25179
+ const localVarQueryParameter = {};
25180
+ // authentication apiToken required
25181
+ // http bearer authentication required
25182
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
25183
+ localVarHeaderParameter['Content-Type'] = 'application/json';
25184
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25185
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25186
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
25187
+ localVarRequestOptions.data = serializeDataIfNeeded(vPSV1FirewallRulesReplaceRequest, localVarRequestOptions, configuration);
25188
+ return {
25189
+ url: toPathString(localVarUrlObj),
25190
+ options: localVarRequestOptions,
25191
+ };
25192
+ }),
25156
25193
  /**
25157
25194
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
25158
25195
  * @summary Sync firewall
@@ -25363,6 +25400,22 @@ export const VPSFirewallApiFp = function (configuration) {
25363
25400
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25364
25401
  });
25365
25402
  },
25403
+ /**
25404
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
25405
+ * @summary Replace all firewall rules in group
25406
+ * @param {number} firewallId Firewall ID
25407
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
25408
+ * @param {*} [options] Override http request option.
25409
+ * @throws {RequiredError}
25410
+ */
25411
+ replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options) {
25412
+ return __awaiter(this, void 0, void 0, function* () {
25413
+ var _a, _b;
25414
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options);
25415
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['VPSFirewallApi.replaceAllFirewallRulesInGroupV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
25416
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
25417
+ });
25418
+ },
25366
25419
  /**
25367
25420
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
25368
25421
  * @summary Sync firewall
@@ -25489,6 +25542,17 @@ export const VPSFirewallApiFactory = function (configuration, basePath, axios) {
25489
25542
  getFirewallListV1(page, options) {
25490
25543
  return localVarFp.getFirewallListV1(page, options).then((request) => request(axios, basePath));
25491
25544
  },
25545
+ /**
25546
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
25547
+ * @summary Replace all firewall rules in group
25548
+ * @param {number} firewallId Firewall ID
25549
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
25550
+ * @param {*} [options] Override http request option.
25551
+ * @throws {RequiredError}
25552
+ */
25553
+ replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options) {
25554
+ return localVarFp.replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options).then((request) => request(axios, basePath));
25555
+ },
25492
25556
  /**
25493
25557
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
25494
25558
  * @summary Sync firewall
@@ -25613,6 +25677,18 @@ export class VPSFirewallApi extends BaseAPI {
25613
25677
  getFirewallListV1(page, options) {
25614
25678
  return VPSFirewallApiFp(this.configuration).getFirewallListV1(page, options).then((request) => request(this.axios, this.basePath));
25615
25679
  }
25680
+ /**
25681
+ * Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
25682
+ * @summary Replace all firewall rules in group
25683
+ * @param {number} firewallId Firewall ID
25684
+ * @param {VPSV1FirewallRulesReplaceRequest} vPSV1FirewallRulesReplaceRequest
25685
+ * @param {*} [options] Override http request option.
25686
+ * @throws {RequiredError}
25687
+ * @memberof VPSFirewallApi
25688
+ */
25689
+ replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options) {
25690
+ return VPSFirewallApiFp(this.configuration).replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options).then((request) => request(this.axios, this.basePath));
25691
+ }
25616
25692
  /**
25617
25693
  * Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
25618
25694
  * @summary Sync firewall
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.45.0
4
+ * API Version: 1.46.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: 1.45.0
6
+ * API Version: 1.46.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: 1.45.0
4
+ * API Version: 1.46.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: 1.45.0
6
+ * API Version: 1.46.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: 1.45.0
4
+ * API Version: 1.46.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: 1.45.0
6
+ * API Version: 1.46.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/1.45.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/1.46.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: 1.45.0
4
+ * API Version: 1.46.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: 1.45.0
6
+ * API Version: 1.46.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: 1.45.0
4
+ * API Version: 1.46.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: 1.45.0
7
+ * API Version: 1.46.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
@@ -12,6 +12,7 @@ All URIs are relative to *https://developers.hostinger.com*
12
12
  |[**deleteFirewallV1**](#deletefirewallv1) | **DELETE** /api/vps/v1/firewall/{firewallId} | Delete firewall|
13
13
  |[**getFirewallDetailsV1**](#getfirewalldetailsv1) | **GET** /api/vps/v1/firewall/{firewallId} | Get firewall details|
14
14
  |[**getFirewallListV1**](#getfirewalllistv1) | **GET** /api/vps/v1/firewall | Get firewall list|
15
+ |[**replaceAllFirewallRulesInGroupV1**](#replaceallfirewallrulesingroupv1) | **PUT** /api/vps/v1/firewall/{firewallId}/rules | Replace all firewall rules in group|
15
16
  |[**syncFirewallV1**](#syncfirewallv1) | **POST** /api/vps/v1/firewall/{firewallId}/sync/{virtualMachineId} | Sync firewall|
16
17
  |[**updateFirewallRuleV1**](#updatefirewallrulev1) | **PUT** /api/vps/v1/firewall/{firewallId}/rules/{ruleId} | Update firewall rule|
17
18
 
@@ -457,6 +458,64 @@ const { status, data } = await apiInstance.getFirewallListV1(
457
458
 
458
459
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
459
460
 
461
+ # **replaceAllFirewallRulesInGroupV1**
462
+ > VPSV1FirewallFirewallResource replaceAllFirewallRulesInGroupV1(vPSV1FirewallRulesReplaceRequest)
463
+
464
+ Replaces all firewall rules within a specified firewall group with the provided set of rules in a single atomic operation, instead of creating or deleting rules one by one. Any virtual machine using this firewall group will need to be synchronized after replacing rules; pass the \"sync\" parameter to trigger synchronization immediately.
465
+
466
+ ### Example
467
+
468
+ ```typescript
469
+ import {
470
+ VPSFirewallApi,
471
+ Configuration,
472
+ VPSV1FirewallRulesReplaceRequest
473
+ } from '@hostinger/sdk';
474
+
475
+ const configuration = new Configuration();
476
+ const apiInstance = new VPSFirewallApi(configuration);
477
+
478
+ let firewallId: number; //Firewall ID (default to undefined)
479
+ let vPSV1FirewallRulesReplaceRequest: VPSV1FirewallRulesReplaceRequest; //
480
+
481
+ const { status, data } = await apiInstance.replaceAllFirewallRulesInGroupV1(
482
+ firewallId,
483
+ vPSV1FirewallRulesReplaceRequest
484
+ );
485
+ ```
486
+
487
+ ### Parameters
488
+
489
+ |Name | Type | Description | Notes|
490
+ |------------- | ------------- | ------------- | -------------|
491
+ | **vPSV1FirewallRulesReplaceRequest** | **VPSV1FirewallRulesReplaceRequest**| | |
492
+ | **firewallId** | [**number**] | Firewall ID | defaults to undefined|
493
+
494
+
495
+ ### Return type
496
+
497
+ **VPSV1FirewallFirewallResource**
498
+
499
+ ### Authorization
500
+
501
+ [apiToken](../README.md#apiToken)
502
+
503
+ ### HTTP request headers
504
+
505
+ - **Content-Type**: application/json
506
+ - **Accept**: application/json
507
+
508
+
509
+ ### HTTP response details
510
+ | Status code | Description | Response headers |
511
+ |-------------|-------------|------------------|
512
+ |**200** | Success response | - |
513
+ |**422** | Validation error response | - |
514
+ |**401** | Unauthenticated response | - |
515
+ |**500** | Error response | - |
516
+
517
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
518
+
460
519
  # **syncFirewallV1**
461
520
  > VPSV1ActionActionResource syncFirewallV1()
462
521
 
@@ -0,0 +1,22 @@
1
+ # VPSV1FirewallRulesReplaceRequest
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **rules** | [**Array&lt;VPSV1FirewallRulesStoreRequest&gt;**](VPSV1FirewallRulesStoreRequest.md) | The complete set of firewall rules that atomically replaces all existing rules in the group | [default to undefined]
9
+ **sync** | **boolean** | Synchronize the firewall group to all its virtual machines after replacing the rules | [optional] [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { VPSV1FirewallRulesReplaceRequest } from '@hostinger/sdk';
15
+
16
+ const instance: VPSV1FirewallRulesReplaceRequest = {
17
+ rules,
18
+ sync,
19
+ };
20
+ ```
21
+
22
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
package/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.45.0
6
+ * API Version: 1.46.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostinger/sdk",
3
- "version": "1.45.0",
3
+ "version": "1.46.1",
4
4
  "description": "Hostinger API TypeScript SDK",
5
5
  "author": "Hostinger",
6
6
  "repository": {