@scaleway/sdk-key-manager 2.6.2 → 2.7.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/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -67,7 +67,7 @@ var API = class extends API$1 {
|
|
|
67
67
|
this.pageOfListKeys = (request) => this.client.fetch({
|
|
68
68
|
method: "GET",
|
|
69
69
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys`,
|
|
70
|
-
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["scheduled_for_deletion", request.scheduledForDeletion], ["tags", request.tags], ["usage", request.usage])
|
|
70
|
+
urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["protection_level", request.protectionLevel], ["scheduled_for_deletion", request.scheduledForDeletion], ["tags", request.tags], ["usage", request.usage])
|
|
71
71
|
}, unmarshalListKeysResponse);
|
|
72
72
|
this.listKeys = (request) => enrichForPagination("keys", this.pageOfListKeys, request);
|
|
73
73
|
this.generateDataKey = (request) => this.client.fetch({
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { API, } from './api.gen.js';
|
|
2
2
|
export * from './marshalling.gen.js';
|
|
3
|
-
export type { CreateKeyRequest, DataKey, DataKeyAlgorithmSymmetricEncryption, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, DeleteKeyRequest, DisableKeyRequest, EnableKeyRequest, EncryptRequest, EncryptResponse, GenerateDataKeyRequest, GetKeyRequest, GetPublicKeyRequest, ImportKeyMaterialRequest, Key, KeyAlgorithmAsymmetricEncryption, KeyAlgorithmAsymmetricSigning, KeyAlgorithmSymmetricEncryption, KeyOrigin, KeyRotationPolicy, KeyState, KeyUsage, ListAlgorithmsRequest, ListAlgorithmsRequestUsage, ListAlgorithmsResponse, ListAlgorithmsResponseAlgorithm, ListKeysRequest, ListKeysRequestOrderBy, ListKeysRequestUsage, ListKeysResponse, ProtectKeyRequest, PublicKey, RestoreKeyRequest, RotateKeyRequest, SignRequest, SignResponse, UnprotectKeyRequest, UpdateKeyRequest, VerifyRequest, VerifyResponse, } from './types.gen.js';
|
|
3
|
+
export type { CreateKeyRequest, DataKey, DataKeyAlgorithmSymmetricEncryption, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, DeleteKeyRequest, DisableKeyRequest, EnableKeyRequest, EncryptRequest, EncryptResponse, GenerateDataKeyRequest, GetKeyRequest, GetPublicKeyRequest, ImportKeyMaterialRequest, Key, KeyAlgorithmAsymmetricEncryption, KeyAlgorithmAsymmetricSigning, KeyAlgorithmSymmetricEncryption, KeyOrigin, KeyProtectionLevel, KeyRotationPolicy, KeyState, KeyUsage, ListAlgorithmsRequest, ListAlgorithmsRequestUsage, ListAlgorithmsResponse, ListAlgorithmsResponseAlgorithm, ListKeysRequest, ListKeysRequestOrderBy, ListKeysRequestUsage, ListKeysResponse, ProtectKeyRequest, PublicKey, RestoreKeyRequest, RotateKeyRequest, SignRequest, SignResponse, UnprotectKeyRequest, UpdateKeyRequest, VerifyRequest, VerifyResponse, } from './types.gen.js';
|
|
@@ -27,6 +27,7 @@ const unmarshalKey = (data) => {
|
|
|
27
27
|
origin: data.origin,
|
|
28
28
|
projectId: data.project_id,
|
|
29
29
|
protected: data.protected,
|
|
30
|
+
protectionLevel: data.protection_level,
|
|
30
31
|
region: data.region,
|
|
31
32
|
rotatedAt: unmarshalDate(data.rotated_at),
|
|
32
33
|
rotationCount: data.rotation_count,
|
|
@@ -122,6 +123,7 @@ const marshalCreateKeyRequest = (request, defaults) => ({
|
|
|
122
123
|
name: request.name,
|
|
123
124
|
origin: request.origin,
|
|
124
125
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
126
|
+
protection_level: request.protectionLevel,
|
|
125
127
|
rotation_policy: request.rotationPolicy !== void 0 ? marshalKeyRotationPolicy(request.rotationPolicy, defaults) : void 0,
|
|
126
128
|
tags: request.tags,
|
|
127
129
|
unprotected: request.unprotected,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { Region as ScwRegion } from '@scaleway/sdk-client';
|
|
2
2
|
export type DataKeyAlgorithmSymmetricEncryption = 'unknown_symmetric_encryption' | 'aes_256_gcm';
|
|
3
3
|
export type KeyAlgorithmAsymmetricEncryption = 'unknown_asymmetric_encryption' | 'rsa_oaep_2048_sha256' | 'rsa_oaep_3072_sha256' | 'rsa_oaep_4096_sha256';
|
|
4
|
-
export type KeyAlgorithmAsymmetricSigning = 'unknown_asymmetric_signing' | 'ec_p256_sha256' | 'ec_p384_sha384' | 'rsa_pss_2048_sha256' | 'rsa_pss_3072_sha256' | 'rsa_pss_4096_sha256' | 'rsa_pkcs1_2048_sha256' | 'rsa_pkcs1_3072_sha256' | 'rsa_pkcs1_4096_sha256';
|
|
4
|
+
export type KeyAlgorithmAsymmetricSigning = 'unknown_asymmetric_signing' | 'ec_p256_sha256' | 'ec_p384_sha384' | 'rsa_pss_2048_sha256' | 'rsa_pss_3072_sha256' | 'rsa_pss_4096_sha256' | 'rsa_pkcs1_2048_sha256' | 'rsa_pkcs1_3072_sha256' | 'rsa_pkcs1_4096_sha256' | 'ml_dsa_44' | 'ml_dsa_65' | 'ml_dsa_87';
|
|
5
5
|
export type KeyAlgorithmSymmetricEncryption = 'unknown_symmetric_encryption' | 'aes_256_gcm';
|
|
6
6
|
export type KeyOrigin = 'unknown_origin' | 'scaleway_kms' | 'external';
|
|
7
|
+
export type KeyProtectionLevel = 'unknown_protection_level' | 'software' | 'hsm';
|
|
7
8
|
export type KeyState = 'unknown_state' | 'enabled' | 'disabled' | 'pending_key_material' | 'scheduled_for_deletion';
|
|
8
9
|
export type ListAlgorithmsRequestUsage = 'unknown_usage' | 'symmetric_encryption' | 'asymmetric_encryption' | 'asymmetric_signing';
|
|
9
10
|
export type ListKeysRequestOrderBy = 'name_asc' | 'name_desc' | 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc';
|
|
@@ -108,6 +109,10 @@ export interface Key {
|
|
|
108
109
|
* Returns the time at which deletion was requested.
|
|
109
110
|
*/
|
|
110
111
|
deletionRequestedAt?: Date;
|
|
112
|
+
/**
|
|
113
|
+
* Refer to the `Key.ProtectionLevel` enum for a description of values.
|
|
114
|
+
*/
|
|
115
|
+
protectionLevel: KeyProtectionLevel;
|
|
111
116
|
/**
|
|
112
117
|
* Region where the key is stored.
|
|
113
118
|
*/
|
|
@@ -150,6 +155,10 @@ export type CreateKeyRequest = {
|
|
|
150
155
|
* Refer to the `Key.Origin` enum for a description of values.
|
|
151
156
|
*/
|
|
152
157
|
origin?: KeyOrigin;
|
|
158
|
+
/**
|
|
159
|
+
* Refer to the `Key.Protection` enum for a description of values.
|
|
160
|
+
*/
|
|
161
|
+
protectionLevel?: KeyProtectionLevel;
|
|
153
162
|
};
|
|
154
163
|
export interface DataKey {
|
|
155
164
|
/**
|
|
@@ -378,6 +387,10 @@ export type ListKeysRequest = {
|
|
|
378
387
|
* Filter keys based on their deletion status. By default, only keys not scheduled for deletion are returned in the output.
|
|
379
388
|
*/
|
|
380
389
|
scheduledForDeletion: boolean;
|
|
390
|
+
/**
|
|
391
|
+
* Select from software or hsm.
|
|
392
|
+
*/
|
|
393
|
+
protectionLevel?: KeyProtectionLevel;
|
|
381
394
|
};
|
|
382
395
|
export interface ListKeysResponse {
|
|
383
396
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-key-manager",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "Scaleway SDK key-manager",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@scaleway/random-name": "5.1.4",
|
|
35
|
-
"@scaleway/sdk-std": "2.4.
|
|
35
|
+
"@scaleway/sdk-std": "2.4.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@repo/configs": "^0.1.1",
|
|
39
|
-
"@scaleway/sdk-client": "^2.4.
|
|
39
|
+
"@scaleway/sdk-client": "^2.4.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@scaleway/sdk-client": "^2.4.
|
|
42
|
+
"@scaleway/sdk-client": "^2.4.1"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=20.20.2"
|