@scaleway/sdk-mongodb 2.4.1 → 2.6.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/_virtual/_rolldown/runtime.js +2 -0
- package/dist/v1/api.gen.js +5 -3
- package/dist/v1/content.gen.js +5 -3
- package/dist/v1/index.gen.d.ts +1 -1
- package/dist/v1/index.gen.js +8 -3
- package/dist/v1/marshalling.gen.d.ts +4 -1
- package/dist/v1/marshalling.gen.js +33 -23
- package/dist/v1/metadata.gen.d.ts +125 -0
- package/dist/v1/metadata.gen.js +139 -0
- package/dist/v1/types.gen.d.ts +8 -0
- package/dist/v1/types.gen.js +0 -0
- package/dist/v1/validation-rules.gen.js +20 -18
- package/dist/v1alpha1/api.gen.js +5 -3
- package/dist/v1alpha1/content.gen.js +4 -2
- package/dist/v1alpha1/index.gen.js +5 -5
- package/dist/v1alpha1/marshalling.gen.d.ts +1 -3
- package/dist/v1alpha1/marshalling.gen.js +24 -22
- package/dist/v1alpha1/metadata.gen.d.ts +93 -0
- package/dist/v1alpha1/metadata.gen.js +104 -0
- package/dist/v1alpha1/types.gen.js +0 -0
- package/dist/v1alpha1/validation-rules.gen.js +17 -15
- 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 { INSTANCE_TRANSIENT_STATUSES, MAINTENANCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
2
|
import { marshalCreateEndpointRequest, marshalCreateInstanceRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalRestoreSnapshotRequest, marshalSetUserRoleRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, unmarshalEndpoint, unmarshalInstance, unmarshalListDatabasesResponse, unmarshalListInstancesResponse, unmarshalListMaintenancesResponse, unmarshalListNodeTypesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalMaintenance, 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 MongoDB®.
|
|
7
8
|
|
|
8
9
|
This API allows you to manage your Managed Databases for MongoDB®.
|
|
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'}
|
|
@@ -334,4 +335,5 @@ var API$1 = class extends API {
|
|
|
334
335
|
path: `/mongodb/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/maintenances/${validatePathParam("maintenanceId", request.maintenanceId)}/apply`
|
|
335
336
|
}, unmarshalMaintenance);
|
|
336
337
|
};
|
|
337
|
-
|
|
338
|
+
//#endregion
|
|
339
|
+
export { API };
|
package/dist/v1/content.gen.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
//#region src/v1/content.gen.ts
|
|
1
2
|
/** Lists transient statutes of the enum {@link InstanceStatus}. */
|
|
2
|
-
|
|
3
|
+
var INSTANCE_TRANSIENT_STATUSES = [
|
|
3
4
|
"provisioning",
|
|
4
5
|
"configuring",
|
|
5
6
|
"deleting",
|
|
@@ -7,11 +8,12 @@ const INSTANCE_TRANSIENT_STATUSES = [
|
|
|
7
8
|
"snapshotting"
|
|
8
9
|
];
|
|
9
10
|
/** Lists transient statutes of the enum {@link MaintenanceStatus}. */
|
|
10
|
-
|
|
11
|
+
var MAINTENANCE_TRANSIENT_STATUSES = ["ongoing"];
|
|
11
12
|
/** Lists transient statutes of the enum {@link SnapshotStatus}. */
|
|
12
|
-
|
|
13
|
+
var SNAPSHOT_TRANSIENT_STATUSES = [
|
|
13
14
|
"creating",
|
|
14
15
|
"restoring",
|
|
15
16
|
"deleting"
|
|
16
17
|
];
|
|
18
|
+
//#endregion
|
|
17
19
|
export { INSTANCE_TRANSIENT_STATUSES, MAINTENANCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES };
|
package/dist/v1/index.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { API, } from './api.gen.js';
|
|
2
2
|
export * from './content.gen.js';
|
|
3
3
|
export * from './marshalling.gen.js';
|
|
4
|
-
export type { ApplyMaintenanceRequest, CreateEndpointRequest, CreateInstanceRequest, CreateSnapshotRequest, CreateUserRequest, Database, DeleteEndpointRequest, DeleteInstanceRequest, DeleteSnapshotRequest, DeleteUserRequest, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicNetworkDetails, EndpointSpec, EndpointSpecPrivateNetworkDetails, EndpointSpecPublicNetworkDetails, EngineUpgrade, GetInstanceCertificateRequest, GetInstanceRequest, GetMaintenanceRequest, GetSnapshotRequest, Instance, InstanceSnapshotSchedule, InstanceStatus, ListDatabasesRequest, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListInstancesRequest, ListInstancesRequestOrderBy, ListInstancesResponse, ListMaintenancesRequest, ListMaintenancesRequestOrderBy, ListMaintenancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, Maintenance, MaintenanceAppliedBy, MaintenanceStatus, NodeType, NodeTypeStock, NodeTypeVolumeType, RestoreSnapshotRequest, ServiceUpdate, SetUserRoleRequest, Snapshot, SnapshotStatus, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User, UserRole, UserRoleRole, Version, Volume, VolumeType, Workflow, } from './types.gen.js';
|
|
4
|
+
export type { ApplyMaintenanceRequest, CreateEndpointRequest, CreateInstanceRequest, CreateSnapshotRequest, CreateUserRequest, Database, DeleteEndpointRequest, DeleteInstanceRequest, DeleteSnapshotRequest, DeleteUserRequest, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicNetworkDetails, EndpointSpec, EndpointSpecPrivateNetworkDetails, EndpointSpecPublicNetworkDetails, EngineUpgrade, GetInstanceCertificateRequest, GetInstanceRequest, GetMaintenanceRequest, GetSnapshotRequest, Instance, InstanceSetting, InstanceSnapshotSchedule, InstanceStatus, ListDatabasesRequest, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListInstancesRequest, ListInstancesRequestOrderBy, ListInstancesResponse, ListMaintenancesRequest, ListMaintenancesRequestOrderBy, ListMaintenancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, Maintenance, MaintenanceAppliedBy, MaintenanceStatus, NodeType, NodeTypeStock, NodeTypeVolumeType, RestoreSnapshotRequest, ServiceUpdate, SetUserRoleRequest, Snapshot, SnapshotStatus, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User, UserRole, UserRoleRole, Version, Volume, VolumeType, Workflow, } from './types.gen.js';
|
|
5
5
|
export * as ValidationRules from './validation-rules.gen.js';
|
package/dist/v1/index.gen.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { INSTANCE_TRANSIENT_STATUSES, MAINTENANCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
import { marshalCreateEndpointRequest, marshalCreateInstanceRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalRestoreSnapshotRequest, marshalSetUserRoleRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, unmarshalEndpoint, unmarshalInstance, unmarshalListDatabasesResponse, unmarshalListInstancesResponse, unmarshalListMaintenancesResponse, unmarshalListNodeTypesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalMaintenance, unmarshalSnapshot, unmarshalUser } from "./marshalling.gen.js";
|
|
3
|
+
import { marshalCreateEndpointRequest, marshalCreateInstanceRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalRestoreSnapshotRequest, marshalSetUserRoleRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, marshalVolume, unmarshalEndpoint, unmarshalInstance, unmarshalInstanceSetting, unmarshalListDatabasesResponse, unmarshalListInstancesResponse, unmarshalListMaintenancesResponse, unmarshalListNodeTypesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalMaintenance, unmarshalSnapshot, unmarshalUser, unmarshalVolume } 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
|
INSTANCE_TRANSIENT_STATUSES: () => INSTANCE_TRANSIENT_STATUSES,
|
|
@@ -19,8 +20,10 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
19
20
|
marshalUpdateSnapshotRequest: () => marshalUpdateSnapshotRequest,
|
|
20
21
|
marshalUpdateUserRequest: () => marshalUpdateUserRequest,
|
|
21
22
|
marshalUpgradeInstanceRequest: () => marshalUpgradeInstanceRequest,
|
|
23
|
+
marshalVolume: () => marshalVolume,
|
|
22
24
|
unmarshalEndpoint: () => unmarshalEndpoint,
|
|
23
25
|
unmarshalInstance: () => unmarshalInstance,
|
|
26
|
+
unmarshalInstanceSetting: () => unmarshalInstanceSetting,
|
|
24
27
|
unmarshalListDatabasesResponse: () => unmarshalListDatabasesResponse,
|
|
25
28
|
unmarshalListInstancesResponse: () => unmarshalListInstancesResponse,
|
|
26
29
|
unmarshalListMaintenancesResponse: () => unmarshalListMaintenancesResponse,
|
|
@@ -30,6 +33,8 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
30
33
|
unmarshalListVersionsResponse: () => unmarshalListVersionsResponse,
|
|
31
34
|
unmarshalMaintenance: () => unmarshalMaintenance,
|
|
32
35
|
unmarshalSnapshot: () => unmarshalSnapshot,
|
|
33
|
-
unmarshalUser: () => unmarshalUser
|
|
36
|
+
unmarshalUser: () => unmarshalUser,
|
|
37
|
+
unmarshalVolume: () => unmarshalVolume
|
|
34
38
|
});
|
|
35
|
-
|
|
39
|
+
//#endregion
|
|
40
|
+
export { API, INSTANCE_TRANSIENT_STATUSES, MAINTENANCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalCreateEndpointRequest, marshalCreateInstanceRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalRestoreSnapshotRequest, marshalSetUserRoleRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, marshalVolume, unmarshalEndpoint, unmarshalInstance, unmarshalInstanceSetting, unmarshalListDatabasesResponse, unmarshalListInstancesResponse, unmarshalListMaintenancesResponse, unmarshalListNodeTypesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalMaintenance, unmarshalSnapshot, unmarshalUser, unmarshalVolume };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { CreateEndpointRequest, CreateInstanceRequest, CreateSnapshotRequest, CreateUserRequest, Endpoint, Instance, ListDatabasesResponse, ListInstancesResponse, ListMaintenancesResponse, ListNodeTypesResponse, ListSnapshotsResponse, ListUsersResponse, ListVersionsResponse, Maintenance, RestoreSnapshotRequest, SetUserRoleRequest, Snapshot, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User } from './types.gen.js';
|
|
2
|
+
import type { CreateEndpointRequest, CreateInstanceRequest, CreateSnapshotRequest, CreateUserRequest, Endpoint, Instance, InstanceSetting, ListDatabasesResponse, ListInstancesResponse, ListMaintenancesResponse, ListNodeTypesResponse, ListSnapshotsResponse, ListUsersResponse, ListVersionsResponse, Maintenance, RestoreSnapshotRequest, SetUserRoleRequest, Snapshot, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User, Volume } from './types.gen.js';
|
|
3
3
|
export declare const unmarshalEndpoint: (data: unknown) => Endpoint;
|
|
4
|
+
export declare const unmarshalInstanceSetting: (data: unknown) => InstanceSetting;
|
|
5
|
+
export declare const unmarshalVolume: (data: unknown) => Volume;
|
|
4
6
|
export declare const unmarshalInstance: (data: unknown) => Instance;
|
|
5
7
|
export declare const unmarshalMaintenance: (data: unknown) => Maintenance;
|
|
6
8
|
export declare const unmarshalSnapshot: (data: unknown) => Snapshot;
|
|
@@ -13,6 +15,7 @@ export declare const unmarshalListSnapshotsResponse: (data: unknown) => ListSnap
|
|
|
13
15
|
export declare const unmarshalListUsersResponse: (data: unknown) => ListUsersResponse;
|
|
14
16
|
export declare const unmarshalListVersionsResponse: (data: unknown) => ListVersionsResponse;
|
|
15
17
|
export declare const marshalCreateEndpointRequest: (request: CreateEndpointRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
18
|
+
export declare const marshalVolume: (request: Volume, defaults: DefaultValues) => Record<string, unknown>;
|
|
16
19
|
export declare const marshalCreateInstanceRequest: (request: CreateInstanceRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
17
20
|
export declare const marshalCreateSnapshotRequest: (request: CreateSnapshotRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
18
21
|
export declare const marshalCreateUserRequest: (request: CreateUserRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
2
2
|
import randomName from "@scaleway/random-name";
|
|
3
|
+
//#region src/v1/marshalling.gen.ts
|
|
3
4
|
var unmarshalEndpointPrivateNetworkDetails = (data) => {
|
|
4
5
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary.`);
|
|
5
6
|
return { privateNetworkId: data.private_network_id };
|
|
@@ -8,7 +9,7 @@ var unmarshalEndpointPublicNetworkDetails = (data) => {
|
|
|
8
9
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPublicNetworkDetails' failed as data isn't a dictionary.`);
|
|
9
10
|
return {};
|
|
10
11
|
};
|
|
11
|
-
|
|
12
|
+
var unmarshalEndpoint = (data) => {
|
|
12
13
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`);
|
|
13
14
|
return {
|
|
14
15
|
dnsRecord: data.dns_record,
|
|
@@ -18,6 +19,13 @@ const unmarshalEndpoint = (data) => {
|
|
|
18
19
|
publicNetwork: data.public_network ? unmarshalEndpointPublicNetworkDetails(data.public_network) : void 0
|
|
19
20
|
};
|
|
20
21
|
};
|
|
22
|
+
var unmarshalInstanceSetting = (data) => {
|
|
23
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstanceSetting' failed as data isn't a dictionary.`);
|
|
24
|
+
return {
|
|
25
|
+
name: data.name,
|
|
26
|
+
value: data.value
|
|
27
|
+
};
|
|
28
|
+
};
|
|
21
29
|
var unmarshalInstanceSnapshotSchedule = (data) => {
|
|
22
30
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstanceSnapshotSchedule' failed as data isn't a dictionary.`);
|
|
23
31
|
return {
|
|
@@ -35,7 +43,7 @@ var unmarshalVolume = (data) => {
|
|
|
35
43
|
type: data.type
|
|
36
44
|
};
|
|
37
45
|
};
|
|
38
|
-
|
|
46
|
+
var unmarshalInstance = (data) => {
|
|
39
47
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Instance' failed as data isn't a dictionary.`);
|
|
40
48
|
return {
|
|
41
49
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -47,6 +55,7 @@ const unmarshalInstance = (data) => {
|
|
|
47
55
|
organizationId: data.organization_id,
|
|
48
56
|
projectId: data.project_id,
|
|
49
57
|
region: data.region,
|
|
58
|
+
settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting),
|
|
50
59
|
snapshotSchedule: data.snapshot_schedule ? unmarshalInstanceSnapshotSchedule(data.snapshot_schedule) : void 0,
|
|
51
60
|
status: data.status,
|
|
52
61
|
tags: data.tags,
|
|
@@ -69,7 +78,7 @@ var unmarshalWorkflow = (data) => {
|
|
|
69
78
|
serviceUpdate: data.service_update ? unmarshalServiceUpdate(data.service_update) : void 0
|
|
70
79
|
};
|
|
71
80
|
};
|
|
72
|
-
|
|
81
|
+
var unmarshalMaintenance = (data) => {
|
|
73
82
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Maintenance' failed as data isn't a dictionary.`);
|
|
74
83
|
return {
|
|
75
84
|
appliedAt: unmarshalDate(data.applied_at),
|
|
@@ -85,7 +94,7 @@ const unmarshalMaintenance = (data) => {
|
|
|
85
94
|
workflow: data.workflow ? unmarshalWorkflow(data.workflow) : void 0
|
|
86
95
|
};
|
|
87
96
|
};
|
|
88
|
-
|
|
97
|
+
var unmarshalSnapshot = (data) => {
|
|
89
98
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Snapshot' failed as data isn't a dictionary.`);
|
|
90
99
|
return {
|
|
91
100
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -110,7 +119,7 @@ var unmarshalUserRole = (data) => {
|
|
|
110
119
|
role: data.role
|
|
111
120
|
};
|
|
112
121
|
};
|
|
113
|
-
|
|
122
|
+
var unmarshalUser = (data) => {
|
|
114
123
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'User' failed as data isn't a dictionary.`);
|
|
115
124
|
return {
|
|
116
125
|
name: data.name,
|
|
@@ -121,21 +130,21 @@ var unmarshalDatabase = (data) => {
|
|
|
121
130
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Database' failed as data isn't a dictionary.`);
|
|
122
131
|
return { name: data.name };
|
|
123
132
|
};
|
|
124
|
-
|
|
133
|
+
var unmarshalListDatabasesResponse = (data) => {
|
|
125
134
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary.`);
|
|
126
135
|
return {
|
|
127
136
|
databases: unmarshalArrayOfObject(data.databases, unmarshalDatabase),
|
|
128
137
|
totalCount: data.total_count
|
|
129
138
|
};
|
|
130
139
|
};
|
|
131
|
-
|
|
140
|
+
var unmarshalListInstancesResponse = (data) => {
|
|
132
141
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstancesResponse' failed as data isn't a dictionary.`);
|
|
133
142
|
return {
|
|
134
143
|
instances: unmarshalArrayOfObject(data.instances, unmarshalInstance),
|
|
135
144
|
totalCount: data.total_count
|
|
136
145
|
};
|
|
137
146
|
};
|
|
138
|
-
|
|
147
|
+
var unmarshalListMaintenancesResponse = (data) => {
|
|
139
148
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListMaintenancesResponse' failed as data isn't a dictionary.`);
|
|
140
149
|
return {
|
|
141
150
|
maintenances: unmarshalArrayOfObject(data.maintenances, unmarshalMaintenance),
|
|
@@ -166,21 +175,21 @@ var unmarshalNodeType = (data) => {
|
|
|
166
175
|
vcpus: data.vcpus
|
|
167
176
|
};
|
|
168
177
|
};
|
|
169
|
-
|
|
178
|
+
var unmarshalListNodeTypesResponse = (data) => {
|
|
170
179
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`);
|
|
171
180
|
return {
|
|
172
181
|
nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
|
|
173
182
|
totalCount: data.total_count
|
|
174
183
|
};
|
|
175
184
|
};
|
|
176
|
-
|
|
185
|
+
var unmarshalListSnapshotsResponse = (data) => {
|
|
177
186
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary.`);
|
|
178
187
|
return {
|
|
179
188
|
snapshots: unmarshalArrayOfObject(data.snapshots, unmarshalSnapshot),
|
|
180
189
|
totalCount: data.total_count
|
|
181
190
|
};
|
|
182
191
|
};
|
|
183
|
-
|
|
192
|
+
var unmarshalListUsersResponse = (data) => {
|
|
184
193
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`);
|
|
185
194
|
return {
|
|
186
195
|
totalCount: data.total_count,
|
|
@@ -194,7 +203,7 @@ var unmarshalVersion = (data) => {
|
|
|
194
203
|
version: data.version
|
|
195
204
|
};
|
|
196
205
|
};
|
|
197
|
-
|
|
206
|
+
var unmarshalListVersionsResponse = (data) => {
|
|
198
207
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`);
|
|
199
208
|
return {
|
|
200
209
|
totalCount: data.total_count,
|
|
@@ -210,7 +219,7 @@ var marshalEndpointSpec = (request, defaults) => ({ ...resolveOneOf([{
|
|
|
210
219
|
param: "private_network",
|
|
211
220
|
value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkDetails(request.privateNetwork, defaults) : void 0
|
|
212
221
|
}]) });
|
|
213
|
-
|
|
222
|
+
var marshalCreateEndpointRequest = (request, defaults) => ({
|
|
214
223
|
endpoint: marshalEndpointSpec(request.endpoint, defaults),
|
|
215
224
|
instance_id: request.instanceId
|
|
216
225
|
});
|
|
@@ -218,7 +227,7 @@ var marshalVolume = (request, defaults) => ({
|
|
|
218
227
|
size_bytes: request.sizeBytes,
|
|
219
228
|
type: request.type
|
|
220
229
|
});
|
|
221
|
-
|
|
230
|
+
var marshalCreateInstanceRequest = (request, defaults) => ({
|
|
222
231
|
endpoints: request.endpoints !== void 0 ? request.endpoints.map((elt) => marshalEndpointSpec(elt, defaults)) : void 0,
|
|
223
232
|
name: request.name || randomName("mgdb"),
|
|
224
233
|
node_amount: request.nodeAmount,
|
|
@@ -230,16 +239,16 @@ const marshalCreateInstanceRequest = (request, defaults) => ({
|
|
|
230
239
|
version: request.version,
|
|
231
240
|
volume: request.volume !== void 0 ? marshalVolume(request.volume, defaults) : void 0
|
|
232
241
|
});
|
|
233
|
-
|
|
242
|
+
var marshalCreateSnapshotRequest = (request, defaults) => ({
|
|
234
243
|
expires_at: request.expiresAt,
|
|
235
244
|
instance_id: request.instanceId,
|
|
236
245
|
name: request.name
|
|
237
246
|
});
|
|
238
|
-
|
|
247
|
+
var marshalCreateUserRequest = (request, defaults) => ({
|
|
239
248
|
name: request.name,
|
|
240
249
|
password: request.password
|
|
241
250
|
});
|
|
242
|
-
|
|
251
|
+
var marshalRestoreSnapshotRequest = (request, defaults) => ({
|
|
243
252
|
instance_name: request.instanceName,
|
|
244
253
|
node_amount: request.nodeAmount,
|
|
245
254
|
node_type: request.nodeType,
|
|
@@ -255,27 +264,28 @@ var marshalUserRole = (request, defaults) => ({
|
|
|
255
264
|
value: request.anyDatabase
|
|
256
265
|
}])
|
|
257
266
|
});
|
|
258
|
-
|
|
267
|
+
var marshalSetUserRoleRequest = (request, defaults) => ({
|
|
259
268
|
roles: request.roles !== void 0 ? request.roles.map((elt) => marshalUserRole(elt, defaults)) : void 0,
|
|
260
269
|
user_name: request.userName
|
|
261
270
|
});
|
|
262
|
-
|
|
271
|
+
var marshalUpdateInstanceRequest = (request, defaults) => ({
|
|
263
272
|
is_snapshot_schedule_enabled: request.isSnapshotScheduleEnabled,
|
|
264
273
|
name: request.name,
|
|
265
274
|
snapshot_schedule_frequency_hours: request.snapshotScheduleFrequencyHours,
|
|
266
275
|
snapshot_schedule_retention_days: request.snapshotScheduleRetentionDays,
|
|
267
276
|
tags: request.tags
|
|
268
277
|
});
|
|
269
|
-
|
|
278
|
+
var marshalUpdateSnapshotRequest = (request, defaults) => ({
|
|
270
279
|
expires_at: request.expiresAt,
|
|
271
280
|
name: request.name
|
|
272
281
|
});
|
|
273
|
-
|
|
274
|
-
|
|
282
|
+
var marshalUpdateUserRequest = (request, defaults) => ({ password: request.password });
|
|
283
|
+
var marshalUpgradeInstanceRequest = (request, defaults) => ({ ...resolveOneOf([{
|
|
275
284
|
param: "volume_size_bytes",
|
|
276
285
|
value: request.volumeSizeBytes
|
|
277
286
|
}, {
|
|
278
287
|
param: "version_id",
|
|
279
288
|
value: request.versionId
|
|
280
289
|
}]) });
|
|
281
|
-
|
|
290
|
+
//#endregion
|
|
291
|
+
export { marshalCreateEndpointRequest, marshalCreateInstanceRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalRestoreSnapshotRequest, marshalSetUserRoleRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, marshalVolume, unmarshalEndpoint, unmarshalInstance, unmarshalInstanceSetting, unmarshalListDatabasesResponse, unmarshalListInstancesResponse, unmarshalListMaintenancesResponse, unmarshalListNodeTypesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalMaintenance, unmarshalSnapshot, unmarshalUser, unmarshalVolume };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
export declare const queriesMetadata: {
|
|
2
|
+
readonly namespace: "mongodb";
|
|
3
|
+
readonly version: "v1";
|
|
4
|
+
readonly folderName: "mongodbv1";
|
|
5
|
+
readonly services: readonly [{
|
|
6
|
+
readonly apiClass: "API";
|
|
7
|
+
readonly methods: readonly [{
|
|
8
|
+
readonly methodName: "listNodeTypes";
|
|
9
|
+
readonly protoName: "ListNodeTypes";
|
|
10
|
+
readonly paramsType: "ListNodeTypesRequest";
|
|
11
|
+
readonly returnType: "ListNodeTypesResponse";
|
|
12
|
+
readonly isList: true;
|
|
13
|
+
readonly paginationType: "offset";
|
|
14
|
+
readonly pageParamKey: "page";
|
|
15
|
+
readonly listItemType: "NodeType";
|
|
16
|
+
readonly isPrivate: false;
|
|
17
|
+
readonly description: "\"";
|
|
18
|
+
}, {
|
|
19
|
+
readonly methodName: "listVersions";
|
|
20
|
+
readonly protoName: "ListVersions";
|
|
21
|
+
readonly paramsType: "ListVersionsRequest";
|
|
22
|
+
readonly returnType: "ListVersionsResponse";
|
|
23
|
+
readonly isList: true;
|
|
24
|
+
readonly paginationType: "offset";
|
|
25
|
+
readonly pageParamKey: "page";
|
|
26
|
+
readonly listItemType: "Version";
|
|
27
|
+
readonly isPrivate: false;
|
|
28
|
+
readonly description: "\"";
|
|
29
|
+
}, {
|
|
30
|
+
readonly methodName: "listInstances";
|
|
31
|
+
readonly protoName: "ListInstances";
|
|
32
|
+
readonly paramsType: "ListInstancesRequest";
|
|
33
|
+
readonly returnType: "ListInstancesResponse";
|
|
34
|
+
readonly isList: true;
|
|
35
|
+
readonly paginationType: "offset";
|
|
36
|
+
readonly pageParamKey: "page";
|
|
37
|
+
readonly listItemType: "Instance";
|
|
38
|
+
readonly isPrivate: false;
|
|
39
|
+
readonly description: "\"";
|
|
40
|
+
}, {
|
|
41
|
+
readonly methodName: "getInstance";
|
|
42
|
+
readonly protoName: "GetInstance";
|
|
43
|
+
readonly paramsType: "GetInstanceRequest";
|
|
44
|
+
readonly returnType: "Instance";
|
|
45
|
+
readonly isList: false;
|
|
46
|
+
readonly paginationType: "none";
|
|
47
|
+
readonly isPrivate: false;
|
|
48
|
+
readonly description: "\"";
|
|
49
|
+
readonly hasWaiter: true;
|
|
50
|
+
}, {
|
|
51
|
+
readonly methodName: "getInstanceCertificate";
|
|
52
|
+
readonly protoName: "GetInstanceCertificate";
|
|
53
|
+
readonly paramsType: "GetInstanceCertificateRequest";
|
|
54
|
+
readonly returnType: "Blob";
|
|
55
|
+
readonly isList: false;
|
|
56
|
+
readonly paginationType: "none";
|
|
57
|
+
readonly isPrivate: false;
|
|
58
|
+
readonly description: "\"";
|
|
59
|
+
}, {
|
|
60
|
+
readonly methodName: "getSnapshot";
|
|
61
|
+
readonly protoName: "GetSnapshot";
|
|
62
|
+
readonly paramsType: "GetSnapshotRequest";
|
|
63
|
+
readonly returnType: "Snapshot";
|
|
64
|
+
readonly isList: false;
|
|
65
|
+
readonly paginationType: "none";
|
|
66
|
+
readonly isPrivate: false;
|
|
67
|
+
readonly description: "\"";
|
|
68
|
+
}, {
|
|
69
|
+
readonly methodName: "listSnapshots";
|
|
70
|
+
readonly protoName: "ListSnapshots";
|
|
71
|
+
readonly paramsType: "ListSnapshotsRequest";
|
|
72
|
+
readonly returnType: "ListSnapshotsResponse";
|
|
73
|
+
readonly isList: true;
|
|
74
|
+
readonly paginationType: "offset";
|
|
75
|
+
readonly pageParamKey: "page";
|
|
76
|
+
readonly listItemType: "Snapshot";
|
|
77
|
+
readonly isPrivate: false;
|
|
78
|
+
readonly description: "\"";
|
|
79
|
+
}, {
|
|
80
|
+
readonly methodName: "listUsers";
|
|
81
|
+
readonly protoName: "ListUsers";
|
|
82
|
+
readonly paramsType: "ListUsersRequest";
|
|
83
|
+
readonly returnType: "ListUsersResponse";
|
|
84
|
+
readonly isList: true;
|
|
85
|
+
readonly paginationType: "offset";
|
|
86
|
+
readonly pageParamKey: "page";
|
|
87
|
+
readonly listItemType: "User";
|
|
88
|
+
readonly isPrivate: false;
|
|
89
|
+
readonly description: "\"";
|
|
90
|
+
}, {
|
|
91
|
+
readonly methodName: "listDatabases";
|
|
92
|
+
readonly protoName: "ListDatabases";
|
|
93
|
+
readonly paramsType: "ListDatabasesRequest";
|
|
94
|
+
readonly returnType: "ListDatabasesResponse";
|
|
95
|
+
readonly isList: true;
|
|
96
|
+
readonly paginationType: "offset";
|
|
97
|
+
readonly pageParamKey: "page";
|
|
98
|
+
readonly listItemType: "Database";
|
|
99
|
+
readonly isPrivate: false;
|
|
100
|
+
readonly description: "\"";
|
|
101
|
+
}, {
|
|
102
|
+
readonly methodName: "listMaintenances";
|
|
103
|
+
readonly protoName: "ListMaintenances";
|
|
104
|
+
readonly paramsType: "ListMaintenancesRequest";
|
|
105
|
+
readonly returnType: "ListMaintenancesResponse";
|
|
106
|
+
readonly isList: true;
|
|
107
|
+
readonly paginationType: "offset";
|
|
108
|
+
readonly pageParamKey: "page";
|
|
109
|
+
readonly listItemType: "Maintenance";
|
|
110
|
+
readonly isPrivate: false;
|
|
111
|
+
readonly description: "\"";
|
|
112
|
+
}, {
|
|
113
|
+
readonly methodName: "getMaintenance";
|
|
114
|
+
readonly protoName: "GetMaintenance";
|
|
115
|
+
readonly paramsType: "GetMaintenanceRequest";
|
|
116
|
+
readonly returnType: "Maintenance";
|
|
117
|
+
readonly isList: false;
|
|
118
|
+
readonly paginationType: "none";
|
|
119
|
+
readonly isPrivate: false;
|
|
120
|
+
readonly description: "\"";
|
|
121
|
+
readonly hasWaiter: true;
|
|
122
|
+
}];
|
|
123
|
+
}];
|
|
124
|
+
};
|
|
125
|
+
export type QueriesMetadata = typeof queriesMetadata;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
//#region src/v1/metadata.gen.ts
|
|
2
|
+
var queriesMetadata = {
|
|
3
|
+
namespace: "mongodb",
|
|
4
|
+
version: "v1",
|
|
5
|
+
folderName: "mongodbv1",
|
|
6
|
+
services: [{
|
|
7
|
+
apiClass: "API",
|
|
8
|
+
methods: [
|
|
9
|
+
{
|
|
10
|
+
methodName: "listNodeTypes",
|
|
11
|
+
protoName: "ListNodeTypes",
|
|
12
|
+
paramsType: "ListNodeTypesRequest",
|
|
13
|
+
returnType: "ListNodeTypesResponse",
|
|
14
|
+
isList: true,
|
|
15
|
+
paginationType: "offset",
|
|
16
|
+
pageParamKey: "page",
|
|
17
|
+
listItemType: "NodeType",
|
|
18
|
+
isPrivate: false,
|
|
19
|
+
description: "\""
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
methodName: "listVersions",
|
|
23
|
+
protoName: "ListVersions",
|
|
24
|
+
paramsType: "ListVersionsRequest",
|
|
25
|
+
returnType: "ListVersionsResponse",
|
|
26
|
+
isList: true,
|
|
27
|
+
paginationType: "offset",
|
|
28
|
+
pageParamKey: "page",
|
|
29
|
+
listItemType: "Version",
|
|
30
|
+
isPrivate: false,
|
|
31
|
+
description: "\""
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
methodName: "listInstances",
|
|
35
|
+
protoName: "ListInstances",
|
|
36
|
+
paramsType: "ListInstancesRequest",
|
|
37
|
+
returnType: "ListInstancesResponse",
|
|
38
|
+
isList: true,
|
|
39
|
+
paginationType: "offset",
|
|
40
|
+
pageParamKey: "page",
|
|
41
|
+
listItemType: "Instance",
|
|
42
|
+
isPrivate: false,
|
|
43
|
+
description: "\""
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
methodName: "getInstance",
|
|
47
|
+
protoName: "GetInstance",
|
|
48
|
+
paramsType: "GetInstanceRequest",
|
|
49
|
+
returnType: "Instance",
|
|
50
|
+
isList: false,
|
|
51
|
+
paginationType: "none",
|
|
52
|
+
isPrivate: false,
|
|
53
|
+
description: "\"",
|
|
54
|
+
hasWaiter: true
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
methodName: "getInstanceCertificate",
|
|
58
|
+
protoName: "GetInstanceCertificate",
|
|
59
|
+
paramsType: "GetInstanceCertificateRequest",
|
|
60
|
+
returnType: "Blob",
|
|
61
|
+
isList: false,
|
|
62
|
+
paginationType: "none",
|
|
63
|
+
isPrivate: false,
|
|
64
|
+
description: "\""
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
methodName: "getSnapshot",
|
|
68
|
+
protoName: "GetSnapshot",
|
|
69
|
+
paramsType: "GetSnapshotRequest",
|
|
70
|
+
returnType: "Snapshot",
|
|
71
|
+
isList: false,
|
|
72
|
+
paginationType: "none",
|
|
73
|
+
isPrivate: false,
|
|
74
|
+
description: "\""
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
methodName: "listSnapshots",
|
|
78
|
+
protoName: "ListSnapshots",
|
|
79
|
+
paramsType: "ListSnapshotsRequest",
|
|
80
|
+
returnType: "ListSnapshotsResponse",
|
|
81
|
+
isList: true,
|
|
82
|
+
paginationType: "offset",
|
|
83
|
+
pageParamKey: "page",
|
|
84
|
+
listItemType: "Snapshot",
|
|
85
|
+
isPrivate: false,
|
|
86
|
+
description: "\""
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
methodName: "listUsers",
|
|
90
|
+
protoName: "ListUsers",
|
|
91
|
+
paramsType: "ListUsersRequest",
|
|
92
|
+
returnType: "ListUsersResponse",
|
|
93
|
+
isList: true,
|
|
94
|
+
paginationType: "offset",
|
|
95
|
+
pageParamKey: "page",
|
|
96
|
+
listItemType: "User",
|
|
97
|
+
isPrivate: false,
|
|
98
|
+
description: "\""
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
methodName: "listDatabases",
|
|
102
|
+
protoName: "ListDatabases",
|
|
103
|
+
paramsType: "ListDatabasesRequest",
|
|
104
|
+
returnType: "ListDatabasesResponse",
|
|
105
|
+
isList: true,
|
|
106
|
+
paginationType: "offset",
|
|
107
|
+
pageParamKey: "page",
|
|
108
|
+
listItemType: "Database",
|
|
109
|
+
isPrivate: false,
|
|
110
|
+
description: "\""
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
methodName: "listMaintenances",
|
|
114
|
+
protoName: "ListMaintenances",
|
|
115
|
+
paramsType: "ListMaintenancesRequest",
|
|
116
|
+
returnType: "ListMaintenancesResponse",
|
|
117
|
+
isList: true,
|
|
118
|
+
paginationType: "offset",
|
|
119
|
+
pageParamKey: "page",
|
|
120
|
+
listItemType: "Maintenance",
|
|
121
|
+
isPrivate: false,
|
|
122
|
+
description: "\""
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
methodName: "getMaintenance",
|
|
126
|
+
protoName: "GetMaintenance",
|
|
127
|
+
paramsType: "GetMaintenanceRequest",
|
|
128
|
+
returnType: "Maintenance",
|
|
129
|
+
isList: false,
|
|
130
|
+
paginationType: "none",
|
|
131
|
+
isPrivate: false,
|
|
132
|
+
description: "\"",
|
|
133
|
+
hasWaiter: true
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}]
|
|
137
|
+
};
|
|
138
|
+
//#endregion
|
|
139
|
+
export { queriesMetadata };
|
package/dist/v1/types.gen.d.ts
CHANGED
|
@@ -65,6 +65,10 @@ export interface Endpoint {
|
|
|
65
65
|
*/
|
|
66
66
|
publicNetwork?: EndpointPublicNetworkDetails;
|
|
67
67
|
}
|
|
68
|
+
export interface InstanceSetting {
|
|
69
|
+
name: string;
|
|
70
|
+
value: string;
|
|
71
|
+
}
|
|
68
72
|
export interface InstanceSnapshotSchedule {
|
|
69
73
|
frequencyHours: number;
|
|
70
74
|
retentionDays: number;
|
|
@@ -206,6 +210,10 @@ export interface Instance {
|
|
|
206
210
|
* Snapshot schedule configuration of the Database Instance.
|
|
207
211
|
*/
|
|
208
212
|
snapshotSchedule?: InstanceSnapshotSchedule;
|
|
213
|
+
/**
|
|
214
|
+
* List of settings applied to the Database Instance.
|
|
215
|
+
*/
|
|
216
|
+
settings: InstanceSetting[];
|
|
209
217
|
}
|
|
210
218
|
export interface Maintenance {
|
|
211
219
|
/**
|
|
File without changes
|