@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,4 +1,5 @@
|
|
|
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({
|
|
3
4
|
CreateInstanceRequest: () => CreateInstanceRequest,
|
|
4
5
|
CreateSnapshotRequest: () => CreateSnapshotRequest,
|
|
@@ -18,7 +19,7 @@ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
18
19
|
UpdateUserRequest: () => UpdateUserRequest,
|
|
19
20
|
Volume: () => Volume
|
|
20
21
|
});
|
|
21
|
-
|
|
22
|
+
var CreateInstanceRequest = {
|
|
22
23
|
name: {
|
|
23
24
|
maxLength: 255,
|
|
24
25
|
minLength: 1,
|
|
@@ -44,12 +45,12 @@ const CreateInstanceRequest = {
|
|
|
44
45
|
},
|
|
45
46
|
version: { pattern: /^[0-9]+\.[0-9]+$/ }
|
|
46
47
|
};
|
|
47
|
-
|
|
48
|
+
var CreateSnapshotRequest = { name: {
|
|
48
49
|
maxLength: 255,
|
|
49
50
|
minLength: 1,
|
|
50
51
|
pattern: /^[A-Za-z0-9\-_]+$/
|
|
51
52
|
} };
|
|
52
|
-
|
|
53
|
+
var CreateUserRequest = {
|
|
53
54
|
name: {
|
|
54
55
|
maxLength: 63,
|
|
55
56
|
minLength: 1,
|
|
@@ -60,19 +61,19 @@ const CreateUserRequest = {
|
|
|
60
61
|
minLength: 8
|
|
61
62
|
}
|
|
62
63
|
};
|
|
63
|
-
|
|
64
|
+
var DeleteUserRequest = { name: {
|
|
64
65
|
maxLength: 63,
|
|
65
66
|
minLength: 1,
|
|
66
67
|
pattern: /^[a-zA-Z0-9_\-]*$/
|
|
67
68
|
} };
|
|
68
|
-
|
|
69
|
+
var ListDatabasesRequest = {
|
|
69
70
|
page: { greaterThanOrEqual: 1 },
|
|
70
71
|
pageSize: {
|
|
71
72
|
greaterThanOrEqual: 1,
|
|
72
73
|
lessThanOrEqual: 100
|
|
73
74
|
}
|
|
74
75
|
};
|
|
75
|
-
|
|
76
|
+
var ListInstancesRequest = {
|
|
76
77
|
name: {
|
|
77
78
|
maxLength: 255,
|
|
78
79
|
minLength: 1,
|
|
@@ -84,21 +85,21 @@ const ListInstancesRequest = {
|
|
|
84
85
|
lessThanOrEqual: 100
|
|
85
86
|
}
|
|
86
87
|
};
|
|
87
|
-
|
|
88
|
+
var ListMaintenancesRequest = {
|
|
88
89
|
page: { greaterThanOrEqual: 1 },
|
|
89
90
|
pageSize: {
|
|
90
91
|
greaterThanOrEqual: 1,
|
|
91
92
|
lessThanOrEqual: 100
|
|
92
93
|
}
|
|
93
94
|
};
|
|
94
|
-
|
|
95
|
+
var ListNodeTypesRequest = {
|
|
95
96
|
page: { greaterThanOrEqual: 1 },
|
|
96
97
|
pageSize: {
|
|
97
98
|
greaterThanOrEqual: 1,
|
|
98
99
|
lessThanOrEqual: 100
|
|
99
100
|
}
|
|
100
101
|
};
|
|
101
|
-
|
|
102
|
+
var ListSnapshotsRequest = {
|
|
102
103
|
name: {
|
|
103
104
|
maxLength: 255,
|
|
104
105
|
minLength: 1,
|
|
@@ -110,7 +111,7 @@ const ListSnapshotsRequest = {
|
|
|
110
111
|
lessThanOrEqual: 100
|
|
111
112
|
}
|
|
112
113
|
};
|
|
113
|
-
|
|
114
|
+
var ListUsersRequest = {
|
|
114
115
|
name: {
|
|
115
116
|
maxLength: 63,
|
|
116
117
|
minLength: 1,
|
|
@@ -122,7 +123,7 @@ const ListUsersRequest = {
|
|
|
122
123
|
lessThanOrEqual: 100
|
|
123
124
|
}
|
|
124
125
|
};
|
|
125
|
-
|
|
126
|
+
var ListVersionsRequest = {
|
|
126
127
|
page: { greaterThanOrEqual: 1 },
|
|
127
128
|
pageSize: {
|
|
128
129
|
greaterThanOrEqual: 1,
|
|
@@ -130,7 +131,7 @@ const ListVersionsRequest = {
|
|
|
130
131
|
},
|
|
131
132
|
version: { pattern: /^[0-9]+\.[0-9]+$/ }
|
|
132
133
|
};
|
|
133
|
-
|
|
134
|
+
var RestoreSnapshotRequest = {
|
|
134
135
|
instanceName: {
|
|
135
136
|
maxLength: 255,
|
|
136
137
|
minLength: 1,
|
|
@@ -141,12 +142,12 @@ const RestoreSnapshotRequest = {
|
|
|
141
142
|
lessThanOrEqual: 3
|
|
142
143
|
}
|
|
143
144
|
};
|
|
144
|
-
|
|
145
|
+
var SetUserRoleRequest = { userName: {
|
|
145
146
|
maxLength: 63,
|
|
146
147
|
minLength: 1,
|
|
147
148
|
pattern: /^[a-zA-Z0-9_\-]*$/
|
|
148
149
|
} };
|
|
149
|
-
|
|
150
|
+
var UpdateInstanceRequest = {
|
|
150
151
|
name: {
|
|
151
152
|
maxLength: 255,
|
|
152
153
|
minLength: 1,
|
|
@@ -161,12 +162,12 @@ const UpdateInstanceRequest = {
|
|
|
161
162
|
lessThanOrEqual: 365
|
|
162
163
|
}
|
|
163
164
|
};
|
|
164
|
-
|
|
165
|
+
var UpdateSnapshotRequest = { name: {
|
|
165
166
|
maxLength: 255,
|
|
166
167
|
minLength: 1,
|
|
167
168
|
pattern: /^[A-Za-z0-9\-_]+$/
|
|
168
169
|
} };
|
|
169
|
-
|
|
170
|
+
var UpdateUserRequest = {
|
|
170
171
|
name: {
|
|
171
172
|
maxLength: 63,
|
|
172
173
|
minLength: 1,
|
|
@@ -177,5 +178,6 @@ const UpdateUserRequest = {
|
|
|
177
178
|
minLength: 8
|
|
178
179
|
}
|
|
179
180
|
};
|
|
180
|
-
|
|
181
|
-
|
|
181
|
+
var Volume = { sizeBytes: { greaterThanOrEqual: 1e9 } };
|
|
182
|
+
//#endregion
|
|
183
|
+
export { CreateInstanceRequest, CreateSnapshotRequest, CreateUserRequest, DeleteUserRequest, ListDatabasesRequest, ListInstancesRequest, ListMaintenancesRequest, ListNodeTypesRequest, ListSnapshotsRequest, ListUsersRequest, ListVersionsRequest, RestoreSnapshotRequest, SetUserRoleRequest, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, Volume, validation_rules_gen_exports };
|
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { INSTANCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
2
|
import { marshalCreateEndpointRequest, marshalCreateInstanceRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalRestoreSnapshotRequest, marshalSetUserRoleRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, unmarshalEndpoint, unmarshalInstance, unmarshalListInstancesResponse, unmarshalListNodeTypesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, 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/v1alpha1/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'}
|
|
@@ -282,4 +283,5 @@ var API$1 = class extends API {
|
|
|
282
283
|
path: `/mongodb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints`
|
|
283
284
|
}, unmarshalEndpoint);
|
|
284
285
|
};
|
|
285
|
-
|
|
286
|
+
//#endregion
|
|
287
|
+
export { API };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
//#region src/v1alpha1/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,9 +8,10 @@ const INSTANCE_TRANSIENT_STATUSES = [
|
|
|
7
8
|
"snapshotting"
|
|
8
9
|
];
|
|
9
10
|
/** Lists transient statutes of the enum {@link SnapshotStatus}. */
|
|
10
|
-
|
|
11
|
+
var SNAPSHOT_TRANSIENT_STATUSES = [
|
|
11
12
|
"creating",
|
|
12
13
|
"restoring",
|
|
13
14
|
"deleting"
|
|
14
15
|
];
|
|
16
|
+
//#endregion
|
|
15
17
|
export { INSTANCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { INSTANCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
import { marshalCreateEndpointRequest, marshalCreateInstanceRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalRestoreSnapshotRequest, marshalSetUserRoleRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, unmarshalEndpoint, unmarshalInstance,
|
|
3
|
+
import { marshalCreateEndpointRequest, marshalCreateInstanceRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalRestoreSnapshotRequest, marshalSetUserRoleRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, unmarshalEndpoint, unmarshalInstance, unmarshalListInstancesResponse, unmarshalListNodeTypesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, 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/v1alpha1/index.gen.ts
|
|
6
7
|
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
7
8
|
API: () => API,
|
|
8
9
|
INSTANCE_TRANSIENT_STATUSES: () => INSTANCE_TRANSIENT_STATUSES,
|
|
@@ -20,14 +21,13 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
20
21
|
marshalUpgradeInstanceRequest: () => marshalUpgradeInstanceRequest,
|
|
21
22
|
unmarshalEndpoint: () => unmarshalEndpoint,
|
|
22
23
|
unmarshalInstance: () => unmarshalInstance,
|
|
23
|
-
unmarshalInstanceSetting: () => unmarshalInstanceSetting,
|
|
24
24
|
unmarshalListInstancesResponse: () => unmarshalListInstancesResponse,
|
|
25
25
|
unmarshalListNodeTypesResponse: () => unmarshalListNodeTypesResponse,
|
|
26
26
|
unmarshalListSnapshotsResponse: () => unmarshalListSnapshotsResponse,
|
|
27
27
|
unmarshalListUsersResponse: () => unmarshalListUsersResponse,
|
|
28
28
|
unmarshalListVersionsResponse: () => unmarshalListVersionsResponse,
|
|
29
29
|
unmarshalSnapshot: () => unmarshalSnapshot,
|
|
30
|
-
unmarshalUser: () => unmarshalUser
|
|
31
|
-
unmarshalVolume: () => unmarshalVolume
|
|
30
|
+
unmarshalUser: () => unmarshalUser
|
|
32
31
|
});
|
|
33
|
-
|
|
32
|
+
//#endregion
|
|
33
|
+
export { API, INSTANCE_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalCreateEndpointRequest, marshalCreateInstanceRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalRestoreSnapshotRequest, marshalSetUserRoleRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, unmarshalEndpoint, unmarshalInstance, unmarshalListInstancesResponse, unmarshalListNodeTypesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalSnapshot, unmarshalUser };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { CreateEndpointRequest, CreateInstanceRequest, CreateSnapshotRequest, CreateUserRequest, Endpoint, Instance,
|
|
2
|
+
import type { CreateEndpointRequest, CreateInstanceRequest, CreateSnapshotRequest, CreateUserRequest, Endpoint, Instance, ListInstancesResponse, ListNodeTypesResponse, ListSnapshotsResponse, ListUsersResponse, ListVersionsResponse, RestoreSnapshotRequest, SetUserRoleRequest, Snapshot, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User } 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;
|
|
6
4
|
export declare const unmarshalInstance: (data: unknown) => Instance;
|
|
7
5
|
export declare const unmarshalSnapshot: (data: unknown) => Snapshot;
|
|
8
6
|
export declare const unmarshalUser: (data: unknown) => User;
|
|
@@ -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/v1alpha1/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 unmarshalEndpointPublicDetails = (data) => {
|
|
|
8
9
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPublicDetails' 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
|
dnsRecords: data.dns_records,
|
|
@@ -19,7 +20,7 @@ const unmarshalEndpoint = (data) => {
|
|
|
19
20
|
public: data.public ? unmarshalEndpointPublicDetails(data.public) : void 0
|
|
20
21
|
};
|
|
21
22
|
};
|
|
22
|
-
|
|
23
|
+
var unmarshalInstanceSetting = (data) => {
|
|
23
24
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstanceSetting' failed as data isn't a dictionary.`);
|
|
24
25
|
return {
|
|
25
26
|
name: data.name,
|
|
@@ -36,14 +37,14 @@ var unmarshalInstanceSnapshotSchedule = (data) => {
|
|
|
36
37
|
retentionDays: data.retention_days
|
|
37
38
|
};
|
|
38
39
|
};
|
|
39
|
-
|
|
40
|
+
var unmarshalVolume = (data) => {
|
|
40
41
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
|
|
41
42
|
return {
|
|
42
43
|
size: data.size,
|
|
43
44
|
type: data.type
|
|
44
45
|
};
|
|
45
46
|
};
|
|
46
|
-
|
|
47
|
+
var unmarshalInstance = (data) => {
|
|
47
48
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Instance' failed as data isn't a dictionary.`);
|
|
48
49
|
return {
|
|
49
50
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -66,7 +67,7 @@ var unmarshalSnapshotVolumeType = (data) => {
|
|
|
66
67
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SnapshotVolumeType' failed as data isn't a dictionary.`);
|
|
67
68
|
return { type: data.type };
|
|
68
69
|
};
|
|
69
|
-
|
|
70
|
+
var unmarshalSnapshot = (data) => {
|
|
70
71
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Snapshot' failed as data isn't a dictionary.`);
|
|
71
72
|
return {
|
|
72
73
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -91,14 +92,14 @@ var unmarshalUserRole = (data) => {
|
|
|
91
92
|
role: data.role
|
|
92
93
|
};
|
|
93
94
|
};
|
|
94
|
-
|
|
95
|
+
var unmarshalUser = (data) => {
|
|
95
96
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'User' failed as data isn't a dictionary.`);
|
|
96
97
|
return {
|
|
97
98
|
name: data.name,
|
|
98
99
|
roles: unmarshalArrayOfObject(data.roles, unmarshalUserRole)
|
|
99
100
|
};
|
|
100
101
|
};
|
|
101
|
-
|
|
102
|
+
var unmarshalListInstancesResponse = (data) => {
|
|
102
103
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstancesResponse' failed as data isn't a dictionary.`);
|
|
103
104
|
return {
|
|
104
105
|
instances: unmarshalArrayOfObject(data.instances, unmarshalInstance),
|
|
@@ -129,21 +130,21 @@ var unmarshalNodeType = (data) => {
|
|
|
129
130
|
vcpus: data.vcpus
|
|
130
131
|
};
|
|
131
132
|
};
|
|
132
|
-
|
|
133
|
+
var unmarshalListNodeTypesResponse = (data) => {
|
|
133
134
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`);
|
|
134
135
|
return {
|
|
135
136
|
nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
|
|
136
137
|
totalCount: data.total_count
|
|
137
138
|
};
|
|
138
139
|
};
|
|
139
|
-
|
|
140
|
+
var unmarshalListSnapshotsResponse = (data) => {
|
|
140
141
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary.`);
|
|
141
142
|
return {
|
|
142
143
|
snapshots: unmarshalArrayOfObject(data.snapshots, unmarshalSnapshot),
|
|
143
144
|
totalCount: data.total_count
|
|
144
145
|
};
|
|
145
146
|
};
|
|
146
|
-
|
|
147
|
+
var unmarshalListUsersResponse = (data) => {
|
|
147
148
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`);
|
|
148
149
|
return {
|
|
149
150
|
totalCount: data.total_count,
|
|
@@ -174,7 +175,7 @@ var unmarshalVersion = (data) => {
|
|
|
174
175
|
version: data.version
|
|
175
176
|
};
|
|
176
177
|
};
|
|
177
|
-
|
|
178
|
+
var unmarshalListVersionsResponse = (data) => {
|
|
178
179
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`);
|
|
179
180
|
return {
|
|
180
181
|
totalCount: data.total_count,
|
|
@@ -190,7 +191,7 @@ var marshalEndpointSpec = (request, defaults) => ({ ...resolveOneOf([{
|
|
|
190
191
|
param: "private_network",
|
|
191
192
|
value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkDetails(request.privateNetwork, defaults) : void 0
|
|
192
193
|
}]) });
|
|
193
|
-
|
|
194
|
+
var marshalCreateEndpointRequest = (request, defaults) => ({
|
|
194
195
|
endpoint: marshalEndpointSpec(request.endpoint, defaults),
|
|
195
196
|
instance_id: request.instanceId
|
|
196
197
|
});
|
|
@@ -198,7 +199,7 @@ var marshalCreateInstanceRequestVolumeDetails = (request, defaults) => ({
|
|
|
198
199
|
volume_size: request.volumeSize,
|
|
199
200
|
volume_type: request.volumeType
|
|
200
201
|
});
|
|
201
|
-
|
|
202
|
+
var marshalCreateInstanceRequest = (request, defaults) => ({
|
|
202
203
|
endpoints: request.endpoints !== void 0 ? request.endpoints.map((elt) => marshalEndpointSpec(elt, defaults)) : void 0,
|
|
203
204
|
name: request.name || randomName("mgdb"),
|
|
204
205
|
node_number: request.nodeNumber,
|
|
@@ -210,16 +211,16 @@ const marshalCreateInstanceRequest = (request, defaults) => ({
|
|
|
210
211
|
version: request.version,
|
|
211
212
|
volume: request.volume !== void 0 ? marshalCreateInstanceRequestVolumeDetails(request.volume, defaults) : void 0
|
|
212
213
|
});
|
|
213
|
-
|
|
214
|
+
var marshalCreateSnapshotRequest = (request, defaults) => ({
|
|
214
215
|
expires_at: request.expiresAt,
|
|
215
216
|
name: request.name
|
|
216
217
|
});
|
|
217
|
-
|
|
218
|
+
var marshalCreateUserRequest = (request, defaults) => ({
|
|
218
219
|
name: request.name,
|
|
219
220
|
password: request.password
|
|
220
221
|
});
|
|
221
222
|
var marshalRestoreSnapshotRequestVolumeDetails = (request, defaults) => ({ volume_type: request.volumeType });
|
|
222
|
-
|
|
223
|
+
var marshalRestoreSnapshotRequest = (request, defaults) => ({
|
|
223
224
|
instance_name: request.instanceName,
|
|
224
225
|
node_number: request.nodeNumber,
|
|
225
226
|
node_type: request.nodeType,
|
|
@@ -235,21 +236,22 @@ var marshalUserRole = (request, defaults) => ({
|
|
|
235
236
|
value: request.anyDatabase
|
|
236
237
|
}])
|
|
237
238
|
});
|
|
238
|
-
|
|
239
|
+
var marshalSetUserRoleRequest = (request, defaults) => ({
|
|
239
240
|
roles: request.roles !== void 0 ? request.roles.map((elt) => marshalUserRole(elt, defaults)) : void 0,
|
|
240
241
|
user_name: request.userName
|
|
241
242
|
});
|
|
242
|
-
|
|
243
|
+
var marshalUpdateInstanceRequest = (request, defaults) => ({
|
|
243
244
|
name: request.name,
|
|
244
245
|
tags: request.tags
|
|
245
246
|
});
|
|
246
|
-
|
|
247
|
+
var marshalUpdateSnapshotRequest = (request, defaults) => ({
|
|
247
248
|
expires_at: request.expiresAt,
|
|
248
249
|
name: request.name
|
|
249
250
|
});
|
|
250
|
-
|
|
251
|
-
|
|
251
|
+
var marshalUpdateUserRequest = (request, defaults) => ({ password: request.password });
|
|
252
|
+
var marshalUpgradeInstanceRequest = (request, defaults) => ({ ...resolveOneOf([{
|
|
252
253
|
param: "volume_size",
|
|
253
254
|
value: request.volumeSize
|
|
254
255
|
}]) });
|
|
255
|
-
|
|
256
|
+
//#endregion
|
|
257
|
+
export { marshalCreateEndpointRequest, marshalCreateInstanceRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalRestoreSnapshotRequest, marshalSetUserRoleRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, unmarshalEndpoint, unmarshalInstance, unmarshalListInstancesResponse, unmarshalListNodeTypesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalSnapshot, unmarshalUser };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export declare const queriesMetadata: {
|
|
2
|
+
readonly namespace: "mongodb";
|
|
3
|
+
readonly version: "v1alpha1";
|
|
4
|
+
readonly folderName: "mongodbv1alpha1";
|
|
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
|
+
}];
|
|
92
|
+
};
|
|
93
|
+
export type QueriesMetadata = typeof queriesMetadata;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
//#region src/v1alpha1/metadata.gen.ts
|
|
2
|
+
var queriesMetadata = {
|
|
3
|
+
namespace: "mongodb",
|
|
4
|
+
version: "v1alpha1",
|
|
5
|
+
folderName: "mongodbv1alpha1",
|
|
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
|
+
}]
|
|
102
|
+
};
|
|
103
|
+
//#endregion
|
|
104
|
+
export { queriesMetadata };
|
|
File without changes
|