@scaleway/sdk-redis 2.2.0 → 2.3.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.
@@ -1,10 +1,9 @@
1
+ /** Lists transient statutes of the enum {@link ClusterStatus}. */
1
2
  const CLUSTER_TRANSIENT_STATUSES = [
2
- "provisioning",
3
- "configuring",
4
- "deleting",
5
- "autohealing",
6
- "initializing"
3
+ "provisioning",
4
+ "configuring",
5
+ "deleting",
6
+ "autohealing",
7
+ "initializing"
7
8
  ];
8
- export {
9
- CLUSTER_TRANSIENT_STATUSES
10
- };
9
+ export { CLUSTER_TRANSIENT_STATUSES };
@@ -1,4 +1,4 @@
1
- export { API } from './api.gen.js';
1
+ export { API, } from './api.gen.js';
2
2
  export * from './content.gen.js';
3
3
  export * from './marshalling.gen.js';
4
4
  export type { ACLRule, ACLRuleSpec, AddAclRulesRequest, AddAclRulesResponse, AddClusterSettingsRequest, AddEndpointsRequest, AddEndpointsResponse, AvailableClusterSetting, AvailableClusterSettingPropertyType, Cluster, ClusterMetricsResponse, ClusterSetting, ClusterSettingsResponse, ClusterStatus, ClusterVersion, CreateClusterRequest, DeleteAclRuleRequest, DeleteClusterRequest, DeleteClusterSettingRequest, DeleteEndpointRequest, Endpoint, EndpointSpec, EndpointSpecPrivateNetworkSpec, EndpointSpecPrivateNetworkSpecIpamConfig, EndpointSpecPublicNetworkSpec, GetAclRuleRequest, GetClusterCertificateRequest, GetClusterMetricsRequest, GetClusterRequest, GetEndpointRequest, ListClustersRequest, ListClustersRequestOrderBy, ListClustersResponse, ListClusterVersionsRequest, ListClusterVersionsResponse, ListNodeTypesRequest, ListNodeTypesResponse, MigrateClusterRequest, NodeType, NodeTypeStock, PrivateNetwork, PrivateNetworkProvisioningMode, PublicNetwork, RenewClusterCertificateRequest, SetAclRulesRequest, SetAclRulesResponse, SetClusterSettingsRequest, SetEndpointsRequest, SetEndpointsResponse, UpdateClusterRequest, UpdateEndpointRequest, } from './types.gen.js';
@@ -1,29 +1,31 @@
1
- import { API } from "./api.gen.js";
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
2
  import { CLUSTER_TRANSIENT_STATUSES } from "./content.gen.js";
3
3
  import { marshalAddAclRulesRequest, marshalAddClusterSettingsRequest, marshalAddEndpointsRequest, marshalCreateClusterRequest, marshalMigrateClusterRequest, marshalSetAclRulesRequest, marshalSetClusterSettingsRequest, marshalSetEndpointsRequest, marshalUpdateClusterRequest, marshalUpdateEndpointRequest, unmarshalACLRule, unmarshalAddAclRulesResponse, unmarshalAddEndpointsResponse, unmarshalCluster, unmarshalClusterMetricsResponse, unmarshalClusterSettingsResponse, unmarshalEndpoint, unmarshalListClusterVersionsResponse, unmarshalListClustersResponse, unmarshalListNodeTypesResponse, unmarshalSetAclRulesResponse, unmarshalSetEndpointsResponse } from "./marshalling.gen.js";
