@scaleway/sdk-key-manager 2.19.0 → 2.20.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/README.md CHANGED
@@ -56,8 +56,8 @@ const api = new KeyManager.v1.API(client)
56
56
  For a simpler setup, you can load credentials from the configuration file or environment variables:
57
57
 
58
58
  ```typescript
59
- import { createClient } from '@scaleway/sdk-client'
60
59
  import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader'
60
+ import { createClient } from '@scaleway/sdk-client'
61
61
  import { KeyManager } from '@scaleway/sdk-key-manager'
62
62
 
63
63
  const profile = loadProfileFromConfigurationFile()
@@ -1,4 +1,4 @@
1
- import { CreateKeyRequest, DataKey, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, DeleteKeyRequest, DisableKeyRequest, EnableKeyRequest, EncryptRequest, EncryptResponse, GenerateDataKeyRequest, GetKeyRequest, GetPublicKeyRequest, ImportKeyMaterialRequest, Key, KeyRotation, ListAlgorithmsRequest, ListAlgorithmsResponse, ListKeyRotationsRequest, ListKeyRotationsResponse, ListKeysRequest, ListKeysResponse, ProtectKeyRequest, PublicKey, RestoreKeyRequest, RotateKeyRequest, SignRequest, SignResponse, UnprotectKeyRequest, UnwrapKeyRequest, UnwrapKeyResponse, UpdateKeyRequest, VerifyRequest, VerifyResponse, WrapKeyRequest, WrapKeyResponse } from "./types.gen.js";
1
+ import { CreateKeyRequest, DataKey, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, DeleteKeyRequest, DisableKeyRequest, EnableKeyRequest, EncryptRequest, EncryptResponse, GenerateDataKeyRequest, GenerateKeyMaterialImportParametersRequest, GenerateKeyMaterialImportParametersResponse, GetKeyRequest, GetPublicKeyRequest, ImportKeyMaterialRequest, Key, KeyRotation, ListAlgorithmsRequest, ListAlgorithmsResponse, ListKeyRotationsRequest, ListKeyRotationsResponse, ListKeysRequest, ListKeysResponse, ProtectKeyRequest, PublicKey, RestoreKeyRequest, RotateKeyRequest, SignRequest, SignResponse, UnprotectKeyRequest, UnwrapKeyRequest, UnwrapKeyResponse, UpdateKeyRequest, VerifyRequest, VerifyResponse, WrapKeyRequest, WrapKeyResponse } from "./types.gen.js";
2
2
  import { API, ApiLocality, RequestOptions } from "@scaleway/sdk-client";
3
3
  //#region src/v1alpha1/api.gen.d.ts
4
4
  /**
@@ -157,6 +157,13 @@ declare class API$1 extends API {
157
157
  * @param request - The request {@link DeleteKeyMaterialRequest}
158
158
  */
159
159
  deleteKeyMaterial: (request: Readonly<DeleteKeyMaterialRequest>, options?: RequestOptions) => Promise<void>;
160
+ /**
161
+ * Generate key material import parameters. Retrieve the cryptographic parameters (public key and import token) required to securely import key material into an existing key. The key's origin must be `external`.
162
+ *
163
+ * @param request - The request {@link GenerateKeyMaterialImportParametersRequest}
164
+ * @returns A Promise of GenerateKeyMaterialImportParametersResponse
165
+ */
166
+ generateKeyMaterialImportParameters: (request: Readonly<GenerateKeyMaterialImportParametersRequest>, options?: RequestOptions) => Promise<GenerateKeyMaterialImportParametersResponse>;
160
167
  /**
161
168
  * Restore a key. Restore a key and all its rotations scheduled for deletion specified by the `region` and `key_id` parameters.
162
169
  *
@@ -1,4 +1,4 @@
1
- import { marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse } from "./marshalling.gen.js";
1
+ import { marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalGenerateKeyMaterialImportParametersRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalGenerateKeyMaterialImportParametersResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse } from "./marshalling.gen.js";
2
2
  import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam } from "@scaleway/sdk-client";
3
3
 
4
4
  //#region src/v1alpha1/api.gen.ts
@@ -138,6 +138,13 @@ var API$1 = class extends API {
138
138
  path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/delete-key-material`,
