@scaleway/sdk-key-manager 2.7.1 → 2.8.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.
@@ -83,7 +83,10 @@ export declare class API extends ParentAPI {
83
83
  disableKey: (request: Readonly<DisableKeyRequest>) => Promise<Key>;
84
84
  protected pageOfListKeys: (request: Readonly<ListKeysRequest>) => Promise<ListKeysResponse>;
85
85
  /**
86
- * List keys. Retrieve a list of keys across all Projects in an Organization or within a specific Project. You must specify the `region`, and either the `organization_id` or the `project_id`.
86
+ * List keys. Retrieve a list of keys across all Projects in an Organization or within a specific Project.
87
+ If the user has permissions for all current and future projects: Either organization_id or project_id is required.
88
+ If the user has permissions for all current projects or only specific projects: The project_id is required.
89
+ The `region` parameter in path is needed in both case.
87
90
  *
88
91
  * @param request - The request {@link ListKeysRequest}
89
92
  * @returns A Promise of ListKeysResponse
@@ -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], ["protection_level", request.protectionLevel], ["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], ["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, 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';
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';
@@ -27,7 +27,6 @@ const unmarshalKey = (data) => {
27
27
  origin: data.origin,
28
28
  projectId: data.project_id,
29
29
  protected: data.protected,
30
- protectionLevel: data.protection_level,
31
30
  region: data.region,
32
31
  rotatedAt: unmarshalDate(data.rotated_at),
33
32
  rotationCount: data.rotation_count,
@@ -123,7 +122,6 @@ const marshalCreateKeyRequest = (request, defaults) => ({
123
122
  name: request.name,
124
123
  origin: request.origin,
125
124
  project_id: request.projectId ?? defaults.defaultProjectId,
126
- protection_level: request.protectionLevel,
127
125
  rotation_policy: request.rotationPolicy !== void 0 ? marshalKeyRotationPolicy(request.rotationPolicy, defaults) : void 0,
128
126
  tags: request.tags,
129
127
  unprotected: request.unprotected,
@@ -4,7 +4,6 @@ export type KeyAlgorithmAsymmetricEncryption = 'unknown_asymmetric_encryption' |
4
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';
8
7
  export type KeyState = 'unknown_state' | 'enabled' | 'disabled' | 'pending_key_material' | 'scheduled_for_deletion';
9
8
  export type ListAlgorithmsRequestUsage = 'unknown_usage' | 'symmetric_encryption' | 'asymmetric_encryption' | 'asymmetric_signing';
10
9
  export type ListKeysRequestOrderBy = 'name_asc' | 'name_desc' | 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc';
@@ -109,10 +108,6 @@ export interface Key {
109
108
  * Returns the time at which deletion was requested.
110
109
  */
111
110
  deletionRequestedAt?: Date;
112
- /**
113
- * Refer to the `Key.ProtectionLevel` enum for a description of values.
114
- */
115
- protectionLevel: KeyProtectionLevel;
116
111
  /**
117
112
  * Region where the key is stored.
118
113
  */
@@ -155,10 +150,6 @@ export type CreateKeyRequest = {
155
150
  * Refer to the `Key.Origin` enum for a description of values.
156
151
  */
157
152
  origin?: KeyOrigin;
158
- /**
159
- * Refer to the `Key.Protection` enum for a description of values.
160
- */
161
- protectionLevel?: KeyProtectionLevel;
162
153
  };
163
154
  export interface DataKey {
164
155
  /**
@@ -331,7 +322,7 @@ export type ImportKeyMaterialRequest = {
331
322
  */
332
323
  keyId: string;
333
324
  /**
334
- * The key material The key material is a random sequence of bytes used to derive a cryptographic key.
325
+ * The key material is a random sequence of bytes used to derive a cryptographic key.
335
326
  */
336
327
  keyMaterial: string;
337
328
  /**
@@ -387,10 +378,6 @@ export type ListKeysRequest = {
387
378
  * Filter keys based on their deletion status. By default, only keys not scheduled for deletion are returned in the output.
388
379
  */
389
380
  scheduledForDeletion: boolean;
390
- /**
391
- * Select from software or hsm.
392
- */
393
- protectionLevel?: KeyProtectionLevel;
394
381
  };
395
382
  export interface ListKeysResponse {
396
383
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-key-manager",
3
- "version": "2.7.1",
3
+ "version": "2.8.1",
4
4
  "description": "Scaleway SDK key-manager",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -35,8 +35,8 @@
35
35
  "@scaleway/sdk-std": "2.4.3"
36
36
  },
37
37
  "devDependencies": {
38
- "@repo/configs": "^0.1.1",
39
- "@scaleway/sdk-client": "^2.4.1"
38
+ "@scaleway/sdk-client": "^2.4.1",
39
+ "@repo/configs": "^0.1.1"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@scaleway/sdk-client": "^2.4.1"