4
- export {
5
- API,
6
- CLUSTER_TRANSIENT_STATUSES,
7
- marshalAddAclRulesRequest,
8
- marshalAddClusterSettingsRequest,
9
- marshalAddEndpointsRequest,
10
- marshalCreateClusterRequest,
11
- marshalMigrateClusterRequest,
12
- marshalSetAclRulesRequest,
13
- marshalSetClusterSettingsRequest,
14
- marshalSetEndpointsRequest,
15
- marshalUpdateClusterRequest,
16
- marshalUpdateEndpointRequest,
17
- unmarshalACLRule,
18
- unmarshalAddAclRulesResponse,
19
- unmarshalAddEndpointsResponse,
20
- unmarshalCluster,
21
- unmarshalClusterMetricsResponse,
22
- unmarshalClusterSettingsResponse,
23
- unmarshalEndpoint,
24
- unmarshalListClusterVersionsResponse,
25
- unmarshalListClustersResponse,
26
- unmarshalListNodeTypesResponse,
27
- unmarshalSetAclRulesResponse,
28
- unmarshalSetEndpointsResponse
29
- };
4
+ import { API } from "./api.gen.js";
5
+ var index_gen_exports = /* @__PURE__ */ __exportAll({
6
+ API: () => API,
7
+ CLUSTER_TRANSIENT_STATUSES: () => CLUSTER_TRANSIENT_STATUSES,
8
+ marshalAddAclRulesRequest: () => marshalAddAclRulesRequest,
9
+ marshalAddClusterSettingsRequest: () => marshalAddClusterSettingsRequest,
10
+ marshalAddEndpointsRequest: () => marshalAddEndpointsRequest,
11
+ marshalCreateClusterRequest: () => marshalCreateClusterRequest,
12
+ marshalMigrateClusterRequest: () => marshalMigrateClusterRequest,
13
+ marshalSetAclRulesRequest: () => marshalSetAclRulesRequest,
14
+ marshalSetClusterSettingsRequest: () => marshalSetClusterSettingsRequest,
15
+ marshalSetEndpointsRequest: () => marshalSetEndpointsRequest,
16
+ marshalUpdateClusterRequest: () => marshalUpdateClusterRequest,
17
+ marshalUpdateEndpointRequest: () => marshalUpdateEndpointRequest,
18
+ unmarshalACLRule: () => unmarshalACLRule,
19
+ unmarshalAddAclRulesResponse: () => unmarshalAddAclRulesResponse,
20
+ unmarshalAddEndpointsResponse: () => unmarshalAddEndpointsResponse,
21
+ unmarshalCluster: () => unmarshalCluster,
22
+ unmarshalClusterMetricsResponse: () => unmarshalClusterMetricsResponse,
23
+ unmarshalClusterSettingsResponse: () => unmarshalClusterSettingsResponse,
24
+ unmarshalEndpoint: () => unmarshalEndpoint,
25
+ unmarshalListClusterVersionsResponse: () => unmarshalListClusterVersionsResponse,
26
+ unmarshalListClustersResponse: () => unmarshalListClustersResponse,
27
+ unmarshalListNodeTypesResponse: () => unmarshalListNodeTypesResponse,
28
+ unmarshalSetAclRulesResponse: () => unmarshalSetAclRulesResponse,
29
+ unmarshalSetEndpointsResponse: () => unmarshalSetEndpointsResponse
30
+ });
31
+ export { index_gen_exports };
@@ -1,353 +1,219 @@
1
+ import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalTimeSeries } from "@scaleway/sdk-client";
1
2
  import randomName from "@scaleway/random-name";
