@scaleway/sdk 2.53.0 → 2.55.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/applesilicon/v1alpha1/api.gen.cjs +21 -0
- package/dist/api/applesilicon/v1alpha1/api.gen.d.ts +3 -1
- package/dist/api/applesilicon/v1alpha1/api.gen.js +22 -1
- package/dist/api/applesilicon/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +46 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.d.ts +4 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +47 -1
- package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +31 -0
- package/dist/api/block/v1alpha1/api.gen.cjs +3 -2
- package/dist/api/block/v1alpha1/api.gen.d.ts +1 -1
- package/dist/api/block/v1alpha1/api.gen.js +3 -2
- package/dist/api/block/v1alpha1/marshalling.gen.cjs +3 -2
- package/dist/api/block/v1alpha1/marshalling.gen.js +3 -2
- package/dist/api/block/v1alpha1/types.gen.d.ts +7 -2
- package/dist/api/cockpit/v1/api.gen.cjs +21 -2
- package/dist/api/cockpit/v1/api.gen.d.ts +16 -3
- package/dist/api/cockpit/v1/api.gen.js +22 -3
- package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
- package/dist/api/cockpit/v1/marshalling.gen.cjs +31 -1
- package/dist/api/cockpit/v1/marshalling.gen.d.ts +2 -1
- package/dist/api/cockpit/v1/marshalling.gen.js +31 -1
- package/dist/api/cockpit/v1/types.gen.d.ts +33 -1
- package/dist/api/cockpit/v1/validation-rules.gen.cjs +11 -0
- package/dist/api/cockpit/v1/validation-rules.gen.d.ts +11 -0
- package/dist/api/cockpit/v1/validation-rules.gen.js +11 -0
- package/dist/api/container/v1beta1/marshalling.gen.cjs +7 -3
- package/dist/api/container/v1beta1/marshalling.gen.js +7 -3
- package/dist/api/container/v1beta1/types.gen.d.ts +17 -2
- package/dist/api/edge_services/v1alpha1/types.gen.d.ts +4 -4
- package/dist/api/function/v1beta1/marshalling.gen.cjs +3 -1
- package/dist/api/function/v1beta1/marshalling.gen.js +3 -1
- package/dist/api/function/v1beta1/types.gen.d.ts +4 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.cjs +1 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/iam/v1alpha1/types.gen.d.ts +5 -0
- package/dist/api/ipam/v1/types.gen.d.ts +1 -1
- package/dist/api/jobs/v1alpha1/api.gen.cjs +29 -0
- package/dist/api/jobs/v1alpha1/api.gen.d.ts +29 -0
- package/dist/api/jobs/v1alpha1/api.gen.js +29 -0
- package/dist/api/jobs/v1alpha1/types.gen.d.ts +38 -6
- package/dist/api/k8s/v1/api.gen.cjs +1 -1
- package/dist/api/k8s/v1/api.gen.js +1 -1
- package/dist/api/k8s/v1/types.gen.d.ts +1 -1
- package/dist/api/mongodb/v1alpha1/api.gen.cjs +16 -16
- package/dist/api/mongodb/v1alpha1/api.gen.d.ts +10 -1
- package/dist/api/mongodb/v1alpha1/api.gen.js +16 -16
- package/dist/api/mongodb/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/mongodb/v1alpha1/types.gen.d.ts +9 -0
- package/dist/api/webhosting/v1/api.gen.cjs +16 -8
- package/dist/api/webhosting/v1/api.gen.d.ts +9 -1
- package/dist/api/webhosting/v1/api.gen.js +17 -9
- package/dist/api/webhosting/v1/index.gen.d.ts +1 -1
- package/dist/api/webhosting/v1/marshalling.gen.cjs +14 -0
- package/dist/api/webhosting/v1/marshalling.gen.d.ts +2 -1
- package/dist/api/webhosting/v1/marshalling.gen.js +14 -0
- package/dist/api/webhosting/v1/types.gen.d.ts +19 -0
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -112,6 +112,12 @@ class API extends API$1 {
|
|
|
112
112
|
},
|
|
113
113
|
unmarshalStartJobDefinitionResponse
|
|
114
114
|
);
|
|
115
|
+
/**
|
|
116
|
+
* Create a secret reference within a job definition.
|
|
117
|
+
*
|
|
118
|
+
* @param request - The request {@link CreateJobDefinitionSecretsRequest}
|
|
119
|
+
* @returns A Promise of CreateJobDefinitionSecretsResponse
|
|
120
|
+
*/
|
|
115
121
|
createJobDefinitionSecrets = (request) => this.client.fetch(
|
|
116
122
|
{
|
|
117
123
|
body: JSON.stringify(
|
|
@@ -126,6 +132,12 @@ class API extends API$1 {
|
|
|
126
132
|
},
|
|
127
133
|
unmarshalCreateJobDefinitionSecretsResponse
|
|
128
134
|
);
|
|
135
|
+
/**
|
|
136
|
+
* Get a secret references within a job definition.
|
|
137
|
+
*
|
|
138
|
+
* @param request - The request {@link GetJobDefinitionSecretRequest}
|
|
139
|
+
* @returns A Promise of Secret
|
|
140
|
+
*/
|
|
129
141
|
getJobDefinitionSecret = (request) => this.client.fetch(
|
|
130
142
|
{
|
|
131
143
|
method: "GET",
|
|
@@ -133,6 +145,12 @@ class API extends API$1 {
|
|
|
133
145
|
},
|
|
134
146
|
unmarshalSecret
|
|
135
147
|
);
|
|
148
|
+
/**
|
|
149
|
+
* List secrets references within a job definition.
|
|
150
|
+
*
|
|
151
|
+
* @param request - The request {@link ListJobDefinitionSecretsRequest}
|
|
152
|
+
* @returns A Promise of ListJobDefinitionSecretsResponse
|
|
153
|
+
*/
|
|
136
154
|
listJobDefinitionSecrets = (request) => this.client.fetch(
|
|
137
155
|
{
|
|
138
156
|
method: "GET",
|
|
@@ -140,6 +158,12 @@ class API extends API$1 {
|
|
|
140
158
|
},
|
|
141
159
|
unmarshalListJobDefinitionSecretsResponse
|
|
142
160
|
);
|
|
161
|
+
/**
|
|
162
|
+
* Update a secret reference within a job definition.
|
|
163
|
+
*
|
|
164
|
+
* @param request - The request {@link UpdateJobDefinitionSecretRequest}
|
|
165
|
+
* @returns A Promise of Secret
|
|
166
|
+
*/
|
|
143
167
|
updateJobDefinitionSecret = (request) => this.client.fetch(
|
|
144
168
|
{
|
|
145
169
|
body: JSON.stringify(
|
|
@@ -154,6 +178,11 @@ class API extends API$1 {
|
|
|
154
178
|
},
|
|
155
179
|
unmarshalSecret
|
|
156
180
|
);
|
|
181
|
+
/**
|
|
182
|
+
* Delete a secret reference within a job definition.
|
|
183
|
+
*
|
|
184
|
+
* @param request - The request {@link DeleteJobDefinitionSecretRequest}
|
|
185
|
+
*/
|
|
157
186
|
deleteJobDefinitionSecret = (request) => this.client.fetch({
|
|
158
187
|
method: "DELETE",
|
|
159
188
|
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam("jobDefinitionId", request.jobDefinitionId)}/secrets/${validatePathParam("secretId", request.secretId)}`
|
|
@@ -30,12 +30,23 @@ export interface CreateJobDefinitionSecretsRequestSecretConfig {
|
|
|
30
30
|
envVarName?: string;
|
|
31
31
|
}
|
|
32
32
|
export interface Secret {
|
|
33
|
+
/** UUID of the secret reference within the job. */
|
|
33
34
|
secretId: string;
|
|
35
|
+
/** UUID of the secret in Secret Manager. */
|
|
34
36
|
secretManagerId: string;
|
|
37
|
+
/** Version of the secret in Secret Manager. */
|
|
35
38
|
secretManagerVersion: string;
|
|
36
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* File secret mounted inside the job.
|
|
41
|
+
*
|
|
42
|
+
* One-of ('secretConfig'): at most one of 'file', 'envVar' could be set.
|
|
43
|
+
*/
|
|
37
44
|
file?: SecretFile;
|
|
38
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Environment variable used to expose the secret.
|
|
47
|
+
*
|
|
48
|
+
* One-of ('secretConfig'): at most one of 'file', 'envVar' could be set.
|
|
49
|
+
*/
|
|
39
50
|
envVar?: SecretEnvVar;
|
|
40
51
|
}
|
|
41
52
|
export interface JobDefinition {
|
|
@@ -127,12 +138,13 @@ export type CreateJobDefinitionSecretsRequest = {
|
|
|
127
138
|
* config.
|
|
128
139
|
*/
|
|
129
140
|
region?: Region;
|
|
130
|
-
/** UUID of the job definition
|
|
141
|
+
/** UUID of the job definition. */
|
|
131
142
|
jobDefinitionId: string;
|
|
132
|
-
/**
|
|
143
|
+
/** List of secrets to inject into the job. */
|
|
133
144
|
secrets: CreateJobDefinitionSecretsRequestSecretConfig[];
|
|
134
145
|
};
|
|
135
146
|
export interface CreateJobDefinitionSecretsResponse {
|
|
147
|
+
/** List of secrets created. */
|
|
136
148
|
secrets: Secret[];
|
|
137
149
|
}
|
|
138
150
|
export type DeleteJobDefinitionRequest = {
|
|
@@ -150,7 +162,9 @@ export type DeleteJobDefinitionSecretRequest = {
|
|
|
150
162
|
* config.
|
|
151
163
|
*/
|
|
152
164
|
region?: Region;
|
|
165
|
+
/** UUID of the job definition. */
|
|
153
166
|
jobDefinitionId: string;
|
|
167
|
+
/** UUID of the secret reference within the job. */
|
|
154
168
|
secretId: string;
|
|
155
169
|
};
|
|
156
170
|
export type GetJobDefinitionRequest = {
|
|
@@ -168,7 +182,9 @@ export type GetJobDefinitionSecretRequest = {
|
|
|
168
182
|
* config.
|
|
169
183
|
*/
|
|
170
184
|
region?: Region;
|
|
185
|
+
/** UUID of the job definition. */
|
|
171
186
|
jobDefinitionId: string;
|
|
187
|
+
/** UUID of the secret reference within the job. */
|
|
172
188
|
secretId: string;
|
|
173
189
|
};
|
|
174
190
|
export type GetJobRunRequest = {
|
|
@@ -196,10 +212,13 @@ export type ListJobDefinitionSecretsRequest = {
|
|
|
196
212
|
* config.
|
|
197
213
|
*/
|
|
198
214
|
region?: Region;
|
|
215
|
+
/** UUID of the job definition. */
|
|
199
216
|
jobDefinitionId: string;
|
|
200
217
|
};
|
|
201
218
|
export interface ListJobDefinitionSecretsResponse {
|
|
219
|
+
/** List of secret references within a job definition. */
|
|
202
220
|
secrets: Secret[];
|
|
221
|
+
/** Total count of secret references within a job definition. */
|
|
203
222
|
totalCount: number;
|
|
204
223
|
}
|
|
205
224
|
export type ListJobDefinitionsRequest = {
|
|
@@ -306,11 +325,24 @@ export type UpdateJobDefinitionSecretRequest = {
|
|
|
306
325
|
* config.
|
|
307
326
|
*/
|
|
308
327
|
region?: Region;
|
|
328
|
+
/** UUID of the job definition. */
|
|
309
329
|
jobDefinitionId: string;
|
|
330
|
+
/** UUID of the secret reference within the job. */
|
|
310
331
|
secretId: string;
|
|
332
|
+
/** Version of the secret in Secret Manager. */
|
|
311
333
|
secretManagerVersion?: string;
|
|
312
|
-
/**
|
|
334
|
+
/**
|
|
335
|
+
* Path of the secret to mount inside the job (either `path` or `env_var_name`
|
|
336
|
+
* must be set).
|
|
337
|
+
*
|
|
338
|
+
* One-of ('secretConfig'): at most one of 'path', 'envVarName' could be set.
|
|
339
|
+
*/
|
|
313
340
|
path?: string;
|
|
314
|
-
/**
|
|
341
|
+
/**
|
|
342
|
+
* Environment variable name used to expose the secret inside the job (either
|
|
343
|
+
* `path` or `env_var_name` must be set).
|
|
344
|
+
*
|
|
345
|
+
* One-of ('secretConfig'): at most one of 'path', 'envVarName' could be set.
|
|
346
|
+
*/
|
|
315
347
|
envVarName?: string;
|
|
316
348
|
};
|
|
@@ -424,7 +424,7 @@ class API extends api.API {
|
|
|
424
424
|
getNodeMetadata = (request = {}) => this.client.fetch(
|
|
425
425
|
{
|
|
426
426
|
method: "GET",
|
|
427
|
-
path: `/k8s/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/
|
|
427
|
+
path: `/k8s/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/node-metadata`
|
|
428
428
|
},
|
|
429
429
|
marshalling_gen.unmarshalNodeMetadata
|
|
430
430
|
);
|
|
@@ -422,7 +422,7 @@ class API extends API$1 {
|
|
|
422
422
|
getNodeMetadata = (request = {}) => this.client.fetch(
|
|
423
423
|
{
|
|
424
424
|
method: "GET",
|
|
425
|
-
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/
|
|
425
|
+
path: `/k8s/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/node-metadata`
|
|
426
426
|
},
|
|
427
427
|
unmarshalNodeMetadata
|
|
428
428
|
);
|
|
@@ -11,7 +11,7 @@ export type ListPoolsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'up
|
|
|
11
11
|
export type MaintenanceWindowDayOfTheWeek = 'any' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
|
|
12
12
|
export type NodeStatus = 'unknown' | 'creating' | 'not_ready' | 'ready' | 'deleting' | 'deleted' | 'locked' | 'rebooting' | 'creation_error' | 'upgrading' | 'starting' | 'registering';
|
|
13
13
|
export type PoolStatus = 'unknown' | 'ready' | 'deleting' | 'deleted' | 'scaling' | 'warning' | 'locked' | 'upgrading';
|
|
14
|
-
export type PoolVolumeType = 'default_volume_type' | 'l_ssd' | 'b_ssd';
|
|
14
|
+
export type PoolVolumeType = 'default_volume_type' | 'l_ssd' | 'b_ssd' | 'sbs_5k' | 'sbs_15k';
|
|
15
15
|
export type Runtime = 'unknown_runtime' | 'docker' | 'containerd' | 'crio';
|
|
16
16
|
export interface MaintenanceWindow {
|
|
17
17
|
/** Start time of the two-hour maintenance window. */
|
|
@@ -64,19 +64,13 @@ class API extends api.API {
|
|
|
64
64
|
urlParams: marshalling.urlParams(
|
|
65
65
|
["name", request.name],
|
|
66
66
|
["order_by", request.orderBy],
|
|
67
|
-
[
|
|
68
|
-
"organization_id",
|
|
69
|
-
request.organizationId ?? this.client.settings.defaultOrganizationId
|
|
70
|
-
],
|
|
67
|
+
["organization_id", request.organizationId],
|
|
71
68
|
["page", request.page],
|
|
72
69
|
[
|
|
73
70
|
"page_size",
|
|
74
71
|
request.pageSize ?? this.client.settings.defaultPageSize
|
|
75
72
|
],
|
|
76
|
-
[
|
|
77
|
-
"project_id",
|
|
78
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
79
|
-
],
|
|
73
|
+
["project_id", request.projectId],
|
|
80
74
|
["tags", request.tags]
|
|
81
75
|
)
|
|
82
76
|
},
|
|
@@ -302,19 +296,13 @@ class API extends api.API {
|
|
|
302
296
|
["instance_id", request.instanceId],
|
|
303
297
|
["name", request.name],
|
|
304
298
|
["order_by", request.orderBy],
|
|
305
|
-
[
|
|
306
|
-
"organization_id",
|
|
307
|
-
request.organizationId ?? this.client.settings.defaultOrganizationId
|
|
308
|
-
],
|
|
299
|
+
["organization_id", request.organizationId],
|
|
309
300
|
["page", request.page],
|
|
310
301
|
[
|
|
311
302
|
"page_size",
|
|
312
303
|
request.pageSize ?? this.client.settings.defaultPageSize
|
|
313
304
|
],
|
|
314
|
-
[
|
|
315
|
-
"project_id",
|
|
316
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
317
|
-
]
|
|
305
|
+
["project_id", request.projectId]
|
|
318
306
|
)
|
|
319
307
|
},
|
|
320
308
|
marshalling_gen.unmarshalListSnapshotsResponse
|
|
@@ -407,5 +395,17 @@ class API extends api.API {
|
|
|
407
395
|
},
|
|
408
396
|
marshalling_gen.unmarshalUser
|
|
409
397
|
);
|
|
398
|
+
/**
|
|
399
|
+
* Delete a Database Instance endpoint. Delete the endpoint of a Database
|
|
400
|
+
* Instance. You must specify the `endpoint_id` parameter of the endpoint you
|
|
401
|
+
* want to delete. Note that you might need to update any environment
|
|
402
|
+
* configurations that point to the deleted endpoint.
|
|
403
|
+
*
|
|
404
|
+
* @param request - The request {@link DeleteEndpointRequest}
|
|
405
|
+
*/
|
|
406
|
+
deleteEndpoint = (request) => this.client.fetch({
|
|
407
|
+
method: "DELETE",
|
|
408
|
+
path: `/mongodb/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${marshalling.validatePathParam("endpointId", request.endpointId)}`
|
|
409
|
+
});
|
|
410
410
|
}
|
|
411
411
|
exports.API = API;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Region, WaitForOptions } from '../../../bridge';
|
|
3
|
-
import type { CreateInstanceRequest, CreateSnapshotRequest, CreateUserRequest, DeleteInstanceRequest, DeleteSnapshotRequest, GetInstanceCertificateRequest, GetInstanceRequest, GetSnapshotRequest, Instance, ListInstancesRequest, ListInstancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListSnapshotsRequest, ListSnapshotsResponse, ListUsersRequest, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, RestoreSnapshotRequest, Snapshot, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User } from './types.gen';
|
|
3
|
+
import type { CreateInstanceRequest, CreateSnapshotRequest, CreateUserRequest, DeleteEndpointRequest, DeleteInstanceRequest, DeleteSnapshotRequest, GetInstanceCertificateRequest, GetInstanceRequest, GetSnapshotRequest, Instance, ListInstancesRequest, ListInstancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListSnapshotsRequest, ListSnapshotsResponse, ListUsersRequest, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, RestoreSnapshotRequest, Snapshot, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Managed Database for MongoDB®.
|
|
6
6
|
*
|
|
@@ -208,4 +208,13 @@ export declare class API extends ParentAPI {
|
|
|
208
208
|
* @returns A Promise of User
|
|
209
209
|
*/
|
|
210
210
|
updateUser: (request: Readonly<UpdateUserRequest>) => Promise<User>;
|
|
211
|
+
/**
|
|
212
|
+
* Delete a Database Instance endpoint. Delete the endpoint of a Database
|
|
213
|
+
* Instance. You must specify the `endpoint_id` parameter of the endpoint you
|
|
214
|
+
* want to delete. Note that you might need to update any environment
|
|
215
|
+
* configurations that point to the deleted endpoint.
|
|
216
|
+
*
|
|
217
|
+
* @param request - The request {@link DeleteEndpointRequest}
|
|
218
|
+
*/
|
|
219
|
+
deleteEndpoint: (request: Readonly<DeleteEndpointRequest>) => Promise<void>;
|
|
211
220
|
}
|
|
@@ -62,19 +62,13 @@ class API extends API$1 {
|
|
|
62
62
|
urlParams: urlParams(
|
|
63
63
|
["name", request.name],
|
|
64
64
|
["order_by", request.orderBy],
|
|
65
|
-
[
|
|
66
|
-
"organization_id",
|
|
67
|
-
request.organizationId ?? this.client.settings.defaultOrganizationId
|
|
68
|
-
],
|
|
65
|
+
["organization_id", request.organizationId],
|
|
69
66
|
["page", request.page],
|
|
70
67
|
[
|
|
71
68
|
"page_size",
|
|
72
69
|
request.pageSize ?? this.client.settings.defaultPageSize
|
|
73
70
|
],
|
|
74
|
-
[
|
|
75
|
-
"project_id",
|
|
76
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
77
|
-
],
|
|
71
|
+
["project_id", request.projectId],
|
|
78
72
|
["tags", request.tags]
|
|
79
73
|
)
|
|
80
74
|
},
|
|
@@ -300,19 +294,13 @@ class API extends API$1 {
|
|
|
300
294
|
["instance_id", request.instanceId],
|
|
301
295
|
["name", request.name],
|
|
302
296
|
["order_by", request.orderBy],
|
|
303
|
-
[
|
|
304
|
-
"organization_id",
|
|
305
|
-
request.organizationId ?? this.client.settings.defaultOrganizationId
|
|
306
|
-
],
|
|
297
|
+
["organization_id", request.organizationId],
|
|
307
298
|
["page", request.page],
|
|
308
299
|
[
|
|
309
300
|
"page_size",
|
|
310
301
|
request.pageSize ?? this.client.settings.defaultPageSize
|
|
311
302
|
],
|
|
312
|
-
[
|
|
313
|
-
"project_id",
|
|
314
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
315
|
-
]
|
|
303
|
+
["project_id", request.projectId]
|
|
316
304
|
)
|
|
317
305
|
},
|
|
318
306
|
unmarshalListSnapshotsResponse
|
|
@@ -405,6 +393,18 @@ class API extends API$1 {
|
|
|
405
393
|
},
|
|
406
394
|
unmarshalUser
|
|
407
395
|
);
|
|
396
|
+
/**
|
|
397
|
+
* Delete a Database Instance endpoint. Delete the endpoint of a Database
|
|
398
|
+
* Instance. You must specify the `endpoint_id` parameter of the endpoint you
|
|
399
|
+
* want to delete. Note that you might need to update any environment
|
|
400
|
+
* configurations that point to the deleted endpoint.
|
|
401
|
+
*
|
|
402
|
+
* @param request - The request {@link DeleteEndpointRequest}
|
|
403
|
+
*/
|
|
404
|
+
deleteEndpoint = (request) => this.client.fetch({
|
|
405
|
+
method: "DELETE",
|
|
406
|
+
path: `/mongodb/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam("endpointId", request.endpointId)}`
|
|
407
|
+
});
|
|
408
408
|
}
|
|
409
409
|
export {
|
|
410
410
|
API
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { CreateInstanceRequest, CreateInstanceRequestVolumeDetails, CreateSnapshotRequest, CreateUserRequest, DeleteInstanceRequest, DeleteSnapshotRequest, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicDetails, EndpointSpec, EndpointSpecPrivateNetworkDetails, EndpointSpecPublicDetails, GetInstanceCertificateRequest, GetInstanceRequest, GetSnapshotRequest, Instance, InstanceSetting, InstanceStatus, ListInstancesRequest, ListInstancesRequestOrderBy, ListInstancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, NodeType, NodeTypeStock, NodeTypeVolumeType, RestoreSnapshotRequest, RestoreSnapshotRequestVolumeDetails, Setting, SettingPropertyType, Snapshot, SnapshotStatus, SnapshotVolumeType, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User, Version, Volume, VolumeType, } from './types.gen';
|
|
3
|
+
export type { CreateInstanceRequest, CreateInstanceRequestVolumeDetails, CreateSnapshotRequest, CreateUserRequest, DeleteEndpointRequest, DeleteInstanceRequest, DeleteSnapshotRequest, Endpoint, EndpointPrivateNetworkDetails, EndpointPublicDetails, EndpointSpec, EndpointSpecPrivateNetworkDetails, EndpointSpecPublicDetails, GetInstanceCertificateRequest, GetInstanceRequest, GetSnapshotRequest, Instance, InstanceSetting, InstanceStatus, ListInstancesRequest, ListInstancesRequestOrderBy, ListInstancesResponse, ListNodeTypesRequest, ListNodeTypesResponse, ListSnapshotsRequest, ListSnapshotsRequestOrderBy, ListSnapshotsResponse, ListUsersRequest, ListUsersRequestOrderBy, ListUsersResponse, ListVersionsRequest, ListVersionsResponse, NodeType, NodeTypeStock, NodeTypeVolumeType, RestoreSnapshotRequest, RestoreSnapshotRequestVolumeDetails, Setting, SettingPropertyType, Snapshot, SnapshotStatus, SnapshotVolumeType, UpdateInstanceRequest, UpdateSnapshotRequest, UpdateUserRequest, UpgradeInstanceRequest, User, Version, Volume, VolumeType, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -252,6 +252,15 @@ export type CreateUserRequest = {
|
|
|
252
252
|
/** Password of the database user. */
|
|
253
253
|
password: string;
|
|
254
254
|
};
|
|
255
|
+
export type DeleteEndpointRequest = {
|
|
256
|
+
/**
|
|
257
|
+
* Region to target. If none is passed will use default region from the
|
|
258
|
+
* config.
|
|
259
|
+
*/
|
|
260
|
+
region?: Region;
|
|
261
|
+
/** UUID of the Endpoint to delete. */
|
|
262
|
+
endpointId: string;
|
|
263
|
+
};
|
|
255
264
|
export type DeleteInstanceRequest = {
|
|
256
265
|
/**
|
|
257
266
|
* Region to target. If none is passed will use default region from the
|
|
@@ -294,19 +294,13 @@ class HostingAPI extends api.API {
|
|
|
294
294
|
["control_panels", request.controlPanels],
|
|
295
295
|
["domain", request.domain],
|
|
296
296
|
["order_by", request.orderBy],
|
|
297
|
-
[
|
|
298
|
-
"organization_id",
|
|
299
|
-
request.organizationId ?? this.client.settings.defaultOrganizationId
|
|
300
|
-
],
|
|
297
|
+
["organization_id", request.organizationId],
|
|
301
298
|
["page", request.page],
|
|
302
299
|
[
|
|
303
300
|
"page_size",
|
|
304
301
|
request.pageSize ?? this.client.settings.defaultPageSize
|
|
305
302
|
],
|
|
306
|
-
[
|
|
307
|
-
"project_id",
|
|
308
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
309
|
-
],
|
|
303
|
+
["project_id", request.projectId],
|
|
310
304
|
["statuses", request.statuses],
|
|
311
305
|
["tags", request.tags]
|
|
312
306
|
)
|
|
@@ -414,6 +408,20 @@ class HostingAPI extends api.API {
|
|
|
414
408
|
},
|
|
415
409
|
marshalling_gen.unmarshalResetHostingPasswordResponse
|
|
416
410
|
);
|
|
411
|
+
/**
|
|
412
|
+
* Get the total counts of websites, databases, email accounts, and FTP
|
|
413
|
+
* accounts of a Web Hosting plan.
|
|
414
|
+
*
|
|
415
|
+
* @param request - The request {@link HostingApiGetResourceSummaryRequest}
|
|
416
|
+
* @returns A Promise of ResourceSummary
|
|
417
|
+
*/
|
|
418
|
+
getResourceSummary = (request) => this.client.fetch(
|
|
419
|
+
{
|
|
420
|
+
method: "GET",
|
|
421
|
+
path: `/webhosting/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${marshalling.validatePathParam("hostingId", request.hostingId)}/resource-summary`
|
|
422
|
+
},
|
|
423
|
+
marshalling_gen.unmarshalResourceSummary
|
|
424
|
+
);
|
|
417
425
|
}
|
|
418
426
|
class FtpAccountAPI extends api.API {
|
|
419
427
|
/** Lists the available regions of the API. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Region, WaitForOptions } from '../../../bridge';
|
|
3
|
-
import type { ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, ResetHostingPasswordResponse, Session, WebsiteApiListWebsitesRequest } from './types.gen';
|
|
3
|
+
import type { ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, ResetHostingPasswordResponse, ResourceSummary, Session, WebsiteApiListWebsitesRequest } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Web Hosting API.
|
|
6
6
|
*
|
|
@@ -216,6 +216,14 @@ export declare class HostingAPI extends ParentAPI {
|
|
|
216
216
|
* @returns A Promise of ResetHostingPasswordResponse
|
|
217
217
|
*/
|
|
218
218
|
resetHostingPassword: (request: Readonly<HostingApiResetHostingPasswordRequest>) => Promise<ResetHostingPasswordResponse>;
|
|
219
|
+
/**
|
|
220
|
+
* Get the total counts of websites, databases, email accounts, and FTP
|
|
221
|
+
* accounts of a Web Hosting plan.
|
|
222
|
+
*
|
|
223
|
+
* @param request - The request {@link HostingApiGetResourceSummaryRequest}
|
|
224
|
+
* @returns A Promise of ResourceSummary
|
|
225
|
+
*/
|
|
226
|
+
getResourceSummary: (request: Readonly<HostingApiGetResourceSummaryRequest>) => Promise<ResourceSummary>;
|
|
219
227
|
}
|
|
220
228
|
/**
|
|
221
229
|
* Web Hosting FTP Account API.
|
|
@@ -4,7 +4,7 @@ import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
|
|
|
4
4
|
import "../../../vendor/base64/index.js";
|
|
5
5
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
6
6
|
import { HOSTING_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
7
|
-
import { unmarshalListControlPanelsResponse, marshalDatabaseApiCreateDatabaseRequest, unmarshalDatabase, unmarshalListDatabasesResponse, marshalDatabaseApiCreateDatabaseUserRequest, unmarshalDatabaseUser, unmarshalListDatabaseUsersResponse, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, unmarshalListOffersResponse, marshalHostingApiCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalHostingApiUpdateHostingRequest, unmarshalSession, unmarshalResetHostingPasswordResponse, marshalFtpAccountApiCreateFtpAccountRequest, unmarshalFtpAccount, unmarshalListFtpAccountsResponse, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, unmarshalMailAccount, unmarshalListMailAccountsResponse, marshalMailAccountApiRemoveMailAccountRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, unmarshalListWebsitesResponse } from "./marshalling.gen.js";
|
|
7
|
+
import { unmarshalListControlPanelsResponse, marshalDatabaseApiCreateDatabaseRequest, unmarshalDatabase, unmarshalListDatabasesResponse, marshalDatabaseApiCreateDatabaseUserRequest, unmarshalDatabaseUser, unmarshalListDatabaseUsersResponse, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, unmarshalListOffersResponse, marshalHostingApiCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalHostingApiUpdateHostingRequest, unmarshalSession, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, marshalFtpAccountApiCreateFtpAccountRequest, unmarshalFtpAccount, unmarshalListFtpAccountsResponse, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, unmarshalMailAccount, unmarshalListMailAccountsResponse, marshalMailAccountApiRemoveMailAccountRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, unmarshalListWebsitesResponse } from "./marshalling.gen.js";
|
|
8
8
|
const jsonContentHeaders = {
|
|
9
9
|
"Content-Type": "application/json; charset=utf-8"
|
|
10
10
|
};
|
|
@@ -292,19 +292,13 @@ class HostingAPI extends API$1 {
|
|
|
292
292
|
["control_panels", request.controlPanels],
|
|
293
293
|
["domain", request.domain],
|
|
294
294
|
["order_by", request.orderBy],
|
|
295
|
-
[
|
|
296
|
-
"organization_id",
|
|
297
|
-
request.organizationId ?? this.client.settings.defaultOrganizationId
|
|
298
|
-
],
|
|
295
|
+
["organization_id", request.organizationId],
|
|
299
296
|
["page", request.page],
|
|
300
297
|
[
|
|
301
298
|
"page_size",
|
|
302
299
|
request.pageSize ?? this.client.settings.defaultPageSize
|
|
303
300
|
],
|
|
304
|
-
[
|
|
305
|
-
"project_id",
|
|
306
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
307
|
-
],
|
|
301
|
+
["project_id", request.projectId],
|
|
308
302
|
["statuses", request.statuses],
|
|
309
303
|
["tags", request.tags]
|
|
310
304
|
)
|
|
@@ -412,6 +406,20 @@ class HostingAPI extends API$1 {
|
|
|
412
406
|
},
|
|
413
407
|
unmarshalResetHostingPasswordResponse
|
|
414
408
|
);
|
|
409
|
+
/**
|
|
410
|
+
* Get the total counts of websites, databases, email accounts, and FTP
|
|
411
|
+
* accounts of a Web Hosting plan.
|
|
412
|
+
*
|
|
413
|
+
* @param request - The request {@link HostingApiGetResourceSummaryRequest}
|
|
414
|
+
* @returns A Promise of ResourceSummary
|
|
415
|
+
*/
|
|
416
|
+
getResourceSummary = (request) => this.client.fetch(
|
|
417
|
+
{
|
|
418
|
+
method: "GET",
|
|
419
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/resource-summary`
|
|
420
|
+
},
|
|
421
|
+
unmarshalResourceSummary
|
|
422
|
+
);
|
|
415
423
|
}
|
|
416
424
|
class FtpAccountAPI extends API$1 {
|
|
417
425
|
/** Lists the available regions of the API. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ControlPanelAPI, DatabaseAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI, } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { ControlPanel, ControlPanelApiListControlPanelsRequest, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingCpanelUrls, HostingDnsStatus, HostingOption, HostingStatus, HostingSummary, HostingSummaryStatus, ListControlPanelsResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListFtpAccountsRequestOrderBy, ListFtpAccountsResponse, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailAccountsRequestOrderBy, ListMailAccountsResponse, ListOffersRequestOrderBy, ListOffersResponse, ListWebsitesRequestOrderBy, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, Offer, OfferApiListOffersRequest, OfferOption, OfferOptionName, OfferOptionRequest, OfferOptionWarning, ResetHostingPasswordResponse, Session, Website, WebsiteApiListWebsitesRequest, } from './types.gen';
|
|
3
|
+
export type { ControlPanel, ControlPanelApiListControlPanelsRequest, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingCpanelUrls, HostingDnsStatus, HostingOption, HostingStatus, HostingSummary, HostingSummaryStatus, ListControlPanelsResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListFtpAccountsRequestOrderBy, ListFtpAccountsResponse, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailAccountsRequestOrderBy, ListMailAccountsResponse, ListOffersRequestOrderBy, ListOffersResponse, ListWebsitesRequestOrderBy, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, Offer, OfferApiListOffersRequest, OfferOption, OfferOptionName, OfferOptionRequest, OfferOptionWarning, ResetHostingPasswordResponse, ResourceSummary, Session, Website, WebsiteApiListWebsitesRequest, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -280,6 +280,19 @@ const unmarshalResetHostingPasswordResponse = (data) => {
|
|
|
280
280
|
oneTimePassword: data.one_time_password
|
|
281
281
|
};
|
|
282
282
|
};
|
|
283
|
+
const unmarshalResourceSummary = (data) => {
|
|
284
|
+
if (!json.isJSONObject(data)) {
|
|
285
|
+
throw new TypeError(
|
|
286
|
+
`Unmarshalling the type 'ResourceSummary' failed as data isn't a dictionary.`
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
return {
|
|
290
|
+
databasesCount: data.databases_count,
|
|
291
|
+
ftpAccountsCount: data.ftp_accounts_count,
|
|
292
|
+
mailAccountsCount: data.mail_accounts_count,
|
|
293
|
+
websitesCount: data.websites_count
|
|
294
|
+
};
|
|
295
|
+
};
|
|
283
296
|
const unmarshalSession = (data) => {
|
|
284
297
|
if (!json.isJSONObject(data)) {
|
|
285
298
|
throw new TypeError(
|
|
@@ -388,4 +401,5 @@ exports.unmarshalListOffersResponse = unmarshalListOffersResponse;
|
|
|
388
401
|
exports.unmarshalListWebsitesResponse = unmarshalListWebsitesResponse;
|
|
389
402
|
exports.unmarshalMailAccount = unmarshalMailAccount;
|
|
390
403
|
exports.unmarshalResetHostingPasswordResponse = unmarshalResetHostingPasswordResponse;
|
|
404
|
+
exports.unmarshalResourceSummary = unmarshalResourceSummary;
|
|
391
405
|
exports.unmarshalSession = unmarshalSession;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiRemoveMailAccountRequest, ResetHostingPasswordResponse, Session } from './types.gen';
|
|
2
|
+
import type { Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiRemoveMailAccountRequest, ResetHostingPasswordResponse, ResourceSummary, Session } from './types.gen';
|
|
3
3
|
export declare const unmarshalDatabaseUser: (data: unknown) => DatabaseUser;
|
|
4
4
|
export declare const unmarshalDatabase: (data: unknown) => Database;
|
|
5
5
|
export declare const unmarshalFtpAccount: (data: unknown) => FtpAccount;
|
|
@@ -14,6 +14,7 @@ export declare const unmarshalListMailAccountsResponse: (data: unknown) => ListM
|
|
|
14
14
|
export declare const unmarshalListOffersResponse: (data: unknown) => ListOffersResponse;
|
|
15
15
|
export declare const unmarshalListWebsitesResponse: (data: unknown) => ListWebsitesResponse;
|
|
16
16
|
export declare const unmarshalResetHostingPasswordResponse: (data: unknown) => ResetHostingPasswordResponse;
|
|
17
|
+
export declare const unmarshalResourceSummary: (data: unknown) => ResourceSummary;
|
|
17
18
|
export declare const unmarshalSession: (data: unknown) => Session;
|
|
18
19
|
export declare const marshalDatabaseApiAssignDatabaseUserRequest: (request: DatabaseApiAssignDatabaseUserRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
19
20
|
export declare const marshalDatabaseApiChangeDatabaseUserPasswordRequest: (request: DatabaseApiChangeDatabaseUserPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -278,6 +278,19 @@ const unmarshalResetHostingPasswordResponse = (data) => {
|
|
|
278
278
|
oneTimePassword: data.one_time_password
|
|
279
279
|
};
|
|
280
280
|
};
|
|
281
|
+
const unmarshalResourceSummary = (data) => {
|
|
282
|
+
if (!isJSONObject(data)) {
|
|
283
|
+
throw new TypeError(
|
|
284
|
+
`Unmarshalling the type 'ResourceSummary' failed as data isn't a dictionary.`
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
return {
|
|
288
|
+
databasesCount: data.databases_count,
|
|
289
|
+
ftpAccountsCount: data.ftp_accounts_count,
|
|
290
|
+
mailAccountsCount: data.mail_accounts_count,
|
|
291
|
+
websitesCount: data.websites_count
|
|
292
|
+
};
|
|
293
|
+
};
|
|
281
294
|
const unmarshalSession = (data) => {
|
|
282
295
|
if (!isJSONObject(data)) {
|
|
283
296
|
throw new TypeError(
|
|
@@ -387,5 +400,6 @@ export {
|
|
|
387
400
|
unmarshalListWebsitesResponse,
|
|
388
401
|
unmarshalMailAccount,
|
|
389
402
|
unmarshalResetHostingPasswordResponse,
|
|
403
|
+
unmarshalResourceSummary,
|
|
390
404
|
unmarshalSession
|
|
391
405
|
};
|
|
@@ -462,6 +462,15 @@ export type HostingApiGetHostingRequest = {
|
|
|
462
462
|
/** Hosting ID. */
|
|
463
463
|
hostingId: string;
|
|
464
464
|
};
|
|
465
|
+
export type HostingApiGetResourceSummaryRequest = {
|
|
466
|
+
/**
|
|
467
|
+
* Region to target. If none is passed will use default region from the
|
|
468
|
+
* config.
|
|
469
|
+
*/
|
|
470
|
+
region?: Region;
|
|
471
|
+
/** Hosting ID. */
|
|
472
|
+
hostingId: string;
|
|
473
|
+
};
|
|
465
474
|
export type HostingApiListHostingsRequest = {
|
|
466
475
|
/**
|
|
467
476
|
* Region to target. If none is passed will use default region from the
|
|
@@ -674,6 +683,16 @@ export interface ResetHostingPasswordResponse {
|
|
|
674
683
|
/** New temporary password. */
|
|
675
684
|
oneTimePassword: string;
|
|
676
685
|
}
|
|
686
|
+
export interface ResourceSummary {
|
|
687
|
+
/** Total number of active databases in the Web Hosting plan. */
|
|
688
|
+
databasesCount: number;
|
|
689
|
+
/** Total number of active email accounts in the Web Hosting plan. */
|
|
690
|
+
mailAccountsCount: number;
|
|
691
|
+
/** Total number of active FTP accounts in the Web Hosting plan. */
|
|
692
|
+
ftpAccountsCount: number;
|
|
693
|
+
/** Total number of active domains in the the Web Hosting plan. */
|
|
694
|
+
websitesCount: number;
|
|
695
|
+
}
|
|
677
696
|
export interface Session {
|
|
678
697
|
/** Logged user's session URL. */
|
|
679
698
|
url: string;
|
package/dist/scw/constants.cjs
CHANGED
package/dist/scw/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "v2.
|
|
2
|
-
export declare const userAgent = "scaleway-sdk-js/v2.
|
|
1
|
+
export declare const version = "v2.54.0";
|
|
2
|
+
export declare const userAgent = "scaleway-sdk-js/v2.54.0";
|
package/dist/scw/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.55.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Scaleway SDK.",
|
|
6
6
|
"keywords": [
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"bundledDependencies": [
|
|
40
40
|
"@scaleway/random-name"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "d3f0ca3df372a526551181cdb79e4a7391ba7205"
|
|
43
43
|
}
|