@scaleway/sdk 2.68.0 → 2.69.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/audit_trail/v1alpha1/api.gen.cjs +1 -0
- package/dist/api/audit_trail/v1alpha1/api.gen.js +1 -0
- package/dist/api/audit_trail/v1alpha1/marshalling.gen.cjs +5 -0
- package/dist/api/audit_trail/v1alpha1/marshalling.gen.js +5 -0
- package/dist/api/audit_trail/v1alpha1/types.gen.d.ts +50 -14
- package/dist/api/audit_trail/v1alpha1/validation-rules.gen.cjs +3 -0
- package/dist/api/audit_trail/v1alpha1/validation-rules.gen.d.ts +3 -0
- package/dist/api/audit_trail/v1alpha1/validation-rules.gen.js +3 -0
- package/dist/api/billing/v2beta1/api.gen.cjs +9 -2
- package/dist/api/billing/v2beta1/api.gen.d.ts +9 -2
- package/dist/api/billing/v2beta1/api.gen.js +9 -2
- package/dist/api/billing/v2beta1/types.gen.d.ts +1 -1
- package/dist/api/edge_services/v1beta1/api.gen.cjs +1 -1
- package/dist/api/edge_services/v1beta1/api.gen.js +1 -1
- package/dist/api/edge_services/v1beta1/marshalling.gen.cjs +1 -0
- package/dist/api/edge_services/v1beta1/marshalling.gen.d.ts +2 -1
- package/dist/api/edge_services/v1beta1/marshalling.gen.js +1 -0
- package/dist/api/edge_services/v1beta1/types.gen.d.ts +104 -104
- package/dist/api/iam/v1alpha1/api.gen.cjs +7 -0
- package/dist/api/iam/v1alpha1/api.gen.d.ts +2 -1
- package/dist/api/iam/v1alpha1/api.gen.js +8 -1
- package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/iam/v1alpha1/marshalling.gen.cjs +51 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.d.ts +2 -1
- package/dist/api/iam/v1alpha1/marshalling.gen.js +51 -0
- package/dist/api/iam/v1alpha1/types.gen.d.ts +24 -0
- package/dist/api/mongodb/v1alpha1/types.gen.d.ts +1 -1
- package/dist/api/secret/v1beta1/api.gen.cjs +2 -34
- package/dist/api/secret/v1beta1/api.gen.d.ts +3 -19
- package/dist/api/secret/v1beta1/api.gen.js +2 -34
- package/dist/api/secret/v1beta1/index.gen.d.ts +1 -1
- package/dist/api/secret/v1beta1/types.gen.d.ts +3 -19
- package/dist/api/tem/v1alpha1/types.gen.d.ts +5 -5
- package/dist/api/vpcgw/v1/api.gen.cjs +7 -0
- package/dist/api/vpcgw/v1/api.gen.d.ts +7 -0
- package/dist/api/vpcgw/v1/api.gen.js +7 -0
- package/dist/api/vpcgw/v1/types.gen.d.ts +1 -0
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/standard/quotas-exceeded-error.cjs +1 -1
- package/dist/scw/errors/standard/quotas-exceeded-error.d.ts +4 -4
- package/dist/scw/errors/standard/quotas-exceeded-error.js +1 -1
- package/package.json +2 -2
|
@@ -213,6 +213,56 @@ const unmarshalEncodedJWT = (data) => {
|
|
|
213
213
|
token: data.token
|
|
214
214
|
};
|
|
215
215
|
};
|
|
216
|
+
const unmarshalGetUserConnectionsResponseConnectionConnectedOrganization = (data) => {
|
|
217
|
+
if (!json.isJSONObject(data)) {
|
|
218
|
+
throw new TypeError(
|
|
219
|
+
`Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedOrganization' failed as data isn't a dictionary.`
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
id: data.id,
|
|
224
|
+
locked: data.locked,
|
|
225
|
+
name: data.name
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
const unmarshalGetUserConnectionsResponseConnectionConnectedUser = (data) => {
|
|
229
|
+
if (!json.isJSONObject(data)) {
|
|
230
|
+
throw new TypeError(
|
|
231
|
+
`Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedUser' failed as data isn't a dictionary.`
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
return {
|
|
235
|
+
id: data.id,
|
|
236
|
+
type: data.type,
|
|
237
|
+
username: data.username
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
const unmarshalGetUserConnectionsResponseConnection = (data) => {
|
|
241
|
+
if (!json.isJSONObject(data)) {
|
|
242
|
+
throw new TypeError(
|
|
243
|
+
`Unmarshalling the type 'GetUserConnectionsResponseConnection' failed as data isn't a dictionary.`
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
return {
|
|
247
|
+
organization: data.organization ? unmarshalGetUserConnectionsResponseConnectionConnectedOrganization(
|
|
248
|
+
data.organization
|
|
249
|
+
) : void 0,
|
|
250
|
+
user: data.user ? unmarshalGetUserConnectionsResponseConnectionConnectedUser(data.user) : void 0
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
const unmarshalGetUserConnectionsResponse = (data) => {
|
|
254
|
+
if (!json.isJSONObject(data)) {
|
|
255
|
+
throw new TypeError(
|
|
256
|
+
`Unmarshalling the type 'GetUserConnectionsResponse' failed as data isn't a dictionary.`
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
return {
|
|
260
|
+
connections: marshalling.unmarshalArrayOfObject(
|
|
261
|
+
data.connections,
|
|
262
|
+
unmarshalGetUserConnectionsResponseConnection
|
|
263
|
+
)
|
|
264
|
+
};
|
|
265
|
+
};
|
|
216
266
|
const unmarshalListAPIKeysResponse = (data) => {
|
|
217
267
|
if (!json.isJSONObject(data)) {
|
|
218
268
|
throw new TypeError(
|
|
@@ -602,6 +652,7 @@ exports.marshalValidateUserMFAOTPRequest = marshalValidateUserMFAOTPRequest;
|
|
|
602
652
|
exports.unmarshalAPIKey = unmarshalAPIKey;
|
|
603
653
|
exports.unmarshalApplication = unmarshalApplication;
|
|
604
654
|
exports.unmarshalEncodedJWT = unmarshalEncodedJWT;
|
|
655
|
+
exports.unmarshalGetUserConnectionsResponse = unmarshalGetUserConnectionsResponse;
|
|
605
656
|
exports.unmarshalGroup = unmarshalGroup;
|
|
606
657
|
exports.unmarshalJWT = unmarshalJWT;
|
|
607
658
|
exports.unmarshalListAPIKeysResponse = unmarshalListAPIKeysResponse;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, Application, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateSSHKeyRequest, CreateUserRequest, EncodedJWT, Group, JWT, ListAPIKeysResponse, ListApplicationsResponse, ListGracePeriodsResponse, ListGroupsResponse, ListJWTsResponse, ListLogsResponse, ListPermissionSetsResponse, ListPoliciesResponse, ListQuotaResponse, ListRulesResponse, ListSSHKeysResponse, ListUsersResponse, Log, MFAOTP, OrganizationSecuritySettings, Policy, Quotum, RemoveGroupMemberRequest, SSHKey, SetGroupMembersRequest, SetRulesRequest, SetRulesResponse, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateUserPasswordRequest, UpdateUserRequest, UpdateUserUsernameRequest, User, ValidateUserMFAOTPRequest, ValidateUserMFAOTPResponse } from './types.gen';
|
|
2
|
+
import type { APIKey, AddGroupMemberRequest, AddGroupMembersRequest, Application, CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreateJWTRequest, CreatePolicyRequest, CreateSSHKeyRequest, CreateUserRequest, EncodedJWT, GetUserConnectionsResponse, Group, JWT, ListAPIKeysResponse, ListApplicationsResponse, ListGracePeriodsResponse, ListGroupsResponse, ListJWTsResponse, ListLogsResponse, ListPermissionSetsResponse, ListPoliciesResponse, ListQuotaResponse, ListRulesResponse, ListSSHKeysResponse, ListUsersResponse, Log, MFAOTP, OrganizationSecuritySettings, Policy, Quotum, RemoveGroupMemberRequest, SSHKey, SetGroupMembersRequest, SetRulesRequest, SetRulesResponse, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSSHKeyRequest, UpdateUserPasswordRequest, UpdateUserRequest, UpdateUserUsernameRequest, User, ValidateUserMFAOTPRequest, ValidateUserMFAOTPResponse } from './types.gen';
|
|
3
3
|
export declare const unmarshalJWT: (data: unknown) => JWT;
|
|
4
4
|
export declare const unmarshalAPIKey: (data: unknown) => APIKey;
|
|
5
5
|
export declare const unmarshalApplication: (data: unknown) => Application;
|
|
@@ -10,6 +10,7 @@ export declare const unmarshalQuotum: (data: unknown) => Quotum;
|
|
|
10
10
|
export declare const unmarshalSSHKey: (data: unknown) => SSHKey;
|
|
11
11
|
export declare const unmarshalUser: (data: unknown) => User;
|
|
12
12
|
export declare const unmarshalEncodedJWT: (data: unknown) => EncodedJWT;
|
|
13
|
+
export declare const unmarshalGetUserConnectionsResponse: (data: unknown) => GetUserConnectionsResponse;
|
|
13
14
|
export declare const unmarshalListAPIKeysResponse: (data: unknown) => ListAPIKeysResponse;
|
|
14
15
|
export declare const unmarshalListApplicationsResponse: (data: unknown) => ListApplicationsResponse;
|
|
15
16
|
export declare const unmarshalListGracePeriodsResponse: (data: unknown) => ListGracePeriodsResponse;
|
|
@@ -211,6 +211,56 @@ const unmarshalEncodedJWT = (data) => {
|
|
|
211
211
|
token: data.token
|
|
212
212
|
};
|
|
213
213
|
};
|
|
214
|
+
const unmarshalGetUserConnectionsResponseConnectionConnectedOrganization = (data) => {
|
|
215
|
+
if (!isJSONObject(data)) {
|
|
216
|
+
throw new TypeError(
|
|
217
|
+
`Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedOrganization' failed as data isn't a dictionary.`
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
return {
|
|
221
|
+
id: data.id,
|
|
222
|
+
locked: data.locked,
|
|
223
|
+
name: data.name
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
const unmarshalGetUserConnectionsResponseConnectionConnectedUser = (data) => {
|
|
227
|
+
if (!isJSONObject(data)) {
|
|
228
|
+
throw new TypeError(
|
|
229
|
+
`Unmarshalling the type 'GetUserConnectionsResponseConnectionConnectedUser' failed as data isn't a dictionary.`
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
return {
|
|
233
|
+
id: data.id,
|
|
234
|
+
type: data.type,
|
|
235
|
+
username: data.username
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
const unmarshalGetUserConnectionsResponseConnection = (data) => {
|
|
239
|
+
if (!isJSONObject(data)) {
|
|
240
|
+
throw new TypeError(
|
|
241
|
+
`Unmarshalling the type 'GetUserConnectionsResponseConnection' failed as data isn't a dictionary.`
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
return {
|
|
245
|
+
organization: data.organization ? unmarshalGetUserConnectionsResponseConnectionConnectedOrganization(
|
|
246
|
+
data.organization
|
|
247
|
+
) : void 0,
|
|
248
|
+
user: data.user ? unmarshalGetUserConnectionsResponseConnectionConnectedUser(data.user) : void 0
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
const unmarshalGetUserConnectionsResponse = (data) => {
|
|
252
|
+
if (!isJSONObject(data)) {
|
|
253
|
+
throw new TypeError(
|
|
254
|
+
`Unmarshalling the type 'GetUserConnectionsResponse' failed as data isn't a dictionary.`
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
return {
|
|
258
|
+
connections: unmarshalArrayOfObject(
|
|
259
|
+
data.connections,
|
|
260
|
+
unmarshalGetUserConnectionsResponseConnection
|
|
261
|
+
)
|
|
262
|
+
};
|
|
263
|
+
};
|
|
214
264
|
const unmarshalListAPIKeysResponse = (data) => {
|
|
215
265
|
if (!isJSONObject(data)) {
|
|
216
266
|
throw new TypeError(
|
|
@@ -601,6 +651,7 @@ export {
|
|
|
601
651
|
unmarshalAPIKey,
|
|
602
652
|
unmarshalApplication,
|
|
603
653
|
unmarshalEncodedJWT,
|
|
654
|
+
unmarshalGetUserConnectionsResponse,
|
|
604
655
|
unmarshalGroup,
|
|
605
656
|
unmarshalJWT,
|
|
606
657
|
unmarshalListAPIKeysResponse,
|
|
@@ -17,6 +17,16 @@ export type LogResourceType = 'unknown_resource_type' | 'api_key' | 'user' | 'ap
|
|
|
17
17
|
export type PermissionSetScopeType = 'unknown_scope_type' | 'projects' | 'organization' | 'account_root_user';
|
|
18
18
|
export type UserStatus = 'unknown_status' | 'invitation_pending' | 'activated';
|
|
19
19
|
export type UserType = 'unknown_type' | 'guest' | 'owner' | 'member';
|
|
20
|
+
export interface GetUserConnectionsResponseConnectionConnectedOrganization {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
locked: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface GetUserConnectionsResponseConnectionConnectedUser {
|
|
26
|
+
id: string;
|
|
27
|
+
username: string;
|
|
28
|
+
type: UserType;
|
|
29
|
+
}
|
|
20
30
|
export interface QuotumLimit {
|
|
21
31
|
/**
|
|
22
32
|
* Whether or not the limit is applied globally.
|
|
@@ -105,6 +115,12 @@ export interface CreateUserRequestMember {
|
|
|
105
115
|
/** The member's password. */
|
|
106
116
|
password: string;
|
|
107
117
|
}
|
|
118
|
+
export interface GetUserConnectionsResponseConnection {
|
|
119
|
+
/** Information about the connected organization. */
|
|
120
|
+
organization?: GetUserConnectionsResponseConnectionConnectedOrganization;
|
|
121
|
+
/** Information about the connected user. */
|
|
122
|
+
user?: GetUserConnectionsResponseConnectionConnectedUser;
|
|
123
|
+
}
|
|
108
124
|
export interface APIKey {
|
|
109
125
|
/** Access key of the API key. */
|
|
110
126
|
accessKey: string;
|
|
@@ -625,6 +641,14 @@ export type GetSSHKeyRequest = {
|
|
|
625
641
|
/** ID of the SSH key. */
|
|
626
642
|
sshKeyId: string;
|
|
627
643
|
};
|
|
644
|
+
export type GetUserConnectionsRequest = {
|
|
645
|
+
/** ID of the user to list connections for. */
|
|
646
|
+
userId: string;
|
|
647
|
+
};
|
|
648
|
+
export interface GetUserConnectionsResponse {
|
|
649
|
+
/** List of connections. */
|
|
650
|
+
connections: GetUserConnectionsResponseConnection[];
|
|
651
|
+
}
|
|
628
652
|
export type GetUserRequest = {
|
|
629
653
|
/** ID of the user to find. */
|
|
630
654
|
userId: string;
|
|
@@ -6,7 +6,7 @@ export type ListUsersRequestOrderBy = 'name_asc' | 'name_desc';
|
|
|
6
6
|
export type NodeTypeStock = 'unknown_stock' | 'low_stock' | 'out_of_stock' | 'available';
|
|
7
7
|
export type SettingPropertyType = 'BOOLEAN' | 'INT' | 'STRING' | 'FLOAT';
|
|
8
8
|
export type SnapshotStatus = 'unknown_status' | 'creating' | 'ready' | 'restoring' | 'deleting' | 'error' | 'locked';
|
|
9
|
-
export type UserRoleRole = 'unknown_role' | 'read' | 'read_write' | 'db_admin';
|
|
9
|
+
export type UserRoleRole = 'unknown_role' | 'read' | 'read_write' | 'db_admin' | 'sync';
|
|
10
10
|
export type VolumeType = 'unknown_type' | 'sbs_5k' | 'sbs_15k';
|
|
11
11
|
/** Private Network details. */
|
|
12
12
|
export interface EndpointPrivateNetworkDetails {
|
|
@@ -76,7 +76,7 @@ class API extends api.API {
|
|
|
76
76
|
method: "DELETE",
|
|
77
77
|
path: `/secret-manager/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${marshalling.validatePathParam("secretId", request.secretId)}`
|
|
78
78
|
});
|
|
79
|
-
pageOfListSecrets = (request
|
|
79
|
+
pageOfListSecrets = (request) => this.client.fetch(
|
|
80
80
|
{
|
|
81
81
|
method: "GET",
|
|
82
82
|
path: `/secret-manager/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets`,
|
|
@@ -107,7 +107,7 @@ class API extends api.API {
|
|
|
107
107
|
* @param request - The request {@link ListSecretsRequest}
|
|
108
108
|
* @returns A Promise of ListSecretsResponse
|
|
109
109
|
*/
|
|
110
|
-
listSecrets = (request
|
|
110
|
+
listSecrets = (request) => resourcePaginator.enrichForPagination("secrets", this.pageOfListSecrets, request);
|
|
111
111
|
/**
|
|
112
112
|
* Browse secrets. Retrieve the list of secrets and folders for the given
|
|
113
113
|
* prefix. You must specify either the `organization_id` or the `project_id`
|
|
@@ -387,37 +387,5 @@ class API extends api.API {
|
|
|
387
387
|
* @returns A Promise of ListSecretTypesResponse
|
|
388
388
|
*/
|
|
389
389
|
listSecretTypes = (request = {}) => resourcePaginator.enrichForPagination("types", this.pageOfListSecretTypes, request);
|
|
390
|
-
/**
|
|
391
|
-
* Restore a version.. Restore a secret's version specified by the `region`,
|
|
392
|
-
* `secret_id` and `revision` parameters.
|
|
393
|
-
*
|
|
394
|
-
* @param request - The request {@link RestoreSecretVersionRequest}
|
|
395
|
-
* @returns A Promise of SecretVersion
|
|
396
|
-
*/
|
|
397
|
-
restoreSecretVersion = (request) => this.client.fetch(
|
|
398
|
-
{
|
|
399
|
-
body: "{}",
|
|
400
|
-
headers: jsonContentHeaders,
|
|
401
|
-
method: "POST",
|
|
402
|
-
path: `/secret-manager/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${marshalling.validatePathParam("secretId", request.secretId)}/versions/${marshalling.validatePathParam("revision", request.revision)}/restore`
|
|
403
|
-
},
|
|
404
|
-
marshalling_gen.unmarshalSecretVersion
|
|
405
|
-
);
|
|
406
|
-
/**
|
|
407
|
-
* Restore a secret.. Restore a secret and all its versions scheduled for
|
|
408
|
-
* deletion specified by the `region` and `secret_id` parameters.
|
|
409
|
-
*
|
|
410
|
-
* @param request - The request {@link RestoreSecretRequest}
|
|
411
|
-
* @returns A Promise of Secret
|
|
412
|
-
*/
|
|
413
|
-
restoreSecret = (request) => this.client.fetch(
|
|
414
|
-
{
|
|
415
|
-
body: "{}",
|
|
416
|
-
headers: jsonContentHeaders,
|
|
417
|
-
method: "POST",
|
|
418
|
-
path: `/secret-manager/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${marshalling.validatePathParam("secretId", request.secretId)}/restore`
|
|
419
|
-
},
|
|
420
|
-
marshalling_gen.unmarshalSecret
|
|
421
|
-
);
|
|
422
390
|
}
|
|
423
391
|
exports.API = API;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Region as ScwRegion } from '../../../bridge';
|
|
3
|
-
import type { AccessSecretVersionByPathRequest, AccessSecretVersionRequest, AccessSecretVersionResponse, AddSecretOwnerRequest, BrowseSecretsRequest, BrowseSecretsResponse, CreateSecretRequest, CreateSecretVersionRequest, DeleteSecretRequest, DeleteSecretVersionRequest, DisableSecretVersionRequest, EnableSecretVersionRequest, GetSecretRequest, GetSecretVersionRequest, ListSecretTypesRequest, ListSecretTypesResponse, ListSecretVersionsRequest, ListSecretVersionsResponse, ListSecretsRequest, ListSecretsResponse, ListTagsRequest, ListTagsResponse, ProtectSecretRequest,
|
|
3
|
+
import type { AccessSecretVersionByPathRequest, AccessSecretVersionRequest, AccessSecretVersionResponse, AddSecretOwnerRequest, BrowseSecretsRequest, BrowseSecretsResponse, CreateSecretRequest, CreateSecretVersionRequest, DeleteSecretRequest, DeleteSecretVersionRequest, DisableSecretVersionRequest, EnableSecretVersionRequest, GetSecretRequest, GetSecretVersionRequest, ListSecretTypesRequest, ListSecretTypesResponse, ListSecretVersionsRequest, ListSecretVersionsResponse, ListSecretsRequest, ListSecretsResponse, ListTagsRequest, ListTagsResponse, ProtectSecretRequest, Secret, SecretVersion, UnprotectSecretRequest, UpdateSecretRequest, UpdateSecretVersionRequest } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Secret Manager API.
|
|
6
6
|
*
|
|
@@ -43,7 +43,7 @@ export declare class API extends ParentAPI {
|
|
|
43
43
|
* @param request - The request {@link DeleteSecretRequest}
|
|
44
44
|
*/
|
|
45
45
|
deleteSecret: (request: Readonly<DeleteSecretRequest>) => Promise<void>;
|
|
46
|
-
protected pageOfListSecrets: (request
|
|
46
|
+
protected pageOfListSecrets: (request: Readonly<ListSecretsRequest>) => Promise<ListSecretsResponse>;
|
|
47
47
|
/**
|
|
48
48
|
* List secrets. Retrieve the list of secrets created within an Organization
|
|
49
49
|
* and/or Project. You must specify either the `organization_id` or the
|
|
@@ -52,7 +52,7 @@ export declare class API extends ParentAPI {
|
|
|
52
52
|
* @param request - The request {@link ListSecretsRequest}
|
|
53
53
|
* @returns A Promise of ListSecretsResponse
|
|
54
54
|
*/
|
|
55
|
-
listSecrets: (request
|
|
55
|
+
listSecrets: (request: Readonly<ListSecretsRequest>) => Promise<ListSecretsResponse> & {
|
|
56
56
|
all: () => Promise<Secret[]>;
|
|
57
57
|
[Symbol.asyncIterator]: () => AsyncGenerator<Secret[], void, void>;
|
|
58
58
|
};
|
|
@@ -190,20 +190,4 @@ export declare class API extends ParentAPI {
|
|
|
190
190
|
all: () => Promise<import("./types.gen").SecretType[]>;
|
|
191
191
|
[Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").SecretType[], void, void>;
|
|
192
192
|
};
|
|
193
|
-
/**
|
|
194
|
-
* Restore a version.. Restore a secret's version specified by the `region`,
|
|
195
|
-
* `secret_id` and `revision` parameters.
|
|
196
|
-
*
|
|
197
|
-
* @param request - The request {@link RestoreSecretVersionRequest}
|
|
198
|
-
* @returns A Promise of SecretVersion
|
|
199
|
-
*/
|
|
200
|
-
restoreSecretVersion: (request: Readonly<RestoreSecretVersionRequest>) => Promise<SecretVersion>;
|
|
201
|
-
/**
|
|
202
|
-
* Restore a secret.. Restore a secret and all its versions scheduled for
|
|
203
|
-
* deletion specified by the `region` and `secret_id` parameters.
|
|
204
|
-
*
|
|
205
|
-
* @param request - The request {@link RestoreSecretRequest}
|
|
206
|
-
* @returns A Promise of Secret
|
|
207
|
-
*/
|
|
208
|
-
restoreSecret: (request: Readonly<RestoreSecretRequest>) => Promise<Secret>;
|
|
209
193
|
}
|
|
@@ -74,7 +74,7 @@ class API extends API$1 {
|
|
|
74
74
|
method: "DELETE",
|
|
75
75
|
path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}`
|
|
76
76
|
});
|
|
77
|
-
pageOfListSecrets = (request
|
|
77
|
+
pageOfListSecrets = (request) => this.client.fetch(
|
|
78
78
|
{
|
|
79
79
|
method: "GET",
|
|
80
80
|
path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets`,
|
|
@@ -105,7 +105,7 @@ class API extends API$1 {
|
|
|
105
105
|
* @param request - The request {@link ListSecretsRequest}
|
|
106
106
|
* @returns A Promise of ListSecretsResponse
|
|
107
107
|
*/
|
|
108
|
-
listSecrets = (request
|
|
108
|
+
listSecrets = (request) => enrichForPagination("secrets", this.pageOfListSecrets, request);
|
|
109
109
|
/**
|
|
110
110
|
* Browse secrets. Retrieve the list of secrets and folders for the given
|
|
111
111
|
* prefix. You must specify either the `organization_id` or the `project_id`
|
|
@@ -385,38 +385,6 @@ class API extends API$1 {
|
|
|
385
385
|
* @returns A Promise of ListSecretTypesResponse
|
|
386
386
|
*/
|
|
387
387
|
listSecretTypes = (request = {}) => enrichForPagination("types", this.pageOfListSecretTypes, request);
|
|
388
|
-
/**
|
|
389
|
-
* Restore a version.. Restore a secret's version specified by the `region`,
|
|
390
|
-
* `secret_id` and `revision` parameters.
|
|
391
|
-
*
|
|
392
|
-
* @param request - The request {@link RestoreSecretVersionRequest}
|
|
393
|
-
* @returns A Promise of SecretVersion
|
|
394
|
-
*/
|
|
395
|
-
restoreSecretVersion = (request) => this.client.fetch(
|
|
396
|
-
{
|
|
397
|
-
body: "{}",
|
|
398
|
-
headers: jsonContentHeaders,
|
|
399
|
-
method: "POST",
|
|
400
|
-
path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}/versions/${validatePathParam("revision", request.revision)}/restore`
|
|
401
|
-
},
|
|
402
|
-
unmarshalSecretVersion
|
|
403
|
-
);
|
|
404
|
-
/**
|
|
405
|
-
* Restore a secret.. Restore a secret and all its versions scheduled for
|
|
406
|
-
* deletion specified by the `region` and `secret_id` parameters.
|
|
407
|
-
*
|
|
408
|
-
* @param request - The request {@link RestoreSecretRequest}
|
|
409
|
-
* @returns A Promise of Secret
|
|
410
|
-
*/
|
|
411
|
-
restoreSecret = (request) => this.client.fetch(
|
|
412
|
-
{
|
|
413
|
-
body: "{}",
|
|
414
|
-
headers: jsonContentHeaders,
|
|
415
|
-
method: "POST",
|
|
416
|
-
path: `/secret-manager/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/secrets/${validatePathParam("secretId", request.secretId)}/restore`
|
|
417
|
-
},
|
|
418
|
-
unmarshalSecret
|
|
419
|
-
);
|
|
420
388
|
}
|
|
421
389
|
export {
|
|
422
390
|
API
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { API } from './api.gen.js';
|
|
2
|
-
export type { AccessSecretVersionByPathRequest, AccessSecretVersionRequest, AccessSecretVersionResponse, AddSecretOwnerRequest, BasicCredentials, BrowseSecretsRequest, BrowseSecretsRequestOrderBy, BrowseSecretsResponse, BrowseSecretsResponseItem, BrowseSecretsResponseItemFolderDetails, BrowseSecretsResponseItemSecretDetails, CreateSecretRequest, CreateSecretVersionRequest, DatabaseCredentials, DeleteSecretRequest, DeleteSecretVersionRequest, DisableSecretVersionRequest, EnableSecretVersionRequest, EphemeralPolicy, EphemeralPolicyAction, EphemeralProperties, GetSecretRequest, GetSecretVersionRequest, ListSecretTypesRequest, ListSecretTypesResponse, ListSecretVersionsRequest, ListSecretVersionsResponse, ListSecretsRequest, ListSecretsRequestOrderBy, ListSecretsResponse, ListTagsRequest, ListTagsResponse, Product, ProtectSecretRequest,
|
|
2
|
+
export type { AccessSecretVersionByPathRequest, AccessSecretVersionRequest, AccessSecretVersionResponse, AddSecretOwnerRequest, BasicCredentials, BrowseSecretsRequest, BrowseSecretsRequestOrderBy, BrowseSecretsResponse, BrowseSecretsResponseItem, BrowseSecretsResponseItemFolderDetails, BrowseSecretsResponseItemSecretDetails, CreateSecretRequest, CreateSecretVersionRequest, DatabaseCredentials, DeleteSecretRequest, DeleteSecretVersionRequest, DisableSecretVersionRequest, EnableSecretVersionRequest, EphemeralPolicy, EphemeralPolicyAction, EphemeralProperties, GetSecretRequest, GetSecretVersionRequest, ListSecretTypesRequest, ListSecretTypesResponse, ListSecretVersionsRequest, ListSecretVersionsResponse, ListSecretsRequest, ListSecretsRequestOrderBy, ListSecretsResponse, ListTagsRequest, ListTagsResponse, Product, ProtectSecretRequest, SSHKey, Secret, SecretStatus, SecretType, SecretVersion, SecretVersionStatus, UnprotectSecretRequest, UpdateSecretRequest, UpdateSecretVersionRequest, } from './types.gen';
|
|
3
3
|
export * as ValidationRules from './validation-rules.gen.js';
|
|
@@ -448,9 +448,10 @@ export type ListSecretsRequest = {
|
|
|
448
448
|
type?: SecretType;
|
|
449
449
|
/**
|
|
450
450
|
* Filter by whether the secret was scheduled for deletion / not scheduled for
|
|
451
|
-
* deletion
|
|
451
|
+
* deletion. By default, it will display only not scheduled for deletion
|
|
452
|
+
* secrets.
|
|
452
453
|
*/
|
|
453
|
-
scheduledForDeletion
|
|
454
|
+
scheduledForDeletion: boolean;
|
|
454
455
|
};
|
|
455
456
|
export interface ListSecretsResponse {
|
|
456
457
|
/** Single page of secrets matching the requested criteria. */
|
|
@@ -484,23 +485,6 @@ export type ProtectSecretRequest = {
|
|
|
484
485
|
/** ID of the secret to enable secret protection for. */
|
|
485
486
|
secretId: string;
|
|
486
487
|
};
|
|
487
|
-
export type RestoreSecretRequest = {
|
|
488
|
-
/**
|
|
489
|
-
* Region to target. If none is passed will use default region from the
|
|
490
|
-
* config.
|
|
491
|
-
*/
|
|
492
|
-
region?: ScwRegion;
|
|
493
|
-
secretId: string;
|
|
494
|
-
};
|
|
495
|
-
export type RestoreSecretVersionRequest = {
|
|
496
|
-
/**
|
|
497
|
-
* Region to target. If none is passed will use default region from the
|
|
498
|
-
* config.
|
|
499
|
-
*/
|
|
500
|
-
region?: ScwRegion;
|
|
501
|
-
secretId: string;
|
|
502
|
-
revision: string;
|
|
503
|
-
};
|
|
504
488
|
export interface SSHKey {
|
|
505
489
|
/** The private SSH key. */
|
|
506
490
|
sshPrivateKey: string;
|
|
@@ -114,7 +114,7 @@ export interface Email {
|
|
|
114
114
|
projectId: string;
|
|
115
115
|
/** Email address of the sender. */
|
|
116
116
|
mailFrom: string;
|
|
117
|
-
/** @deprecated Email address of the recipient. */
|
|
117
|
+
/** @deprecated Deprecated. Email address of the recipient. */
|
|
118
118
|
rcptTo?: string;
|
|
119
119
|
/** Email address of the recipient. */
|
|
120
120
|
mailRcpt: string;
|
|
@@ -191,7 +191,7 @@ export interface Domain {
|
|
|
191
191
|
lastValidAt?: Date;
|
|
192
192
|
/** Date and time of the domain's deletion. */
|
|
193
193
|
revokedAt?: Date;
|
|
194
|
-
/** @deprecated Error message returned if the last check failed. */
|
|
194
|
+
/** @deprecated Deprecated. Error message returned if the last check failed. */
|
|
195
195
|
lastError?: string;
|
|
196
196
|
/** Snippet of the SPF record to register in the DNS zone. */
|
|
197
197
|
spfConfig: string;
|
|
@@ -331,8 +331,8 @@ export type CreateDomainRequest = {
|
|
|
331
331
|
projectId?: string;
|
|
332
332
|
/** Fully qualified domain dame. */
|
|
333
333
|
domainName: string;
|
|
334
|
-
/** Accept Scaleway's Terms of Service. */
|
|
335
|
-
acceptTos
|
|
334
|
+
/** @deprecated Deprecated. Accept Scaleway's Terms of Service. */
|
|
335
|
+
acceptTos?: boolean;
|
|
336
336
|
/** Activate auto-configuration of the domain's DNS zone. */
|
|
337
337
|
autoconfig: boolean;
|
|
338
338
|
};
|
|
@@ -558,7 +558,7 @@ export type ListEmailsRequest = {
|
|
|
558
558
|
until?: Date;
|
|
559
559
|
/** (Optional) List emails sent with this sender's email address. */
|
|
560
560
|
mailFrom?: string;
|
|
561
|
-
/** @deprecated List emails sent to this recipient's email address. */
|
|
561
|
+
/** @deprecated Deprecated. List emails sent to this recipient's email address. */
|
|
562
562
|
mailTo?: string;
|
|
563
563
|
/** (Optional) List emails sent to this recipient's email address. */
|
|
564
564
|
mailRcpt?: string;
|
|
@@ -740,6 +740,13 @@ class API extends api.API {
|
|
|
740
740
|
},
|
|
741
741
|
marshalling_gen.unmarshalGateway
|
|
742
742
|
);
|
|
743
|
+
/**
|
|
744
|
+
* Put a Public Gateway in IPAM mode. Put a Public Gateway in IPAM mode, so
|
|
745
|
+
* that it can be used with the Public Gateways API v2. This call is
|
|
746
|
+
* idempotent.
|
|
747
|
+
*
|
|
748
|
+
* @param request - The request {@link MigrateToV2Request}
|
|
749
|
+
*/
|
|
743
750
|
migrateToV2 = (request) => this.client.fetch({
|
|
744
751
|
body: "{}",
|
|
745
752
|
headers: jsonContentHeaders,
|
|
@@ -391,5 +391,12 @@ export declare class API extends ParentAPI {
|
|
|
391
391
|
* @returns A Promise of Gateway
|
|
392
392
|
*/
|
|
393
393
|
refreshSSHKeys: (request: Readonly<RefreshSSHKeysRequest>) => Promise<Gateway>;
|
|
394
|
+
/**
|
|
395
|
+
* Put a Public Gateway in IPAM mode. Put a Public Gateway in IPAM mode, so
|
|
396
|
+
* that it can be used with the Public Gateways API v2. This call is
|
|
397
|
+
* idempotent.
|
|
398
|
+
*
|
|
399
|
+
* @param request - The request {@link MigrateToV2Request}
|
|
400
|
+
*/
|
|
394
401
|
migrateToV2: (request: Readonly<MigrateToV2Request>) => Promise<void>;
|
|
395
402
|
}
|
|
@@ -738,6 +738,13 @@ class API extends API$1 {
|
|
|
738
738
|
},
|
|
739
739
|
unmarshalGateway
|
|
740
740
|
);
|
|
741
|
+
/**
|
|
742
|
+
* Put a Public Gateway in IPAM mode. Put a Public Gateway in IPAM mode, so
|
|
743
|
+
* that it can be used with the Public Gateways API v2. This call is
|
|
744
|
+
* idempotent.
|
|
745
|
+
*
|
|
746
|
+
* @param request - The request {@link MigrateToV2Request}
|
|
747
|
+
*/
|
|
741
748
|
migrateToV2 = (request) => this.client.fetch({
|
|
742
749
|
body: "{}",
|
|
743
750
|
headers: jsonContentHeaders,
|
|
@@ -711,6 +711,7 @@ export interface ListPATRulesResponse {
|
|
|
711
711
|
export type MigrateToV2Request = {
|
|
712
712
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
713
713
|
zone?: ScwZone;
|
|
714
|
+
/** ID of the gateway to put into IPAM mode. */
|
|
714
715
|
gatewayId: string;
|
|
715
716
|
};
|
|
716
717
|
export type RefreshSSHKeysRequest = {
|
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.68.0";
|
|
2
|
+
export declare const userAgent = "scaleway-sdk-js/v2.68.0";
|
package/dist/scw/constants.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const json = require("../../../helpers/json.cjs");
|
|
4
4
|
const scwError = require("../scw-error.cjs");
|
|
5
5
|
const buildMessage = (list) => `quota(s) exceeded: ${list.map((details) => {
|
|
6
|
-
const message =
|
|
6
|
+
const message = `Quotas reached: You have reached the maximum number of ${details.resource} authorized by your Organization. Access the quotas page from your Organization dashboard to manage quotas.`;
|
|
7
7
|
return details.scope ? `${message} for ${details.scope.kind} '${details.scope.id}'` : message;
|
|
8
8
|
}).join("; ")}`;
|
|
9
9
|
const buildScope = (detail) => {
|
|
@@ -5,21 +5,21 @@ import { ScalewayError } from '../scw-error.js';
|
|
|
5
5
|
*
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export interface QuotasExceededErrorScope {
|
|
9
9
|
kind: 'organization' | 'project';
|
|
10
10
|
id: string;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
12
|
/**
|
|
13
13
|
* Details of an {@link QuotasExceededError} error.
|
|
14
14
|
*
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export interface QuotasExceededErrorDetails {
|
|
18
18
|
readonly resource: string;
|
|
19
19
|
readonly quota: number;
|
|
20
20
|
readonly current: number;
|
|
21
21
|
readonly scope?: QuotasExceededErrorScope;
|
|
22
|
-
}
|
|
22
|
+
}
|
|
23
23
|
/**
|
|
24
24
|
* QuotasExceeded error happens when one or many resource exceed quotas during the creation of a resource.
|
|
25
25
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isJSONObject } from "../../../helpers/json.js";
|
|
2
2
|
import { ScalewayError } from "../scw-error.js";
|
|
3
3
|
const buildMessage = (list) => `quota(s) exceeded: ${list.map((details) => {
|
|
4
|
-
const message =
|
|
4
|
+
const message = `Quotas reached: You have reached the maximum number of ${details.resource} authorized by your Organization. Access the quotas page from your Organization dashboard to manage quotas.`;
|
|
5
5
|
return details.scope ? `${message} for ${details.scope.kind} '${details.scope.id}'` : message;
|
|
6
6
|
}).join("; ")}`;
|
|
7
7
|
const buildScope = (detail) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.69.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": "808bced50c8510a64d36b90140d83267ce3fe603"
|
|
43
43
|
}
|