2
- import { resolveOneOf, isJSONObject, unmarshalDate, unmarshalArrayOfObject, unmarshalTimeSeries } from "@scaleway/sdk-client";
3
3
  const unmarshalACLRule = (data) => {
4
- if (!isJSONObject(data)) {
5
- throw new TypeError(
6
- `Unmarshalling the type 'ACLRule' failed as data isn't a dictionary.`
7
- );
8
- }
9
- return {
10
- description: data.description,
11
- id: data.id,
12
- ipCidr: data.ip_cidr
13
- };
14
- };
15
- const unmarshalPrivateNetwork = (data) => {
16
- if (!isJSONObject(data)) {
17
- throw new TypeError(
18
- `Unmarshalling the type 'PrivateNetwork' failed as data isn't a dictionary.`
19
- );
20
- }
21
- return {
22
- id: data.id,
23
- provisioningMode: data.provisioning_mode,
24
- serviceIps: data.service_ips,
25
- zone: data.zone
26
- };
27
- };
28
- const unmarshalPublicNetwork = (data) => {
29
- if (!isJSONObject(data)) {
30
- throw new TypeError(
31
- `Unmarshalling the type 'PublicNetwork' failed as data isn't a dictionary.`
32
- );
33
- }
34
- return {};
4
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ACLRule' failed as data isn't a dictionary.`);
5
+ return {
6
+ description: data.description,
7
+ id: data.id,
8
+ ipCidr: data.ip_cidr
9
+ };
10
+ };
11
+ var unmarshalPrivateNetwork = (data) => {
12
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PrivateNetwork' failed as data isn't a dictionary.`);
13
+ return {
14
+ id: data.id,
15
+ provisioningMode: data.provisioning_mode,
16
+ serviceIps: data.service_ips,
17
+ zone: data.zone
18
+ };
19
+ };
20
+ var unmarshalPublicNetwork = (data) => {
21
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicNetwork' failed as data isn't a dictionary.`);
22
+ return {};
35
23
  };
36
24
  const unmarshalEndpoint = (data) => {
37
- if (!isJSONObject(data)) {
38
- throw new TypeError(
39
- `Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`
40
- );
41
- }
42
- return {
43
- id: data.id,
44
- ips: data.ips,
45
- port: data.port,
46
- privateNetwork: data.private_network ? unmarshalPrivateNetwork(data.private_network) : void 0,
47
- publicNetwork: data.public_network ? unmarshalPublicNetwork(data.public_network) : void 0
48
- };
49
- };
50
- const unmarshalClusterSetting = (data) => {
51
- if (!isJSONObject(data)) {
52
- throw new TypeError(
53
- `Unmarshalling the type 'ClusterSetting' failed as data isn't a dictionary.`
54
- );
55
- }
56
- return {
57
- name: data.name,
58
- value: data.value
59
- };
25
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`);
26
+ return {
27
+ id: data.id,
28
+ ips: data.ips,
29
+ port: data.port,
30
+ privateNetwork: data.private_network ? unmarshalPrivateNetwork(data.private_network) : void 0,
31
+ publicNetwork: data.public_network ? unmarshalPublicNetwork(data.public_network) : void 0
32
+ };
33
+ };
34
+ var unmarshalClusterSetting = (data) => {
35
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ClusterSetting' failed as data isn't a dictionary.`);
36
+ return {
37
+ name: data.name,
38
+ value: data.value
39
+ };
60
40
  };
