@scaleway/sdk-rdb 2.3.1 → 2.4.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.
- package/dist/_virtual/_rolldown/runtime.js +2 -0
- package/dist/v1/api.gen.js +5 -3
- package/dist/v1/content.gen.js +8 -6
- package/dist/v1/index.gen.js +3 -1
- package/dist/v1/marshalling.gen.js +59 -57
- package/dist/v1/types.gen.d.ts +5 -5
- package/dist/v1/types.gen.js +0 -0
- package/dist/v1/validation-rules.gen.js +4 -2
- package/package.json +5 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __exportAll = (all, no_symbols) => {
|
|
3
4
|
let target = {};
|
|
@@ -8,4 +9,5 @@ var __exportAll = (all, no_symbols) => {
|
|
|
8
9
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
9
10
|
return target;
|
|
10
11
|
};
|
|
12
|
+
//#endregion
|
|
11
13
|
export { __exportAll };
|
package/dist/v1/api.gen.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, READ_REPLICA_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
2
|
import { marshalAddInstanceACLRulesRequest, marshalAddInstanceSettingsRequest, marshalCloneInstanceRequest, marshalCreateDatabaseBackupRequest, marshalCreateDatabaseRequest, marshalCreateEndpointRequest, marshalCreateInstanceFromSnapshotRequest, marshalCreateInstanceRequest, marshalCreateReadReplicaEndpointRequest, marshalCreateReadReplicaRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalDeleteInstanceACLRulesRequest, marshalDeleteInstanceSettingsRequest, marshalMigrateEndpointRequest, marshalPrepareInstanceLogsRequest, marshalPurgeInstanceLogsRequest, marshalRestoreDatabaseBackupRequest, marshalSetInstanceACLRulesRequest, marshalSetInstanceSettingsRequest, marshalSetPrivilegeRequest, marshalUpdateDatabaseBackupRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, unmarshalAddInstanceACLRulesResponse, unmarshalAddInstanceSettingsResponse, unmarshalDatabase, unmarshalDatabaseBackup, unmarshalDeleteInstanceACLRulesResponse, unmarshalDeleteInstanceSettingsResponse, unmarshalEndpoint, unmarshalInstance, unmarshalInstanceLog, unmarshalInstanceMetrics, unmarshalListDatabaseBackupsResponse, unmarshalListDatabaseEnginesResponse, unmarshalListDatabasesResponse, unmarshalListInstanceACLRulesResponse, unmarshalListInstanceLogsDetailsResponse, unmarshalListInstanceLogsResponse, unmarshalListInstancesResponse, unmarshalListNodeTypesResponse, unmarshalListPrivilegesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalMaintenance, unmarshalPrepareInstanceLogsResponse, unmarshalPrivilege, unmarshalReadReplica, unmarshalSetInstanceACLRulesResponse, unmarshalSetInstanceSettingsResponse, unmarshalSnapshot, unmarshalUser } from "./marshalling.gen.js";
|
|
3
|
-
import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
3
|
+
import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
|
+
//#region src/v1/api.gen.ts
|
|
4
5
|
var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
5
6
|
/**
|
|
6
7
|
* Managed Database for PostgreSQL and MySQL API.
|
|
7
8
|
|
|
8
9
|
This API allows you to manage your Managed Databases for PostgreSQL and MySQL.
|
|
9
10
|
*/
|
|
10
|
-
var API
|
|
11
|
+
var API = class extends API$1 {
|
|
11
12
|
/**
|
|
12
13
|
* Locality of this API.
|
|
13
14
|
* type ∈ {'zone','region','global','unspecified'}
|
|
@@ -721,4 +722,5 @@ var API$1 = class extends API {
|
|
|
721
722
|
path: `/rdb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam("instanceId", request.instanceId)}/apply-maintenance`
|
|
722
723
|
}, unmarshalMaintenance);
|
|
723
724
|
};
|
|
724
|
-
|
|
725
|
+
//#endregion
|
|
726
|
+
export { API };
|
package/dist/v1/content.gen.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
//#region src/v1/content.gen.ts
|
|
1
2
|
/** Lists transient statutes of the enum {@link DatabaseBackupStatus}. */
|
|
2
|
-
|
|
3
|
+
var DATABASE_BACKUP_TRANSIENT_STATUSES = [
|
|
3
4
|
"creating",
|
|
4
5
|
"restoring",
|
|
5
6
|
"deleting",
|
|
6
7
|
"exporting"
|
|
7
8
|
];
|
|
8
9
|
/** Lists transient statutes of the enum {@link InstanceLogStatus}. */
|
|
9
|
-
|
|
10
|
+
var INSTANCE_LOG_TRANSIENT_STATUSES = ["creating"];
|
|
10
11
|
/** Lists transient statutes of the enum {@link InstanceStatus}. */
|
|
11
|
-
|
|
12
|
+
var INSTANCE_TRANSIENT_STATUSES = [
|
|
12
13
|
"provisioning",
|
|
13
14
|
"configuring",
|
|
14
15
|
"deleting",
|
|
@@ -19,9 +20,9 @@ const INSTANCE_TRANSIENT_STATUSES = [
|
|
|
19
20
|
"restarting"
|
|
20
21
|
];
|
|
21
22
|
/** Lists transient statutes of the enum {@link MaintenanceStatus}. */
|
|
22
|
-
|
|
23
|
+
var MAINTENANCE_TRANSIENT_STATUSES = ["ongoing"];
|
|
23
24
|
/** Lists transient statutes of the enum {@link ReadReplicaStatus}. */
|
|
24
|
-
|
|
25
|
+
var READ_REPLICA_TRANSIENT_STATUSES = [
|
|
25
26
|
"provisioning",
|
|
26
27
|
"initializing",
|
|
27
28
|
"deleting",
|
|
@@ -29,9 +30,10 @@ const READ_REPLICA_TRANSIENT_STATUSES = [
|
|
|
29
30
|
"promoting"
|
|
30
31
|
];
|
|
31
32
|
/** Lists transient statutes of the enum {@link SnapshotStatus}. */
|
|
32
|
-
|
|
33
|
+
var SNAPSHOT_TRANSIENT_STATUSES = [
|
|
33
34
|
"creating",
|
|
34
35
|
"restoring",
|
|
35
36
|
"deleting"
|
|
36
37
|
];
|
|
38
|
+
//#endregion
|
|
37
39
|
export { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, MAINTENANCE_TRANSIENT_STATUSES, READ_REPLICA_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES };
|
package/dist/v1/index.gen.js
CHANGED
|
@@ -3,6 +3,7 @@ import { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, IN
|
|
|
3
3
|
import { marshalAddInstanceACLRulesRequest, marshalAddInstanceSettingsRequest, marshalCloneInstanceRequest, marshalCreateDatabaseBackupRequest, marshalCreateDatabaseRequest, marshalCreateEndpointRequest, marshalCreateInstanceFromSnapshotRequest, marshalCreateInstanceRequest, marshalCreateReadReplicaEndpointRequest, marshalCreateReadReplicaRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalDeleteInstanceACLRulesRequest, marshalDeleteInstanceSettingsRequest, marshalMigrateEndpointRequest, marshalPrepareInstanceLogsRequest, marshalPurgeInstanceLogsRequest, marshalRestoreDatabaseBackupRequest, marshalSetInstanceACLRulesRequest, marshalSetInstanceSettingsRequest, marshalSetPrivilegeRequest, marshalUpdateDatabaseBackupRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, unmarshalACLRule, unmarshalAddInstanceACLRulesResponse, unmarshalAddInstanceSettingsResponse, unmarshalBackupSchedule, unmarshalDatabase, unmarshalDatabaseBackup, unmarshalDeleteInstanceACLRulesResponse, unmarshalDeleteInstanceSettingsResponse, unmarshalEndpoint, unmarshalInstance, unmarshalInstanceLog, unmarshalInstanceMetrics, unmarshalListDatabaseBackupsResponse, unmarshalListDatabaseEnginesResponse, unmarshalListDatabasesResponse, unmarshalListInstanceACLRulesResponse, unmarshalListInstanceLogsDetailsResponse, unmarshalListInstanceLogsResponse, unmarshalListInstancesResponse, unmarshalListNodeTypesResponse, unmarshalListPrivilegesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalMaintenance, unmarshalPrepareInstanceLogsResponse, unmarshalPrivilege, unmarshalReadReplica, unmarshalSetInstanceACLRulesResponse, unmarshalSetInstanceSettingsResponse, unmarshalSnapshot, unmarshalUser } from "./marshalling.gen.js";
|
|
4
4
|
import { API } from "./api.gen.js";
|
|
5
5
|
import { validation_rules_gen_exports } from "./validation-rules.gen.js";
|
|
6
|
+
//#region src/v1/index.gen.ts
|
|
6
7
|
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
7
8
|
API: () => API,
|
|
8
9
|
DATABASE_BACKUP_TRANSIENT_STATUSES: () => DATABASE_BACKUP_TRANSIENT_STATUSES,
|
|
@@ -70,4 +71,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
70
71
|
unmarshalSnapshot: () => unmarshalSnapshot,
|
|
71
72
|
unmarshalUser: () => unmarshalUser
|
|
72
73
|
});
|
|
73
|
-
|
|
74
|
+
//#endregion
|
|
75
|
+
export { API, DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, MAINTENANCE_TRANSIENT_STATUSES, READ_REPLICA_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalAddInstanceACLRulesRequest, marshalAddInstanceSettingsRequest, marshalCloneInstanceRequest, marshalCreateDatabaseBackupRequest, marshalCreateDatabaseRequest, marshalCreateEndpointRequest, marshalCreateInstanceFromSnapshotRequest, marshalCreateInstanceRequest, marshalCreateReadReplicaEndpointRequest, marshalCreateReadReplicaRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalDeleteInstanceACLRulesRequest, marshalDeleteInstanceSettingsRequest, marshalMigrateEndpointRequest, marshalPrepareInstanceLogsRequest, marshalPurgeInstanceLogsRequest, marshalRestoreDatabaseBackupRequest, marshalSetInstanceACLRulesRequest, marshalSetInstanceSettingsRequest, marshalSetPrivilegeRequest, marshalUpdateDatabaseBackupRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, unmarshalACLRule, unmarshalAddInstanceACLRulesResponse, unmarshalAddInstanceSettingsResponse, unmarshalBackupSchedule, unmarshalDatabase, unmarshalDatabaseBackup, unmarshalDeleteInstanceACLRulesResponse, unmarshalDeleteInstanceSettingsResponse, unmarshalEndpoint, unmarshalInstance, unmarshalInstanceLog, unmarshalInstanceMetrics, unmarshalListDatabaseBackupsResponse, unmarshalListDatabaseEnginesResponse, unmarshalListDatabasesResponse, unmarshalListInstanceACLRulesResponse, unmarshalListInstanceLogsDetailsResponse, unmarshalListInstanceLogsResponse, unmarshalListInstancesResponse, unmarshalListNodeTypesResponse, unmarshalListPrivilegesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalMaintenance, unmarshalPrepareInstanceLogsResponse, unmarshalPrivilege, unmarshalReadReplica, unmarshalSetInstanceACLRulesResponse, unmarshalSetInstanceSettingsResponse, unmarshalSnapshot, unmarshalUser };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalTimeSeries } from "@scaleway/sdk-client";
|
|
2
2
|
import randomName from "@scaleway/random-name";
|
|
3
|
+
//#region src/v1/marshalling.gen.ts
|
|
3
4
|
var unmarshalEndpointDirectAccessDetails = (data) => {
|
|
4
5
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointDirectAccessDetails' failed as data isn't a dictionary.`);
|
|
5
6
|
return {};
|
|
@@ -17,7 +18,7 @@ var unmarshalEndpointPrivateNetworkDetails = (data) => {
|
|
|
17
18
|
zone: data.zone
|
|
18
19
|
};
|
|
19
20
|
};
|
|
20
|
-
|
|
21
|
+
var unmarshalEndpoint = (data) => {
|
|
21
22
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`);
|
|
22
23
|
return {
|
|
23
24
|
directAccess: data.direct_access ? unmarshalEndpointDirectAccessDetails(data.direct_access) : void 0,
|
|
@@ -30,7 +31,7 @@ const unmarshalEndpoint = (data) => {
|
|
|
30
31
|
privateNetwork: data.private_network ? unmarshalEndpointPrivateNetworkDetails(data.private_network) : void 0
|
|
31
32
|
};
|
|
32
33
|
};
|
|
33
|
-
|
|
34
|
+
var unmarshalMaintenance = (data) => {
|
|
34
35
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Maintenance' failed as data isn't a dictionary.`);
|
|
35
36
|
return {
|
|
36
37
|
closedAt: unmarshalDate(data.closed_at),
|
|
@@ -42,7 +43,7 @@ const unmarshalMaintenance = (data) => {
|
|
|
42
43
|
stopsAt: unmarshalDate(data.stops_at)
|
|
43
44
|
};
|
|
44
45
|
};
|
|
45
|
-
|
|
46
|
+
var unmarshalReadReplica = (data) => {
|
|
46
47
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ReadReplica' failed as data isn't a dictionary.`);
|
|
47
48
|
return {
|
|
48
49
|
endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
|
|
@@ -53,7 +54,7 @@ const unmarshalReadReplica = (data) => {
|
|
|
53
54
|
status: data.status
|
|
54
55
|
};
|
|
55
56
|
};
|
|
56
|
-
|
|
57
|
+
var unmarshalDatabaseBackup = (data) => {
|
|
57
58
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DatabaseBackup' failed as data isn't a dictionary.`);
|
|
58
59
|
return {
|
|
59
60
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -72,7 +73,7 @@ const unmarshalDatabaseBackup = (data) => {
|
|
|
72
73
|
updatedAt: unmarshalDate(data.updated_at)
|
|
73
74
|
};
|
|
74
75
|
};
|
|
75
|
-
|
|
76
|
+
var unmarshalDatabase = (data) => {
|
|
76
77
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Database' failed as data isn't a dictionary.`);
|
|
77
78
|
return {
|
|
78
79
|
managed: data.managed,
|
|
@@ -81,7 +82,7 @@ const unmarshalDatabase = (data) => {
|
|
|
81
82
|
size: data.size
|
|
82
83
|
};
|
|
83
84
|
};
|
|
84
|
-
|
|
85
|
+
var unmarshalInstanceLog = (data) => {
|
|
85
86
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstanceLog' failed as data isn't a dictionary.`);
|
|
86
87
|
return {
|
|
87
88
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -93,7 +94,7 @@ const unmarshalInstanceLog = (data) => {
|
|
|
93
94
|
status: data.status
|
|
94
95
|
};
|
|
95
96
|
};
|
|
96
|
-
|
|
97
|
+
var unmarshalBackupSchedule = (data) => {
|
|
97
98
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BackupSchedule' failed as data isn't a dictionary.`);
|
|
98
99
|
return {
|
|
99
100
|
disabled: data.disabled,
|
|
@@ -137,7 +138,7 @@ var unmarshalVolume = (data) => {
|
|
|
137
138
|
type: data.type
|
|
138
139
|
};
|
|
139
140
|
};
|
|
140
|
-
|
|
141
|
+
var unmarshalInstance = (data) => {
|
|
141
142
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Instance' failed as data isn't a dictionary.`);
|
|
142
143
|
return {
|
|
143
144
|
backupSameRegion: data.backup_same_region,
|
|
@@ -165,7 +166,7 @@ const unmarshalInstance = (data) => {
|
|
|
165
166
|
volume: data.volume ? unmarshalVolume(data.volume) : void 0
|
|
166
167
|
};
|
|
167
168
|
};
|
|
168
|
-
|
|
169
|
+
var unmarshalPrivilege = (data) => {
|
|
169
170
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Privilege' failed as data isn't a dictionary.`);
|
|
170
171
|
return {
|
|
171
172
|
databaseName: data.database_name,
|
|
@@ -180,7 +181,7 @@ var unmarshalSnapshotVolumeType = (data) => {
|
|
|
180
181
|
type: data.type
|
|
181
182
|
};
|
|
182
183
|
};
|
|
183
|
-
|
|
184
|
+
var unmarshalSnapshot = (data) => {
|
|
184
185
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Snapshot' failed as data isn't a dictionary.`);
|
|
185
186
|
return {
|
|
186
187
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -197,14 +198,14 @@ const unmarshalSnapshot = (data) => {
|
|
|
197
198
|
volumeType: data.volume_type ? unmarshalSnapshotVolumeType(data.volume_type) : void 0
|
|
198
199
|
};
|
|
199
200
|
};
|
|
200
|
-
|
|
201
|
+
var unmarshalUser = (data) => {
|
|
201
202
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'User' failed as data isn't a dictionary.`);
|
|
202
203
|
return {
|
|
203
204
|
isAdmin: data.is_admin,
|
|
204
205
|
name: data.name
|
|
205
206
|
};
|
|
206
207
|
};
|
|
207
|
-
|
|
208
|
+
var unmarshalACLRule = (data) => {
|
|
208
209
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ACLRule' failed as data isn't a dictionary.`);
|
|
209
210
|
return {
|
|
210
211
|
action: data.action,
|
|
@@ -215,27 +216,27 @@ const unmarshalACLRule = (data) => {
|
|
|
215
216
|
protocol: data.protocol
|
|
216
217
|
};
|
|
217
218
|
};
|
|
218
|
-
|
|
219
|
+
var unmarshalAddInstanceACLRulesResponse = (data) => {
|
|
219
220
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddInstanceACLRulesResponse' failed as data isn't a dictionary.`);
|
|
220
221
|
return { rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule) };
|
|
221
222
|
};
|
|
222
|
-
|
|
223
|
+
var unmarshalAddInstanceSettingsResponse = (data) => {
|
|
223
224
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddInstanceSettingsResponse' failed as data isn't a dictionary.`);
|
|
224
225
|
return { settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting) };
|
|
225
226
|
};
|
|
226
|
-
|
|
227
|
+
var unmarshalDeleteInstanceACLRulesResponse = (data) => {
|
|
227
228
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DeleteInstanceACLRulesResponse' failed as data isn't a dictionary.`);
|
|
228
229
|
return { rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule) };
|
|
229
230
|
};
|
|
230
|
-
|
|
231
|
+
var unmarshalDeleteInstanceSettingsResponse = (data) => {
|
|
231
232
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DeleteInstanceSettingsResponse' failed as data isn't a dictionary.`);
|
|
232
233
|
return { settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting) };
|
|
233
234
|
};
|
|
234
|
-
|
|
235
|
+
var unmarshalInstanceMetrics = (data) => {
|
|
235
236
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstanceMetrics' failed as data isn't a dictionary.`);
|
|
236
237
|
return { timeseries: unmarshalArrayOfObject(data.timeseries, unmarshalTimeSeries) };
|
|
237
238
|
};
|
|
238
|
-
|
|
239
|
+
var unmarshalListDatabaseBackupsResponse = (data) => {
|
|
239
240
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDatabaseBackupsResponse' failed as data isn't a dictionary.`);
|
|
240
241
|
return {
|
|
241
242
|
databaseBackups: unmarshalArrayOfObject(data.database_backups, unmarshalDatabaseBackup),
|
|
@@ -279,21 +280,21 @@ var unmarshalDatabaseEngine = (data) => {
|
|
|
279
280
|
versions: unmarshalArrayOfObject(data.versions, unmarshalEngineVersion)
|
|
280
281
|
};
|
|
281
282
|
};
|
|
282
|
-
|
|
283
|
+
var unmarshalListDatabaseEnginesResponse = (data) => {
|
|
283
284
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDatabaseEnginesResponse' failed as data isn't a dictionary.`);
|
|
284
285
|
return {
|
|
285
286
|
engines: unmarshalArrayOfObject(data.engines, unmarshalDatabaseEngine),
|
|
286
287
|
totalCount: data.total_count
|
|
287
288
|
};
|
|
288
289
|
};
|
|
289
|
-
|
|
290
|
+
var unmarshalListDatabasesResponse = (data) => {
|
|
290
291
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary.`);
|
|
291
292
|
return {
|
|
292
293
|
databases: unmarshalArrayOfObject(data.databases, unmarshalDatabase),
|
|
293
294
|
totalCount: data.total_count
|
|
294
295
|
};
|
|
295
296
|
};
|
|
296
|
-
|
|
297
|
+
var unmarshalListInstanceACLRulesResponse = (data) => {
|
|
297
298
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstanceACLRulesResponse' failed as data isn't a dictionary.`);
|
|
298
299
|
return {
|
|
299
300
|
rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule),
|
|
@@ -307,15 +308,15 @@ var unmarshalListInstanceLogsDetailsResponseInstanceLogDetail = (data) => {
|
|
|
307
308
|
size: data.size
|
|
308
309
|
};
|
|
309
310
|
};
|
|
310
|
-
|
|
311
|
+
var unmarshalListInstanceLogsDetailsResponse = (data) => {
|
|
311
312
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstanceLogsDetailsResponse' failed as data isn't a dictionary.`);
|
|
312
313
|
return { details: unmarshalArrayOfObject(data.details, unmarshalListInstanceLogsDetailsResponseInstanceLogDetail) };
|
|
313
314
|
};
|
|
314
|
-
|
|
315
|
+
var unmarshalListInstanceLogsResponse = (data) => {
|
|
315
316
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstanceLogsResponse' failed as data isn't a dictionary.`);
|
|
316
317
|
return { instanceLogs: unmarshalArrayOfObject(data.instance_logs, unmarshalInstanceLog) };
|
|
317
318
|
};
|
|
318
|
-
|
|
319
|
+
var unmarshalListInstancesResponse = (data) => {
|
|
319
320
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstancesResponse' failed as data isn't a dictionary.`);
|
|
320
321
|
return {
|
|
321
322
|
instances: unmarshalArrayOfObject(data.instances, unmarshalInstance),
|
|
@@ -359,43 +360,43 @@ var unmarshalNodeType = (data) => {
|
|
|
359
360
|
volumeConstraint: data.volume_constraint ? unmarshalNodeTypeVolumeConstraintSizes(data.volume_constraint) : void 0
|
|
360
361
|
};
|
|
361
362
|
};
|
|
362
|
-
|
|
363
|
+
var unmarshalListNodeTypesResponse = (data) => {
|
|
363
364
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`);
|
|
364
365
|
return {
|
|
365
366
|
nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
|
|
366
367
|
totalCount: data.total_count
|
|
367
368
|
};
|
|
368
369
|
};
|
|
369
|
-
|
|
370
|
+
var unmarshalListPrivilegesResponse = (data) => {
|
|
370
371
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPrivilegesResponse' failed as data isn't a dictionary.`);
|
|
371
372
|
return {
|
|
372
373
|
privileges: unmarshalArrayOfObject(data.privileges, unmarshalPrivilege),
|
|
373
374
|
totalCount: data.total_count
|
|
374
375
|
};
|
|
375
376
|
};
|
|
376
|
-
|
|
377
|
+
var unmarshalListSnapshotsResponse = (data) => {
|
|
377
378
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary.`);
|
|
378
379
|
return {
|
|
379
380
|
snapshots: unmarshalArrayOfObject(data.snapshots, unmarshalSnapshot),
|
|
380
381
|
totalCount: data.total_count
|
|
381
382
|
};
|
|
382
383
|
};
|
|
383
|
-
|
|
384
|
+
var unmarshalListUsersResponse = (data) => {
|
|
384
385
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`);
|
|
385
386
|
return {
|
|
386
387
|
totalCount: data.total_count,
|
|
387
388
|
users: unmarshalArrayOfObject(data.users, unmarshalUser)
|
|
388
389
|
};
|
|
389
390
|
};
|
|
390
|
-
|
|
391
|
+
var unmarshalPrepareInstanceLogsResponse = (data) => {
|
|
391
392
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PrepareInstanceLogsResponse' failed as data isn't a dictionary.`);
|
|
392
393
|
return { instanceLogs: unmarshalArrayOfObject(data.instance_logs, unmarshalInstanceLog) };
|
|
393
394
|
};
|
|
394
|
-
|
|
395
|
+
var unmarshalSetInstanceACLRulesResponse = (data) => {
|
|
395
396
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetInstanceACLRulesResponse' failed as data isn't a dictionary.`);
|
|
396
397
|
return { rules: unmarshalArrayOfObject(data.rules, unmarshalACLRule) };
|
|
397
398
|
};
|
|
398
|
-
|
|
399
|
+
var unmarshalSetInstanceSettingsResponse = (data) => {
|
|
399
400
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetInstanceSettingsResponse' failed as data isn't a dictionary.`);
|
|
400
401
|
return { settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting) };
|
|
401
402
|
};
|
|
@@ -403,23 +404,23 @@ var marshalACLRuleRequest = (request, defaults) => ({
|
|
|
403
404
|
description: request.description,
|
|
404
405
|
ip: request.ip
|
|
405
406
|
});
|
|
406
|
-
|
|
407
|
+
var marshalAddInstanceACLRulesRequest = (request, defaults) => ({ rules: request.rules.map((elt) => marshalACLRuleRequest(elt, defaults)) });
|
|
407
408
|
var marshalInstanceSetting = (request, defaults) => ({
|
|
408
409
|
name: request.name,
|
|
409
410
|
value: request.value
|
|
410
411
|
});
|
|
411
|
-
|
|
412
|
-
|
|
412
|
+
var marshalAddInstanceSettingsRequest = (request, defaults) => ({ settings: request.settings.map((elt) => marshalInstanceSetting(elt, defaults)) });
|
|
413
|
+
var marshalCloneInstanceRequest = (request, defaults) => ({
|
|
413
414
|
name: request.name,
|
|
414
415
|
node_type: request.nodeType
|
|
415
416
|
});
|
|
416
|
-
|
|
417
|
+
var marshalCreateDatabaseBackupRequest = (request, defaults) => ({
|
|
417
418
|
database_name: request.databaseName,
|
|
418
419
|
expires_at: request.expiresAt,
|
|
419
420
|
instance_id: request.instanceId,
|
|
420
421
|
name: request.name || randomName("bkp")
|
|
421
422
|
});
|
|
422
|
-
|
|
423
|
+
var marshalCreateDatabaseRequest = (request, defaults) => ({ name: request.name });
|
|
423
424
|
var marshalEndpointSpecPrivateNetworkIpamConfig = (request, defaults) => ({});
|
|
424
425
|
var marshalEndpointSpecLoadBalancer = (request, defaults) => ({});
|
|
425
426
|
var marshalEndpointSpecPrivateNetwork = (request, defaults) => ({
|
|
@@ -439,14 +440,14 @@ var marshalEndpointSpec = (request, defaults) => ({ ...resolveOneOf([{
|
|
|
439
440
|
param: "private_network",
|
|
440
441
|
value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetwork(request.privateNetwork, defaults) : void 0
|
|
441
442
|
}]) });
|
|
442
|
-
|
|
443
|
-
|
|
443
|
+
var marshalCreateEndpointRequest = (request, defaults) => ({ endpoint_spec: request.endpointSpec !== void 0 ? marshalEndpointSpec(request.endpointSpec, defaults) : void 0 });
|
|
444
|
+
var marshalCreateInstanceFromSnapshotRequest = (request, defaults) => ({
|
|
444
445
|
instance_name: request.instanceName,
|
|
445
446
|
is_ha_cluster: request.isHaCluster,
|
|
446
447
|
node_type: request.nodeType
|
|
447
448
|
});
|
|
448
449
|
var marshalEncryptionAtRest = (request, defaults) => ({ enabled: request.enabled });
|
|
449
|
-
|
|
450
|
+
var marshalCreateInstanceRequest = (request, defaults) => ({
|
|
450
451
|
backup_same_region: request.backupSameRegion,
|
|
451
452
|
disable_backup: request.disableBackup,
|
|
452
453
|
encryption: request.encryption !== void 0 ? marshalEncryptionAtRest(request.encryption, defaults) : void 0,
|
|
@@ -490,41 +491,41 @@ var marshalReadReplicaEndpointSpec = (request, defaults) => ({ ...resolveOneOf([
|
|
|
490
491
|
param: "private_network",
|
|
491
492
|
value: request.privateNetwork !== void 0 ? marshalReadReplicaEndpointSpecPrivateNetwork(request.privateNetwork, defaults) : void 0
|
|
492
493
|
}]) });
|
|
493
|
-
|
|
494
|
-
|
|
494
|
+
var marshalCreateReadReplicaEndpointRequest = (request, defaults) => ({ endpoint_spec: request.endpointSpec.map((elt) => marshalReadReplicaEndpointSpec(elt, defaults)) });
|
|
495
|
+
var marshalCreateReadReplicaRequest = (request, defaults) => ({
|
|
495
496
|
endpoint_spec: request.endpointSpec !== void 0 ? request.endpointSpec.map((elt) => marshalReadReplicaEndpointSpec(elt, defaults)) : void 0,
|
|
496
497
|
instance_id: request.instanceId,
|
|
497
498
|
same_zone: request.sameZone
|
|
498
499
|
});
|
|
499
|
-
|
|
500
|
+
var marshalCreateSnapshotRequest = (request, defaults) => ({
|
|
500
501
|
expires_at: request.expiresAt,
|
|
501
502
|
name: request.name || randomName("snp")
|
|
502
503
|
});
|
|
503
|
-
|
|
504
|
+
var marshalCreateUserRequest = (request, defaults) => ({
|
|
504
505
|
is_admin: request.isAdmin,
|
|
505
506
|
name: request.name,
|
|
506
507
|
password: request.password
|
|
507
508
|
});
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
509
|
+
var marshalDeleteInstanceACLRulesRequest = (request, defaults) => ({ acl_rule_ips: request.aclRuleIps });
|
|
510
|
+
var marshalDeleteInstanceSettingsRequest = (request, defaults) => ({ setting_names: request.settingNames });
|
|
511
|
+
var marshalMigrateEndpointRequest = (request, defaults) => ({ instance_id: request.instanceId });
|
|
512
|
+
var marshalPrepareInstanceLogsRequest = (request, defaults) => ({
|
|
512
513
|
end_date: request.endDate,
|
|
513
514
|
start_date: request.startDate
|
|
514
515
|
});
|
|
515
|
-
|
|
516
|
-
|
|
516
|
+
var marshalPurgeInstanceLogsRequest = (request, defaults) => ({ log_name: request.logName });
|
|
517
|
+
var marshalRestoreDatabaseBackupRequest = (request, defaults) => ({
|
|
517
518
|
database_name: request.databaseName,
|
|
518
519
|
instance_id: request.instanceId
|
|
519
520
|
});
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
521
|
+
var marshalSetInstanceACLRulesRequest = (request, defaults) => ({ rules: request.rules.map((elt) => marshalACLRuleRequest(elt, defaults)) });
|
|
522
|
+
var marshalSetInstanceSettingsRequest = (request, defaults) => ({ settings: request.settings.map((elt) => marshalInstanceSetting(elt, defaults)) });
|
|
523
|
+
var marshalSetPrivilegeRequest = (request, defaults) => ({
|
|
523
524
|
database_name: request.databaseName,
|
|
524
525
|
permission: request.permission,
|
|
525
526
|
user_name: request.userName
|
|
526
527
|
});
|
|
527
|
-
|
|
528
|
+
var marshalUpdateDatabaseBackupRequest = (request, defaults) => ({
|
|
528
529
|
expires_at: request.expiresAt,
|
|
529
530
|
name: request.name
|
|
530
531
|
});
|
|
@@ -532,7 +533,7 @@ var marshalLogsPolicy = (request, defaults) => ({
|
|
|
532
533
|
max_age_retention: request.maxAgeRetention,
|
|
533
534
|
total_disk_retention: request.totalDiskRetention
|
|
534
535
|
});
|
|
535
|
-
|
|
536
|
+
var marshalUpdateInstanceRequest = (request, defaults) => ({
|
|
536
537
|
backup_same_region: request.backupSameRegion,
|
|
537
538
|
backup_schedule_frequency: request.backupScheduleFrequency,
|
|
538
539
|
backup_schedule_retention: request.backupScheduleRetention,
|
|
@@ -542,11 +543,11 @@ const marshalUpdateInstanceRequest = (request, defaults) => ({
|
|
|
542
543
|
name: request.name,
|
|
543
544
|
tags: request.tags
|
|
544
545
|
});
|
|
545
|
-
|
|
546
|
+
var marshalUpdateSnapshotRequest = (request, defaults) => ({
|
|
546
547
|
expires_at: request.expiresAt,
|
|
547
548
|
name: request.name
|
|
548
549
|
});
|
|
549
|
-
|
|
550
|
+
var marshalUpdateUserRequest = (request, defaults) => ({
|
|
550
551
|
is_admin: request.isAdmin,
|
|
551
552
|
password: request.password
|
|
552
553
|
});
|
|
@@ -554,7 +555,7 @@ var marshalUpgradeInstanceRequestMajorUpgradeWorkflow = (request, defaults) => (
|
|
|
554
555
|
upgradable_version_id: request.upgradableVersionId,
|
|
555
556
|
with_endpoints: request.withEndpoints
|
|
556
557
|
});
|
|
557
|
-
|
|
558
|
+
var marshalUpgradeInstanceRequest = (request, defaults) => ({ ...resolveOneOf([
|
|
558
559
|
{
|
|
559
560
|
param: "node_type",
|
|
560
561
|
value: request.nodeType
|
|
@@ -584,4 +585,5 @@ const marshalUpgradeInstanceRequest = (request, defaults) => ({ ...resolveOneOf(
|
|
|
584
585
|
value: request.enableEncryption
|
|
585
586
|
}
|
|
586
587
|
]) });
|
|
588
|
+
//#endregion
|
|
587
589
|
export { marshalAddInstanceACLRulesRequest, marshalAddInstanceSettingsRequest, marshalCloneInstanceRequest, marshalCreateDatabaseBackupRequest, marshalCreateDatabaseRequest, marshalCreateEndpointRequest, marshalCreateInstanceFromSnapshotRequest, marshalCreateInstanceRequest, marshalCreateReadReplicaEndpointRequest, marshalCreateReadReplicaRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalDeleteInstanceACLRulesRequest, marshalDeleteInstanceSettingsRequest, marshalMigrateEndpointRequest, marshalPrepareInstanceLogsRequest, marshalPurgeInstanceLogsRequest, marshalRestoreDatabaseBackupRequest, marshalSetInstanceACLRulesRequest, marshalSetInstanceSettingsRequest, marshalSetPrivilegeRequest, marshalUpdateDatabaseBackupRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, unmarshalACLRule, unmarshalAddInstanceACLRulesResponse, unmarshalAddInstanceSettingsResponse, unmarshalBackupSchedule, unmarshalDatabase, unmarshalDatabaseBackup, unmarshalDeleteInstanceACLRulesResponse, unmarshalDeleteInstanceSettingsResponse, unmarshalEndpoint, unmarshalInstance, unmarshalInstanceLog, unmarshalInstanceMetrics, unmarshalListDatabaseBackupsResponse, unmarshalListDatabaseEnginesResponse, unmarshalListDatabasesResponse, unmarshalListInstanceACLRulesResponse, unmarshalListInstanceLogsDetailsResponse, unmarshalListInstanceLogsResponse, unmarshalListInstancesResponse, unmarshalListNodeTypesResponse, unmarshalListPrivilegesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalMaintenance, unmarshalPrepareInstanceLogsResponse, unmarshalPrivilege, unmarshalReadReplica, unmarshalSetInstanceACLRulesResponse, unmarshalSetInstanceSettingsResponse, unmarshalSnapshot, unmarshalUser };
|
package/dist/v1/types.gen.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type ListPrivilegesRequestOrderBy = 'user_name_asc' | 'user_name_desc' |
|
|
|
15
15
|
export type ListSnapshotsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc' | 'expires_at_asc' | 'expires_at_desc';
|
|
16
16
|
export type ListUsersRequestOrderBy = 'name_asc' | 'name_desc' | 'is_admin_asc' | 'is_admin_desc';
|
|
17
17
|
export type MaintenanceStatus = 'unknown' | 'pending' | 'done' | 'canceled' | 'ongoing';
|
|
18
|
-
export type NodeTypeGeneration = 'unknown_generation' | 'generation_v1' | 'generation_v2';
|
|
18
|
+
export type NodeTypeGeneration = 'unknown_generation' | 'generation_v1' | 'generation_v2' | 'generation_v3';
|
|
19
19
|
export type NodeTypeStock = 'unknown' | 'low_stock' | 'out_of_stock' | 'available';
|
|
20
20
|
export type Permission = 'readonly' | 'readwrite' | 'all' | 'custom' | 'none';
|
|
21
21
|
export type ReadReplicaStatus = 'unknown' | 'provisioning' | 'initializing' | 'ready' | 'deleting' | 'error' | 'locked' | 'configuring' | 'promoting';
|
|
@@ -356,14 +356,14 @@ export interface ACLRuleRequest {
|
|
|
356
356
|
}
|
|
357
357
|
export interface ACLRule {
|
|
358
358
|
ip: string;
|
|
359
|
-
/**
|
|
360
|
-
* @deprecated
|
|
361
|
-
*/
|
|
362
|
-
port?: number;
|
|
363
359
|
protocol: ACLRuleProtocol;
|
|
364
360
|
direction: ACLRuleDirection;
|
|
365
361
|
action: ACLRuleAction;
|
|
366
362
|
description: string;
|
|
363
|
+
/**
|
|
364
|
+
* @deprecated
|
|
365
|
+
*/
|
|
366
|
+
port?: number;
|
|
367
367
|
}
|
|
368
368
|
export interface EndpointSpec {
|
|
369
369
|
/**
|
|
File without changes
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region src/v1/validation-rules.gen.ts
|
|
2
3
|
var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({ UpdateInstanceRequest: () => UpdateInstanceRequest });
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
var UpdateInstanceRequest = { backupScheduleStartHour: { lessThanOrEqual: 23 } };
|
|
5
|
+
//#endregion
|
|
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.4.1",
|
|
4
4
|
"description": "Scaleway SDK rdb",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"node": ">=20.19.6"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@scaleway/random-name": "5.1.
|
|
30
|
-
"@scaleway/sdk-std": "2.2.
|
|
29
|
+
"@scaleway/random-name": "5.1.4",
|
|
30
|
+
"@scaleway/sdk-std": "2.2.2"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@scaleway/sdk-client": "^2.2.
|
|
33
|
+
"@scaleway/sdk-client": "^2.2.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^2.2.
|
|
36
|
+
"@scaleway/sdk-client": "^2.2.2"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"package:check": "pnpm publint",
|