@scaleway/sdk 2.59.0 → 2.61.0

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.
Files changed (77) hide show
  1. package/dist/api/applesilicon/v1alpha1/api.gen.cjs +117 -0
  2. package/dist/api/applesilicon/v1alpha1/api.gen.d.ts +54 -1
  3. package/dist/api/applesilicon/v1alpha1/api.gen.js +120 -3
  4. package/dist/api/applesilicon/v1alpha1/content.gen.cjs +4 -0
  5. package/dist/api/applesilicon/v1alpha1/content.gen.d.ts +5 -1
  6. package/dist/api/applesilicon/v1alpha1/content.gen.js +4 -0
  7. package/dist/api/applesilicon/v1alpha1/index.gen.cjs +3 -0
  8. package/dist/api/applesilicon/v1alpha1/index.gen.d.ts +2 -2
  9. package/dist/api/applesilicon/v1alpha1/index.gen.js +5 -2
  10. package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +60 -0
  11. package/dist/api/applesilicon/v1alpha1/marshalling.gen.d.ts +6 -1
  12. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +60 -0
  13. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +100 -0
  14. package/dist/api/container/v1beta1/api.gen.cjs +6 -8
  15. package/dist/api/container/v1beta1/api.gen.d.ts +6 -8
  16. package/dist/api/container/v1beta1/api.gen.js +6 -8
  17. package/dist/api/edge_services/v1alpha1/types.gen.d.ts +4 -4
  18. package/dist/api/index.gen.d.ts +2 -1
  19. package/dist/api/interlink/index.gen.cjs +4 -0
  20. package/dist/api/interlink/index.gen.d.ts +5 -0
  21. package/dist/api/interlink/index.gen.js +4 -0
  22. package/dist/api/interlink/v1beta1/api.gen.cjs +405 -0
  23. package/dist/api/interlink/v1beta1/api.gen.d.ts +208 -0
  24. package/dist/api/interlink/v1beta1/api.gen.js +405 -0
  25. package/dist/api/interlink/v1beta1/index.gen.cjs +6 -0
  26. package/dist/api/interlink/v1beta1/index.gen.d.ts +3 -0
  27. package/dist/api/interlink/v1beta1/index.gen.js +6 -0
  28. package/dist/api/interlink/v1beta1/marshalling.gen.cjs +180 -0
  29. package/dist/api/interlink/v1beta1/marshalling.gen.d.ts +16 -0
  30. package/dist/api/interlink/v1beta1/marshalling.gen.js +180 -0
  31. package/dist/api/interlink/v1beta1/types.gen.d.ts +455 -0
  32. package/dist/api/interlink/v1beta1/validation-rules.gen.cjs +107 -0
  33. package/dist/api/interlink/v1beta1/validation-rules.gen.d.ts +93 -0
  34. package/dist/api/interlink/v1beta1/validation-rules.gen.js +107 -0
  35. package/dist/api/ipam/v1/api.gen.cjs +1 -0
  36. package/dist/api/ipam/v1/api.gen.js +1 -0
  37. package/dist/api/ipam/v1/types.gen.d.ts +12 -10
  38. package/dist/api/k8s/v1/api.gen.cjs +22 -20
  39. package/dist/api/k8s/v1/api.gen.d.ts +22 -20
  40. package/dist/api/k8s/v1/api.gen.js +22 -20
  41. package/dist/api/k8s/v1/marshalling.gen.cjs +2 -5
  42. package/dist/api/k8s/v1/marshalling.gen.js +2 -5
  43. package/dist/api/k8s/v1/types.gen.d.ts +65 -49
  44. package/dist/api/lb/v1/types.gen.d.ts +6 -6
  45. package/dist/api/mongodb/v1alpha1/api.gen.cjs +13 -1
  46. package/dist/api/mongodb/v1alpha1/api.gen.d.ts +8 -1
  47. package/dist/api/mongodb/v1alpha1/api.gen.js +13 -1
  48. package/dist/api/mongodb/v1alpha1/index.gen.d.ts +1 -1
  49. package/dist/api/mongodb/v1alpha1/types.gen.d.ts +11 -0
  50. package/dist/api/mongodb/v1alpha1/validation-rules.gen.cjs +8 -0
  51. package/dist/api/mongodb/v1alpha1/validation-rules.gen.d.ts +7 -0
  52. package/dist/api/mongodb/v1alpha1/validation-rules.gen.js +8 -0
  53. package/dist/api/secret/v1beta1/marshalling.gen.cjs +1 -0
  54. package/dist/api/secret/v1beta1/marshalling.gen.js +1 -0
  55. package/dist/api/secret/v1beta1/types.gen.d.ts +2 -0
  56. package/dist/api/vpcgw/v2/api.gen.cjs +49 -1
  57. package/dist/api/vpcgw/v2/api.gen.d.ts +25 -1
  58. package/dist/api/vpcgw/v2/api.gen.js +50 -2
  59. package/dist/api/vpcgw/v2/index.gen.d.ts +1 -1
  60. package/dist/api/vpcgw/v2/marshalling.gen.cjs +31 -0
  61. package/dist/api/vpcgw/v2/marshalling.gen.d.ts +5 -1
  62. package/dist/api/vpcgw/v2/marshalling.gen.js +31 -0
  63. package/dist/api/vpcgw/v2/types.gen.d.ts +39 -0
  64. package/dist/api/webhosting/v1/api.gen.cjs +20 -0
  65. package/dist/api/webhosting/v1/api.gen.d.ts +8 -1
  66. package/dist/api/webhosting/v1/api.gen.js +21 -1
  67. package/dist/api/webhosting/v1/index.gen.d.ts +1 -1
  68. package/dist/api/webhosting/v1/marshalling.gen.cjs +16 -1
  69. package/dist/api/webhosting/v1/marshalling.gen.d.ts +2 -1
  70. package/dist/api/webhosting/v1/marshalling.gen.js +16 -1
  71. package/dist/api/webhosting/v1/types.gen.d.ts +30 -2
  72. package/dist/index.cjs +26 -24
  73. package/dist/index.js +26 -24
  74. package/dist/scw/constants.cjs +1 -1
  75. package/dist/scw/constants.d.ts +2 -2
  76. package/dist/scw/constants.js +1 -1
  77. package/package.json +2 -2
