@scaleway/sdk-redis 2.2.1 → 2.3.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.
@@ -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,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,346 +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(data.cluster_settings, unmarshalClusterSetting),
70
- clusterSize: data.cluster_size,
71
- createdAt: unmarshalDate(data.created_at),
72
- endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
73
- id: data.id,
74
- name: data.name,
75
- nodeType: data.node_type,
76
- projectId: data.project_id,
77
- status: data.status,
78
- tags: data.tags,
79
- tlsEnabled: data.tls_enabled,
80
- updatedAt: unmarshalDate(data.updated_at),
81
- upgradableVersions: data.upgradable_versions,
82
- userName: data.user_name,
83
- version: data.version,
84
- zone: data.zone
85
- };
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
+ };
86
62
  };
87
63
  const unmarshalAddAclRulesResponse = (data) => {
88
- if (!isJSONObject(data)) {
89
- throw new TypeError(
90
- `Unmarshalling the type 'AddAclRulesResponse' failed as data isn't a dictionary.`
91
- );
92
- }
93
- return {
94
- aclRules: unmarshalArrayOfObject(data.acl_rules, unmarshalACLRule),
95
- totalCount: data.total_count
96
- };
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
+ };
97
69
  };
98
70
  const unmarshalAddEndpointsResponse = (data) => {
99
- if (!isJSONObject(data)) {
100
- throw new TypeError(
101
- `Unmarshalling the type 'AddEndpointsResponse' failed as data isn't a dictionary.`
102
- );
103
- }
104
- return {
105
- endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
106
- totalCount: data.total_count
107
- };
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
+ };
108
76
  };
109
77
  const unmarshalClusterMetricsResponse = (data) => {
110
- if (!isJSONObject(data)) {
111
- throw new TypeError(
112
- `Unmarshalling the type 'ClusterMetricsResponse' failed as data isn't a dictionary.`
113
- );
114
- }
115
- return {
116
- timeseries: unmarshalArrayOfObject(data.timeseries, unmarshalTimeSeries)
117
- };
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) };
118
80
  };
119
81
  const unmarshalClusterSettingsResponse = (data) => {
120
- if (!isJSONObject(data)) {
121
- throw new TypeError(
122
- `Unmarshalling the type 'ClusterSettingsResponse' failed as data isn't a dictionary.`
123
- );
124
- }
125
- return {
126
- settings: unmarshalArrayOfObject(data.settings, unmarshalClusterSetting)
127
- };
128
- };
129
- const unmarshalAvailableClusterSetting = (data) => {
130
- if (!isJSONObject(data)) {
131
- throw new TypeError(
132
- `Unmarshalling the type 'AvailableClusterSetting' failed as data isn't a dictionary.`
133
- );
134
- }
135
- return {
136
- defaultValue: data.default_value,
137
- deprecated: data.deprecated,
138
- description: data.description,
139
- maxValue: data.max_value,
140
- minValue: data.min_value,
141
- name: data.name,
142
- regex: data.regex,
143
- type: data.type
144
- };
145
- };
146
- const unmarshalClusterVersion = (data) => {
147
- if (!isJSONObject(data)) {
148
- throw new TypeError(
149
- `Unmarshalling the type 'ClusterVersion' failed as data isn't a dictionary.`
150
- );
151
- }
152
- return {
153
- availableSettings: unmarshalArrayOfObject(data.available_settings, unmarshalAvailableClusterSetting),
154
- endOfLifeAt: unmarshalDate(data.end_of_life_at),
155
- logoUrl: data.logo_url,
156
- version: data.version,
157
- zone: data.zone
158
- };
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
+ };
159
107
  };
160
108
  const unmarshalListClusterVersionsResponse = (data) => {
161
- if (!isJSONObject(data)) {
162
- throw new TypeError(
163
- `Unmarshalling the type 'ListClusterVersionsResponse' failed as data isn't a dictionary.`
164
- );
165
- }
166
- return {
167
- totalCount: data.total_count,
168
- versions: unmarshalArrayOfObject(data.versions, unmarshalClusterVersion)
169
- };
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
+ };
170
114
  };