61
41
  const unmarshalCluster = (data) => {
62
- if (!isJSONObject(data)) {
63
- throw new TypeError(
64
- `Unmarshalling the type 'Cluster' failed as data isn't a dictionary.`
65
- );
66
- }
67
- return {
68
- aclRules: unmarshalArrayOfObject(data.acl_rules, unmarshalACLRule),
69
- clusterSettings: unmarshalArrayOfObject(
70
- data.cluster_settings,
71
- unmarshalClusterSetting
72
- ),
73
- clusterSize: data.cluster_size,
74
- createdAt: unmarshalDate(data.created_at),
75
- endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
76
- id: data.id,
77
- name: data.name,
78
- nodeType: data.node_type,
79
- projectId: data.project_id,
80
- status: data.status,
81
- tags: data.tags,
82
- tlsEnabled: data.tls_enabled,
83
- updatedAt: unmarshalDate(data.updated_at),
84
- upgradableVersions: data.upgradable_versions,
85
- userName: data.user_name,
86
- version: data.version,
87
- zone: data.zone
88
- };
42
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Cluster' failed as data isn't a dictionary.`);
43
+ return {
44
+ aclRules: unmarshalArrayOfObject(data.acl_rules, unmarshalACLRule),
45
+ clusterSettings: unmarshalArrayOfObject(data.cluster_settings, unmarshalClusterSetting),
46
+ clusterSize: data.cluster_size,
47
+ createdAt: unmarshalDate(data.created_at),
48
+ endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
49
+ id: data.id,
50
+ name: data.name,
51
+ nodeType: data.node_type,
52
+ projectId: data.project_id,
53
+ status: data.status,
54
+ tags: data.tags,
55
+ tlsEnabled: data.tls_enabled,
56
+ updatedAt: unmarshalDate(data.updated_at),
57
+ upgradableVersions: data.upgradable_versions,
58
+ userName: data.user_name,
59
+ version: data.version,
60
+ zone: data.zone
61
+ };
89
62
  };
90
63
  const unmarshalAddAclRulesResponse = (data) => {
91
- if (!isJSONObject(data)) {
92
- throw new TypeError(
93
- `Unmarshalling the type 'AddAclRulesResponse' failed as data isn't a dictionary.`
94
- );
95
- }
96
- return {
97
- aclRules: unmarshalArrayOfObject(data.acl_rules, unmarshalACLRule),
98
- totalCount: data.total_count
99
- };
64
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddAclRulesResponse' failed as data isn't a dictionary.`);
65
+ return {
66
+ aclRules: unmarshalArrayOfObject(data.acl_rules, unmarshalACLRule),
67
+ totalCount: data.total_count
68
+ };
100
69
  };
101
70
  const unmarshalAddEndpointsResponse = (data) => {
102
- if (!isJSONObject(data)) {
103
- throw new TypeError(
104
- `Unmarshalling the type 'AddEndpointsResponse' failed as data isn't a dictionary.`
105
- );
106
- }
107
- return {
108
- endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
109
- totalCount: data.total_count
110
- };
71
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddEndpointsResponse' failed as data isn't a dictionary.`);
72
+ return {
73
+ endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
74
+ totalCount: data.total_count
75
+ };
111
76
  };
112
77
  const unmarshalClusterMetricsResponse = (data) => {
113
- if (!isJSONObject(data)) {
114
- throw new TypeError(
115
- `Unmarshalling the type 'ClusterMetricsResponse' failed as data isn't a dictionary.`
116
- );
117
- }
118
- return {
119
- timeseries: unmarshalArrayOfObject(data.timeseries, unmarshalTimeSeries)
120
- };
78
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ClusterMetricsResponse' failed as data isn't a dictionary.`);
79
+ return { timeseries: unmarshalArrayOfObject(data.timeseries, unmarshalTimeSeries) };
121
80
  };
122
81
  const unmarshalClusterSettingsResponse = (data) => {
123
- if (!isJSONObject(data)) {
124
- throw new TypeError(
125
- `Unmarshalling the type 'ClusterSettingsResponse' failed as data isn't a dictionary.`
126
- );
127
- }
128
- return {
129
- settings: unmarshalArrayOfObject(data.settings, unmarshalClusterSetting)
130
- };
131
- };
132
- const unmarshalAvailableClusterSetting = (data) => {
133
- if (!isJSONObject(data)) {
134
- throw new TypeError(
135
- `Unmarshalling the type 'AvailableClusterSetting' failed as data isn't a dictionary.`
136
- );
137
- }
138
- return {
139
- defaultValue: data.default_value,
140
- deprecated: data.deprecated,
141
- description: data.description,
142
- maxValue: data.max_value,
143
- minValue: data.min_value,
144
- name: data.name,
145
- regex: data.regex,
146
- type: data.type
147
- };
148
- };
149
- const unmarshalClusterVersion = (data) => {
150
- if (!isJSONObject(data)) {
151
- throw new TypeError(
152
- `Unmarshalling the type 'ClusterVersion' failed as data isn't a dictionary.`
153
- );
154
- }
155
- return {
156
- availableSettings: unmarshalArrayOfObject(
157
- data.available_settings,
158
- unmarshalAvailableClusterSetting
159
- ),
160
- endOfLifeAt: unmarshalDate(data.end_of_life_at),
161
- logoUrl: data.logo_url,
162
- version: data.version,
163
- zone: data.zone
164
- };
82
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ClusterSettingsResponse' failed as data isn't a dictionary.`);
83
+ return { settings: unmarshalArrayOfObject(data.settings, unmarshalClusterSetting) };
84
+ };
85
+ var unmarshalAvailableClusterSetting = (data) => {
86
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AvailableClusterSetting' failed as data isn't a dictionary.`);
87
+ return {
88
+ defaultValue: data.default_value,
89
+ deprecated: data.deprecated,
90
+ description: data.description,
91
+ maxValue: data.max_value,
92
+ minValue: data.min_value,
93
+ name: data.name,
94
+ regex: data.regex,
95
+ type: data.type
96
+ };
97
+ };
98
+ var unmarshalClusterVersion = (data) => {
99
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ClusterVersion' failed as data isn't a dictionary.`);
100
+ return {
101
+ availableSettings: unmarshalArrayOfObject(data.available_settings, unmarshalAvailableClusterSetting),
102
+ endOfLifeAt: unmarshalDate(data.end_of_life_at),
103
+ logoUrl: data.logo_url,
104
+ version: data.version,
105
+ zone: data.zone
106
+ };
165
107
  };
166
108
  const unmarshalListClusterVersionsResponse = (data) => {
167
- if (!isJSONObject(data)) {
168
- throw new TypeError(
169
- `Unmarshalling the type 'ListClusterVersionsResponse' failed as data isn't a dictionary.`
170
- );
171
- }
172
- return {
173
- totalCount: data.total_count,
174
- versions: unmarshalArrayOfObject(data.versions, unmarshalClusterVersion)
175
- };
109
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListClusterVersionsResponse' failed as data isn't a dictionary.`);
110
+ return {
111
+ totalCount: data.total_count,
112
+ versions: unmarshalArrayOfObject(data.versions, unmarshalClusterVersion)
113
+ };
176
114
  };
177
115
  const unmarshalListClustersResponse = (data) => {
178
- if (!isJSONObject(data)) {
179
- throw new TypeError(
180
- `Unmarshalling the type 'ListClustersResponse' failed as data isn't a dictionary.`
181
- );
182
- }
183
- return {
184
- clusters: unmarshalArrayOfObject(data.clusters, unmarshalCluster),
185
- totalCount: data.total_count
186
- };
187
- };
188
- const unmarshalNodeType = (data) => {
189
- if (!isJSONObject(data)) {
190
- throw new TypeError(
191
- `Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`
192
- );
193
- }
194
- return {
195
- beta: data.beta,
196
- description: data.description,
197
- disabled: data.disabled,
198
- memory: data.memory,
199
- name: data.name,
200
- stockStatus: data.stock_status,
201
- vcpus: data.vcpus,
202
- zone: data.zone
203
- };
116
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListClustersResponse' failed as data isn't a dictionary.`);
117
+ return {
118
+ clusters: unmarshalArrayOfObject(data.clusters, unmarshalCluster),
119
+ totalCount: data.total_count
120
+ };
121
+ };
122
+ var unmarshalNodeType = (data) => {
123
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`);
124
+ return {
125
+ beta: data.beta,
126
+ description: data.description,
127
+ disabled: data.disabled,
128
+ memory: data.memory,
129
+ name: data.name,
130
+ stockStatus: data.stock_status,
131
+ vcpus: data.vcpus,
132
+ zone: data.zone
133
+ };
204
134
  };