@@ -4,7 +4,7 @@ import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
4
4
  import "../../../vendor/base64/index.js";
5
5
  import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
6
6
  import { GATEWAY_TRANSIENT_STATUSES, GATEWAY_NETWORK_TRANSIENT_STATUSES } from "./content.gen.js";
7
- import { unmarshalListGatewaysResponse, unmarshalGateway, marshalCreateGatewayRequest, marshalUpdateGatewayRequest, marshalUpgradeGatewayRequest, unmarshalListGatewayNetworksResponse, unmarshalGatewayNetwork, marshalCreateGatewayNetworkRequest, marshalUpdateGatewayNetworkRequest, unmarshalListPatRulesResponse, unmarshalPatRule, marshalCreatePatRuleRequest, marshalUpdatePatRuleRequest, marshalSetPatRulesRequest, unmarshalSetPatRulesResponse, unmarshalListGatewayTypesResponse, unmarshalListIPsResponse, unmarshalIP, marshalCreateIPRequest, marshalUpdateIPRequest } from "./marshalling.gen.js";
7
+ import { unmarshalListGatewaysResponse, unmarshalGateway, marshalCreateGatewayRequest, marshalUpdateGatewayRequest, marshalUpgradeGatewayRequest, unmarshalListGatewayNetworksResponse, unmarshalGatewayNetwork, marshalCreateGatewayNetworkRequest, marshalUpdateGatewayNetworkRequest, unmarshalListPatRulesResponse, unmarshalPatRule, marshalCreatePatRuleRequest, marshalUpdatePatRuleRequest, marshalSetPatRulesRequest, unmarshalSetPatRulesResponse, unmarshalListGatewayTypesResponse, unmarshalListIPsResponse, unmarshalIP, marshalCreateIPRequest, marshalUpdateIPRequest, marshalAddBastionAllowedIPsRequest, unmarshalAddBastionAllowedIPsResponse, marshalSetBastionAllowedIPsRequest, unmarshalSetBastionAllowedIPsResponse } from "./marshalling.gen.js";
8
8
  const jsonContentHeaders = {
9
9
  "Content-Type": "application/json; charset=utf-8"
10
10
  };
@@ -128,7 +128,8 @@ class API extends API$1 {
128
128
  deleteGateway = (request) => this.client.fetch(
129
129
  {
130
130
  method: "DELETE",
131
- path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}`
131
+ path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}`,
132
+ urlParams: urlParams(["delete_ip", request.deleteIp])
132
133
  },
133
134
  unmarshalGateway
134
135
  );
@@ -511,6 +512,53 @@ class API extends API$1 {
511
512
  },
512
513
  unmarshalGateway
513
514
  );