171
115
  const unmarshalListClustersResponse = (data) => {
172
- if (!isJSONObject(data)) {
173
- throw new TypeError(
174
- `Unmarshalling the type 'ListClustersResponse' failed as data isn't a dictionary.`
175
- );
176
- }
177
- return {
178
- clusters: unmarshalArrayOfObject(data.clusters, unmarshalCluster),
179
- totalCount: data.total_count
180
- };
181
- };
182
- const unmarshalNodeType = (data) => {
183
- if (!isJSONObject(data)) {
184
- throw new TypeError(
185
- `Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`
186
- );
187
- }
188
- return {
189
- beta: data.beta,
190
- description: data.description,
191
- disabled: data.disabled,
192
- memory: data.memory,
193
- name: data.name,
194
- stockStatus: data.stock_status,
195
- vcpus: data.vcpus,
196
- zone: data.zone
197
- };
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
+ };
198
134
  };
199
135
  const unmarshalListNodeTypesResponse = (data) => {
200
- if (!isJSONObject(data)) {
201
- throw new TypeError(
202
- `Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`
203
- );
204
- }
205
- return {
206
- nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
207
- totalCount: data.total_count
208
- };
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
+ };
209
141
  };
210
142
  const unmarshalSetAclRulesResponse = (data) => {
211
- if (!isJSONObject(data)) {
212
- throw new TypeError(
213
- `Unmarshalling the type 'SetAclRulesResponse' failed as data isn't a dictionary.`
214
- );
215
- }
216
- return {
217
- aclRules: unmarshalArrayOfObject(data.acl_rules, unmarshalACLRule)
218
- };
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) };
219
145
  };
220
146
  const unmarshalSetEndpointsResponse = (data) => {
221
- if (!isJSONObject(data)) {
222
- throw new TypeError(
223
- `Unmarshalling the type 'SetEndpointsResponse' failed as data isn't a dictionary.`
224
- );
225
- }
226
- return {
227
- endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint)
228
- };
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) };
229
149
  };
