@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.
- 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 -418
- package/dist/v1/content.gen.js +7 -8
- package/dist/v1/index.gen.d.ts +1 -1
- package/dist/v1/index.gen.js +29 -27
- package/dist/v1/marshalling.gen.js +187 -321
- 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.d.ts
CHANGED
|
@@ -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';
|
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,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
|
-
|
|
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
|
-
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
-
|
|
114
|
-
|
|
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
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
|
|
207
|
-
|
|
208
|
-
|
|
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
|
-
|
|
218
|
-
|
|
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
|
-
|
|
228
|
-
|
|
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
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
|
248
|
-
|
|
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
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
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
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
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
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
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
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
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.
|
|
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",
|