205
135
  const unmarshalListNodeTypesResponse = (data) => {
206
- if (!isJSONObject(data)) {
207
- throw new TypeError(
208
- `Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`
209
- );
210
- }
211
- return {
212
- nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
213
- totalCount: data.total_count
214
- };
136
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`);
137
+ return {
138
+ nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
139
+ totalCount: data.total_count
140
+ };
215
141
  };
216
142
  const unmarshalSetAclRulesResponse = (data) => {
217
- if (!isJSONObject(data)) {
218
- throw new TypeError(
219
- `Unmarshalling the type 'SetAclRulesResponse' failed as data isn't a dictionary.`
220
- );
221
- }
222
- return {
223
- aclRules: unmarshalArrayOfObject(data.acl_rules, unmarshalACLRule)
224
- };
143
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetAclRulesResponse' failed as data isn't a dictionary.`);
144
+ return { aclRules: unmarshalArrayOfObject(data.acl_rules, unmarshalACLRule) };
225
145
  };
226
146
  const unmarshalSetEndpointsResponse = (data) => {
227
- if (!isJSONObject(data)) {
228
- throw new TypeError(
229
- `Unmarshalling the type 'SetEndpointsResponse' failed as data isn't a dictionary.`
230
- );
231
- }
232
- return {
233
- endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint)
234
- };
147
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetEndpointsResponse' failed as data isn't a dictionary.`);
148
+ return { endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint) };
235
149
  };
236
- const marshalACLRuleSpec = (request, defaults) => ({
237
- description: request.description,
238
- ip_cidr: request.ipCidr
239
- });
240
- const marshalAddAclRulesRequest = (request, defaults) => ({
241
- acl_rules: request.aclRules.map((elt) => marshalACLRuleSpec(elt))
242
- });
243
- const marshalClusterSetting = (request, defaults) => ({
244
- name: request.name,
245
- value: request.value
150
+ var marshalACLRuleSpec = (request, defaults) => ({
151
+ description: request.description,
152
+ ip_cidr: request.ipCidr
246
153
  });
247
- const marshalAddClusterSettingsRequest = (request, defaults) => ({
248
- settings: request.settings.map((elt) => marshalClusterSetting(elt))
154
+ const marshalAddAclRulesRequest = (request, defaults) => ({ acl_rules: request.aclRules.map((elt) => marshalACLRuleSpec(elt, defaults)) });
155
+ var marshalClusterSetting = (request, defaults) => ({
156
+ name: request.name,
157
+ value: request.value
249
158
  });
250
- const marshalEndpointSpecPrivateNetworkSpecIpamConfig = (request, defaults) => ({});
251
- const marshalEndpointSpecPrivateNetworkSpec = (request, defaults) => ({
252
- id: request.id,
253
- ipam_config: request.ipamConfig !== void 0 ? marshalEndpointSpecPrivateNetworkSpecIpamConfig(
254
- request.ipamConfig
255
- ) : void 0,
256
- service_ips: request.serviceIps
257
- });
258
- const marshalEndpointSpecPublicNetworkSpec = (request, defaults) => ({});
259
- const marshalEndpointSpec = (request, defaults) => ({
260
- ...resolveOneOf([
261
- {
262
- param: "private_network",
263
- value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkSpec(
264
- request.privateNetwork
265
- ) : void 0
266
- },
267
- {
268
- param: "public_network",
269
- value: request.publicNetwork !== void 0 ? marshalEndpointSpecPublicNetworkSpec(
270
- request.publicNetwork
271
- ) : void 0
272
- }
273
- ])
274
- });
275
- const marshalAddEndpointsRequest = (request, defaults) => ({
276
- endpoints: request.endpoints.map((elt) => marshalEndpointSpec(elt))
159
+ const marshalAddClusterSettingsRequest = (request, defaults) => ({ settings: request.settings.map((elt) => marshalClusterSetting(elt, defaults)) });
160
+ var marshalEndpointSpecPrivateNetworkSpecIpamConfig = (request, defaults) => ({});
161
+ var marshalEndpointSpecPrivateNetworkSpec = (request, defaults) => ({
162
+ id: request.id,
163
+ ipam_config: request.ipamConfig !== void 0 ? marshalEndpointSpecPrivateNetworkSpecIpamConfig(request.ipamConfig, defaults) : void 0,
164
+ service_ips: request.serviceIps
277
165
  });
166
+ var marshalEndpointSpecPublicNetworkSpec = (request, defaults) => ({});
167
+ var marshalEndpointSpec = (request, defaults) => ({ ...resolveOneOf([{
168
+ param: "private_network",
169
+ value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkSpec(request.privateNetwork, defaults) : void 0
170
+ }, {
171
+ param: "public_network",
172
+ value: request.publicNetwork !== void 0 ? marshalEndpointSpecPublicNetworkSpec(request.publicNetwork, defaults) : void 0
173
+ }]) });
174
+ const marshalAddEndpointsRequest = (request, defaults) => ({ endpoints: request.endpoints.map((elt) => marshalEndpointSpec(elt, defaults)) });
278
175
  const marshalCreateClusterRequest = (request, defaults) => ({
279
- acl_rules: request.aclRules !== void 0 ? request.aclRules.map((elt) => marshalACLRuleSpec(elt)) : void 0,
280
- cluster_settings: request.clusterSettings !== void 0 ? request.clusterSettings.map((elt) => marshalClusterSetting(elt)) : void 0,
281
- cluster_size: request.clusterSize,
282
- endpoints: request.endpoints !== void 0 ? request.endpoints.map((elt) => marshalEndpointSpec(elt)) : void 0,
283
- name: request.name || randomName("ins"),
284
- node_type: request.nodeType,
285
- password: request.password,
286
- project_id: request.projectId ?? defaults.defaultProjectId,
287
- tags: request.tags,
288
- tls_enabled: request.tlsEnabled,
289
- user_name: request.userName,
290
- version: request.version
291
- });
292
- const marshalMigrateClusterRequest = (request, defaults) => ({
293
- ...resolveOneOf([
294
- { param: "version", value: request.version },
295
- { param: "node_type", value: request.nodeType },
296
- { param: "cluster_size", value: request.clusterSize }
297
- ])
298
- });
299
- const marshalSetAclRulesRequest = (request, defaults) => ({
300
- acl_rules: request.aclRules.map((elt) => marshalACLRuleSpec(elt))
301
- });
302
- const marshalSetClusterSettingsRequest = (request, defaults) => ({
303
- settings: request.settings.map((elt) => marshalClusterSetting(elt))
304
- });
305
- const marshalSetEndpointsRequest = (request, defaults) => ({
306
- endpoints: request.endpoints.map((elt) => marshalEndpointSpec(elt))
176
+ acl_rules: request.aclRules !== void 0 ? request.aclRules.map((elt) => marshalACLRuleSpec(elt, defaults)) : void 0,
177
+ cluster_settings: request.clusterSettings !== void 0 ? request.clusterSettings.map((elt) => marshalClusterSetting(elt, defaults)) : void 0,
178
+ cluster_size: request.clusterSize,
179
+ endpoints: request.endpoints !== void 0 ? request.endpoints.map((elt) => marshalEndpointSpec(elt, defaults)) : void 0,
180
+ name: request.name || randomName("ins"),
181
+ node_type: request.nodeType,
182
+ password: request.password,
183
+ project_id: request.projectId ?? defaults.defaultProjectId,
184
+ tags: request.tags,
185
+ tls_enabled: request.tlsEnabled,
186
+ user_name: request.userName,
187
+ version: request.version
307
188
  });
189
+ const marshalMigrateClusterRequest = (request, defaults) => ({ ...resolveOneOf([
190
+ {
191
+ param: "version",
192
+ value: request.version
193
+ },
194
+ {
195
+ param: "node_type",
196
+ value: request.nodeType
197
+ },
198
+ {
199
+ param: "cluster_size",
200
+ value: request.clusterSize
201
+ }
202
+ ]) });
203
+ const marshalSetAclRulesRequest = (request, defaults) => ({ acl_rules: request.aclRules.map((elt) => marshalACLRuleSpec(elt, defaults)) });
204
+ const marshalSetClusterSettingsRequest = (request, defaults) => ({ settings: request.settings.map((elt) => marshalClusterSetting(elt, defaults)) });
205
+ const marshalSetEndpointsRequest = (request, defaults) => ({ endpoints: request.endpoints.map((elt) => marshalEndpointSpec(elt, defaults)) });
308
206
  const marshalUpdateClusterRequest = (request, defaults) => ({
309
- name: request.name,
310
- password: request.password,
311
- tags: request.tags,
312
- user_name: request.userName
207
+ name: request.name,
208
+ password: request.password,
209
+ tags: request.tags,
210
+ user_name: request.userName
313
211
  });
314
- const marshalUpdateEndpointRequest = (request, defaults) => ({
315
- ...resolveOneOf([
316
- {
317
- param: "private_network",
318
- value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkSpec(
319
- request.privateNetwork
320
- ) : void 0
321
- },
322
- {
323
- param: "public_network",
324
- value: request.publicNetwork !== void 0 ? marshalEndpointSpecPublicNetworkSpec(
325
- request.publicNetwork
326
- ) : void 0
327
- }
328
- ])
329
- });
330
- export {
331
- marshalAddAclRulesRequest,
332
- marshalAddClusterSettingsRequest,
333
- marshalAddEndpointsRequest,
334
- marshalCreateClusterRequest,
335
- marshalMigrateClusterRequest,
336
- marshalSetAclRulesRequest,
337
- marshalSetClusterSettingsRequest,
338
- marshalSetEndpointsRequest,
339
- marshalUpdateClusterRequest,
340
- marshalUpdateEndpointRequest,
341
- unmarshalACLRule,
342
- unmarshalAddAclRulesResponse,
343
- unmarshalAddEndpointsResponse,
344
- unmarshalCluster,
345
- unmarshalClusterMetricsResponse,
346
- unmarshalClusterSettingsResponse,
347
- unmarshalEndpoint,
348
- unmarshalListClusterVersionsResponse,
349
- unmarshalListClustersResponse,
350
- unmarshalListNodeTypesResponse,
351
- unmarshalSetAclRulesResponse,
352
- unmarshalSetEndpointsResponse
353
- };
212
+ const marshalUpdateEndpointRequest = (request, defaults) => ({ ...resolveOneOf([{
213
+ param: "private_network",
214
+ value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkSpec(request.privateNetwork, defaults) : void 0
215
+ }, {
216
+ param: "public_network",
217
+ value: request.publicNetwork !== void 0 ? marshalEndpointSpecPublicNetworkSpec(request.publicNetwork, defaults) : void 0
218
+ }]) });
219
+ export { marshalAddAclRulesRequest, marshalAddClusterSettingsRequest, marshalAddEndpointsRequest, marshalCreateClusterRequest, marshalMigrateClusterRequest, marshalSetAclRulesRequest, marshalSetClusterSettingsRequest, marshalSetEndpointsRequest, marshalUpdateClusterRequest, marshalUpdateEndpointRequest, unmarshalACLRule, unmarshalAddAclRulesResponse, unmarshalAddEndpointsResponse, unmarshalCluster, unmarshalClusterMetricsResponse, unmarshalClusterSettingsResponse, unmarshalEndpoint, unmarshalListClusterVersionsResponse, unmarshalListClustersResponse, unmarshalListNodeTypesResponse, unmarshalSetAclRulesResponse, unmarshalSetEndpointsResponse };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-redis",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Scaleway SDK redis",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -27,13 +27,13 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.1.0"
30
+ "@scaleway/sdk-std": "2.2.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "@scaleway/sdk-client": "^2.1.0"
33
+ "@scaleway/sdk-client": "^2.2.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.1.0"
36
+ "@scaleway/sdk-client": "^2.2.0"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",