@scaleway/sdk-key-manager 2.18.1 → 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 +1 -1
- package/dist/v1alpha1/api.gen.d.ts +34 -27
- package/dist/v1alpha1/api.gen.js +79 -49
- package/dist/v1alpha1/constants.gen.d.ts +3 -1
- package/dist/v1alpha1/constants.gen.js +11 -1
- package/dist/v1alpha1/index.gen.d.ts +5 -5
- package/dist/v1alpha1/index.gen.js +6 -3
- package/dist/v1alpha1/marshalling.gen.d.ts +3 -1
- package/dist/v1alpha1/marshalling.gen.js +10 -1
- package/dist/v1alpha1/types.gen.d.ts +30 -0
- package/package.json +4 -4
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,5 +1,5 @@
|
|
|
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";
|
|
2
|
-
import { API, ApiLocality } from "@scaleway/sdk-client";
|
|
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
|
+
import { API, ApiLocality, RequestOptions } from "@scaleway/sdk-client";
|
|
3
3
|
//#region src/v1alpha1/api.gen.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Key Manager API.
|
|
@@ -18,70 +18,70 @@ declare class API$1 extends API {
|
|
|
18
18
|
* @param request - The request {@link CreateKeyRequest}
|
|
19
19
|
* @returns A Promise of Key
|
|
20
20
|
*/
|
|
21
|
-
createKey: (request: Readonly<CreateKeyRequest
|
|
21
|
+
createKey: (request: Readonly<CreateKeyRequest>, options?: RequestOptions) => Promise<Key>;
|
|
22
22
|
/**
|
|
23
23
|
* Get key metadata. Retrieve metadata for a specified key using the `region` and `key_id` parameters.
|
|
24
24
|
*
|
|
25
25
|
* @param request - The request {@link GetKeyRequest}
|
|
26
26
|
* @returns A Promise of Key
|
|
27
27
|
*/
|
|
28
|
-
getKey: (request: Readonly<GetKeyRequest
|
|
28
|
+
getKey: (request: Readonly<GetKeyRequest>, options?: RequestOptions) => Promise<Key>;
|
|
29
29
|
/**
|
|
30
30
|
* Get the public key in PEM format.. Retrieves the public portion of an asymmetric cryptographic key in PEM format.
|
|
31
31
|
*
|
|
32
32
|
* @param request - The request {@link GetPublicKeyRequest}
|
|
33
33
|
* @returns A Promise of PublicKey
|
|
34
34
|
*/
|
|
35
|
-
getPublicKey: (request: Readonly<GetPublicKeyRequest
|
|
35
|
+
getPublicKey: (request: Readonly<GetPublicKeyRequest>, options?: RequestOptions) => Promise<PublicKey>;
|
|
36
36
|
/**
|
|
37
37
|
* Update a key. Modify a key's metadata including name, description and tags, specified by the `key_id` and `region` parameters.
|
|
38
38
|
*
|
|
39
39
|
* @param request - The request {@link UpdateKeyRequest}
|
|
40
40
|
* @returns A Promise of Key
|
|
41
41
|
*/
|
|
42
|
-
updateKey: (request: Readonly<UpdateKeyRequest
|
|
42
|
+
updateKey: (request: Readonly<UpdateKeyRequest>, options?: RequestOptions) => Promise<Key>;
|
|
43
43
|
/**
|
|
44
44
|
* Delete a key. Permanently delete a key specified by the `region` and `key_id` parameters. This action is irreversible. Any data encrypted with this key, including data encryption keys, will no longer be decipherable.
|
|
45
45
|
*
|
|
46
46
|
* @param request - The request {@link DeleteKeyRequest}
|
|
47
47
|
*/
|
|
48
|
-
deleteKey: (request: Readonly<DeleteKeyRequest
|
|
48
|
+
deleteKey: (request: Readonly<DeleteKeyRequest>, options?: RequestOptions) => Promise<void>;
|
|
49
49
|
/**
|
|
50
50
|
* Rotate a key. Generate a new version of an existing key with new key material. Previous key versions remain usable to decrypt previously encrypted data, but the key's new version will be used for subsequent encryption operations and data key generation.
|
|
51
51
|
*
|
|
52
52
|
* @param request - The request {@link RotateKeyRequest}
|
|
53
53
|
* @returns A Promise of Key
|
|
54
54
|
*/
|
|
55
|
-
rotateKey: (request: Readonly<RotateKeyRequest
|
|
55
|
+
rotateKey: (request: Readonly<RotateKeyRequest>, options?: RequestOptions) => Promise<Key>;
|
|
56
56
|
/**
|
|
57
57
|
* Apply key protection. Apply protection to a given key specified by the `key_id` parameter. Applying key protection means that your key can be used and modified, but it cannot be deleted.
|
|
58
58
|
*
|
|
59
59
|
* @param request - The request {@link ProtectKeyRequest}
|
|
60
60
|
* @returns A Promise of Key
|
|
61
61
|
*/
|
|
62
|
-
protectKey: (request: Readonly<ProtectKeyRequest
|
|
62
|
+
protectKey: (request: Readonly<ProtectKeyRequest>, options?: RequestOptions) => Promise<Key>;
|
|
63
63
|
/**
|
|
64
64
|
* Remove key protection. Remove key protection from a given key specified by the `key_id` parameter. Removing key protection means that your key can be deleted anytime.
|
|
65
65
|
*
|
|
66
66
|
* @param request - The request {@link UnprotectKeyRequest}
|
|
67
67
|
* @returns A Promise of Key
|
|
68
68
|
*/
|
|
69
|
-
unprotectKey: (request: Readonly<UnprotectKeyRequest
|
|
69
|
+
unprotectKey: (request: Readonly<UnprotectKeyRequest>, options?: RequestOptions) => Promise<Key>;
|
|
70
70
|
/**
|
|
71
71
|
* Enable key. Enable a given key to be used for cryptographic operations. Enabling a key allows you to make a disabled key usable again. You must specify the `region` and `key_id` parameters.
|
|
72
72
|
*
|
|
73
73
|
* @param request - The request {@link EnableKeyRequest}
|
|
74
74
|
* @returns A Promise of Key
|
|
75
75
|
*/
|
|
76
|
-
enableKey: (request: Readonly<EnableKeyRequest
|
|
76
|
+
enableKey: (request: Readonly<EnableKeyRequest>, options?: RequestOptions) => Promise<Key>;
|
|
77
77
|
/**
|
|
78
78
|
* Disable key. Disable a given key, preventing it to be used for cryptographic operations. Disabling a key renders it unusable. You must specify the `region` and `key_id` parameters.
|
|
79
79
|
*
|
|
80
80
|
* @param request - The request {@link DisableKeyRequest}
|
|
81
81
|
* @returns A Promise of Key
|
|
82
82
|
*/
|
|
83
|
-
disableKey: (request: Readonly<DisableKeyRequest
|
|
84
|
-
protected pageOfListKeys: (request: Readonly<ListKeysRequest
|
|
83
|
+
disableKey: (request: Readonly<DisableKeyRequest>, options?: RequestOptions) => Promise<Key>;
|
|
84
|
+
protected pageOfListKeys: (request: Readonly<ListKeysRequest>, options?: RequestOptions) => Promise<ListKeysResponse>;
|
|
85
85
|
/**
|
|
86
86
|
* List keys. Retrieve a list of keys across all Projects in an Organization or within a specific Project.
|
|
87
87
|
If the user has permissions for all current and future projects: Either organization_id or project_id is required.
|
|
@@ -91,11 +91,11 @@ declare class API$1 extends API {
|
|
|
91
91
|
* @param request - The request {@link ListKeysRequest}
|
|
92
92
|
* @returns A Promise of ListKeysResponse
|
|
93
93
|
*/
|
|
94
|
-
listKeys: (request: Readonly<ListKeysRequest
|
|
94
|
+
listKeys: (request: Readonly<ListKeysRequest>, options?: RequestOptions) => Promise<ListKeysResponse> & {
|
|
95
95
|
all: () => Promise<Key[]>;
|
|
96
96
|
[Symbol.asyncIterator]: () => AsyncGenerator<Key[], void, void>;
|
|
97
97
|
};
|
|
98
|
-
protected pageOfListKeyRotations: (request: Readonly<ListKeyRotationsRequest
|
|
98
|
+
protected pageOfListKeyRotations: (request: Readonly<ListKeyRotationsRequest>, options?: RequestOptions) => Promise<ListKeyRotationsResponse>;
|
|
99
99
|
/**
|
|
100
100
|
* List key rotations. Retrieve a list of all rotations associated with a specific key.
|
|
101
101
|
The `key_id` and `region` parameters in the path are required.
|
|
@@ -103,7 +103,7 @@ declare class API$1 extends API {
|
|
|
103
103
|
* @param request - The request {@link ListKeyRotationsRequest}
|
|
104
104
|
* @returns A Promise of ListKeyRotationsResponse
|
|
105
105
|
*/
|
|
106
|
-
listKeyRotations: (request: Readonly<ListKeyRotationsRequest
|
|
106
|
+
listKeyRotations: (request: Readonly<ListKeyRotationsRequest>, options?: RequestOptions) => Promise<ListKeyRotationsResponse> & {
|
|
107
107
|
all: () => Promise<KeyRotation[]>;
|
|
108
108
|
[Symbol.asyncIterator]: () => AsyncGenerator<KeyRotation[], void, void>;
|
|
109
109
|
};
|
|
@@ -115,76 +115,83 @@ declare class API$1 extends API {
|
|
|
115
115
|
* @param request - The request {@link GenerateDataKeyRequest}
|
|
116
116
|
* @returns A Promise of DataKey
|
|
117
117
|
*/
|
|
118
|
-
generateDataKey: (request: Readonly<GenerateDataKeyRequest
|
|
118
|
+
generateDataKey: (request: Readonly<GenerateDataKeyRequest>, options?: RequestOptions) => Promise<DataKey>;
|
|
119
119
|
/**
|
|
120
120
|
* Encrypt a payload. Encrypt a payload using an existing key, specified by the `key_id` parameter. The maximum payload size that can be encrypted is 64 KB of plaintext.
|
|
121
121
|
*
|
|
122
122
|
* @param request - The request {@link EncryptRequest}
|
|
123
123
|
* @returns A Promise of EncryptResponse
|
|
124
124
|
*/
|
|
125
|
-
encrypt: (request: Readonly<EncryptRequest
|
|
125
|
+
encrypt: (request: Readonly<EncryptRequest>, options?: RequestOptions) => Promise<EncryptResponse>;
|
|
126
126
|
/**
|
|
127
127
|
* Decrypt an encrypted payload. Decrypt an encrypted payload using an existing key, specified by the `key_id` parameter. The maximum payload size that can be decrypted is equivalent to the encrypted output of 64 KB of data (around 131 KB).
|
|
128
128
|
*
|
|
129
129
|
* @param request - The request {@link DecryptRequest}
|
|
130
130
|
* @returns A Promise of DecryptResponse
|
|
131
131
|
*/
|
|
132
|
-
decrypt: (request: Readonly<DecryptRequest
|
|
132
|
+
decrypt: (request: Readonly<DecryptRequest>, options?: RequestOptions) => Promise<DecryptResponse>;
|
|
133
133
|
/**
|
|
134
134
|
* Sign a message digest. Use a given key to sign a message digest. The key must have its usage set to `asymmetric_signing`. The digest must be created using the same digest algorithm that is defined in the key's algorithm configuration.
|
|
135
135
|
*
|
|
136
136
|
* @param request - The request {@link SignRequest}
|
|
137
137
|
* @returns A Promise of SignResponse
|
|
138
138
|
*/
|
|
139
|
-
sign: (request: Readonly<SignRequest
|
|
139
|
+
sign: (request: Readonly<SignRequest>, options?: RequestOptions) => Promise<SignResponse>;
|
|
140
140
|
/**
|
|
141
141
|
* Verify a message signature. Use a given key to verify a message signature against a message digest. The key must have its usage set to `asymmetric_signing`. The message digest must be generated using the same digest algorithm that is defined in the key's algorithm configuration.
|
|
142
142
|
*
|
|
143
143
|
* @param request - The request {@link VerifyRequest}
|
|
144
144
|
* @returns A Promise of VerifyResponse
|
|
145
145
|
*/
|
|
146
|
-
verify: (request: Readonly<VerifyRequest
|
|
146
|
+
verify: (request: Readonly<VerifyRequest>, options?: RequestOptions) => Promise<VerifyResponse>;
|
|
147
147
|
/**
|
|
148
148
|
* Import key material. Import externally generated key material into Key Manager to derive a new cryptographic key. The key's origin must be `external`.
|
|
149
149
|
*
|
|
150
150
|
* @param request - The request {@link ImportKeyMaterialRequest}
|
|
151
151
|
* @returns A Promise of Key
|
|
152
152
|
*/
|
|
153
|
-
importKeyMaterial: (request: Readonly<ImportKeyMaterialRequest
|
|
153
|
+
importKeyMaterial: (request: Readonly<ImportKeyMaterialRequest>, options?: RequestOptions) => Promise<Key>;
|
|
154
154
|
/**
|
|
155
155
|
* Delete key material. Delete previously imported key material. This renders the associated cryptographic key unusable for any operation. The key's origin must be `external`.
|
|
156
156
|
*
|
|
157
157
|
* @param request - The request {@link DeleteKeyMaterialRequest}
|
|
158
158
|
*/
|
|
159
|
-
deleteKeyMaterial: (request: Readonly<DeleteKeyMaterialRequest
|
|
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
|
*
|
|
163
170
|
* @param request - The request {@link RestoreKeyRequest}
|
|
164
171
|
* @returns A Promise of Key
|
|
165
172
|
*/
|
|
166
|
-
restoreKey: (request: Readonly<RestoreKeyRequest
|
|
173
|
+
restoreKey: (request: Readonly<RestoreKeyRequest>, options?: RequestOptions) => Promise<Key>;
|
|
167
174
|
/**
|
|
168
175
|
* List all available algorithms. Lists all cryptographic algorithms supported by the Key Manager service.
|
|
169
176
|
*
|
|
170
177
|
* @param request - The request {@link ListAlgorithmsRequest}
|
|
171
178
|
* @returns A Promise of ListAlgorithmsResponse
|
|
172
179
|
*/
|
|
173
|
-
listAlgorithms: (request?: Readonly<ListAlgorithmsRequest
|
|
180
|
+
listAlgorithms: (request?: Readonly<ListAlgorithmsRequest>, options?: RequestOptions) => Promise<ListAlgorithmsResponse>;
|
|
174
181
|
/**
|
|
175
182
|
* Wrap a key. Wrap (encrypt) a key using an existing key, specified by the `key_id` parameter. The key must use ML-KEM algorithm. The maximum key size that can be wrapped is 2 KB of plaintext.
|
|
176
183
|
*
|
|
177
184
|
* @param request - The request {@link WrapKeyRequest}
|
|
178
185
|
* @returns A Promise of WrapKeyResponse
|
|
179
186
|
*/
|
|
180
|
-
wrapKey: (request: Readonly<WrapKeyRequest
|
|
187
|
+
wrapKey: (request: Readonly<WrapKeyRequest>, options?: RequestOptions) => Promise<WrapKeyResponse>;
|
|
181
188
|
/**
|
|
182
189
|
* Unwrap a key. Unwrap (decrypt) a wrapped key using an existing key, specified by the `key_id` parameter. The key must use ML-KEM algorithm. The maximum key size that can be unwrapped is 4 KB of ciphertext.
|
|
183
190
|
*
|
|
184
191
|
* @param request - The request {@link UnwrapKeyRequest}
|
|
185
192
|
* @returns A Promise of UnwrapKeyResponse
|
|
186
193
|
*/
|
|
187
|
-
unwrapKey: (request: Readonly<UnwrapKeyRequest
|
|
194
|
+
unwrapKey: (request: Readonly<UnwrapKeyRequest>, options?: RequestOptions) => Promise<UnwrapKeyResponse>;
|
|
188
195
|
}
|
|
189
196
|
//#endregion
|
|
190
197
|
export { API$1 as API };
|
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -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
|
|
@@ -11,136 +11,166 @@ This API allows you to create, manage and use cryptographic keys in a centralize
|
|
|
11
11
|
var API$1 = class extends API {
|
|
12
12
|
constructor(..._args) {
|
|
13
13
|
super(..._args);
|
|
14
|
-
this.createKey = (request) => this.client.fetch({
|
|
14
|
+
this.createKey = (request, options) => this.client.fetch({
|
|
15
15
|
body: JSON.stringify(marshalCreateKeyRequest(request, this.client.settings)),
|
|
16
16
|
headers: jsonContentHeaders,
|
|
17
17
|
method: "POST",
|
|
18
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys
|
|
18
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys`,
|
|
19
|
+
signal: options?.signal
|
|
19
20
|
}, unmarshalKey);
|
|
20
|
-
this.getKey = (request) => this.client.fetch({
|
|
21
|
+
this.getKey = (request, options) => this.client.fetch({
|
|
21
22
|
method: "GET",
|
|
22
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}
|
|
23
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}`,
|
|
24
|
+
signal: options?.signal
|
|
23
25
|
}, unmarshalKey);
|
|
24
|
-
this.getPublicKey = (request) => this.client.fetch({
|
|
26
|
+
this.getPublicKey = (request, options) => this.client.fetch({
|
|
25
27
|
method: "GET",
|
|
26
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/public-key
|
|
28
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/public-key`,
|
|
29
|
+
signal: options?.signal
|
|
27
30
|
}, unmarshalPublicKey);
|
|
28
|
-
this.updateKey = (request) => this.client.fetch({
|
|
31
|
+
this.updateKey = (request, options) => this.client.fetch({
|
|
29
32
|
body: JSON.stringify(marshalUpdateKeyRequest(request, this.client.settings)),
|
|
30
33
|
headers: jsonContentHeaders,
|
|
31
34
|
method: "PATCH",
|
|
32
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}
|
|
35
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}`,
|
|
36
|
+
signal: options?.signal
|
|
33
37
|
}, unmarshalKey);
|
|
34
|
-
this.deleteKey = (request) => this.client.fetch({
|
|
38
|
+
this.deleteKey = (request, options) => this.client.fetch({
|
|
35
39
|
method: "DELETE",
|
|
36
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}
|
|
40
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}`,
|
|
41
|
+
signal: options?.signal
|
|
37
42
|
});
|
|
38
|
-
this.rotateKey = (request) => this.client.fetch({
|
|
43
|
+
this.rotateKey = (request, options) => this.client.fetch({
|
|
39
44
|
body: "{}",
|
|
40
45
|
headers: jsonContentHeaders,
|
|
41
46
|
method: "POST",
|
|
42
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/rotate
|
|
47
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/rotate`,
|
|
48
|
+
signal: options?.signal
|
|
43
49
|
}, unmarshalKey);
|
|
44
|
-
this.protectKey = (request) => this.client.fetch({
|
|
50
|
+
this.protectKey = (request, options) => this.client.fetch({
|
|
45
51
|
body: "{}",
|
|
46
52
|
headers: jsonContentHeaders,
|
|
47
53
|
method: "POST",
|
|
48
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/protect
|
|
54
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/protect`,
|
|
55
|
+
signal: options?.signal
|
|
49
56
|
}, unmarshalKey);
|
|
50
|
-
this.unprotectKey = (request) => this.client.fetch({
|
|
57
|
+
this.unprotectKey = (request, options) => this.client.fetch({
|
|
51
58
|
body: "{}",
|
|
52
59
|
headers: jsonContentHeaders,
|
|
53
60
|
method: "POST",
|
|
54
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/unprotect
|
|
61
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/unprotect`,
|
|
62
|
+
signal: options?.signal
|
|
55
63
|
}, unmarshalKey);
|
|
56
|
-
this.enableKey = (request) => this.client.fetch({
|
|
64
|
+
this.enableKey = (request, options) => this.client.fetch({
|
|
57
65
|
body: "{}",
|
|
58
66
|
headers: jsonContentHeaders,
|
|
59
67
|
method: "POST",
|
|
60
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/enable
|
|
68
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/enable`,
|
|
69
|
+
signal: options?.signal
|
|
61
70
|
}, unmarshalKey);
|
|
62
|
-
this.disableKey = (request) => this.client.fetch({
|
|
71
|
+
this.disableKey = (request, options) => this.client.fetch({
|
|
63
72
|
body: "{}",
|
|
64
73
|
headers: jsonContentHeaders,
|
|
65
74
|
method: "POST",
|
|
66
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/disable
|
|
75
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/disable`,
|
|
76
|
+
signal: options?.signal
|
|
67
77
|
}, unmarshalKey);
|
|
68
|
-
this.pageOfListKeys = (request) => this.client.fetch({
|
|
78
|
+
this.pageOfListKeys = (request, options) => this.client.fetch({
|
|
69
79
|
method: "GET",
|
|
70
80
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys`,
|
|
71
|
-
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])
|
|
81
|
+
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]),
|
|
82
|
+
signal: options?.signal
|
|
72
83
|
}, unmarshalListKeysResponse);
|
|
73
|
-
this.listKeys = (request) => enrichForPagination("keys", this.pageOfListKeys, request);
|
|
74
|
-
this.pageOfListKeyRotations = (request) => this.client.fetch({
|
|
84
|
+
this.listKeys = (request, options) => enrichForPagination("keys", this.pageOfListKeys, request, options);
|
|
85
|
+
this.pageOfListKeyRotations = (request, options) => this.client.fetch({
|
|
75
86
|
method: "GET",
|
|
76
87
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/rotations`,
|
|
77
|
-
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["status", request.status])
|
|
88
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["status", request.status]),
|
|
89
|
+
signal: options?.signal
|
|
78
90
|
}, unmarshalListKeyRotationsResponse);
|
|
79
|
-
this.listKeyRotations = (request) => enrichForPagination("rotations", this.pageOfListKeyRotations, request);
|
|
80
|
-
this.generateDataKey = (request) => this.client.fetch({
|
|
91
|
+
this.listKeyRotations = (request, options) => enrichForPagination("rotations", this.pageOfListKeyRotations, request, options);
|
|
92
|
+
this.generateDataKey = (request, options) => this.client.fetch({
|
|
81
93
|
body: JSON.stringify(marshalGenerateDataKeyRequest(request, this.client.settings)),
|
|
82
94
|
headers: jsonContentHeaders,
|
|
83
95
|
method: "POST",
|
|
84
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/generate-data-key
|
|
96
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/generate-data-key`,
|
|
97
|
+
signal: options?.signal
|
|
85
98
|
}, unmarshalDataKey);
|
|
86
|
-
this.encrypt = (request) => this.client.fetch({
|
|
99
|
+
this.encrypt = (request, options) => this.client.fetch({
|
|
87
100
|
body: JSON.stringify(marshalEncryptRequest(request, this.client.settings)),
|
|
88
101
|
headers: jsonContentHeaders,
|
|
89
102
|
method: "POST",
|
|
90
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/encrypt
|
|
103
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/encrypt`,
|
|
104
|
+
signal: options?.signal
|
|
91
105
|
}, unmarshalEncryptResponse);
|
|
92
|
-
this.decrypt = (request) => this.client.fetch({
|
|
106
|
+
this.decrypt = (request, options) => this.client.fetch({
|
|
93
107
|
body: JSON.stringify(marshalDecryptRequest(request, this.client.settings)),
|
|
94
108
|
headers: jsonContentHeaders,
|
|
95
109
|
method: "POST",
|
|
96
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/decrypt
|
|
110
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/decrypt`,
|
|
111
|
+
signal: options?.signal
|
|
97
112
|
}, unmarshalDecryptResponse);
|
|
98
|
-
this.sign = (request) => this.client.fetch({
|
|
113
|
+
this.sign = (request, options) => this.client.fetch({
|
|
99
114
|
body: JSON.stringify(marshalSignRequest(request, this.client.settings)),
|
|
100
115
|
headers: jsonContentHeaders,
|
|
101
116
|
method: "POST",
|
|
102
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/sign
|
|
117
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/sign`,
|
|
118
|
+
signal: options?.signal
|
|
103
119
|
}, unmarshalSignResponse);
|
|
104
|
-
this.verify = (request) => this.client.fetch({
|
|
120
|
+
this.verify = (request, options) => this.client.fetch({
|
|
105
121
|
body: JSON.stringify(marshalVerifyRequest(request, this.client.settings)),
|
|
106
122
|
headers: jsonContentHeaders,
|
|
107
123
|
method: "POST",
|
|
108
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/verify
|
|
124
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/verify`,
|
|
125
|
+
signal: options?.signal
|
|
109
126
|
}, unmarshalVerifyResponse);
|
|
110
|
-
this.importKeyMaterial = (request) => this.client.fetch({
|
|
127
|
+
this.importKeyMaterial = (request, options) => this.client.fetch({
|
|
111
128
|
body: JSON.stringify(marshalImportKeyMaterialRequest(request, this.client.settings)),
|
|
112
129
|
headers: jsonContentHeaders,
|
|
113
130
|
method: "POST",
|
|
114
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/import-key-material
|
|
131
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/import-key-material`,
|
|
132
|
+
signal: options?.signal
|
|
115
133
|
}, unmarshalKey);
|
|
116
|
-
this.deleteKeyMaterial = (request) => this.client.fetch({
|
|
134
|
+
this.deleteKeyMaterial = (request, options) => this.client.fetch({
|
|
117
135
|
body: JSON.stringify(marshalDeleteKeyMaterialRequest(request, this.client.settings)),
|
|
118
136
|
headers: jsonContentHeaders,
|
|
119
137
|
method: "POST",
|
|
120
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/delete-key-material
|
|
138
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/delete-key-material`,
|
|
139
|
+
signal: options?.signal
|
|
121
140
|
});
|
|
122
|
-
this.
|
|
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);
|
|
148
|
+
this.restoreKey = (request, options) => this.client.fetch({
|
|
123
149
|
body: "{}",
|
|
124
150
|
headers: jsonContentHeaders,
|
|
125
151
|
method: "POST",
|
|
126
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/restore
|
|
152
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/restore`,
|
|
153
|
+
signal: options?.signal
|
|
127
154
|
}, unmarshalKey);
|
|
128
|
-
this.listAlgorithms = (request = {}) => this.client.fetch({
|
|
155
|
+
this.listAlgorithms = (request = {}, options) => this.client.fetch({
|
|
129
156
|
method: "GET",
|
|
130
157
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/algorithms`,
|
|
131
|
-
urlParams: urlParams(["usages", request.usages])
|
|
158
|
+
urlParams: urlParams(["usages", request.usages]),
|
|
159
|
+
signal: options?.signal
|
|
132
160
|
}, unmarshalListAlgorithmsResponse);
|
|
133
|
-
this.wrapKey = (request) => this.client.fetch({
|
|
161
|
+
this.wrapKey = (request, options) => this.client.fetch({
|
|
134
162
|
body: JSON.stringify(marshalWrapKeyRequest(request, this.client.settings)),
|
|
135
163
|
headers: jsonContentHeaders,
|
|
136
164
|
method: "POST",
|
|
137
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/wrap
|
|
165
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/wrap`,
|
|
166
|
+
signal: options?.signal
|
|
138
167
|
}, unmarshalWrapKeyResponse);
|
|
139
|
-
this.unwrapKey = (request) => this.client.fetch({
|
|
168
|
+
this.unwrapKey = (request, options) => this.client.fetch({
|
|
140
169
|
body: JSON.stringify(marshalUnwrapKeyRequest(request, this.client.settings)),
|
|
141
170
|
headers: jsonContentHeaders,
|
|
142
171
|
method: "POST",
|
|
143
|
-
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/unwrap
|
|
172
|
+
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/unwrap`,
|
|
173
|
+
signal: options?.signal
|
|
144
174
|
}, unmarshalUnwrapKeyResponse);
|
|
145
175
|
}
|
|
146
176
|
static {
|
|
@@ -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.
|
|
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.
|
|
36
|
+
"@scaleway/sdk-std": "2.9.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@repo/configs": "^0.1.1",
|
|
40
|
-
"@scaleway/sdk-client": "^2.
|
|
40
|
+
"@scaleway/sdk-client": "^2.13.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@scaleway/sdk-client": "^2.
|
|
43
|
+
"@scaleway/sdk-client": "^2.13.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"package:check": "pnpm publint",
|