230
- const marshalACLRuleSpec = (request, defaults) => ({
231
- description: request.description,
232
- ip_cidr: request.ipCidr
233
- });
234
- const marshalAddAclRulesRequest = (request, defaults) => ({
235
- acl_rules: request.aclRules.map((elt) => marshalACLRuleSpec(elt))
236
- });
237
- const marshalClusterSetting = (request, defaults) => ({
238
- name: request.name,
239
- value: request.value
150
+ var marshalACLRuleSpec = (request, defaults) => ({
151
+ description: request.description,
152
+ ip_cidr: request.ipCidr
240
153
  });
241
- const marshalAddClusterSettingsRequest = (request, defaults) => ({
242
- 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
243
158
  });
244
- const marshalEndpointSpecPrivateNetworkSpecIpamConfig = (request, defaults) => ({});
245
- const marshalEndpointSpecPrivateNetworkSpec = (request, defaults) => ({
246
- id: request.id,
247
- ipam_config: request.ipamConfig !== void 0 ? marshalEndpointSpecPrivateNetworkSpecIpamConfig(request.ipamConfig) : void 0,
248
- service_ips: request.serviceIps
249
- });
250
- const marshalEndpointSpecPublicNetworkSpec = (request, defaults) => ({});
251
- const marshalEndpointSpec = (request, defaults) => ({
252
- ...resolveOneOf([
253
- {
254
- param: "private_network",
255
- value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkSpec(request.privateNetwork) : void 0
256
- },
257
- {
258
- param: "public_network",
259
- value: request.publicNetwork !== void 0 ? marshalEndpointSpecPublicNetworkSpec(request.publicNetwork) : void 0
260
- }
261
- ])
262
- });
263
- const marshalAddEndpointsRequest = (request, defaults) => ({
264
- 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
265
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)) });
266
175
  const marshalCreateClusterRequest = (request, defaults) => ({
267
- acl_rules: request.aclRules !== void 0 ? request.aclRules.map((elt) => marshalACLRuleSpec(elt)) : void 0,
268
- cluster_settings: request.clusterSettings !== void 0 ? request.clusterSettings.map((elt) => marshalClusterSetting(elt)) : void 0,
269
- cluster_size: request.clusterSize,
270
- endpoints: request.endpoints !== void 0 ? request.endpoints.map((elt) => marshalEndpointSpec(elt)) : void 0,
271
- name: request.name || randomName("ins"),
272
- node_type: request.nodeType,
273
- password: request.password,
274
- project_id: request.projectId ?? defaults.defaultProjectId,
275
- tags: request.tags,
276
- tls_enabled: request.tlsEnabled,
277
- user_name: request.userName,
278
- version: request.version
279
- });
280
- const marshalMigrateClusterRequest = (request, defaults) => ({
281
- ...resolveOneOf([
282
- {
283
- param: "version",
284
- value: request.version
285
- },
286
- {
287
- param: "node_type",
288
- value: request.nodeType
289
- },
290
- {
291
- param: "cluster_size",
292
- value: request.clusterSize
293
- }
294
- ])
295
- });
296
- const marshalSetAclRulesRequest = (request, defaults) => ({
297
- acl_rules: request.aclRules.map((elt) => marshalACLRuleSpec(elt))
298
- });
299
- const marshalSetClusterSettingsRequest = (request, defaults) => ({
300
- settings: request.settings.map((elt) => marshalClusterSetting(elt))
301
- });
302
- const marshalSetEndpointsRequest = (request, defaults) => ({
303
- 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
304
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)) });
305
206
  const marshalUpdateClusterRequest = (request, defaults) => ({
306
- name: request.name,
307
- password: request.password,
308
- tags: request.tags,
309
- user_name: request.userName
207
+ name: request.name,
208
+ password: request.password,
209
+ tags: request.tags,
210
+ user_name: request.userName
310
211
  });
311
- const marshalUpdateEndpointRequest = (request, defaults) => ({
312
- ...resolveOneOf([
313
- {
314
- param: "private_network",
315
- value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkSpec(request.privateNetwork) : void 0
316
- },
317
- {
318
- param: "public_network",
319
- value: request.publicNetwork !== void 0 ? marshalEndpointSpecPublicNetworkSpec(request.publicNetwork) : void 0
320
- }
321
- ])
322
- });
323
- export {
324
- marshalAddAclRulesRequest,
325
- marshalAddClusterSettingsRequest,
326
- marshalAddEndpointsRequest,
327
- marshalCreateClusterRequest,
328
- marshalMigrateClusterRequest,
329
- marshalSetAclRulesRequest,
330
- marshalSetClusterSettingsRequest,
331
- marshalSetEndpointsRequest,
332
- marshalUpdateClusterRequest,
333
- marshalUpdateEndpointRequest,
334
- unmarshalACLRule,
335
- unmarshalAddAclRulesResponse,
336
- unmarshalAddEndpointsResponse,
337
- unmarshalCluster,
338
- unmarshalClusterMetricsResponse,
339
- unmarshalClusterSettingsResponse,
340
- unmarshalEndpoint,
341
- unmarshalListClusterVersionsResponse,
342
- unmarshalListClustersResponse,
343
- unmarshalListNodeTypesResponse,
344
- unmarshalSetAclRulesResponse,
345
- unmarshalSetEndpointsResponse
346
- };
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.1",
3
+ "version": "2.3.1",
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.1"
30
+ "@scaleway/sdk-std": "2.2.1"
31
31
  },
32
32
  "peerDependencies": {
33
- "@scaleway/sdk-client": "^2.1.0"
33
+ "@scaleway/sdk-client": "^2.2.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.1.0"
36
+ "@scaleway/sdk-client": "^2.2.1"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",