@scaleway/sdk 2.21.0 → 2.22.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/api/document_db/v1beta1/api.gen.js +15 -1
- package/dist/api/document_db/v1beta1/content.gen.js +1 -1
- package/dist/api/document_db/v1beta1/marshalling.gen.js +15 -14
- package/dist/api/jobs/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/lb/v1/api.gen.js +2 -2
- package/dist/api/llm_inference/index.js +2 -0
- package/dist/api/llm_inference/v1beta1/api.gen.js +233 -0
- package/dist/api/llm_inference/v1beta1/content.gen.js +7 -0
- package/dist/api/llm_inference/v1beta1/index.gen.js +7 -0
- package/dist/api/llm_inference/v1beta1/marshalling.gen.js +225 -0
- package/dist/api/llm_inference/v1beta1/validation-rules.gen.js +55 -0
- package/dist/api/rdb/v1/api.gen.js +18 -1
- package/dist/api/rdb/v1/content.gen.js +1 -1
- package/dist/api/rdb/v1/marshalling.gen.js +15 -14
- package/dist/api/secret/v1beta1/api.gen.js +1 -1
- package/dist/index.cjs +1069 -506
- package/dist/index.d.ts +2058 -1331
- package/dist/index.js +26 -24
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ import { API as API$1 } from '../../../scw/api.js';
|
|
|
3
3
|
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
4
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
5
|
import { DATABASE_BACKUP_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES, READ_REPLICA_TRANSIENT_STATUSES, INSTANCE_LOG_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
-
import { unmarshalListDatabaseEnginesResponse, unmarshalListNodeTypesResponse, unmarshalListDatabaseBackupsResponse, marshalCreateDatabaseBackupRequest, unmarshalDatabaseBackup, marshalUpdateDatabaseBackupRequest, marshalRestoreDatabaseBackupRequest, marshalUpgradeInstanceRequest, unmarshalInstance, unmarshalListInstancesResponse, marshalCreateInstanceRequest, marshalUpdateInstanceRequest, marshalCloneInstanceRequest, unmarshalInstanceMetrics, marshalCreateReadReplicaRequest, unmarshalReadReplica, marshalCreateReadReplicaEndpointRequest, marshalPrepareInstanceLogsRequest, unmarshalPrepareInstanceLogsResponse, unmarshalListInstanceLogsResponse, unmarshalInstanceLog, marshalPurgeInstanceLogsRequest, unmarshalListInstanceLogsDetailsResponse, marshalAddInstanceSettingsRequest, unmarshalAddInstanceSettingsResponse, marshalDeleteInstanceSettingsRequest, unmarshalDeleteInstanceSettingsResponse, marshalSetInstanceSettingsRequest, unmarshalSetInstanceSettingsResponse, unmarshalListInstanceACLRulesResponse, marshalAddInstanceACLRulesRequest, unmarshalAddInstanceACLRulesResponse, marshalSetInstanceACLRulesRequest, unmarshalSetInstanceACLRulesResponse, marshalDeleteInstanceACLRulesRequest, unmarshalDeleteInstanceACLRulesResponse, unmarshalListUsersResponse, marshalCreateUserRequest, unmarshalUser, marshalUpdateUserRequest, unmarshalListDatabasesResponse, marshalCreateDatabaseRequest, unmarshalDatabase, unmarshalListPrivilegesResponse, marshalSetPrivilegeRequest, unmarshalPrivilege, unmarshalListSnapshotsResponse, unmarshalSnapshot, marshalCreateSnapshotRequest, marshalUpdateSnapshotRequest, marshalCreateInstanceFromSnapshotRequest, marshalCreateEndpointRequest, unmarshalEndpoint, marshalMigrateEndpointRequest } from './marshalling.gen.js';
|
|
6
|
+
import { unmarshalListDatabaseEnginesResponse, unmarshalListNodeTypesResponse, unmarshalListDatabaseBackupsResponse, marshalCreateDatabaseBackupRequest, unmarshalDatabaseBackup, marshalUpdateDatabaseBackupRequest, marshalRestoreDatabaseBackupRequest, marshalUpgradeInstanceRequest, unmarshalInstance, unmarshalListInstancesResponse, marshalCreateInstanceRequest, marshalUpdateInstanceRequest, marshalCloneInstanceRequest, unmarshalInstanceMetrics, marshalCreateReadReplicaRequest, unmarshalReadReplica, marshalCreateReadReplicaEndpointRequest, marshalPrepareInstanceLogsRequest, unmarshalPrepareInstanceLogsResponse, unmarshalListInstanceLogsResponse, unmarshalInstanceLog, marshalPurgeInstanceLogsRequest, unmarshalListInstanceLogsDetailsResponse, marshalAddInstanceSettingsRequest, unmarshalAddInstanceSettingsResponse, marshalDeleteInstanceSettingsRequest, unmarshalDeleteInstanceSettingsResponse, marshalSetInstanceSettingsRequest, unmarshalSetInstanceSettingsResponse, unmarshalListInstanceACLRulesResponse, marshalAddInstanceACLRulesRequest, unmarshalAddInstanceACLRulesResponse, marshalSetInstanceACLRulesRequest, unmarshalSetInstanceACLRulesResponse, marshalDeleteInstanceACLRulesRequest, unmarshalDeleteInstanceACLRulesResponse, unmarshalListUsersResponse, marshalCreateUserRequest, unmarshalUser, marshalUpdateUserRequest, unmarshalListDatabasesResponse, marshalCreateDatabaseRequest, unmarshalDatabase, unmarshalListPrivilegesResponse, marshalSetPrivilegeRequest, unmarshalPrivilege, unmarshalListSnapshotsResponse, unmarshalSnapshot, marshalCreateSnapshotRequest, marshalUpdateSnapshotRequest, marshalCreateInstanceFromSnapshotRequest, marshalCreateEndpointRequest, unmarshalEndpoint, marshalMigrateEndpointRequest, unmarshalMaintenance } from './marshalling.gen.js';
|
|
7
7
|
|
|
8
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
9
9
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -903,6 +903,23 @@ class API extends API$1 {
|
|
|
903
903
|
method: 'POST',
|
|
904
904
|
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam('endpointId', request.endpointId)}/migrate`
|
|
905
905
|
}, unmarshalEndpoint);
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* Apply Database Instance maintenance. Apply maintenance tasks to your
|
|
909
|
+
* Database Instance. This will trigger pending maintenance tasks to start in
|
|
910
|
+
* your Database Instance and can generate service interruption. Maintenance
|
|
911
|
+
* tasks can be applied between `starts_at` and `stops_at` times, and are run
|
|
912
|
+
* directly by Scaleway at `forced_at` timestamp.
|
|
913
|
+
*
|
|
914
|
+
* @param request - The request {@link ApplyInstanceMaintenanceRequest}
|
|
915
|
+
* @returns A Promise of Maintenance
|
|
916
|
+
*/
|
|
917
|
+
applyInstanceMaintenance = request => this.client.fetch({
|
|
918
|
+
body: '{}',
|
|
919
|
+
headers: jsonContentHeaders,
|
|
920
|
+
method: 'POST',
|
|
921
|
+
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances/${validatePathParam('instanceId', request.instanceId)}/apply-maintenance`
|
|
922
|
+
}, unmarshalMaintenance);
|
|
906
923
|
}
|
|
907
924
|
|
|
908
925
|
export { API };
|
|
@@ -11,7 +11,7 @@ const INSTANCE_LOG_TRANSIENT_STATUSES = ['creating'];
|
|
|
11
11
|
const INSTANCE_TRANSIENT_STATUSES = ['provisioning', 'configuring', 'deleting', 'autohealing', 'initializing', 'backuping', 'snapshotting', 'restarting'];
|
|
12
12
|
|
|
13
13
|
/** Lists transient statutes of the enum {@link MaintenanceStatus}. */
|
|
14
|
-
const MAINTENANCE_TRANSIENT_STATUSES = ['
|
|
14
|
+
const MAINTENANCE_TRANSIENT_STATUSES = ['ongoing'];
|
|
15
15
|
|
|
16
16
|
/** Lists transient statutes of the enum {@link ReadReplicaStatus}. */
|
|
17
17
|
const READ_REPLICA_TRANSIENT_STATUSES = ['provisioning', 'initializing', 'deleting', 'configuring', 'promoting'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.3/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
2
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
3
|
import { unmarshalTimeSeries } from '../../../scw/custom-marshalling.js';
|
|
4
|
-
import {
|
|
4
|
+
import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
5
5
|
|
|
6
6
|
// This file was automatically generated. DO NOT EDIT.
|
|
7
7
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -42,6 +42,19 @@ const unmarshalEndpoint = data => {
|
|
|
42
42
|
privateNetwork: data.private_network ? unmarshalEndpointPrivateNetworkDetails(data.private_network) : undefined
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
+
const unmarshalMaintenance = data => {
|
|
46
|
+
if (!isJSONObject(data)) {
|
|
47
|
+
throw new TypeError(`Unmarshalling the type 'Maintenance' failed as data isn't a dictionary.`);
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
closedAt: unmarshalDate(data.closed_at),
|
|
51
|
+
forcedAt: unmarshalDate(data.forced_at),
|
|
52
|
+
reason: data.reason,
|
|
53
|
+
startsAt: unmarshalDate(data.starts_at),
|
|
54
|
+
status: data.status,
|
|
55
|
+
stopsAt: unmarshalDate(data.stops_at)
|
|
56
|
+
};
|
|
57
|
+
};
|
|
45
58
|
const unmarshalReadReplica = data => {
|
|
46
59
|
if (!isJSONObject(data)) {
|
|
47
60
|
throw new TypeError(`Unmarshalling the type 'ReadReplica' failed as data isn't a dictionary.`);
|
|
@@ -130,18 +143,6 @@ const unmarshalLogsPolicy = data => {
|
|
|
130
143
|
totalDiskRetention: data.total_disk_retention
|
|
131
144
|
};
|
|
132
145
|
};
|
|
133
|
-
const unmarshalMaintenance = data => {
|
|
134
|
-
if (!isJSONObject(data)) {
|
|
135
|
-
throw new TypeError(`Unmarshalling the type 'Maintenance' failed as data isn't a dictionary.`);
|
|
136
|
-
}
|
|
137
|
-
return {
|
|
138
|
-
closedAt: unmarshalDate(data.closed_at),
|
|
139
|
-
reason: data.reason,
|
|
140
|
-
startsAt: unmarshalDate(data.starts_at),
|
|
141
|
-
status: data.status,
|
|
142
|
-
stopsAt: unmarshalDate(data.stops_at)
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
146
|
const unmarshalUpgradableVersion = data => {
|
|
146
147
|
if (!isJSONObject(data)) {
|
|
147
148
|
throw new TypeError(`Unmarshalling the type 'UpgradableVersion' failed as data isn't a dictionary.`);
|
|
@@ -709,4 +710,4 @@ const marshalUpgradeInstanceRequest = (request, defaults) => ({
|
|
|
709
710
|
}])
|
|
710
711
|
});
|
|
711
712
|
|
|
712
|
-
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, unmarshalPrepareInstanceLogsResponse, unmarshalPrivilege, unmarshalReadReplica, unmarshalSetInstanceACLRulesResponse, unmarshalSetInstanceSettingsResponse, unmarshalSnapshot, unmarshalUser };
|
|
713
|
+
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 };
|
|
@@ -96,7 +96,7 @@ class API extends API$1 {
|
|
|
96
96
|
browseSecrets = request => this.client.fetch({
|
|
97
97
|
method: 'GET',
|
|
98
98
|
path: `/secret-manager/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/secrets/browse`,
|
|
99
|
-
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['prefix', request.prefix], ['project_id', request.projectId])
|
|
99
|
+
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['prefix', request.prefix], ['project_id', request.projectId], ['tags', request.tags])
|
|
100
100
|
}, unmarshalBrowseSecretsResponse);
|
|
101
101
|
|
|
102
102
|
/**
|