139
139
  signal: options?.signal
140
140
  });
141
+ this.generateKeyMaterialImportParameters = (request, options) => this.client.fetch({
142
+ body: JSON.stringify(marshalGenerateKeyMaterialImportParametersRequest(request, this.client.settings)),
143
+ headers: jsonContentHeaders,
144
+ method: "POST",
145
+ path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/import-parameters`,
146
+ signal: options?.signal
147
+ }, unmarshalGenerateKeyMaterialImportParametersResponse);
141
148
  this.restoreKey = (request, options) => this.client.fetch({
142
149
  body: "{}",
143
150
  headers: jsonContentHeaders,
@@ -1,7 +1,9 @@
1
- import { DataKeyAlgorithmSymmetricEncryption, KeyAlgorithmAsymmetricEncryption, KeyAlgorithmAsymmetricSigning, KeyAlgorithmKeyEncapsulation, KeyAlgorithmSymmetricEncryption, KeyOrigin, KeyProtectionLevel, KeyRotationStatus, KeyState, ListAlgorithmsRequestUsage, ListKeyRotationsRequestOrderBy, ListKeysRequestOrderBy, ListKeysRequestUsage } from "./types.gen.js";
1
+ import { DataKeyAlgorithmSymmetricEncryption, GenerateKeyMaterialImportParametersRequestWrappingAlgorithm, KeyAlgorithmAsymmetricEncryption, KeyAlgorithmAsymmetricSigning, KeyAlgorithmKeyEncapsulation, KeyAlgorithmSymmetricEncryption, KeyOrigin, KeyProtectionLevel, KeyRotationStatus, KeyState, ListAlgorithmsRequestUsage, ListKeyRotationsRequestOrderBy, ListKeysRequestOrderBy, ListKeysRequestUsage } from "./types.gen.js";
2
2
  //#region src/v1alpha1/constants.gen.d.ts
3
3
  /** Lists all values of the enum {@link DataKeyAlgorithmSymmetricEncryption}. */
4
4
  export declare const DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS: DataKeyAlgorithmSymmetricEncryption[];
5
+ /** Lists all values of the enum {@link GenerateKeyMaterialImportParametersRequestWrappingAlgorithm}. */
6
+ export declare const GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS: GenerateKeyMaterialImportParametersRequestWrappingAlgorithm[];
5
7
  /** Lists all values of the enum {@link KeyAlgorithmAsymmetricEncryption}. */
6
8
  export declare const KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS: KeyAlgorithmAsymmetricEncryption[];
7
9
  /** Lists all values of the enum {@link KeyAlgorithmAsymmetricSigning}. */
@@ -1,6 +1,16 @@
1
1
  //#region src/v1alpha1/constants.gen.ts
2
2
  /** Lists all values of the enum {@link DataKeyAlgorithmSymmetricEncryption}. */
3
3
  const DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS = ["unknown_symmetric_encryption", "aes_256_gcm"];
4
+ /** Lists all values of the enum {@link GenerateKeyMaterialImportParametersRequestWrappingAlgorithm}. */
5
+ const GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS = [
6
+ "unknown_wrapping_algorithm",
7
+ "rsa_oaep_2048_sha256",
8
+ "rsa_oaep_3072_sha256",
9
+ "rsa_oaep_4096_sha256",
10
+ "rsa_aes_key_wrap_2048_sha256",
11
+ "rsa_aes_key_wrap_3072_sha256",
12
+ "rsa_aes_key_wrap_4096_sha256"
13
+ ];
4
14
  /** Lists all values of the enum {@link KeyAlgorithmAsymmetricEncryption}. */
5
15
  const KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS = [
6
16
  "unknown_asymmetric_encryption",
@@ -87,4 +97,4 @@ const LIST_KEYS_REQUEST_USAGES = [
87
97
  ];
88
98
 
89
99
  //#endregion
90
- export { DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES };
100
+ export { DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES };
@@ -1,10 +1,10 @@
1
- import { CreateKeyRequest, DataKey, DataKeyAlgorithmSymmetricEncryption, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, DeleteKeyRequest, DisableKeyRequest, EnableKeyRequest, EncryptRequest, EncryptResponse, GenerateDataKeyRequest, GetKeyRequest, GetPublicKeyRequest, ImportKeyMaterialRequest, Key, KeyAlgorithmAsymmetricEncryption, KeyAlgorithmAsymmetricSigning, KeyAlgorithmKeyEncapsulation, KeyAlgorithmSymmetricEncryption, KeyOrigin, KeyProtectionLevel, KeyRotation, KeyRotationPolicy, KeyRotationStatus, KeyState, KeyUsage, ListAlgorithmsRequest, ListAlgorithmsRequestUsage, ListAlgorithmsResponse, ListAlgorithmsResponseAlgorithm, ListKeyRotationsRequest, ListKeyRotationsRequestOrderBy, ListKeyRotationsResponse, ListKeysRequest, ListKeysRequestOrderBy, ListKeysRequestUsage, ListKeysResponse, ProtectKeyRequest, PublicKey, RestoreKeyRequest, RotateKeyRequest, SignRequest, SignResponse, UnprotectKeyRequest, UnwrapKeyRequest, UnwrapKeyResponse, UpdateKeyRequest, VerifyRequest, VerifyResponse, WrapKeyRequest, WrapKeyResponse } from "./types.gen.js";
1
+ import { CreateKeyRequest, DataKey, DataKeyAlgorithmSymmetricEncryption, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, DeleteKeyRequest, DisableKeyRequest, EnableKeyRequest, EncryptRequest, EncryptResponse, GenerateDataKeyRequest, GenerateKeyMaterialImportParametersRequest, GenerateKeyMaterialImportParametersRequestWrappingAlgorithm, GenerateKeyMaterialImportParametersResponse, GetKeyRequest, GetPublicKeyRequest, ImportKeyMaterialRequest, Key, KeyAlgorithmAsymmetricEncryption, KeyAlgorithmAsymmetricSigning, KeyAlgorithmKeyEncapsulation, KeyAlgorithmSymmetricEncryption, KeyOrigin, KeyProtectionLevel, KeyRotation, KeyRotationPolicy, KeyRotationStatus, KeyState, KeyUsage, ListAlgorithmsRequest, ListAlgorithmsRequestUsage, ListAlgorithmsResponse, ListAlgorithmsResponseAlgorithm, ListKeyRotationsRequest, ListKeyRotationsRequestOrderBy, ListKeyRotationsResponse, ListKeysRequest, ListKeysRequestOrderBy, ListKeysRequestUsage, ListKeysResponse, ProtectKeyRequest, PublicKey, RestoreKeyRequest, RotateKeyRequest, SignRequest, SignResponse, UnprotectKeyRequest, UnwrapKeyRequest, UnwrapKeyResponse, UpdateKeyRequest, VerifyRequest, VerifyResponse, WrapKeyRequest, WrapKeyResponse } from "./types.gen.js";
2
2
  import { API } from "./api.gen.js";
3
- import { DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES } from "./constants.gen.js";
4
- import { marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse } from "./marshalling.gen.js";
3
+ import { DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES } from "./constants.gen.js";
4
+ import { marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalGenerateKeyMaterialImportParametersRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalGenerateKeyMaterialImportParametersResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse } from "./marshalling.gen.js";
5
5
  import { validation_rules_gen_d_exports } from "./validation-rules.gen.js";
6
6
  declare namespace index_gen_d_exports {
7
- export { API, CreateKeyRequest, DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, DataKey, DataKeyAlgorithmSymmetricEncryption, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, DeleteKeyRequest, DisableKeyRequest, EnableKeyRequest, EncryptRequest, EncryptResponse, GenerateDataKeyRequest, GetKeyRequest, GetPublicKeyRequest, ImportKeyMaterialRequest, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, Key, KeyAlgorithmAsymmetricEncryption, KeyAlgorithmAsymmetricSigning, KeyAlgorithmKeyEncapsulation, KeyAlgorithmSymmetricEncryption, KeyOrigin, KeyProtectionLevel, KeyRotation, KeyRotationPolicy, KeyRotationStatus, KeyState, KeyUsage, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES, ListAlgorithmsRequest, ListAlgorithmsRequestUsage, ListAlgorithmsResponse, ListAlgorithmsResponseAlgorithm, ListKeyRotationsRequest, ListKeyRotationsRequestOrderBy, ListKeyRotationsResponse, ListKeysRequest, ListKeysRequestOrderBy, ListKeysRequestUsage, ListKeysResponse, ProtectKeyRequest, PublicKey, RestoreKeyRequest, RotateKeyRequest, SignRequest, SignResponse, UnprotectKeyRequest, UnwrapKeyRequest, UnwrapKeyResponse, UpdateKeyRequest, validation_rules_gen_d_exports as ValidationRules, VerifyRequest, VerifyResponse, WrapKeyRequest, WrapKeyResponse, marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse };
7
+ export { API, CreateKeyRequest, DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, DataKey, DataKeyAlgorithmSymmetricEncryption, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, DeleteKeyRequest, DisableKeyRequest, EnableKeyRequest, EncryptRequest, EncryptResponse, GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS, GenerateDataKeyRequest, GenerateKeyMaterialImportParametersRequest, GenerateKeyMaterialImportParametersRequestWrappingAlgorithm, GenerateKeyMaterialImportParametersResponse, GetKeyRequest, GetPublicKeyRequest, ImportKeyMaterialRequest, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, Key, KeyAlgorithmAsymmetricEncryption, KeyAlgorithmAsymmetricSigning, KeyAlgorithmKeyEncapsulation, KeyAlgorithmSymmetricEncryption, KeyOrigin, KeyProtectionLevel, KeyRotation, KeyRotationPolicy, KeyRotationStatus, KeyState, KeyUsage, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES, ListAlgorithmsRequest, ListAlgorithmsRequestUsage, ListAlgorithmsResponse, ListAlgorithmsResponseAlgorithm, ListKeyRotationsRequest, ListKeyRotationsRequestOrderBy, ListKeyRotationsResponse, ListKeysRequest, ListKeysRequestOrderBy, ListKeysRequestUsage, ListKeysResponse, ProtectKeyRequest, PublicKey, RestoreKeyRequest, RotateKeyRequest, SignRequest, SignResponse, UnprotectKeyRequest, UnwrapKeyRequest, UnwrapKeyResponse, UpdateKeyRequest, validation_rules_gen_d_exports as ValidationRules, VerifyRequest, VerifyResponse, WrapKeyRequest, WrapKeyResponse, marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalGenerateKeyMaterialImportParametersRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalGenerateKeyMaterialImportParametersResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse };
8
8
  }
9
9
  //#endregion
10
- export { API, type CreateKeyRequest, DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, type DataKey, type DataKeyAlgorithmSymmetricEncryption, type DecryptRequest, type DecryptResponse, type DeleteKeyMaterialRequest, type DeleteKeyRequest, type DisableKeyRequest, type EnableKeyRequest, type EncryptRequest, type EncryptResponse, type GenerateDataKeyRequest, type GetKeyRequest, type GetPublicKeyRequest, type ImportKeyMaterialRequest, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, type Key, type KeyAlgorithmAsymmetricEncryption, type KeyAlgorithmAsymmetricSigning, type KeyAlgorithmKeyEncapsulation, type KeyAlgorithmSymmetricEncryption, type KeyOrigin, type KeyProtectionLevel, type KeyRotation, type KeyRotationPolicy, type KeyRotationStatus, type KeyState, type KeyUsage, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES, type ListAlgorithmsRequest, type ListAlgorithmsRequestUsage, type ListAlgorithmsResponse, type ListAlgorithmsResponseAlgorithm, type ListKeyRotationsRequest, type ListKeyRotationsRequestOrderBy, type ListKeyRotationsResponse, type ListKeysRequest, type ListKeysRequestOrderBy, type ListKeysRequestUsage, type ListKeysResponse, type ProtectKeyRequest, type PublicKey, type RestoreKeyRequest, type RotateKeyRequest, type SignRequest, type SignResponse, type UnprotectKeyRequest, type UnwrapKeyRequest, type UnwrapKeyResponse, type UpdateKeyRequest, validation_rules_gen_d_exports as ValidationRules, type VerifyRequest, type VerifyResponse, type WrapKeyRequest, type WrapKeyResponse, index_gen_d_exports, marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse };
10
+ export { API, type CreateKeyRequest, DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, type DataKey, type DataKeyAlgorithmSymmetricEncryption, type DecryptRequest, type DecryptResponse, type DeleteKeyMaterialRequest, type DeleteKeyRequest, type DisableKeyRequest, type EnableKeyRequest, type EncryptRequest, type EncryptResponse, GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS, type GenerateDataKeyRequest, type GenerateKeyMaterialImportParametersRequest, type GenerateKeyMaterialImportParametersRequestWrappingAlgorithm, type GenerateKeyMaterialImportParametersResponse, type GetKeyRequest, type GetPublicKeyRequest, type ImportKeyMaterialRequest, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, type Key, type KeyAlgorithmAsymmetricEncryption, type KeyAlgorithmAsymmetricSigning, type KeyAlgorithmKeyEncapsulation, type KeyAlgorithmSymmetricEncryption, type KeyOrigin, type KeyProtectionLevel, type KeyRotation, type KeyRotationPolicy, type KeyRotationStatus, type KeyState, type KeyUsage, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES, type ListAlgorithmsRequest, type ListAlgorithmsRequestUsage, type ListAlgorithmsResponse, type ListAlgorithmsResponseAlgorithm, type ListKeyRotationsRequest, type ListKeyRotationsRequestOrderBy, type ListKeyRotationsResponse, type ListKeysRequest, type ListKeysRequestOrderBy, type ListKeysRequestUsage, type ListKeysResponse, type ProtectKeyRequest, type PublicKey, type RestoreKeyRequest, type RotateKeyRequest, type SignRequest, type SignResponse, type UnprotectKeyRequest, type UnwrapKeyRequest, type UnwrapKeyResponse, type UpdateKeyRequest, validation_rules_gen_d_exports as ValidationRules, type VerifyRequest, type VerifyResponse, type WrapKeyRequest, type WrapKeyResponse, index_gen_d_exports, marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalGenerateKeyMaterialImportParametersRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalGenerateKeyMaterialImportParametersResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse };
@@ -1,13 +1,14 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse } from "./marshalling.gen.js";
2
+ import { marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalGenerateKeyMaterialImportParametersRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalGenerateKeyMaterialImportParametersResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse } from "./marshalling.gen.js";
3
3
  import { API } from "./api.gen.js";
4
- import { DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES } from "./constants.gen.js";
4
+ import { DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES } from "./constants.gen.js";
5
5
  import { validation_rules_gen_exports } from "./validation-rules.gen.js";
6
6
 
7
7
  //#region src/v1alpha1/index.gen.ts
8
8
  var index_gen_exports = /* @__PURE__ */ __exportAll({
9
9
  API: () => API,
10
10
  DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS: () => DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS,
11
+ GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS: () => GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS,
11
12
  KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS: () => KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS,
12
13
  KEY_ALGORITHM_ASYMMETRIC_SIGNINGS: () => KEY_ALGORITHM_ASYMMETRIC_SIGNINGS,
13
14
  KEY_ALGORITHM_KEY_ENCAPSULATIONS: () => KEY_ALGORITHM_KEY_ENCAPSULATIONS,
@@ -26,6 +27,7 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
26
27
  marshalDeleteKeyMaterialRequest: () => marshalDeleteKeyMaterialRequest,
27
28
  marshalEncryptRequest: () => marshalEncryptRequest,
28
29
  marshalGenerateDataKeyRequest: () => marshalGenerateDataKeyRequest,
30
+ marshalGenerateKeyMaterialImportParametersRequest: () => marshalGenerateKeyMaterialImportParametersRequest,
29
31
  marshalImportKeyMaterialRequest: () => marshalImportKeyMaterialRequest,
30
32
  marshalSignRequest: () => marshalSignRequest,
31
33
  marshalUnwrapKeyRequest: () => marshalUnwrapKeyRequest,
@@ -35,6 +37,7 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
35
37
  unmarshalDataKey: () => unmarshalDataKey,
36
38
  unmarshalDecryptResponse: () => unmarshalDecryptResponse,
37
39
  unmarshalEncryptResponse: () => unmarshalEncryptResponse,
40
+ unmarshalGenerateKeyMaterialImportParametersResponse: () => unmarshalGenerateKeyMaterialImportParametersResponse,
38
41
  unmarshalKey: () => unmarshalKey,
39
42
  unmarshalListAlgorithmsResponse: () => unmarshalListAlgorithmsResponse,
40
43
  unmarshalListKeyRotationsResponse: () => unmarshalListKeyRotationsResponse,
@@ -47,4 +50,4 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
47
50
  });
48
51
 
49
52
  //#endregion
50
- export { API, DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse };
53
+ export { API, DATA_KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS, KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS, KEY_ALGORITHM_ASYMMETRIC_SIGNINGS, KEY_ALGORITHM_KEY_ENCAPSULATIONS, KEY_ALGORITHM_SYMMETRIC_ENCRYPTIONS, KEY_ORIGINS, KEY_PROTECTION_LEVELS, KEY_ROTATION_STATUSES, KEY_STATES, LIST_ALGORITHMS_REQUEST_USAGES, LIST_KEYS_REQUEST_ORDER_BIES, LIST_KEYS_REQUEST_USAGES, LIST_KEY_ROTATIONS_REQUEST_ORDER_BIES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalGenerateKeyMaterialImportParametersRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalGenerateKeyMaterialImportParametersResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse };
@@ -1,10 +1,11 @@
1
- import { CreateKeyRequest, DataKey, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, EncryptRequest, EncryptResponse, GenerateDataKeyRequest, ImportKeyMaterialRequest, Key, ListAlgorithmsResponse, ListKeyRotationsResponse, ListKeysResponse, PublicKey, SignRequest, SignResponse, UnwrapKeyRequest, UnwrapKeyResponse, UpdateKeyRequest, VerifyRequest, VerifyResponse, WrapKeyRequest, WrapKeyResponse } from "./types.gen.js";
1
+ import { CreateKeyRequest, DataKey, DecryptRequest, DecryptResponse, DeleteKeyMaterialRequest, EncryptRequest, EncryptResponse, GenerateDataKeyRequest, GenerateKeyMaterialImportParametersRequest, GenerateKeyMaterialImportParametersResponse, ImportKeyMaterialRequest, Key, ListAlgorithmsResponse, ListKeyRotationsResponse, ListKeysResponse, PublicKey, SignRequest, SignResponse, UnwrapKeyRequest, UnwrapKeyResponse, UpdateKeyRequest, VerifyRequest, VerifyResponse, WrapKeyRequest, WrapKeyResponse } from "./types.gen.js";
2
2
  import { DefaultValues } from "@scaleway/sdk-client";
3
3
  //#region src/v1alpha1/marshalling.gen.d.ts
4
4
  export declare const unmarshalKey: (data: unknown) => Key;
5
5
  export declare const unmarshalDataKey: (data: unknown) => DataKey;
6
6
  export declare const unmarshalDecryptResponse: (data: unknown) => DecryptResponse;
7
7
  export declare const unmarshalEncryptResponse: (data: unknown) => EncryptResponse;
8
+ export declare const unmarshalGenerateKeyMaterialImportParametersResponse: (data: unknown) => GenerateKeyMaterialImportParametersResponse;
8
9
  export declare const unmarshalListAlgorithmsResponse: (data: unknown) => ListAlgorithmsResponse;
9
10
  export declare const unmarshalListKeyRotationsResponse: (data: unknown) => ListKeyRotationsResponse;
10
11
  export declare const unmarshalListKeysResponse: (data: unknown) => ListKeysResponse;
@@ -18,6 +19,7 @@ export declare const marshalDecryptRequest: (request: DecryptRequest, defaults:
18
19
  export declare const marshalDeleteKeyMaterialRequest: (request: DeleteKeyMaterialRequest, defaults: DefaultValues) => Record<string, unknown>;
19
20
  export declare const marshalEncryptRequest: (request: EncryptRequest, defaults: DefaultValues) => Record<string, unknown>;
20
21
  export declare const marshalGenerateDataKeyRequest: (request: GenerateDataKeyRequest, defaults: DefaultValues) => Record<string, unknown>;
22
+ export declare const marshalGenerateKeyMaterialImportParametersRequest: (request: GenerateKeyMaterialImportParametersRequest, defaults: DefaultValues) => Record<string, unknown>;
21
23
  export declare const marshalImportKeyMaterialRequest: (request: ImportKeyMaterialRequest, defaults: DefaultValues) => Record<string, unknown>;
22
24
  export declare const marshalSignRequest: (request: SignRequest, defaults: DefaultValues) => Record<string, unknown>;
23
25
  export declare const marshalUnwrapKeyRequest: (request: UnwrapKeyRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -66,6 +66,14 @@ const unmarshalEncryptResponse = (data) => {
66
66
  keyId: data.key_id
67
67
  };
68
68
  };
69
+ const unmarshalGenerateKeyMaterialImportParametersResponse = (data) => {
70
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GenerateKeyMaterialImportParametersResponse' failed as data isn't a dictionary.`);
71
+ return {
72
+ importToken: data.import_token,
73
+ keyId: data.key_id,
74
+ publicKey: data.public_key
75
+ };
76
+ };
69
77
  const unmarshalListAlgorithmsResponseAlgorithm = (data) => {
70
78
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListAlgorithmsResponseAlgorithm' failed as data isn't a dictionary.`);
71
79
  return {
@@ -182,6 +190,7 @@ const marshalGenerateDataKeyRequest = (request, defaults) => ({
182
190
  algorithm: request.algorithm,
183
191
  without_plaintext: request.withoutPlaintext
184
192
  });
193
+ const marshalGenerateKeyMaterialImportParametersRequest = (request, defaults) => ({ wrapping_algorithm: request.wrappingAlgorithm });
185
194
  const marshalImportKeyMaterialRequest = (request, defaults) => ({
186
195
  key_material: request.keyMaterial,
187
196
  salt: request.salt
@@ -207,4 +216,4 @@ const marshalWrapKeyRequest = (request, defaults) => ({
207
216
  });
208
217
 
209
218
  //#endregion
210
- export { marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse };
219
+ export { marshalCreateKeyRequest, marshalDecryptRequest, marshalDeleteKeyMaterialRequest, marshalEncryptRequest, marshalGenerateDataKeyRequest, marshalGenerateKeyMaterialImportParametersRequest, marshalImportKeyMaterialRequest, marshalSignRequest, marshalUnwrapKeyRequest, marshalUpdateKeyRequest, marshalVerifyRequest, marshalWrapKeyRequest, unmarshalDataKey, unmarshalDecryptResponse, unmarshalEncryptResponse, unmarshalGenerateKeyMaterialImportParametersResponse, unmarshalKey, unmarshalListAlgorithmsResponse, unmarshalListKeyRotationsResponse, unmarshalListKeysResponse, unmarshalPublicKey, unmarshalSignResponse, unmarshalUnwrapKeyResponse, unmarshalVerifyResponse, unmarshalWrapKeyResponse };
@@ -1,6 +1,7 @@
1
1
  import { Region } from "@scaleway/sdk-client";
2
2
  //#region src/v1alpha1/types.gen.d.ts
3
3
  export type DataKeyAlgorithmSymmetricEncryption = 'unknown_symmetric_encryption' | 'aes_256_gcm';
4
+ export type GenerateKeyMaterialImportParametersRequestWrappingAlgorithm = 'unknown_wrapping_algorithm' | 'rsa_oaep_2048_sha256' | 'rsa_oaep_3072_sha256' | 'rsa_oaep_4096_sha256' | 'rsa_aes_key_wrap_2048_sha256' | 'rsa_aes_key_wrap_3072_sha256' | 'rsa_aes_key_wrap_4096_sha256';
4
5
  export type KeyAlgorithmAsymmetricEncryption = 'unknown_asymmetric_encryption' | 'rsa_oaep_2048_sha256' | 'rsa_oaep_3072_sha256' | 'rsa_oaep_4096_sha256';
5
6
  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' | 'ec_secp256k1_sha256';
6
7
  export type KeyAlgorithmKeyEncapsulation = 'unknown_key_encapsulation' | 'ml_kem_768' | 'ml_kem_1024';
@@ -349,6 +350,35 @@ export type GenerateDataKeyRequest = {
349
350
  */
350
351
  withoutPlaintext: boolean;
351
352
  };
353
+ export type GenerateKeyMaterialImportParametersRequest = {
354
+ /**
355
+ * Region to target. If none is passed will use default region from the config.
356
+ */
357
+ region?: Region;
358
+ /**
359
+ * ID of the key into which to import the key material.
360
+ */
361
+ keyId: string;
362
+ /**
363
+ * Supported values for direct RSA wrapping are: `rsa_oaep_2048_sha256`, `rsa_oaep_3072_sha256`, `rsa_oaep_4096_sha256`.
364
+ Supported values for hybrid wrapping (RSA + AES Key Wrap) are: `rsa_aes_key_wrap_2048_sha256`, `rsa_aes_key_wrap_3072_sha256`, `rsa_aes_key_wrap_4096_sha256`.
365
+ */
366
+ wrappingAlgorithm?: GenerateKeyMaterialImportParametersRequestWrappingAlgorithm;
367
+ };
368
+ export interface GenerateKeyMaterialImportParametersResponse {
369
+ /**
370
+ * ID of the target key.
371
+ */
372
+ keyId: string;
373
+ /**
374
+ * The public key to wrap the key material.
375
+ */
376
+ publicKey: string;
377
+ /**
378
+ * The token generated to authorize the import operation.
379
+ */
380
+ importToken: string;
381
+ }
352
382
  export type GetKeyRequest = {
353
383
  /**
354
384
  * Region to target. If none is passed will use default region from the config.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-key-manager",
3
- "version": "2.19.0",
3
+ "version": "2.20.0",
4
4
  "description": "Scaleway SDK key-manager",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -33,14 +33,14 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@scaleway/random-name": "6.0.2",
36
- "@scaleway/sdk-std": "2.9.1"
36
+ "@scaleway/sdk-std": "2.9.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@repo/configs": "^0.1.1",
40
- "@scaleway/sdk-client": "^2.12.1"
40
+ "@scaleway/sdk-client": "^2.13.0"
41
41
  },
42
42
  "peerDependencies": {
43
- "@scaleway/sdk-client": "^2.12.1"
43
+ "@scaleway/sdk-client": "^2.13.0"
44
44
  },
45
45
  "scripts": {
46
46
  "package:check": "pnpm publint",