515
+ /**
516
+ * Add allowed IP range to SSH bastion. Add an IP range (in CIDR notation) to
517
+ * be allowed to connect to the SSH bastion.
518
+ *
519
+ * @param request - The request {@link AddBastionAllowedIPsRequest}
520
+ * @returns A Promise of AddBastionAllowedIPsResponse
521
+ */
522
+ addBastionAllowedIPs = (request) => this.client.fetch(
523
+ {
524
+ body: JSON.stringify(
525
+ marshalAddBastionAllowedIPsRequest(request, this.client.settings)
526
+ ),
527
+ headers: jsonContentHeaders,
528
+ method: "POST",
529
+ path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips`
530
+ },
531
+ unmarshalAddBastionAllowedIPsResponse
532
+ );
533
+ /**
534
+ * Set all IP ranges allowed for SSH bastion. Set a definitive list of IP
535
+ * ranges (in CIDR notation) allowed to connect to the SSH bastion.
536
+ *
537
+ * @param request - The request {@link SetBastionAllowedIPsRequest}
538
+ * @returns A Promise of SetBastionAllowedIPsResponse
539
+ */
540
+ setBastionAllowedIPs = (request) => this.client.fetch(
541
+ {
542
+ body: JSON.stringify(
543
+ marshalSetBastionAllowedIPsRequest(request, this.client.settings)
544
+ ),
545
+ headers: jsonContentHeaders,
546
+ method: "PUT",
547
+ path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips`
548
+ },
549
+ unmarshalSetBastionAllowedIPsResponse
550
+ );
551
+ /**
552
+ * Delete allowed IP range from SSH bastion. Delete an IP range (defined in
553
+ * CIDR notation) from SSH bastion, so that it is no longer allowed to
554
+ * connect.
555
+ *
556
+ * @param request - The request {@link DeleteBastionAllowedIPsRequest}
557
+ */
558
+ deleteBastionAllowedIPs = (request) => this.client.fetch({
559
+ method: "DELETE",
560
+ path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips/${validatePathParam("ipRange", request.ipRange)}`
561
+ });
514
562
  }
515
563
  export {
516
564
  API
@@ -1,3 +1,3 @@
1
1
  export { API } from './api.gen';
2
2
  export * from './content.gen';
3
- export type { CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePatRuleRequest, Gateway, GatewayNetwork, GatewayNetworkStatus, GatewayStatus, GatewayType, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPatRuleRequest, IP, ListGatewayNetworksRequest, ListGatewayNetworksRequestOrderBy, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysRequestOrderBy, ListGatewaysResponse, ListIPsRequest, ListIPsRequestOrderBy, ListIPsResponse, ListPatRulesRequest, ListPatRulesRequestOrderBy, ListPatRulesResponse, PatRule, PatRuleProtocol, RefreshSSHKeysRequest, SetPatRulesRequest, SetPatRulesRequestRule, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest, } from './types.gen';
3
+ export type { AddBastionAllowedIPsRequest, AddBastionAllowedIPsResponse, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, DeleteBastionAllowedIPsRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePatRuleRequest, Gateway, GatewayNetwork, GatewayNetworkStatus, GatewayStatus, GatewayType, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPatRuleRequest, IP, ListGatewayNetworksRequest, ListGatewayNetworksRequestOrderBy, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysRequestOrderBy, ListGatewaysResponse, ListIPsRequest, ListIPsRequestOrderBy, ListIPsResponse, ListPatRulesRequest, ListPatRulesRequestOrderBy, ListPatRulesResponse, PatRule, PatRuleProtocol, RefreshSSHKeysRequest, SetBastionAllowedIPsRequest, SetBastionAllowedIPsResponse, SetPatRulesRequest, SetPatRulesRequestRule, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest, } from './types.gen';
@@ -51,6 +51,7 @@ const unmarshalGateway = (data) => {
51
51
  }
52
52
  return {
53
53
  bandwidth: data.bandwidth,
54
+ bastionAllowedIps: data.bastion_allowed_ips,
54
55
  bastionEnabled: data.bastion_enabled,
55
56
  bastionPort: data.bastion_port,
56
57
  canUpgradeTo: data.can_upgrade_to,
@@ -92,6 +93,16 @@ const unmarshalPatRule = (data) => {
92
93
  zone: data.zone
93
94
  };
94
95
  };
96
+ const unmarshalAddBastionAllowedIPsResponse = (data) => {
97
+ if (!json.isJSONObject(data)) {
98
+ throw new TypeError(
99
+ `Unmarshalling the type 'AddBastionAllowedIPsResponse' failed as data isn't a dictionary.`
100
+ );
101
+ }
102
+ return {
103
+ ipRanges: data.ip_ranges
104
+ };
105
+ };
95
106
  const unmarshalListGatewayNetworksResponse = (data) => {
96
107
  if (!json.isJSONObject(data)) {
97
108
  throw new TypeError(
@@ -161,6 +172,16 @@ const unmarshalListPatRulesResponse = (data) => {
161
172
  totalCount: data.total_count
162
173
  };
163
174
  };
175
+ const unmarshalSetBastionAllowedIPsResponse = (data) => {
176
+ if (!json.isJSONObject(data)) {
177
+ throw new TypeError(
178
+ `Unmarshalling the type 'SetBastionAllowedIPsResponse' failed as data isn't a dictionary.`
179
+ );
180
+ }
181
+ return {
182
+ ipRanges: data.ip_ranges
183
+ };
184
+ };
164
185
  const unmarshalSetPatRulesResponse = (data) => {
165
186
  if (!json.isJSONObject(data)) {
166
187
  throw new TypeError(
@@ -171,6 +192,9 @@ const unmarshalSetPatRulesResponse = (data) => {
171
192
  patRules: marshalling.unmarshalArrayOfObject(data.pat_rules, unmarshalPatRule)
172
193
  };
173
194
  };
195
+ const marshalAddBastionAllowedIPsRequest = (request, defaults) => ({
196
+ ip_range: request.ipRange
197
+ });
174
198
  const marshalCreateGatewayNetworkRequest = (request, defaults) => ({
175
199
  enable_masquerade: request.enableMasquerade,
176
200
  gateway_id: request.gatewayId,
@@ -199,6 +223,9 @@ const marshalCreatePatRuleRequest = (request, defaults) => ({
199
223
  protocol: request.protocol,
200
224
  public_port: request.publicPort
201
225
  });
226
+ const marshalSetBastionAllowedIPsRequest = (request, defaults) => ({
227
+ ip_ranges: request.ipRanges
228
+ });
202
229
  const marshalSetPatRulesRequestRule = (request, defaults) => ({
203
230
  private_ip: request.privateIp,
204
231
  private_port: request.privatePort,
@@ -237,16 +264,19 @@ const marshalUpdatePatRuleRequest = (request, defaults) => ({
237
264
  const marshalUpgradeGatewayRequest = (request, defaults) => ({
238
265
  type: request.type
239
266
  });
267
+ exports.marshalAddBastionAllowedIPsRequest = marshalAddBastionAllowedIPsRequest;
240
268
  exports.marshalCreateGatewayNetworkRequest = marshalCreateGatewayNetworkRequest;
241
269
  exports.marshalCreateGatewayRequest = marshalCreateGatewayRequest;
242
270
  exports.marshalCreateIPRequest = marshalCreateIPRequest;
243
271
  exports.marshalCreatePatRuleRequest = marshalCreatePatRuleRequest;
272
+ exports.marshalSetBastionAllowedIPsRequest = marshalSetBastionAllowedIPsRequest;
244
273
  exports.marshalSetPatRulesRequest = marshalSetPatRulesRequest;
245
274
  exports.marshalUpdateGatewayNetworkRequest = marshalUpdateGatewayNetworkRequest;
246
275
  exports.marshalUpdateGatewayRequest = marshalUpdateGatewayRequest;
247
276
  exports.marshalUpdateIPRequest = marshalUpdateIPRequest;
248
277
  exports.marshalUpdatePatRuleRequest = marshalUpdatePatRuleRequest;
249
278
  exports.marshalUpgradeGatewayRequest = marshalUpgradeGatewayRequest;
279
+ exports.unmarshalAddBastionAllowedIPsResponse = unmarshalAddBastionAllowedIPsResponse;
250
280
  exports.unmarshalGateway = unmarshalGateway;
251
281
  exports.unmarshalGatewayNetwork = unmarshalGatewayNetwork;
252
282
  exports.unmarshalIP = unmarshalIP;
@@ -256,4 +286,5 @@ exports.unmarshalListGatewaysResponse = unmarshalListGatewaysResponse;
256
286
  exports.unmarshalListIPsResponse = unmarshalListIPsResponse;
257
287
  exports.unmarshalListPatRulesResponse = unmarshalListPatRulesResponse;
258
288
  exports.unmarshalPatRule = unmarshalPatRule;
289
+ exports.unmarshalSetBastionAllowedIPsResponse = unmarshalSetBastionAllowedIPsResponse;
259
290
  exports.unmarshalSetPatRulesResponse = unmarshalSetPatRulesResponse;
@@ -1,19 +1,23 @@
1
1
  import type { DefaultValues } from '../../../bridge';
2
- import type { CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, Gateway, GatewayNetwork, IP, ListGatewayNetworksResponse, ListGatewayTypesResponse, ListGatewaysResponse, ListIPsResponse, ListPatRulesResponse, PatRule, SetPatRulesRequest, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest } from './types.gen';
2
+ import type { AddBastionAllowedIPsRequest, AddBastionAllowedIPsResponse, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, Gateway, GatewayNetwork, IP, ListGatewayNetworksResponse, ListGatewayTypesResponse, ListGatewaysResponse, ListIPsResponse, ListPatRulesResponse, PatRule, SetBastionAllowedIPsRequest, SetBastionAllowedIPsResponse, SetPatRulesRequest, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest } from './types.gen';
3
3
  export declare const unmarshalGatewayNetwork: (data: unknown) => GatewayNetwork;
4
4
  export declare const unmarshalIP: (data: unknown) => IP;
5
5
  export declare const unmarshalGateway: (data: unknown) => Gateway;
6
6
  export declare const unmarshalPatRule: (data: unknown) => PatRule;
7
+ export declare const unmarshalAddBastionAllowedIPsResponse: (data: unknown) => AddBastionAllowedIPsResponse;
7
8
  export declare const unmarshalListGatewayNetworksResponse: (data: unknown) => ListGatewayNetworksResponse;
8
9
  export declare const unmarshalListGatewayTypesResponse: (data: unknown) => ListGatewayTypesResponse;
9
10
  export declare const unmarshalListGatewaysResponse: (data: unknown) => ListGatewaysResponse;
10
11
  export declare const unmarshalListIPsResponse: (data: unknown) => ListIPsResponse;
11
12
  export declare const unmarshalListPatRulesResponse: (data: unknown) => ListPatRulesResponse;
13
+ export declare const unmarshalSetBastionAllowedIPsResponse: (data: unknown) => SetBastionAllowedIPsResponse;
12
14
  export declare const unmarshalSetPatRulesResponse: (data: unknown) => SetPatRulesResponse;
15
+ export declare const marshalAddBastionAllowedIPsRequest: (request: AddBastionAllowedIPsRequest, defaults: DefaultValues) => Record<string, unknown>;
13
16
  export declare const marshalCreateGatewayNetworkRequest: (request: CreateGatewayNetworkRequest, defaults: DefaultValues) => Record<string, unknown>;
14
17
  export declare const marshalCreateGatewayRequest: (request: CreateGatewayRequest, defaults: DefaultValues) => Record<string, unknown>;
15
18
  export declare const marshalCreateIPRequest: (request: CreateIPRequest, defaults: DefaultValues) => Record<string, unknown>;
16
19
  export declare const marshalCreatePatRuleRequest: (request: CreatePatRuleRequest, defaults: DefaultValues) => Record<string, unknown>;
20
+ export declare const marshalSetBastionAllowedIPsRequest: (request: SetBastionAllowedIPsRequest, defaults: DefaultValues) => Record<string, unknown>;
17
21
  export declare const marshalSetPatRulesRequest: (request: SetPatRulesRequest, defaults: DefaultValues) => Record<string, unknown>;
18
22
  export declare const marshalUpdateGatewayNetworkRequest: (request: UpdateGatewayNetworkRequest, defaults: DefaultValues) => Record<string, unknown>;
19
23
  export declare const marshalUpdateGatewayRequest: (request: UpdateGatewayRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -49,6 +49,7 @@ const unmarshalGateway = (data) => {
49
49
  }
50
50
  return {
51
51
  bandwidth: data.bandwidth,
52
+ bastionAllowedIps: data.bastion_allowed_ips,
52
53
  bastionEnabled: data.bastion_enabled,
53
54
  bastionPort: data.bastion_port,
54
55
  canUpgradeTo: data.can_upgrade_to,
@@ -90,6 +91,16 @@ const unmarshalPatRule = (data) => {
90
91
  zone: data.zone
91
92
  };
92
93
  };
94
+ const unmarshalAddBastionAllowedIPsResponse = (data) => {
95
+ if (!isJSONObject(data)) {
96
+ throw new TypeError(
97
+ `Unmarshalling the type 'AddBastionAllowedIPsResponse' failed as data isn't a dictionary.`
98
+ );
99
+ }
100
+ return {
101
+ ipRanges: data.ip_ranges
102
+ };
103
+ };
93
104
  const unmarshalListGatewayNetworksResponse = (data) => {
94
105
  if (!isJSONObject(data)) {
95
106
  throw new TypeError(
@@ -159,6 +170,16 @@ const unmarshalListPatRulesResponse = (data) => {
159
170
  totalCount: data.total_count
160
171
  };
161
172
  };
173
+ const unmarshalSetBastionAllowedIPsResponse = (data) => {
174
+ if (!isJSONObject(data)) {
175
+ throw new TypeError(
176
+ `Unmarshalling the type 'SetBastionAllowedIPsResponse' failed as data isn't a dictionary.`
177
+ );
178
+ }
179
+ return {
180
+ ipRanges: data.ip_ranges
181
+ };
182
+ };
162
183
  const unmarshalSetPatRulesResponse = (data) => {
163
184
  if (!isJSONObject(data)) {
164
185
  throw new TypeError(
@@ -169,6 +190,9 @@ const unmarshalSetPatRulesResponse = (data) => {
169
190
  patRules: unmarshalArrayOfObject(data.pat_rules, unmarshalPatRule)
170
191
  };
171
192
  };
193
+ const marshalAddBastionAllowedIPsRequest = (request, defaults) => ({
194
+ ip_range: request.ipRange
195
+ });
172
196
  const marshalCreateGatewayNetworkRequest = (request, defaults) => ({
173
197
  enable_masquerade: request.enableMasquerade,
174
198
  gateway_id: request.gatewayId,
@@ -197,6 +221,9 @@ const marshalCreatePatRuleRequest = (request, defaults) => ({
197
221
  protocol: request.protocol,
198
222
  public_port: request.publicPort
199
223
  });
224
+ const marshalSetBastionAllowedIPsRequest = (request, defaults) => ({
225
+ ip_ranges: request.ipRanges
226
+ });
200
227
  const marshalSetPatRulesRequestRule = (request, defaults) => ({
201
228
  private_ip: request.privateIp,
202
229
  private_port: request.privatePort,
@@ -236,16 +263,19 @@ const marshalUpgradeGatewayRequest = (request, defaults) => ({
236
263
  type: request.type
237
264
  });
238
265
  export {
266
+ marshalAddBastionAllowedIPsRequest,
239
267
  marshalCreateGatewayNetworkRequest,
240
268
  marshalCreateGatewayRequest,
241
269
  marshalCreateIPRequest,
242
270
  marshalCreatePatRuleRequest,
271
+ marshalSetBastionAllowedIPsRequest,
243
272
  marshalSetPatRulesRequest,
244
273
  marshalUpdateGatewayNetworkRequest,
245
274
  marshalUpdateGatewayRequest,
246
275
  marshalUpdateIPRequest,
247
276
  marshalUpdatePatRuleRequest,
248
277
  marshalUpgradeGatewayRequest,
278
+ unmarshalAddBastionAllowedIPsResponse,
249
279
  unmarshalGateway,
250
280
  unmarshalGatewayNetwork,
251
281
  unmarshalIP,
@@ -255,5 +285,6 @@ export {
255
285
  unmarshalListIPsResponse,
256
286
  unmarshalListPatRulesResponse,
257
287
  unmarshalPatRule,
288
+ unmarshalSetBastionAllowedIPsResponse,
258
289
  unmarshalSetPatRulesResponse
259
290
  };
@@ -110,6 +110,8 @@ export interface Gateway {
110
110
  smtpEnabled: boolean;
111
111
  /** Defines whether the gateway uses non-IPAM IP configurations. */
112
112
  isLegacy: boolean;
113
+ /** Ranges of IP addresses allowed to connect to the gateway's SSH bastion. */
114
+ bastionAllowedIps: string[];
113
115
  /** Zone of the gateway. */
114
116
  zone: Zone;
115
117
  }
@@ -146,6 +148,18 @@ export interface SetPatRulesRequestRule {
146
148
  /** Protocol the rule should apply to. */
147
149
  protocol: PatRuleProtocol;
148
150
  }
151
+ export type AddBastionAllowedIPsRequest = {
152
+ /** Zone to target. If none is passed will use default zone from the config. */
153
+ zone?: Zone;
154
+ /** ID of the gateway to add the allowed IP range to. */
155
+ gatewayId: string;
156
+ /** IP range allowed to connect to the SSH bastion. */
157
+ ipRange: string;
158
+ };
159
+ export interface AddBastionAllowedIPsResponse {
160
+ /** Ranges of IP addresses allowed to connect to the gateway's SSH bastion. */
161
+ ipRanges: string[];
162
+ }
149
163
  export type CreateGatewayNetworkRequest = {
150
164
  /** Zone to target. If none is passed will use default zone from the config. */
151
165
  zone?: Zone;
@@ -202,6 +216,14 @@ export type CreatePatRuleRequest = {
202
216
  /** Protocol the rule should apply to. */
203
217
  protocol?: PatRuleProtocol;
204
218
  };
219
+ export type DeleteBastionAllowedIPsRequest = {
220
+ /** Zone to target. If none is passed will use default zone from the config. */
221
+ zone?: Zone;
222
+ /** ID of the gateway on which to delete the allowed IP range. */
223
+ gatewayId: string;
224
+ /** IP range to delete from SSH bastion's list of allowed IPs. */
225
+ ipRange: string;
226
+ };
205
227
  export type DeleteGatewayNetworkRequest = {
206
228
  /** Zone to target. If none is passed will use default zone from the config. */
207
229
  zone?: Zone;
@@ -213,6 +235,8 @@ export type DeleteGatewayRequest = {
213
235
  zone?: Zone;
214
236
  /** ID of the gateway to delete. */
215
237
  gatewayId: string;
238
+ /** Defines whether the PGW's IP should be deleted. */
239
+ deleteIp: boolean;
216
240
  };
217
241
  export type DeleteIPRequest = {
218
242
  /** Zone to target. If none is passed will use default zone from the config. */
@@ -374,6 +398,21 @@ export type RefreshSSHKeysRequest = {
374
398
  /** ID of the gateway to refresh SSH keys on. */
375
399
  gatewayId: string;
376
400
  };
401
+ export type SetBastionAllowedIPsRequest = {
402
+ /** Zone to target. If none is passed will use default zone from the config. */
403
+ zone?: Zone;
404
+ /** ID of the gateway on which to set the allowed IP range. */
405
+ gatewayId: string;
406
+ /**
407
+ * New list of IP ranges (each range in CIDR notation) allowed to connect to
408
+ * the SSH bastion.
409
+ */
410
+ ipRanges?: string[];
411
+ };
412
+ export interface SetBastionAllowedIPsResponse {
413
+ /** Ranges of IP addresses allowed to connect to the gateway's SSH bastion. */
414
+ ipRanges: string[];
415
+ }
377
416
  export type SetPatRulesRequest = {
378
417
  /** Zone to target. If none is passed will use default zone from the config. */
379
418
  zone?: Zone;
@@ -273,6 +273,26 @@ class DnsAPI extends api.API {
273
273
  },
274
274
  marshalling_gen.unmarshalCheckUserOwnsDomainResponse
275
275
  );
276
+ /**
277
+ * "Synchronize your DNS records on the Elements Console and on cPanel.".
278
+ *
279
+ * @param request - The request {@link DnsApiSyncDomainDnsRecordsRequest}
280
+ * @returns A Promise of DnsRecords
281
+ */
282
+ syncDomainDnsRecords = (request) => this.client.fetch(
283
+ {
284
+ body: JSON.stringify(
285
+ marshalling_gen.marshalDnsApiSyncDomainDnsRecordsRequest(
286
+ request,
287
+ this.client.settings
288
+ )
289
+ ),
290
+ headers: jsonContentHeaders,
291
+ method: "POST",
292
+ path: `/webhosting/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${marshalling.validatePathParam("domain", request.domain)}/sync-domain-dns-records`
293
+ },
294
+ marshalling_gen.unmarshalDnsRecords
295
+ );
276
296
  }
277
297
  class OfferAPI extends api.API {
278
298
  /** Lists the available regions of the API. */
@@ -1,6 +1,6 @@
1
1
  import { API as ParentAPI } from '../../../bridge';
2
2
  import type { Region, WaitForOptions } from '../../../bridge';
3
- import type { CheckUserOwnsDomainResponse, ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsRecords, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, ResetHostingPasswordResponse, ResourceSummary, Session, WebsiteApiListWebsitesRequest } from './types.gen';
3
+ import type { CheckUserOwnsDomainResponse, ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, ResetHostingPasswordResponse, ResourceSummary, Session, WebsiteApiListWebsitesRequest } from './types.gen';
4
4
  /**
5
5
  * Web Hosting Control Panel API.
6
6
  *
@@ -140,6 +140,13 @@ export declare class DnsAPI extends ParentAPI {
140
140
  * @returns A Promise of CheckUserOwnsDomainResponse
141
141
  */
142
142
  checkUserOwnsDomain: (request: Readonly<DnsApiCheckUserOwnsDomainRequest>) => Promise<CheckUserOwnsDomainResponse>;
143
+ /**
144
+ * "Synchronize your DNS records on the Elements Console and on cPanel.".
145
+ *
146
+ * @param request - The request {@link DnsApiSyncDomainDnsRecordsRequest}
147
+ * @returns A Promise of DnsRecords
148
+ */
149
+ syncDomainDnsRecords: (request: Readonly<DnsApiSyncDomainDnsRecordsRequest>) => Promise<DnsRecords>;
143
150
  }
144
151
  /**
145
152
  * Web Hosting Offer API.
@@ -4,7 +4,7 @@ import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
4
4
  import "../../../vendor/base64/index.js";
5
5
  import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
6
6
  import { HOSTING_TRANSIENT_STATUSES } from "./content.gen.js";
7
- import { unmarshalListControlPanelsResponse, marshalDatabaseApiCreateDatabaseRequest, unmarshalDatabase, unmarshalListDatabasesResponse, marshalDatabaseApiCreateDatabaseUserRequest, unmarshalDatabaseUser, unmarshalListDatabaseUsersResponse, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, unmarshalDnsRecords, marshalDnsApiCheckUserOwnsDomainRequest, unmarshalCheckUserOwnsDomainResponse, unmarshalListOffersResponse, marshalHostingApiCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalHostingApiUpdateHostingRequest, unmarshalSession, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, marshalFtpAccountApiCreateFtpAccountRequest, unmarshalFtpAccount, unmarshalListFtpAccountsResponse, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, unmarshalMailAccount, unmarshalListMailAccountsResponse, marshalMailAccountApiRemoveMailAccountRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, unmarshalListWebsitesResponse } from "./marshalling.gen.js";
7
+ import { unmarshalListControlPanelsResponse, marshalDatabaseApiCreateDatabaseRequest, unmarshalDatabase, unmarshalListDatabasesResponse, marshalDatabaseApiCreateDatabaseUserRequest, unmarshalDatabaseUser, unmarshalListDatabaseUsersResponse, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, unmarshalDnsRecords, marshalDnsApiCheckUserOwnsDomainRequest, unmarshalCheckUserOwnsDomainResponse, marshalDnsApiSyncDomainDnsRecordsRequest, unmarshalListOffersResponse, marshalHostingApiCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalHostingApiUpdateHostingRequest, unmarshalSession, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, marshalFtpAccountApiCreateFtpAccountRequest, unmarshalFtpAccount, unmarshalListFtpAccountsResponse, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, unmarshalMailAccount, unmarshalListMailAccountsResponse, marshalMailAccountApiRemoveMailAccountRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, unmarshalListWebsitesResponse } from "./marshalling.gen.js";
8
8
  const jsonContentHeaders = {
9
9
  "Content-Type": "application/json; charset=utf-8"
10
10
  };
@@ -271,6 +271,26 @@ class DnsAPI extends API$1 {
271
271
  },
272
272
  unmarshalCheckUserOwnsDomainResponse
273
273
  );
274
+ /**
275
+ * "Synchronize your DNS records on the Elements Console and on cPanel.".
276
+ *
277
+ * @param request - The request {@link DnsApiSyncDomainDnsRecordsRequest}
278
+ * @returns A Promise of DnsRecords
279
+ */
280
+ syncDomainDnsRecords = (request) => this.client.fetch(
281
+ {
282
+ body: JSON.stringify(
283
+ marshalDnsApiSyncDomainDnsRecordsRequest(
284
+ request,
285
+ this.client.settings
286
+ )
287
+ ),
288
+ headers: jsonContentHeaders,
289
+ method: "POST",
290
+ path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domain", request.domain)}/sync-domain-dns-records`
291
+ },
292
+ unmarshalDnsRecords
293
+ );
274
294
  }
275
295
  class OfferAPI extends API$1 {
276
296
  /** Lists the available regions of the API. */
@@ -1,4 +1,4 @@
1
1
  export { ControlPanelAPI, DatabaseAPI, DnsAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI, } from './api.gen';
2
2
  export * from './content.gen';
3
- export type { CheckUserOwnsDomainResponse, ControlPanel, ControlPanelApiListControlPanelsRequest, CreateDatabaseRequestUser, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsRecord, DnsRecordStatus, DnsRecordType, DnsRecords, DnsRecordsStatus, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingStatus, HostingSummary, HostingSummaryStatus, HostingUser, ListControlPanelsResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListFtpAccountsRequestOrderBy, ListFtpAccountsResponse, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailAccountsRequestOrderBy, ListMailAccountsResponse, ListOffersRequestOrderBy, ListOffersResponse, ListWebsitesRequestOrderBy, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, Nameserver, NameserverStatus, Offer, OfferApiListOffersRequest, OfferOption, OfferOptionName, OfferOptionRequest, OfferOptionWarning, Platform, PlatformControlPanel, PlatformControlPanelUrls, PlatformPlatformGroup, ResetHostingPasswordResponse, ResourceSummary, Session, Website, WebsiteApiListWebsitesRequest, } from './types.gen';
3
+ export type { CheckUserOwnsDomainResponse, ControlPanel, ControlPanelApiListControlPanelsRequest, CreateDatabaseRequestUser, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecord, DnsRecordStatus, DnsRecordType, DnsRecords, DnsRecordsStatus, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingStatus, HostingSummary, HostingSummaryStatus, HostingUser, ListControlPanelsResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListFtpAccountsRequestOrderBy, ListFtpAccountsResponse, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailAccountsRequestOrderBy, ListMailAccountsResponse, ListOffersRequestOrderBy, ListOffersResponse, ListWebsitesRequestOrderBy, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, Nameserver, NameserverStatus, Offer, OfferApiListOffersRequest, OfferOption, OfferOptionName, OfferOptionRequest, OfferOptionWarning, Platform, PlatformControlPanel, PlatformControlPanelUrls, PlatformPlatformGroup, ResetHostingPasswordResponse, ResourceSummary, Session, SyncDomainDnsRecordsRequestRecord, Website, WebsiteApiListWebsitesRequest, } from './types.gen';
4
4
  export * as ValidationRules from './validation-rules.gen';
@@ -159,8 +159,10 @@ const unmarshalOffer = (data) => {
159
159
  controlPanelName: data.control_panel_name,
160
160
  endOfLife: data.end_of_life,
161
161
  id: data.id,
162
+ name: data.name,
162
163
  options: marshalling.unmarshalArrayOfObject(data.options, unmarshalOfferOption),
163
- price: data.price ? customMarshalling.unmarshalMoney(data.price) : void 0
164
+ price: data.price ? customMarshalling.unmarshalMoney(data.price) : void 0,
165
+ quotaWarning: data.quota_warning
164
166
  };
165
167
  };
166
168
  const unmarshalPlatform = (data) => {
@@ -402,6 +404,18 @@ const marshalDatabaseApiUnassignDatabaseUserRequest = (request, defaults) => ({
402
404
  const marshalDnsApiCheckUserOwnsDomainRequest = (request, defaults) => ({
403
405
  project_id: request.projectId ?? defaults.defaultProjectId
404
406
  });
407
+ const marshalSyncDomainDnsRecordsRequestRecord = (request, defaults) => ({
408
+ name: request.name,
409
+ type: request.type
410
+ });
411
+ const marshalDnsApiSyncDomainDnsRecordsRequest = (request, defaults) => ({
412
+ custom_records: request.customRecords !== void 0 ? request.customRecords.map(
413
+ (elt) => marshalSyncDomainDnsRecordsRequestRecord(elt)
414
+ ) : void 0,
415
+ update_all_records: request.updateAllRecords,
416
+ update_mail_records: request.updateMailRecords,
417
+ update_web_records: request.updateWebRecords
418
+ });
405
419
  const marshalFtpAccountApiChangeFtpAccountPasswordRequest = (request, defaults) => ({
406
420
  password: request.password
407
421
  });
@@ -464,6 +478,7 @@ exports.marshalDatabaseApiCreateDatabaseRequest = marshalDatabaseApiCreateDataba
464
478
  exports.marshalDatabaseApiCreateDatabaseUserRequest = marshalDatabaseApiCreateDatabaseUserRequest;
465
479
  exports.marshalDatabaseApiUnassignDatabaseUserRequest = marshalDatabaseApiUnassignDatabaseUserRequest;
466
480
  exports.marshalDnsApiCheckUserOwnsDomainRequest = marshalDnsApiCheckUserOwnsDomainRequest;
481
+ exports.marshalDnsApiSyncDomainDnsRecordsRequest = marshalDnsApiSyncDomainDnsRecordsRequest;
467
482
  exports.marshalFtpAccountApiChangeFtpAccountPasswordRequest = marshalFtpAccountApiChangeFtpAccountPasswordRequest;
468
483
  exports.marshalFtpAccountApiCreateFtpAccountRequest = marshalFtpAccountApiCreateFtpAccountRequest;
469
484
  exports.marshalHostingApiCreateHostingRequest = marshalHostingApiCreateHostingRequest;
@@ -1,5 +1,5 @@
1
1
  import type { DefaultValues } from '../../../bridge';
2
- import type { CheckUserOwnsDomainResponse, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsRecords, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiRemoveMailAccountRequest, ResetHostingPasswordResponse, ResourceSummary, Session } from './types.gen';
2
+ import type { CheckUserOwnsDomainResponse, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiRemoveMailAccountRequest, ResetHostingPasswordResponse, ResourceSummary, Session } from './types.gen';
3
3
  export declare const unmarshalDatabaseUser: (data: unknown) => DatabaseUser;
4
4
  export declare const unmarshalDatabase: (data: unknown) => Database;
5
5
  export declare const unmarshalFtpAccount: (data: unknown) => FtpAccount;
@@ -24,6 +24,7 @@ export declare const marshalDatabaseApiCreateDatabaseRequest: (request: Database
24
24
  export declare const marshalDatabaseApiCreateDatabaseUserRequest: (request: DatabaseApiCreateDatabaseUserRequest, defaults: DefaultValues) => Record<string, unknown>;
25
25
  export declare const marshalDatabaseApiUnassignDatabaseUserRequest: (request: DatabaseApiUnassignDatabaseUserRequest, defaults: DefaultValues) => Record<string, unknown>;
26
26
  export declare const marshalDnsApiCheckUserOwnsDomainRequest: (request: DnsApiCheckUserOwnsDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
27
+ export declare const marshalDnsApiSyncDomainDnsRecordsRequest: (request: DnsApiSyncDomainDnsRecordsRequest, defaults: DefaultValues) => Record<string, unknown>;
27
28
  export declare const marshalFtpAccountApiChangeFtpAccountPasswordRequest: (request: FtpAccountApiChangeFtpAccountPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
28
29
  export declare const marshalFtpAccountApiCreateFtpAccountRequest: (request: FtpAccountApiCreateFtpAccountRequest, defaults: DefaultValues) => Record<string, unknown>;
29
30
  export declare const marshalHostingApiCreateHostingRequest: (request: HostingApiCreateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -157,8 +157,10 @@ const unmarshalOffer = (data) => {
157
157
  controlPanelName: data.control_panel_name,
158
158
  endOfLife: data.end_of_life,
159
159
  id: data.id,
160
+ name: data.name,
160
161
  options: unmarshalArrayOfObject(data.options, unmarshalOfferOption),
161
- price: data.price ? unmarshalMoney(data.price) : void 0
162
+ price: data.price ? unmarshalMoney(data.price) : void 0,
163
+ quotaWarning: data.quota_warning
162
164
  };
163
165
  };
164
166
  const unmarshalPlatform = (data) => {
@@ -400,6 +402,18 @@ const marshalDatabaseApiUnassignDatabaseUserRequest = (request, defaults) => ({
400
402
  const marshalDnsApiCheckUserOwnsDomainRequest = (request, defaults) => ({
401
403
  project_id: request.projectId ?? defaults.defaultProjectId
402
404
  });
405
+ const marshalSyncDomainDnsRecordsRequestRecord = (request, defaults) => ({
406
+ name: request.name,
407
+ type: request.type
408
+ });
409
+ const marshalDnsApiSyncDomainDnsRecordsRequest = (request, defaults) => ({
410
+ custom_records: request.customRecords !== void 0 ? request.customRecords.map(
411
+ (elt) => marshalSyncDomainDnsRecordsRequestRecord(elt)
412
+ ) : void 0,
413
+ update_all_records: request.updateAllRecords,
414
+ update_mail_records: request.updateMailRecords,
415
+ update_web_records: request.updateWebRecords
416
+ });
403
417
  const marshalFtpAccountApiChangeFtpAccountPasswordRequest = (request, defaults) => ({
404
418
  password: request.password
405
419
  });
@@ -463,6 +477,7 @@ export {
463
477
  marshalDatabaseApiCreateDatabaseUserRequest,
464
478
  marshalDatabaseApiUnassignDatabaseUserRequest,
465
479
  marshalDnsApiCheckUserOwnsDomainRequest,
480
+ marshalDnsApiSyncDomainDnsRecordsRequest,
466
481
  marshalFtpAccountApiChangeFtpAccountPasswordRequest,
467
482
  marshalFtpAccountApiCreateFtpAccountRequest,
468
483
  marshalHostingApiCreateHostingRequest,
@@ -13,8 +13,8 @@ export type ListMailAccountsRequestOrderBy = 'username_asc' | 'username_desc' |
13
13
  export type ListOffersRequestOrderBy = 'price_asc';
14
14
  export type ListWebsitesRequestOrderBy = 'domain_asc' | 'domain_desc';
15
15
  export type NameserverStatus = 'unknown_status' | 'valid' | 'invalid';
16
- export type OfferOptionName = 'unknown_name' | 'domain_count' | 'email_count' | 'storage_gb' | 'vcpu_count' | 'ram_gb' | 'backup' | 'dedicated_ip';
17
- export type OfferOptionWarning = 'unknown_warning' | 'quota_exceeded_warning';
16
+ export type OfferOptionName = 'unknown_name' | 'domain_count' | 'email_count' | 'storage_gb' | 'vcpu_count' | 'ram_gb' | 'backup' | 'dedicated_ip' | 'email_storage_gb' | 'database_count' | 'support';
17
+ export type OfferOptionWarning = 'unknown_warning' | 'quota_exceeded_warning' | 'usage_low_warning';
18
18
  export type PlatformPlatformGroup = 'unknown_group' | 'default' | 'premium';
19
19
  export interface PlatformControlPanelUrls {
20
20
  /** URL to connect to the hosting control panel dashboard. */
@@ -65,6 +65,10 @@ export interface OfferOptionRequest {
65
65
  /** The option requested quantity to set for the Web Hosting plan. */
66
66
  quantity: number;
67
67
  }
68
+ export interface SyncDomainDnsRecordsRequestRecord {
69
+ name: string;
70
+ type: DnsRecordType;
71
+ }
68
72
  export interface DnsRecord {
69
73
  /** Record name. */
70
74
  name: string;
@@ -101,6 +105,8 @@ export interface HostingUser {
101
105
  export interface Offer {
102
106
  /** Offer ID. */
103
107
  id: string;
108
+ /** Offer name. */
109
+ name: string;
104
110
  /** Unique identifier used for billing. */
105
111
  billingOperationPath: string;
106
112
  /** Options available for the offer. */
@@ -116,6 +122,11 @@ export interface Offer {
116
122
  controlPanelName: string;
117
123
  /** Indicates if the offer has reached its end of life. */
118
124
  endOfLife: boolean;
125
+ /**
126
+ * Defines a warning if the maximum value for an option in the offer is
127
+ * exceeded.
128
+ */
129
+ quotaWarning: OfferOptionWarning;
119
130
  }
120
131
  export interface Platform {
121
132
  /** Hostname of the host platform. */
@@ -388,6 +399,23 @@ export type DnsApiGetDomainDnsRecordsRequest = {
388
399
  /** Domain associated with the DNS records. */
389
400
  domain: string;
390
401
  };
402
+ export type DnsApiSyncDomainDnsRecordsRequest = {
403
+ /**
404
+ * Region to target. If none is passed will use default region from the
405
+ * config.
406
+ */
407
+ region?: Region;
408
+ /** Domain for which the DNS records will be synchronized. */
409
+ domain: string;
410
+ /** Whether or not to synchronize the web records. */
411
+ updateWebRecords: boolean;
412
+ /** Whether or not to synchronize the mail records. */
413
+ updateMailRecords: boolean;
414
+ /** Whether or not to synchronize all types of records. This one has priority. */
415
+ updateAllRecords: boolean;
416
+ /** Custom records to synchronize. */
417
+ customRecords?: SyncDomainDnsRecordsRequestRecord[];
418
+ };
391
419
  export interface DnsRecords {
392
420
  /** List of DNS records. */
393
421
  records: DnsRecord[];