@scaleway/sdk-redis 2.2.1 → 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.
- package/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +2 -4
- package/dist/v1/api.gen.js +291 -411
- package/dist/v1/content.gen.js +7 -8
- package/dist/v1/index.gen.js +29 -27
- package/dist/v1/marshalling.gen.js +187 -314
- package/package.json +4 -4
package/dist/v1/content.gen.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
/** Lists transient statutes of the enum {@link ClusterStatus}. */
|
|
1
2
|
const CLUSTER_TRANSIENT_STATUSES = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
"provisioning",
|
|
4
|
+
"configuring",
|
|
5
|
+
"deleting",
|
|
6
|
+
"autohealing",
|
|
7
|
+
"initializing"
|
|
7
8
|
];
|
|
8
|
-
export {
|
|
9
|
-
CLUSTER_TRANSIENT_STATUSES
|
|
10
|
-
};
|
|
9
|
+
export { CLUSTER_TRANSIENT_STATUSES };
|
package/dist/v1/index.gen.js
CHANGED
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import {
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
-
|
|
111
|
-
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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
|
-
|
|
212
|
-
|
|
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
|
-
|
|
222
|
-
|
|
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
|
-
|
|
231
|
-
|
|
232
|
-
|
|
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
|
|
242
|
-
|
|
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
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
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
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
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
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
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
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
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.
|
|
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.
|
|
30
|
+
"@scaleway/sdk-std": "2.2.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@scaleway/sdk-client": "^2.
|
|
33
|
+
"@scaleway/sdk-client": "^2.2.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^2.
|
|
36
|
+
"@scaleway/sdk-client": "^2.2.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"package:check": "pnpm publint",
|