@scaleway/sdk-datawarehouse 2.4.0 → 2.5.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/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +2 -4
- package/dist/v1beta1/api.gen.js +240 -340
- package/dist/v1beta1/content.gen.js +10 -11
- package/dist/v1beta1/index.gen.js +24 -22
- package/dist/v1beta1/marshalling.gen.js +126 -209
- package/dist/v1beta1/validation-rules.gen.js +151 -167
- package/package.json +4 -4
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
/** Lists transient statutes of the enum {@link DeploymentStatus}. */
|
|
1
2
|
const DEPLOYMENT_TRANSIENT_STATUSES = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
"creating",
|
|
4
|
+
"configuring",
|
|
5
|
+
"deleting",
|
|
6
|
+
"locking",
|
|
7
|
+
"unlocking",
|
|
8
|
+
"deploying",
|
|
9
|
+
"stopping",
|
|
10
|
+
"starting"
|
|
10
11
|
];
|
|
11
|
-
export {
|
|
12
|
-
DEPLOYMENT_TRANSIENT_STATUSES
|
|
13
|
-
};
|
|
12
|
+
export { DEPLOYMENT_TRANSIENT_STATUSES };
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { DEPLOYMENT_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
3
|
import { marshalCreateDatabaseRequest, marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalCreateUserRequest, marshalUpdateDeploymentRequest, marshalUpdateUserRequest, unmarshalDatabase, unmarshalDeployment, unmarshalEndpoint, unmarshalListDatabasesResponse, unmarshalListDeploymentsResponse, unmarshalListPresetsResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalUser } from "./marshalling.gen.js";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
4
|
+
import { API } from "./api.gen.js";
|
|
5
|
+
import { validation_rules_gen_exports } from "./validation-rules.gen.js";
|
|
6
|
+
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
+
API: () => API,
|
|
8
|
+
DEPLOYMENT_TRANSIENT_STATUSES: () => DEPLOYMENT_TRANSIENT_STATUSES,
|
|
9
|
+
ValidationRules: () => validation_rules_gen_exports,
|
|
10
|
+
marshalCreateDatabaseRequest: () => marshalCreateDatabaseRequest,
|
|
11
|
+
marshalCreateDeploymentRequest: () => marshalCreateDeploymentRequest,
|
|
12
|
+
marshalCreateEndpointRequest: () => marshalCreateEndpointRequest,
|
|
13
|
+
marshalCreateUserRequest: () => marshalCreateUserRequest,
|
|
14
|
+
marshalUpdateDeploymentRequest: () => marshalUpdateDeploymentRequest,
|
|
15
|
+
marshalUpdateUserRequest: () => marshalUpdateUserRequest,
|
|
16
|
+
unmarshalDatabase: () => unmarshalDatabase,
|
|
17
|
+
unmarshalDeployment: () => unmarshalDeployment,
|
|
18
|
+
unmarshalEndpoint: () => unmarshalEndpoint,
|
|
19
|
+
unmarshalListDatabasesResponse: () => unmarshalListDatabasesResponse,
|
|
20
|
+
unmarshalListDeploymentsResponse: () => unmarshalListDeploymentsResponse,
|
|
21
|
+
unmarshalListPresetsResponse: () => unmarshalListPresetsResponse,
|
|
22
|
+
unmarshalListUsersResponse: () => unmarshalListUsersResponse,
|
|
23
|
+
unmarshalListVersionsResponse: () => unmarshalListVersionsResponse,
|
|
24
|
+
unmarshalUser: () => unmarshalUser
|
|
25
|
+
});
|
|
26
|
+
export { index_gen_exports };
|
|
@@ -1,242 +1,159 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
`Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary.`
|
|
6
|
-
);
|
|
7
|
-
}
|
|
8
|
-
return {
|
|
9
|
-
privateNetworkId: data.private_network_id
|
|
10
|
-
};
|
|
1
|
+
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
2
|
+
var unmarshalEndpointPrivateNetworkDetails = (data) => {
|
|
3
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary.`);
|
|
4
|
+
return { privateNetworkId: data.private_network_id };
|
|
11
5
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`Unmarshalling the type 'EndpointPublicDetails' failed as data isn't a dictionary.`
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
return {};
|
|
6
|
+
var unmarshalEndpointPublicDetails = (data) => {
|
|
7
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPublicDetails' failed as data isn't a dictionary.`);
|
|
8
|
+
return {};
|
|
19
9
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return {
|
|
27
|
-
port: data.port,
|
|
28
|
-
protocol: data.protocol
|
|
29
|
-
};
|
|
10
|
+
var unmarshalEndpointService = (data) => {
|
|
11
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointService' failed as data isn't a dictionary.`);
|
|
12
|
+
return {
|
|
13
|
+
port: data.port,
|
|
14
|
+
protocol: data.protocol
|
|
15
|
+
};
|
|
30
16
|
};
|
|
31
17
|
const unmarshalEndpoint = (data) => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
privateNetwork: data.private_network ? unmarshalEndpointPrivateNetworkDetails(data.private_network) : void 0,
|
|
41
|
-
public: data.public ? unmarshalEndpointPublicDetails(data.public) : void 0,
|
|
42
|
-
services: unmarshalArrayOfObject(data.services, unmarshalEndpointService)
|
|
43
|
-
};
|
|
18
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`);
|
|
19
|
+
return {
|
|
20
|
+
dnsRecord: data.dns_record,
|
|
21
|
+
id: data.id,
|
|
22
|
+
privateNetwork: data.private_network ? unmarshalEndpointPrivateNetworkDetails(data.private_network) : void 0,
|
|
23
|
+
public: data.public ? unmarshalEndpointPublicDetails(data.public) : void 0,
|
|
24
|
+
services: unmarshalArrayOfObject(data.services, unmarshalEndpointService)
|
|
25
|
+
};
|
|
44
26
|
};
|
|
45
27
|
const unmarshalDatabase = (data) => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return {
|
|
52
|
-
name: data.name,
|
|
53
|
-
size: data.size
|
|
54
|
-
};
|
|
28
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Database' failed as data isn't a dictionary.`);
|
|
29
|
+
return {
|
|
30
|
+
name: data.name,
|
|
31
|
+
size: data.size
|
|
32
|
+
};
|
|
55
33
|
};
|
|
56
34
|
const unmarshalDeployment = (data) => {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
tags: data.tags,
|
|
77
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
78
|
-
version: data.version
|
|
79
|
-
};
|
|
35
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Deployment' failed as data isn't a dictionary.`);
|
|
36
|
+
return {
|
|
37
|
+
cpuMax: data.cpu_max,
|
|
38
|
+
cpuMin: data.cpu_min,
|
|
39
|
+
createdAt: unmarshalDate(data.created_at),
|
|
40
|
+
endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
|
|
41
|
+
id: data.id,
|
|
42
|
+
name: data.name,
|
|
43
|
+
organizationId: data.organization_id,
|
|
44
|
+
projectId: data.project_id,
|
|
45
|
+
ramPerCpu: data.ram_per_cpu,
|
|
46
|
+
region: data.region,
|
|
47
|
+
replicaCount: data.replica_count,
|
|
48
|
+
shardCount: data.shard_count,
|
|
49
|
+
status: data.status,
|
|
50
|
+
tags: data.tags,
|
|
51
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
52
|
+
version: data.version
|
|
53
|
+
};
|
|
80
54
|
};
|
|
81
55
|
const unmarshalUser = (data) => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return {
|
|
88
|
-
isAdmin: data.is_admin,
|
|
89
|
-
name: data.name
|
|
90
|
-
};
|
|
56
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'User' failed as data isn't a dictionary.`);
|
|
57
|
+
return {
|
|
58
|
+
isAdmin: data.is_admin,
|
|
59
|
+
name: data.name
|
|
60
|
+
};
|
|
91
61
|
};
|
|
92
62
|
const unmarshalListDatabasesResponse = (data) => {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return {
|
|
99
|
-
databases: unmarshalArrayOfObject(data.databases, unmarshalDatabase),
|
|
100
|
-
totalCount: data.total_count
|
|
101
|
-
};
|
|
63
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary.`);
|
|
64
|
+
return {
|
|
65
|
+
databases: unmarshalArrayOfObject(data.databases, unmarshalDatabase),
|
|
66
|
+
totalCount: data.total_count
|
|
67
|
+
};
|
|
102
68
|
};
|
|
103
69
|
const unmarshalListDeploymentsResponse = (data) => {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
return {
|
|
110
|
-
deployments: unmarshalArrayOfObject(data.deployments, unmarshalDeployment),
|
|
111
|
-
totalCount: data.total_count
|
|
112
|
-
};
|
|
70
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDeploymentsResponse' failed as data isn't a dictionary.`);
|
|
71
|
+
return {
|
|
72
|
+
deployments: unmarshalArrayOfObject(data.deployments, unmarshalDeployment),
|
|
73
|
+
totalCount: data.total_count
|
|
74
|
+
};
|
|
113
75
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
ramPerCpu: data.ram_per_cpu,
|
|
126
|
-
replicaCount: data.replica_count,
|
|
127
|
-
shardCount: data.shard_count
|
|
128
|
-
};
|
|
76
|
+
var unmarshalPreset = (data) => {
|
|
77
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Preset' failed as data isn't a dictionary.`);
|
|
78
|
+
return {
|
|
79
|
+
category: data.category,
|
|
80
|
+
cpuMax: data.cpu_max,
|
|
81
|
+
cpuMin: data.cpu_min,
|
|
82
|
+
name: data.name,
|
|
83
|
+
ramPerCpu: data.ram_per_cpu,
|
|
84
|
+
replicaCount: data.replica_count,
|
|
85
|
+
shardCount: data.shard_count
|
|
86
|
+
};
|
|
129
87
|
};
|
|
130
88
|
const unmarshalListPresetsResponse = (data) => {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
return {
|
|
137
|
-
presets: unmarshalArrayOfObject(data.presets, unmarshalPreset),
|
|
138
|
-
totalCount: data.total_count
|
|
139
|
-
};
|
|
89
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPresetsResponse' failed as data isn't a dictionary.`);
|
|
90
|
+
return {
|
|
91
|
+
presets: unmarshalArrayOfObject(data.presets, unmarshalPreset),
|
|
92
|
+
totalCount: data.total_count
|
|
93
|
+
};
|
|
140
94
|
};
|
|
141
95
|
const unmarshalListUsersResponse = (data) => {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
return {
|
|
148
|
-
totalCount: data.total_count,
|
|
149
|
-
users: unmarshalArrayOfObject(data.users, unmarshalUser)
|
|
150
|
-
};
|
|
96
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`);
|
|
97
|
+
return {
|
|
98
|
+
totalCount: data.total_count,
|
|
99
|
+
users: unmarshalArrayOfObject(data.users, unmarshalUser)
|
|
100
|
+
};
|
|
151
101
|
};
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
return {
|
|
159
|
-
endOfLifeAt: unmarshalDate(data.end_of_life_at),
|
|
160
|
-
version: data.version
|
|
161
|
-
};
|
|
102
|
+
var unmarshalVersion = (data) => {
|
|
103
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Version' failed as data isn't a dictionary.`);
|
|
104
|
+
return {
|
|
105
|
+
endOfLifeAt: unmarshalDate(data.end_of_life_at),
|
|
106
|
+
version: data.version
|
|
107
|
+
};
|
|
162
108
|
};
|
|
163
109
|
const unmarshalListVersionsResponse = (data) => {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
return {
|
|
170
|
-
totalCount: data.total_count,
|
|
171
|
-
versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
|
|
172
|
-
};
|
|
110
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`);
|
|
111
|
+
return {
|
|
112
|
+
totalCount: data.total_count,
|
|
113
|
+
versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
|
|
114
|
+
};
|
|
173
115
|
};
|
|
174
|
-
const marshalCreateDatabaseRequest = (request, defaults) => ({
|
|
175
|
-
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
param: "public",
|
|
185
|
-
value: request.public !== void 0 ? marshalEndpointSpecPublicDetails(request.public) : void 0
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
param: "private_network",
|
|
189
|
-
value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkDetails(request.privateNetwork) : void 0
|
|
190
|
-
}
|
|
191
|
-
])
|
|
192
|
-
});
|
|
116
|
+
const marshalCreateDatabaseRequest = (request, defaults) => ({ name: request.name });
|
|
117
|
+
var marshalEndpointSpecPrivateNetworkDetails = (request, defaults) => ({ private_network_id: request.privateNetworkId });
|
|
118
|
+
var marshalEndpointSpecPublicDetails = (request, defaults) => ({});
|
|
119
|
+
var marshalEndpointSpec = (request, defaults) => ({ ...resolveOneOf([{
|
|
120
|
+
param: "public",
|
|
121
|
+
value: request.public !== void 0 ? marshalEndpointSpecPublicDetails(request.public, defaults) : void 0
|
|
122
|
+
}, {
|
|
123
|
+
param: "private_network",
|
|
124
|
+
value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkDetails(request.privateNetwork, defaults) : void 0
|
|
125
|
+
}]) });
|
|
193
126
|
const marshalCreateDeploymentRequest = (request, defaults) => ({
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
127
|
+
cpu_max: request.cpuMax,
|
|
128
|
+
cpu_min: request.cpuMin,
|
|
129
|
+
endpoints: request.endpoints !== void 0 ? request.endpoints.map((elt) => marshalEndpointSpec(elt, defaults)) : void 0,
|
|
130
|
+
name: request.name,
|
|
131
|
+
password: request.password,
|
|
132
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
133
|
+
ram_per_cpu: request.ramPerCpu,
|
|
134
|
+
replica_count: request.replicaCount,
|
|
135
|
+
shard_count: request.shardCount,
|
|
136
|
+
tags: request.tags,
|
|
137
|
+
version: request.version
|
|
205
138
|
});
|
|
206
139
|
const marshalCreateEndpointRequest = (request, defaults) => ({
|
|
207
|
-
|
|
208
|
-
|
|
140
|
+
deployment_id: request.deploymentId,
|
|
141
|
+
endpoint: request.endpoint !== void 0 ? marshalEndpointSpec(request.endpoint, defaults) : void 0
|
|
209
142
|
});
|
|
210
143
|
const marshalCreateUserRequest = (request, defaults) => ({
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
144
|
+
is_admin: request.isAdmin,
|
|
145
|
+
name: request.name,
|
|
146
|
+
password: request.password
|
|
214
147
|
});
|
|
215
148
|
const marshalUpdateDeploymentRequest = (request, defaults) => ({
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
149
|
+
cpu_max: request.cpuMax,
|
|
150
|
+
cpu_min: request.cpuMin,
|
|
151
|
+
name: request.name,
|
|
152
|
+
replica_count: request.replicaCount,
|
|
153
|
+
tags: request.tags
|
|
221
154
|
});
|
|
222
155
|
const marshalUpdateUserRequest = (request, defaults) => ({
|
|
223
|
-
|
|
224
|
-
|
|
156
|
+
is_admin: request.isAdmin,
|
|
157
|
+
password: request.password
|
|
225
158
|
});
|
|
226
|
-
export {
|
|
227
|
-
marshalCreateDatabaseRequest,
|
|
228
|
-
marshalCreateDeploymentRequest,
|
|
229
|
-
marshalCreateEndpointRequest,
|
|
230
|
-
marshalCreateUserRequest,
|
|
231
|
-
marshalUpdateDeploymentRequest,
|
|
232
|
-
marshalUpdateUserRequest,
|
|
233
|
-
unmarshalDatabase,
|
|
234
|
-
unmarshalDeployment,
|
|
235
|
-
unmarshalEndpoint,
|
|
236
|
-
unmarshalListDatabasesResponse,
|
|
237
|
-
unmarshalListDeploymentsResponse,
|
|
238
|
-
unmarshalListPresetsResponse,
|
|
239
|
-
unmarshalListUsersResponse,
|
|
240
|
-
unmarshalListVersionsResponse,
|
|
241
|
-
unmarshalUser
|
|
242
|
-
};
|
|
159
|
+
export { marshalCreateDatabaseRequest, marshalCreateDeploymentRequest, marshalCreateEndpointRequest, marshalCreateUserRequest, marshalUpdateDeploymentRequest, marshalUpdateUserRequest, unmarshalDatabase, unmarshalDeployment, unmarshalEndpoint, unmarshalListDatabasesResponse, unmarshalListDeploymentsResponse, unmarshalListPresetsResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalUser };
|