@scaleway/sdk-rdb 2.6.0 → 2.7.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/dist/.vite/license.md +3 -0
- package/dist/metadata.gen.d.ts +6 -6
- package/dist/metadata.gen.js +6 -2
- package/dist/v1/api.gen.d.ts +5 -5
- package/dist/v1/api.gen.js +334 -713
- package/dist/v1/content.gen.js +6 -6
- package/dist/v1/marshalling.gen.js +86 -86
- package/dist/v1/metadata.gen.js +1 -1
- package/dist/v1/validation-rules.gen.js +1 -1
- package/package.json +8 -6
- package/LICENSE +0 -191
- package/dist/metadata.gen.json +0 -6
- package/dist/metadata2.gen.js +0 -8
package/dist/v1/content.gen.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
//#region src/v1/content.gen.ts
|
|
2
2
|
/** Lists transient statutes of the enum {@link DatabaseBackupStatus}. */
|
|
3
|
-
|
|
3
|
+
const DATABASE_BACKUP_TRANSIENT_STATUSES = [
|
|
4
4
|
"creating",
|
|
5
5
|
"restoring",
|
|
6
6
|
"deleting",
|
|
7
7
|
"exporting"
|
|
8
8
|
];
|
|
9
9
|
/** Lists transient statutes of the enum {@link InstanceLogStatus}. */
|
|
10
|
-
|
|
10
|
+
const INSTANCE_LOG_TRANSIENT_STATUSES = ["creating"];
|
|
11
11
|
/** Lists transient statutes of the enum {@link InstanceStatus}. */
|
|
12
|
-
|
|
12
|
+
const INSTANCE_TRANSIENT_STATUSES = [
|
|
13
13
|
"provisioning",
|
|
14
14
|
"configuring",
|
|
15
15
|
"deleting",
|
|
@@ -20,9 +20,9 @@ var INSTANCE_TRANSIENT_STATUSES = [
|
|
|
20
20
|
"restarting"
|
|
21
21
|
];
|
|
22
22
|
/** Lists transient statutes of the enum {@link MaintenanceStatus}. */
|
|
23
|
-
|
|
23
|
+
const MAINTENANCE_TRANSIENT_STATUSES = ["ongoing"];
|
|
24
24
|
/** Lists transient statutes of the enum {@link ReadReplicaStatus}. */
|
|
25
|
-
|
|
25
|
+
const READ_REPLICA_TRANSIENT_STATUSES = [
|
|
26
26
|
"provisioning",
|
|
27
27
|
"initializing",
|
|
28
28
|
"deleting",
|
|
@@ -30,7 +30,7 @@ var READ_REPLICA_TRANSIENT_STATUSES = [
|
|
|
30
30
|
"promoting"
|
|
31
31
|
];
|
|
32
32
|
/** Lists transient statutes of the enum {@link SnapshotStatus}. */
|
|
33
|
-
|
|
33
|
+
const SNAPSHOT_TRANSIENT_STATUSES = [
|
|
34
34
|
"creating",
|
|
35
35
|
"restoring",
|
|
36
36
|
"deleting"
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalTimeSeries } from "@scaleway/sdk-client";
|
|
2
2
|
import randomName from "@scaleway/random-name";
|
|
3
3
|
//#region src/v1/marshalling.gen.ts
|
|
4
|
-
|
|
4
|
+
const unmarshalEndpointDirectAccessDetails = (data) => {
|
|
5
5
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointDirectAccessDetails' failed as data isn't a dictionary.`);
|
|
6
6
|
return {};
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
const unmarshalEndpointLoadBalancerDetails = (data) => {
|
|
9
9
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointLoadBalancerDetails' failed as data isn't a dictionary.`);
|
|
10
10
|
return {};
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
const unmarshalEndpointPrivateNetworkDetails = (data) => {
|
|
13
13
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary.`);
|
|
14
14
|
return {
|
|
15
15
|
privateNetworkId: data.private_network_id,
|
|
@@ -18,7 +18,7 @@ var unmarshalEndpointPrivateNetworkDetails = (data) => {
|
|
|
18
18
|
zone: data.zone
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
const unmarshalEndpoint = (data) => {
|
|
22
22
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`);
|
|
23
23
|
return {
|
|
24
24
|
directAccess: data.direct_access ? unmarshalEndpointDirectAccessDetails(data.direct_access) : void 0,
|
|
@@ -31,7 +31,7 @@ var unmarshalEndpoint = (data) => {
|
|
|
31
31
|
privateNetwork: data.private_network ? unmarshalEndpointPrivateNetworkDetails(data.private_network) : void 0
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
-
|
|
34
|
+
const unmarshalMaintenance = (data) => {
|
|
35
35
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Maintenance' failed as data isn't a dictionary.`);
|
|
36
36
|
return {
|
|
37
37
|
closedAt: unmarshalDate(data.closed_at),
|
|
@@ -43,7 +43,7 @@ var unmarshalMaintenance = (data) => {
|
|
|
43
43
|
stopsAt: unmarshalDate(data.stops_at)
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
|
|
46
|
+
const unmarshalReadReplica = (data) => {
|
|
47
47
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ReadReplica' failed as data isn't a dictionary.`);
|
|
48
48
|
return {
|
|
49
49
|
endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
|
|
@@ -54,7 +54,7 @@ var unmarshalReadReplica = (data) => {
|
|
|
54
54
|
status: data.status
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
const unmarshalDatabaseBackup = (data) => {
|
|
58
58
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DatabaseBackup' failed as data isn't a dictionary.`);
|
|
59
59
|
return {
|
|
60
60
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -73,7 +73,7 @@ var unmarshalDatabaseBackup = (data) => {
|
|
|
73
73
|
updatedAt: unmarshalDate(data.updated_at)
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
|
-
|
|
76
|
+
const unmarshalDatabase = (data) => {
|
|
77
77
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Database' failed as data isn't a dictionary.`);
|
|
78
78
|
return {
|
|
79
79
|
managed: data.managed,
|
|
@@ -82,7 +82,7 @@ var unmarshalDatabase = (data) => {
|
|
|
82
82
|
size: data.size
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
|
-
|
|
85
|
+
const unmarshalInstanceLog = (data) => {
|
|
86
86
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstanceLog' failed as data isn't a dictionary.`);
|
|
87
87
|
return {
|
|
88
88
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -94,7 +94,7 @@ var unmarshalInstanceLog = (data) => {
|
|
|
94
94
|
status: data.status
|
|
95
95
|
};
|
|
96
96
|
};
|
|
97
|
-
|
|
97
|
+
const unmarshalBackupSchedule = (data) => {
|
|
98
98
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BackupSchedule' failed as data isn't a dictionary.`);
|
|
99
99
|
return {
|
|
100
100
|
disabled: data.disabled,
|
|
@@ -103,25 +103,25 @@ var unmarshalBackupSchedule = (data) => {
|
|
|
103
103
|
retention: data.retention
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
|
-
|
|
106
|
+
const unmarshalEncryptionAtRest = (data) => {
|
|
107
107
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EncryptionAtRest' failed as data isn't a dictionary.`);
|
|
108
108
|
return { enabled: data.enabled };
|
|
109
109
|
};
|
|
110
|
-
|
|
110
|
+
const unmarshalInstanceSetting = (data) => {
|
|
111
111
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstanceSetting' failed as data isn't a dictionary.`);
|
|
112
112
|
return {
|
|
113
113
|
name: data.name,
|
|
114
114
|
value: data.value
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
|
-
|
|
117
|
+
const unmarshalLogsPolicy = (data) => {
|
|
118
118
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'LogsPolicy' failed as data isn't a dictionary.`);
|
|
119
119
|
return {
|
|
120
120
|
maxAgeRetention: data.max_age_retention,
|
|
121
121
|
totalDiskRetention: data.total_disk_retention
|
|
122
122
|
};
|
|
123
123
|
};
|
|
124
|
-
|
|
124
|
+
const unmarshalUpgradableVersion = (data) => {
|
|
125
125
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'UpgradableVersion' failed as data isn't a dictionary.`);
|
|
126
126
|
return {
|
|
127
127
|
id: data.id,
|
|
@@ -130,7 +130,7 @@ var unmarshalUpgradableVersion = (data) => {
|
|
|
130
130
|
version: data.version
|
|
131
131
|
};
|
|
132
132
|
};
|
|
133
|
-
|
|
133
|
+
const unmarshalVolume = (data) => {
|
|
134
134
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
|
|
135
135
|
return {
|
|
136
136
|
class: data.class,
|
|
@@ -138,7 +138,7 @@ var unmarshalVolume = (data) => {
|
|
|
138
138
|
type: data.type
|
|
139
139
|
};
|
|
140
140
|
};
|
|
141
|
-
|
|
141
|
+
const unmarshalInstance = (data) => {
|
|
142
142
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Instance' failed as data isn't a dictionary.`);
|
|
143
143
|
return {
|
|
144
144
|
backupSameRegion: data.backup_same_region,
|
|
@@ -166,7 +166,7 @@ var unmarshalInstance = (data) => {
|
|
|
166
166
|
volume: data.volume ? unmarshalVolume(data.volume) : void 0
|
|
167
167
|
};
|
|
168
168
|
};
|
|
169
|
-
|
|
169
|
+
const unmarshalPrivilege = (data) => {
|
|
170
170
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Privilege' failed as data isn't a dictionary.`);
|
|
171
171
|
return {
|
|
172
172
|
databaseName: data.database_name,
|
|
@@ -174,14 +174,14 @@ var unmarshalPrivilege = (data) => {
|
|
|
174
174
|
userName: data.user_name
|
|
175
175
|
};
|
|
176
176
|
};
|
|
177
|
-
|
|
177
|
+
const unmarshalSnapshotVolumeType = (data) => {
|
|
178
178
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SnapshotVolumeType' failed as data isn't a dictionary.`);
|
|
179
179
|
return {
|
|
180
180
|
class: data.class,
|
|
181
181
|
type: data.type
|
|
182
182
|
};
|
|
183
183
|
};
|
|
184
|
-
|
|
184
|
+
const unmarshalSnapshot = (data) => {
|
|
185
185
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Snapshot' failed as data isn't a dictionary.`);
|
|
186
186
|
return {
|
|
187
187
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -198,14 +198,14 @@ var unmarshalSnapshot = (data) => {
|
|
|
198
198
|
volumeType: data.volume_type ? unmarshalSnapshotVolumeType(data.volume_type) : void 0
|
|
199
199
|
};
|
|
200
200
|
};
|
|
201
|
-
|
|
201
|
+
const unmarshalUser = (data) => {
|
|
202
202
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'User' failed as data isn't a dictionary.`);
|
|
203
203
|
return {
|
|
204
204
|
isAdmin: data.is_admin,
|
|
205
205
|
name: data.name
|
|
206
206
|
};
|
|
207
207
|
};
|
|
208
|
-
|
|
208
|
+
const unmarshalACLRule = (data) => {
|
|
209
209
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ACLRule' failed as data isn't a dictionary.`);
|
|
210
210
|
return {
|
|
211
211
|
action: data.action,
|
|
@@ -216,34 +216,34 @@ var unmarshalACLRule = (data) => {
|
|
|
216
216
|
protocol: data.protocol
|
|
217
217
|
};
|
|
218
218
|
};
|
|
219
|
-
|
|
219
|
+
const unmarshalAddInstanceACLRulesResponse = (data) => {
|
|
220
220
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddInstanceACLRulesResponse' failed as data isn't a dictionary.`);
|
|
221
221
|
return { rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule) };
|
|
222
222
|
};
|
|
223
|
-
|
|
223
|
+
const unmarshalAddInstanceSettingsResponse = (data) => {
|
|
224
224
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddInstanceSettingsResponse' failed as data isn't a dictionary.`);
|
|
225
225
|
return { settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting) };
|
|
226
226
|
};
|
|
227
|
-
|
|
227
|
+
const unmarshalDeleteInstanceACLRulesResponse = (data) => {
|
|
228
228
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DeleteInstanceACLRulesResponse' failed as data isn't a dictionary.`);
|
|
229
229
|
return { rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule) };
|
|
230
230
|
};
|
|
231
|
-
|
|
231
|
+
const unmarshalDeleteInstanceSettingsResponse = (data) => {
|
|
232
232
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DeleteInstanceSettingsResponse' failed as data isn't a dictionary.`);
|
|
233
233
|
return { settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting) };
|
|
234
234
|
};
|
|
235
|
-
|
|
235
|
+
const unmarshalInstanceMetrics = (data) => {
|
|
236
236
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstanceMetrics' failed as data isn't a dictionary.`);
|
|
237
237
|
return { timeseries: unmarshalArrayOfObject(data.timeseries, unmarshalTimeSeries) };
|
|
238
238
|
};
|
|
239
|
-
|
|
239
|
+
const unmarshalListDatabaseBackupsResponse = (data) => {
|
|
240
240
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDatabaseBackupsResponse' failed as data isn't a dictionary.`);
|
|
241
241
|
return {
|
|
242
242
|
databaseBackups: unmarshalArrayOfObject(data.database_backups, unmarshalDatabaseBackup),
|
|
243
243
|
totalCount: data.total_count
|
|
244
244
|
};
|
|
245
245
|
};
|
|
246
|
-
|
|
246
|
+
const unmarshalEngineSetting = (data) => {
|
|
247
247
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EngineSetting' failed as data isn't a dictionary.`);
|
|
248
248
|
return {
|
|
249
249
|
defaultValue: data.default_value,
|
|
@@ -259,7 +259,7 @@ var unmarshalEngineSetting = (data) => {
|
|
|
259
259
|
unit: data.unit
|
|
260
260
|
};
|
|
261
261
|
};
|
|
262
|
-
|
|
262
|
+
const unmarshalEngineVersion = (data) => {
|
|
263
263
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EngineVersion' failed as data isn't a dictionary.`);
|
|
264
264
|
return {
|
|
265
265
|
availableInitSettings: unmarshalArrayOfObject(data.available_init_settings, unmarshalEngineSetting),
|
|
@@ -271,7 +271,7 @@ var unmarshalEngineVersion = (data) => {
|
|
|
271
271
|
version: data.version
|
|
272
272
|
};
|
|
273
273
|
};
|
|
274
|
-
|
|
274
|
+
const unmarshalDatabaseEngine = (data) => {
|
|
275
275
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DatabaseEngine' failed as data isn't a dictionary.`);
|
|
276
276
|
return {
|
|
277
277
|
logoUrl: data.logo_url,
|
|
@@ -280,57 +280,57 @@ var unmarshalDatabaseEngine = (data) => {
|
|
|
280
280
|
versions: unmarshalArrayOfObject(data.versions, unmarshalEngineVersion)
|
|
281
281
|
};
|
|
282
282
|
};
|
|
283
|
-
|
|
283
|
+
const unmarshalListDatabaseEnginesResponse = (data) => {
|
|
284
284
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDatabaseEnginesResponse' failed as data isn't a dictionary.`);
|
|
285
285
|
return {
|
|
286
286
|
engines: unmarshalArrayOfObject(data.engines, unmarshalDatabaseEngine),
|
|
287
287
|
totalCount: data.total_count
|
|
288
288
|
};
|
|
289
289
|
};
|
|
290
|
-
|
|
290
|
+
const unmarshalListDatabasesResponse = (data) => {
|
|
291
291
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary.`);
|
|
292
292
|
return {
|
|
293
293
|
databases: unmarshalArrayOfObject(data.databases, unmarshalDatabase),
|
|
294
294
|
totalCount: data.total_count
|
|
295
295
|
};
|
|
296
296
|
};
|
|
297
|
-
|
|
297
|
+
const unmarshalListInstanceACLRulesResponse = (data) => {
|
|
298
298
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstanceACLRulesResponse' failed as data isn't a dictionary.`);
|
|
299
299
|
return {
|
|
300
300
|
rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule),
|
|
301
301
|
totalCount: data.total_count
|
|
302
302
|
};
|
|
303
303
|
};
|
|
304
|
-
|
|
304
|
+
const unmarshalListInstanceLogsDetailsResponseInstanceLogDetail = (data) => {
|
|
305
305
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstanceLogsDetailsResponseInstanceLogDetail' failed as data isn't a dictionary.`);
|
|
306
306
|
return {
|
|
307
307
|
logName: data.log_name,
|
|
308
308
|
size: data.size
|
|
309
309
|
};
|
|
310
310
|
};
|
|
311
|
-
|
|
311
|
+
const unmarshalListInstanceLogsDetailsResponse = (data) => {
|
|
312
312
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstanceLogsDetailsResponse' failed as data isn't a dictionary.`);
|
|
313
313
|
return { details: unmarshalArrayOfObject(data.details, unmarshalListInstanceLogsDetailsResponseInstanceLogDetail) };
|
|
314
314
|
};
|
|
315
|
-
|
|
315
|
+
const unmarshalListInstanceLogsResponse = (data) => {
|
|
316
316
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstanceLogsResponse' failed as data isn't a dictionary.`);
|
|
317
317
|
return { instanceLogs: unmarshalArrayOfObject(data.instance_logs, unmarshalInstanceLog) };
|
|
318
318
|
};
|
|
319
|
-
|
|
319
|
+
const unmarshalListInstancesResponse = (data) => {
|
|
320
320
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstancesResponse' failed as data isn't a dictionary.`);
|
|
321
321
|
return {
|
|
322
322
|
instances: unmarshalArrayOfObject(data.instances, unmarshalInstance),
|
|
323
323
|
totalCount: data.total_count
|
|
324
324
|
};
|
|
325
325
|
};
|
|
326
|
-
|
|
326
|
+
const unmarshalNodeTypeVolumeConstraintSizes = (data) => {
|
|
327
327
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NodeTypeVolumeConstraintSizes' failed as data isn't a dictionary.`);
|
|
328
328
|
return {
|
|
329
329
|
maxSize: data.max_size,
|
|
330
330
|
minSize: data.min_size
|
|
331
331
|
};
|
|
332
332
|
};
|
|
333
|
-
|
|
333
|
+
const unmarshalNodeTypeVolumeType = (data) => {
|
|
334
334
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NodeTypeVolumeType' failed as data isn't a dictionary.`);
|
|
335
335
|
return {
|
|
336
336
|
chunkSize: data.chunk_size,
|
|
@@ -341,7 +341,7 @@ var unmarshalNodeTypeVolumeType = (data) => {
|
|
|
341
341
|
type: data.type
|
|
342
342
|
};
|
|
343
343
|
};
|
|
344
|
-
|
|
344
|
+
const unmarshalNodeType = (data) => {
|
|
345
345
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`);
|
|
346
346
|
return {
|
|
347
347
|
availableVolumeTypes: unmarshalArrayOfObject(data.available_volume_types, unmarshalNodeTypeVolumeType),
|
|
@@ -360,70 +360,70 @@ var unmarshalNodeType = (data) => {
|
|
|
360
360
|
volumeConstraint: data.volume_constraint ? unmarshalNodeTypeVolumeConstraintSizes(data.volume_constraint) : void 0
|
|
361
361
|
};
|
|
362
362
|
};
|
|
363
|
-
|
|
363
|
+
const unmarshalListNodeTypesResponse = (data) => {
|
|
364
364
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`);
|
|
365
365
|
return {
|
|
366
366
|
nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
|
|
367
367
|
totalCount: data.total_count
|
|
368
368
|
};
|
|
369
369
|
};
|
|
370
|
-
|
|
370
|
+
const unmarshalListPrivilegesResponse = (data) => {
|
|
371
371
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPrivilegesResponse' failed as data isn't a dictionary.`);
|
|
372
372
|
return {
|
|
373
373
|
privileges: unmarshalArrayOfObject(data.privileges, unmarshalPrivilege),
|
|
374
374
|
totalCount: data.total_count
|
|
375
375
|
};
|
|
376
376
|
};
|
|
377
|
-
|
|
377
|
+
const unmarshalListSnapshotsResponse = (data) => {
|
|
378
378
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary.`);
|
|
379
379
|
return {
|
|
380
380
|
snapshots: unmarshalArrayOfObject(data.snapshots, unmarshalSnapshot),
|
|
381
381
|
totalCount: data.total_count
|
|
382
382
|
};
|
|
383
383
|
};
|
|
384
|
-
|
|
384
|
+
const unmarshalListUsersResponse = (data) => {
|
|
385
385
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`);
|
|
386
386
|
return {
|
|
387
387
|
totalCount: data.total_count,
|
|
388
388
|
users: unmarshalArrayOfObject(data.users, unmarshalUser)
|
|
389
389
|
};
|
|
390
390
|
};
|
|
391
|
-
|
|
391
|
+
const unmarshalPrepareInstanceLogsResponse = (data) => {
|
|
392
392
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PrepareInstanceLogsResponse' failed as data isn't a dictionary.`);
|
|
393
393
|
return { instanceLogs: unmarshalArrayOfObject(data.instance_logs, unmarshalInstanceLog) };
|
|
394
394
|
};
|
|
395
|
-
|
|
395
|
+
const unmarshalSetInstanceACLRulesResponse = (data) => {
|
|
396
396
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetInstanceACLRulesResponse' failed as data isn't a dictionary.`);
|
|
397
397
|
return { rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule) };
|
|
398
398
|
};
|
|
399
|
-
|
|
399
|
+
const unmarshalSetInstanceSettingsResponse = (data) => {
|
|
400
400
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetInstanceSettingsResponse' failed as data isn't a dictionary.`);
|
|
401
401
|
return { settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting) };
|
|
402
402
|
};
|
|
403
|
-
|
|
403
|
+
const marshalACLRuleRequest = (request, defaults) => ({
|
|
404
404
|
description: request.description,
|
|
405
405
|
ip: request.ip
|
|
406
406
|
});
|
|
407
|
-
|
|
408
|
-
|
|
407
|
+
const marshalAddInstanceACLRulesRequest = (request, defaults) => ({ rules: request.rules.map((elt) => marshalACLRuleRequest(elt, defaults)) });
|
|
408
|
+
const marshalInstanceSetting = (request, defaults) => ({
|
|
409
409
|
name: request.name,
|
|
410
410
|
value: request.value
|
|
411
411
|
});
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
const marshalAddInstanceSettingsRequest = (request, defaults) => ({ settings: request.settings.map((elt) => marshalInstanceSetting(elt, defaults)) });
|
|
413
|
+
const marshalCloneInstanceRequest = (request, defaults) => ({
|
|
414
414
|
name: request.name,
|
|
415
415
|
node_type: request.nodeType
|
|
416
416
|
});
|
|
417
|
-
|
|
417
|
+
const marshalCreateDatabaseBackupRequest = (request, defaults) => ({
|
|
418
418
|
database_name: request.databaseName,
|
|
419
419
|
expires_at: request.expiresAt,
|
|
420
420
|
instance_id: request.instanceId,
|
|
421
421
|
name: request.name || randomName("bkp")
|
|
422
422
|
});
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
423
|
+
const marshalCreateDatabaseRequest = (request, defaults) => ({ name: request.name });
|
|
424
|
+
const marshalEndpointSpecPrivateNetworkIpamConfig = (request, defaults) => ({});
|
|
425
|
+
const marshalEndpointSpecLoadBalancer = (request, defaults) => ({});
|
|
426
|
+
const marshalEndpointSpecPrivateNetwork = (request, defaults) => ({
|
|
427
427
|
private_network_id: request.privateNetworkId,
|
|
428
428
|
...resolveOneOf([{
|
|
429
429
|
param: "service_ip",
|
|
@@ -433,21 +433,21 @@ var marshalEndpointSpecPrivateNetwork = (request, defaults) => ({
|
|
|
433
433
|
value: request.ipamConfig !== void 0 ? marshalEndpointSpecPrivateNetworkIpamConfig(request.ipamConfig, defaults) : void 0
|
|
434
434
|
}])
|
|
435
435
|
});
|
|
436
|
-
|
|
436
|
+
const marshalEndpointSpec = (request, defaults) => ({ ...resolveOneOf([{
|
|
437
437
|
param: "load_balancer",
|
|
438
438
|
value: request.loadBalancer !== void 0 ? marshalEndpointSpecLoadBalancer(request.loadBalancer, defaults) : void 0
|
|
439
439
|
}, {
|
|
440
440
|
param: "private_network",
|
|
441
441
|
value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetwork(request.privateNetwork, defaults) : void 0
|
|
442
442
|
}]) });
|
|
443
|
-
|
|
444
|
-
|
|
443
|
+
const marshalCreateEndpointRequest = (request, defaults) => ({ endpoint_spec: request.endpointSpec !== void 0 ? marshalEndpointSpec(request.endpointSpec, defaults) : void 0 });
|
|
444
|
+
const marshalCreateInstanceFromSnapshotRequest = (request, defaults) => ({
|
|
445
445
|
instance_name: request.instanceName,
|
|
446
446
|
is_ha_cluster: request.isHaCluster,
|
|
447
447
|
node_type: request.nodeType
|
|
448
448
|
});
|
|
449
|
-
|
|
450
|
-
|
|
449
|
+
const marshalEncryptionAtRest = (request, defaults) => ({ enabled: request.enabled });
|
|
450
|
+
const marshalCreateInstanceRequest = (request, defaults) => ({
|
|
451
451
|
backup_same_region: request.backupSameRegion,
|
|
452
452
|
disable_backup: request.disableBackup,
|
|
453
453
|
encryption: request.encryption !== void 0 ? marshalEncryptionAtRest(request.encryption, defaults) : void 0,
|
|
@@ -472,9 +472,9 @@ var marshalCreateInstanceRequest = (request, defaults) => ({
|
|
|
472
472
|
value: request.organizationId
|
|
473
473
|
}])
|
|
474
474
|
});
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
475
|
+
const marshalReadReplicaEndpointSpecPrivateNetworkIpamConfig = (request, defaults) => ({});
|
|
476
|
+
const marshalReadReplicaEndpointSpecDirectAccess = (request, defaults) => ({});
|
|
477
|
+
const marshalReadReplicaEndpointSpecPrivateNetwork = (request, defaults) => ({
|
|
478
478
|
private_network_id: request.privateNetworkId,
|
|
479
479
|
...resolveOneOf([{
|
|
480
480
|
param: "service_ip",
|
|
@@ -484,56 +484,56 @@ var marshalReadReplicaEndpointSpecPrivateNetwork = (request, defaults) => ({
|
|
|
484
484
|
value: request.ipamConfig !== void 0 ? marshalReadReplicaEndpointSpecPrivateNetworkIpamConfig(request.ipamConfig, defaults) : void 0
|
|
485
485
|
}])
|
|
486
486
|
});
|
|
487
|
-
|
|
487
|
+
const marshalReadReplicaEndpointSpec = (request, defaults) => ({ ...resolveOneOf([{
|
|
488
488
|
param: "direct_access",
|
|
489
489
|
value: request.directAccess !== void 0 ? marshalReadReplicaEndpointSpecDirectAccess(request.directAccess, defaults) : void 0
|
|
490
490
|
}, {
|
|
491
491
|
param: "private_network",
|
|
492
492
|
value: request.privateNetwork !== void 0 ? marshalReadReplicaEndpointSpecPrivateNetwork(request.privateNetwork, defaults) : void 0
|
|
493
493
|
}]) });
|
|
494
|
-
|
|
495
|
-
|
|
494
|
+
const marshalCreateReadReplicaEndpointRequest = (request, defaults) => ({ endpoint_spec: request.endpointSpec.map((elt) => marshalReadReplicaEndpointSpec(elt, defaults)) });
|
|
495
|
+
const marshalCreateReadReplicaRequest = (request, defaults) => ({
|
|
496
496
|
endpoint_spec: request.endpointSpec !== void 0 ? request.endpointSpec.map((elt) => marshalReadReplicaEndpointSpec(elt, defaults)) : void 0,
|
|
497
497
|
instance_id: request.instanceId,
|
|
498
498
|
same_zone: request.sameZone
|
|
499
499
|
});
|
|
500
|
-
|
|
500
|
+
const marshalCreateSnapshotRequest = (request, defaults) => ({
|
|
501
501
|
expires_at: request.expiresAt,
|
|
502
502
|
name: request.name || randomName("snp")
|
|
503
503
|
});
|
|
504
|
-
|
|
504
|
+
const marshalCreateUserRequest = (request, defaults) => ({
|
|
505
505
|
is_admin: request.isAdmin,
|
|
506
506
|
name: request.name,
|
|
507
507
|
password: request.password
|
|
508
508
|
});
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
509
|
+
const marshalDeleteInstanceACLRulesRequest = (request, defaults) => ({ acl_rule_ips: request.aclRuleIps });
|
|
510
|
+
const marshalDeleteInstanceSettingsRequest = (request, defaults) => ({ setting_names: request.settingNames });
|
|
511
|
+
const marshalMigrateEndpointRequest = (request, defaults) => ({ instance_id: request.instanceId });
|
|
512
|
+
const marshalPrepareInstanceLogsRequest = (request, defaults) => ({
|
|
513
513
|
end_date: request.endDate,
|
|
514
514
|
start_date: request.startDate
|
|
515
515
|
});
|
|
516
|
-
|
|
517
|
-
|
|
516
|
+
const marshalPurgeInstanceLogsRequest = (request, defaults) => ({ log_name: request.logName });
|
|
517
|
+
const marshalRestoreDatabaseBackupRequest = (request, defaults) => ({
|
|
518
518
|
database_name: request.databaseName,
|
|
519
519
|
instance_id: request.instanceId
|
|
520
520
|
});
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
521
|
+
const marshalSetInstanceACLRulesRequest = (request, defaults) => ({ rules: request.rules.map((elt) => marshalACLRuleRequest(elt, defaults)) });
|
|
522
|
+
const marshalSetInstanceSettingsRequest = (request, defaults) => ({ settings: request.settings.map((elt) => marshalInstanceSetting(elt, defaults)) });
|
|
523
|
+
const marshalSetPrivilegeRequest = (request, defaults) => ({
|
|
524
524
|
database_name: request.databaseName,
|
|
525
525
|
permission: request.permission,
|
|
526
526
|
user_name: request.userName
|
|
527
527
|
});
|
|
528
|
-
|
|
528
|
+
const marshalUpdateDatabaseBackupRequest = (request, defaults) => ({
|
|
529
529
|
expires_at: request.expiresAt,
|
|
530
530
|
name: request.name
|
|
531
531
|
});
|
|
532
|
-
|
|
532
|
+
const marshalLogsPolicy = (request, defaults) => ({
|
|
533
533
|
max_age_retention: request.maxAgeRetention,
|
|
534
534
|
total_disk_retention: request.totalDiskRetention
|
|
535
535
|
});
|
|
536
|
-
|
|
536
|
+
const marshalUpdateInstanceRequest = (request, defaults) => ({
|
|
537
537
|
backup_same_region: request.backupSameRegion,
|
|
538
538
|
backup_schedule_frequency: request.backupScheduleFrequency,
|
|
539
539
|
backup_schedule_retention: request.backupScheduleRetention,
|
|
@@ -543,19 +543,19 @@ var marshalUpdateInstanceRequest = (request, defaults) => ({
|
|
|
543
543
|
name: request.name,
|
|
544
544
|
tags: request.tags
|
|
545
545
|
});
|
|
546
|
-
|
|
546
|
+
const marshalUpdateSnapshotRequest = (request, defaults) => ({
|
|
547
547
|
expires_at: request.expiresAt,
|
|
548
548
|
name: request.name
|
|
549
549
|
});
|
|
550
|
-
|
|
550
|
+
const marshalUpdateUserRequest = (request, defaults) => ({
|
|
551
551
|
is_admin: request.isAdmin,
|
|
552
552
|
password: request.password
|
|
553
553
|
});
|
|
554
|
-
|
|
554
|
+
const marshalUpgradeInstanceRequestMajorUpgradeWorkflow = (request, defaults) => ({
|
|
555
555
|
upgradable_version_id: request.upgradableVersionId,
|
|
556
556
|
with_endpoints: request.withEndpoints
|
|
557
557
|
});
|
|
558
|
-
|
|
558
|
+
const marshalUpgradeInstanceRequest = (request, defaults) => ({ ...resolveOneOf([
|
|
559
559
|
{
|
|
560
560
|
param: "node_type",
|
|
561
561
|
value: request.nodeType
|
package/dist/v1/metadata.gen.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
//#region src/v1/validation-rules.gen.ts
|
|
3
3
|
var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({ UpdateInstanceRequest: () => UpdateInstanceRequest });
|
|
4
|
-
|
|
4
|
+
const UpdateInstanceRequest = { backupScheduleStartHour: { lessThanOrEqual: 23 } };
|
|
5
5
|
//#endregion
|
|
6
6
|
export { UpdateInstanceRequest, validation_rules_gen_exports };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-rdb",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Scaleway SDK rdb",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -35,18 +35,20 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@scaleway/random-name": "5.1.4",
|
|
38
|
-
"@scaleway/sdk-std": "2.
|
|
38
|
+
"@scaleway/sdk-std": "2.4.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@scaleway/sdk-client": "^2.
|
|
41
|
+
"@scaleway/sdk-client": "^2.3.0",
|
|
42
|
+
"@repo/configs": "^0.1.1"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
|
-
"@
|
|
45
|
+
"@repo/configs": "^0.1.1",
|
|
46
|
+
"@scaleway/sdk-client": "^2.3.0"
|
|
45
47
|
},
|
|
46
48
|
"scripts": {
|
|
47
49
|
"package:check": "pnpm publint",
|
|
48
|
-
"typecheck": "
|
|
49
|
-
"type:generate": "
|
|
50
|
+
"typecheck": "tsgo --noEmit",
|
|
51
|
+
"type:generate": "tsgo --declaration -p tsconfig.build.json",
|
|
50
52
|
"build": "vite build --config vite.config.ts && pnpm run type:generate",
|
|
51
53
|
"build:profile": "npx vite-bundle-visualizer -c vite.config.ts"
|
|
52
54
|
}
|