@scaleway/sdk-serverless-sqldb 2.1.1 → 2.2.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/v1alpha1/api.gen.js
CHANGED
|
@@ -10,9 +10,7 @@ class API extends API$1 {
|
|
|
10
10
|
* type ∈ {'zone','region','global','unspecified'}
|
|
11
11
|
*/
|
|
12
12
|
static LOCALITY = toApiLocality({
|
|
13
|
-
regions: [
|
|
14
|
-
"fr-par"
|
|
15
|
-
]
|
|
13
|
+
regions: ["fr-par"]
|
|
16
14
|
});
|
|
17
15
|
/**
|
|
18
16
|
* Create a new Serverless SQL Database. You must provide the following parameters: `organization_id`, `project_id`, `name`, `cpu_min`, `cpu_max`. You can also provide `from_backup_id` to create a database from a backup.
|
|
@@ -52,7 +50,9 @@ class API extends API$1 {
|
|
|
52
50
|
* @returns A Promise of Database
|
|
53
51
|
*/
|
|
54
52
|
waitForDatabase = (request, options) => waitForResource(
|
|
55
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
53
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
54
|
+
!DATABASE_TRANSIENT_STATUSES.includes(res.status)
|
|
55
|
+
)),
|
|
56
56
|
this.getDatabase,
|
|
57
57
|
request,
|
|
58
58
|
options
|
|
@@ -80,7 +80,10 @@ class API extends API$1 {
|
|
|
80
80
|
["organization_id", request.organizationId],
|
|
81
81
|
["page", request.page],
|
|
82
82
|
["page_size", request.pageSize],
|
|
83
|
-
[
|
|
83
|
+
[
|
|
84
|
+
"project_id",
|
|
85
|
+
request.projectId ?? this.client.settings.defaultProjectId
|
|
86
|
+
]
|
|
84
87
|
)
|
|
85
88
|
},
|
|
86
89
|
unmarshalListDatabasesResponse
|
|
@@ -118,7 +121,10 @@ class API extends API$1 {
|
|
|
118
121
|
restoreDatabaseFromBackup = (request) => this.client.fetch(
|
|
119
122
|
{
|
|
120
123
|
body: JSON.stringify(
|
|
121
|
-
marshalRestoreDatabaseFromBackupRequest(
|
|
124
|
+
marshalRestoreDatabaseFromBackupRequest(
|
|
125
|
+
request,
|
|
126
|
+
this.client.settings
|
|
127
|
+
)
|
|
122
128
|
),
|
|
123
129
|
headers: jsonContentHeaders,
|
|
124
130
|
method: "POST",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { API
|
|
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 { CreateDatabaseRequest, Database, DatabaseBackup, DatabaseBackupStatus, DatabaseStatus, DeleteDatabaseRequest, ExportDatabaseBackupRequest, GetDatabaseBackupRequest, GetDatabaseRequest, ListDatabaseBackupsRequest, ListDatabaseBackupsRequestOrderBy, ListDatabaseBackupsResponse, ListDatabasesRequest, ListDatabasesRequestOrderBy, ListDatabasesResponse, RestoreDatabaseFromBackupRequest, UpdateDatabaseRequest, } from './types.gen.js';
|