@scaleway/sdk-key-manager 2.22.1 → 2.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/v1alpha1/api.gen.js +72 -18
- package/dist/v1alpha1/marshalling.gen.js +23 -23
- package/dist/v1alpha1/types.gen.d.ts +84 -84
- package/package.json +4 -4
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -13,7 +13,10 @@ var API$1 = class extends API {
|
|
|
13
13
|
super(..._args);
|
|
14
14
|
this.createKey = (request, options) => this.client.fetch({
|
|
15
15
|
body: JSON.stringify(marshalCreateKeyRequest(request, this.client.settings)),
|
|
16
|
-
headers:
|
|
16
|
+
headers: {
|
|
17
|
+
...jsonContentHeaders,
|
|
18
|
+
...options?.headers
|
|
19
|
+
},
|
|
17
20
|
method: "POST",
|
|
18
21
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys`,
|
|
19
22
|
signal: options?.signal
|
|
@@ -30,7 +33,10 @@ var API$1 = class extends API {
|
|
|
30
33
|
}, unmarshalPublicKey);
|
|
31
34
|
this.updateKey = (request, options) => this.client.fetch({
|
|
32
35
|
body: JSON.stringify(marshalUpdateKeyRequest(request, this.client.settings)),
|
|
33
|
-
headers:
|
|
36
|
+
headers: {
|
|
37
|
+
...jsonContentHeaders,
|
|
38
|
+
...options?.headers
|
|
39
|
+
},
|
|
34
40
|
method: "PATCH",
|
|
35
41
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}`,
|
|
36
42
|
signal: options?.signal
|
|
@@ -42,35 +48,50 @@ var API$1 = class extends API {
|
|
|
42
48
|
});
|
|
43
49
|
this.rotateKey = (request, options) => this.client.fetch({
|
|
44
50
|
body: "{}",
|
|
45
|
-
headers:
|
|
51
|
+
headers: {
|
|
52
|
+
...jsonContentHeaders,
|
|
53
|
+
...options?.headers
|
|
54
|
+
},
|
|
46
55
|
method: "POST",
|
|
47
56
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/rotate`,
|
|
48
57
|
signal: options?.signal
|
|
49
58
|
}, unmarshalKey);
|
|
50
59
|
this.protectKey = (request, options) => this.client.fetch({
|
|
51
60
|
body: "{}",
|
|
52
|
-
headers:
|
|
61
|
+
headers: {
|
|
62
|
+
...jsonContentHeaders,
|
|
63
|
+
...options?.headers
|
|
64
|
+
},
|
|
53
65
|
method: "POST",
|
|
54
66
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/protect`,
|
|
55
67
|
signal: options?.signal
|
|
56
68
|
}, unmarshalKey);
|
|
57
69
|
this.unprotectKey = (request, options) => this.client.fetch({
|
|
58
70
|
body: "{}",
|
|
59
|
-
headers:
|
|
71
|
+
headers: {
|
|
72
|
+
...jsonContentHeaders,
|
|
73
|
+
...options?.headers
|
|
74
|
+
},
|
|
60
75
|
method: "POST",
|
|
61
76
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/unprotect`,
|
|
62
77
|
signal: options?.signal
|
|
63
78
|
}, unmarshalKey);
|
|
64
79
|
this.enableKey = (request, options) => this.client.fetch({
|
|
65
80
|
body: "{}",
|
|
66
|
-
headers:
|
|
81
|
+
headers: {
|
|
82
|
+
...jsonContentHeaders,
|
|
83
|
+
...options?.headers
|
|
84
|
+
},
|
|
67
85
|
method: "POST",
|
|
68
86
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/enable`,
|
|
69
87
|
signal: options?.signal
|
|
70
88
|
}, unmarshalKey);
|
|
71
89
|
this.disableKey = (request, options) => this.client.fetch({
|
|
72
90
|
body: "{}",
|
|
73
|
-
headers:
|
|
91
|
+
headers: {
|
|
92
|
+
...jsonContentHeaders,
|
|
93
|
+
...options?.headers
|
|
94
|
+
},
|
|
74
95
|
method: "POST",
|
|
75
96
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/disable`,
|
|
76
97
|
signal: options?.signal
|
|
@@ -91,63 +112,90 @@ var API$1 = class extends API {
|
|
|
91
112
|
this.listKeyRotations = (request, options) => enrichForPagination("rotations", this.pageOfListKeyRotations, request, options);
|
|
92
113
|
this.generateDataKey = (request, options) => this.client.fetch({
|
|
93
114
|
body: JSON.stringify(marshalGenerateDataKeyRequest(request, this.client.settings)),
|
|
94
|
-
headers:
|
|
115
|
+
headers: {
|
|
116
|
+
...jsonContentHeaders,
|
|
117
|
+
...options?.headers
|
|
118
|
+
},
|
|
95
119
|
method: "POST",
|
|
96
120
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/generate-data-key`,
|
|
97
121
|
signal: options?.signal
|
|
98
122
|
}, unmarshalDataKey);
|
|
99
123
|
this.encrypt = (request, options) => this.client.fetch({
|
|
100
124
|
body: JSON.stringify(marshalEncryptRequest(request, this.client.settings)),
|
|
101
|
-
headers:
|
|
125
|
+
headers: {
|
|
126
|
+
...jsonContentHeaders,
|
|
127
|
+
...options?.headers
|
|
128
|
+
},
|
|
102
129
|
method: "POST",
|
|
103
130
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/encrypt`,
|
|
104
131
|
signal: options?.signal
|
|
105
132
|
}, unmarshalEncryptResponse);
|
|
106
133
|
this.decrypt = (request, options) => this.client.fetch({
|
|
107
134
|
body: JSON.stringify(marshalDecryptRequest(request, this.client.settings)),
|
|
108
|
-
headers:
|
|
135
|
+
headers: {
|
|
136
|
+
...jsonContentHeaders,
|
|
137
|
+
...options?.headers
|
|
138
|
+
},
|
|
109
139
|
method: "POST",
|
|
110
140
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/decrypt`,
|
|
111
141
|
signal: options?.signal
|
|
112
142
|
}, unmarshalDecryptResponse);
|
|
113
143
|
this.sign = (request, options) => this.client.fetch({
|
|
114
144
|
body: JSON.stringify(marshalSignRequest(request, this.client.settings)),
|
|
115
|
-
headers:
|
|
145
|
+
headers: {
|
|
146
|
+
...jsonContentHeaders,
|
|
147
|
+
...options?.headers
|
|
148
|
+
},
|
|
116
149
|
method: "POST",
|
|
117
150
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/sign`,
|
|
118
151
|
signal: options?.signal
|
|
119
152
|
}, unmarshalSignResponse);
|
|
120
153
|
this.verify = (request, options) => this.client.fetch({
|
|
121
154
|
body: JSON.stringify(marshalVerifyRequest(request, this.client.settings)),
|
|
122
|
-
headers:
|
|
155
|
+
headers: {
|
|
156
|
+
...jsonContentHeaders,
|
|
157
|
+
...options?.headers
|
|
158
|
+
},
|
|
123
159
|
method: "POST",
|
|
124
160
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/verify`,
|
|
125
161
|
signal: options?.signal
|
|
126
162
|
}, unmarshalVerifyResponse);
|
|
127
163
|
this.importKeyMaterial = (request, options) => this.client.fetch({
|
|
128
164
|
body: JSON.stringify(marshalImportKeyMaterialRequest(request, this.client.settings)),
|
|
129
|
-
headers:
|
|
165
|
+
headers: {
|
|
166
|
+
...jsonContentHeaders,
|
|
167
|
+
...options?.headers
|
|
168
|
+
},
|
|
130
169
|
method: "POST",
|
|
131
170
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/import-key-material`,
|
|
132
171
|
signal: options?.signal
|
|
133
172
|
}, unmarshalKey);
|
|
134
173
|
this.deleteKeyMaterial = (request, options) => this.client.fetch({
|
|
135
174
|
body: JSON.stringify(marshalDeleteKeyMaterialRequest(request, this.client.settings)),
|
|
136
|
-
headers:
|
|
175
|
+
headers: {
|
|
176
|
+
...jsonContentHeaders,
|
|
177
|
+
...options?.headers
|
|
178
|
+
},
|
|
137
179
|
method: "POST",
|
|
138
180
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/delete-key-material`,
|
|
139
181
|
signal: options?.signal
|
|
140
182
|
});
|
|
141
183
|
this.generateKeyMaterialImportParameters = (request, options) => this.client.fetch({
|
|
142
184
|
body: JSON.stringify(marshalGenerateKeyMaterialImportParametersRequest(request, this.client.settings)),
|
|
143
|
-
headers:
|
|
185
|
+
headers: {
|
|
186
|
+
...jsonContentHeaders,
|
|
187
|
+
...options?.headers
|
|
188
|
+
},
|
|
144
189
|
method: "POST",
|
|
145
190
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/import-parameters`,
|
|
146
191
|
signal: options?.signal
|
|
147
192
|
}, unmarshalGenerateKeyMaterialImportParametersResponse);
|
|
148
193
|
this.restoreKey = (request, options) => this.client.fetch({
|
|
149
194
|
body: "{}",
|
|
150
|
-
headers:
|
|
195
|
+
headers: {
|
|
196
|
+
...jsonContentHeaders,
|
|
197
|
+
...options?.headers
|
|
198
|
+
},
|
|
151
199
|
method: "POST",
|
|
152
200
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/restore`,
|
|
153
201
|
signal: options?.signal
|
|
@@ -160,14 +208,20 @@ var API$1 = class extends API {
|
|
|
160
208
|
}, unmarshalListAlgorithmsResponse);
|
|
161
209
|
this.wrapKey = (request, options) => this.client.fetch({
|
|
162
210
|
body: JSON.stringify(marshalWrapKeyRequest(request, this.client.settings)),
|
|
163
|
-
headers:
|
|
211
|
+
headers: {
|
|
212
|
+
...jsonContentHeaders,
|
|
213
|
+
...options?.headers
|
|
214
|
+
},
|
|
164
215
|
method: "POST",
|
|
165
216
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/wrap`,
|
|
166
217
|
signal: options?.signal
|
|
167
218
|
}, unmarshalWrapKeyResponse);
|
|
168
219
|
this.unwrapKey = (request, options) => this.client.fetch({
|
|
169
220
|
body: JSON.stringify(marshalUnwrapKeyRequest(request, this.client.settings)),
|
|
170
|
-
headers:
|
|
221
|
+
headers: {
|
|
222
|
+
...jsonContentHeaders,
|
|
223
|
+
...options?.headers
|
|
224
|
+
},
|
|
171
225
|
method: "POST",
|
|
172
226
|
path: `/key-manager/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/keys/${validatePathParam("keyId", request.keyId)}/unwrap`,
|
|
173
227
|
signal: options?.signal
|
|
@@ -4,25 +4,25 @@ import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } fro
|
|
|
4
4
|
const unmarshalKeyRotationPolicy = (data) => {
|
|
5
5
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'KeyRotationPolicy' failed as data isn't a dictionary.`);
|
|
6
6
|
return {
|
|
7
|
-
nextRotationAt: unmarshalDate(data.next_rotation_at),
|
|
8
|
-
rotationPeriod: data.rotation_period
|
|
7
|
+
nextRotationAt: unmarshalDate(data.next_rotation_at) ?? null,
|
|
8
|
+
rotationPeriod: data.rotation_period ?? null
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
11
|
const unmarshalKeyUsage = (data) => {
|
|
12
12
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'KeyUsage' failed as data isn't a dictionary.`);
|
|
13
13
|
return {
|
|
14
|
-
asymmetricEncryption: data.asymmetric_encryption ? data.asymmetric_encryption :
|
|
15
|
-
asymmetricSigning: data.asymmetric_signing ? data.asymmetric_signing :
|
|
16
|
-
keyEncapsulation: data.key_encapsulation ? data.key_encapsulation :
|
|
17
|
-
symmetricEncryption: data.symmetric_encryption ? data.symmetric_encryption :
|
|
14
|
+
asymmetricEncryption: data.asymmetric_encryption ? data.asymmetric_encryption : null,
|
|
15
|
+
asymmetricSigning: data.asymmetric_signing ? data.asymmetric_signing : null,
|
|
16
|
+
keyEncapsulation: data.key_encapsulation ? data.key_encapsulation : null,
|
|
17
|
+
symmetricEncryption: data.symmetric_encryption ? data.symmetric_encryption : null
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
const unmarshalKey = (data) => {
|
|
21
21
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Key' failed as data isn't a dictionary.`);
|
|
22
22
|
return {
|
|
23
|
-
createdAt: unmarshalDate(data.created_at),
|
|
24
|
-
deletionRequestedAt: unmarshalDate(data.deletion_requested_at),
|
|
25
|
-
description: data.description,
|
|
23
|
+
createdAt: unmarshalDate(data.created_at) ?? null,
|
|
24
|
+
deletionRequestedAt: unmarshalDate(data.deletion_requested_at) ?? null,
|
|
25
|
+
description: data.description ?? null,
|
|
26
26
|
id: data.id,
|
|
27
27
|
locked: data.locked,
|
|
28
28
|
name: data.name,
|
|
@@ -31,14 +31,14 @@ const unmarshalKey = (data) => {
|
|
|
31
31
|
protected: data.protected,
|
|
32
32
|
protectionLevel: data.protection_level,
|
|
33
33
|
region: data.region,
|
|
34
|
-
rotatedAt: unmarshalDate(data.rotated_at),
|
|
34
|
+
rotatedAt: unmarshalDate(data.rotated_at) ?? null,
|
|
35
35
|
rotationCount: data.rotation_count,
|
|
36
|
-
rotationPolicy: data.rotation_policy ? unmarshalKeyRotationPolicy(data.rotation_policy) :
|
|
36
|
+
rotationPolicy: data.rotation_policy ? unmarshalKeyRotationPolicy(data.rotation_policy) : null,
|
|
37
37
|
srn: data.srn,
|
|
38
38
|
state: data.state,
|
|
39
39
|
tags: data.tags,
|
|
40
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
41
|
-
usage: data.usage ? unmarshalKeyUsage(data.usage) :
|
|
40
|
+
updatedAt: unmarshalDate(data.updated_at) ?? null,
|
|
41
|
+
usage: data.usage ? unmarshalKeyUsage(data.usage) : null
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
44
|
const unmarshalDataKey = (data) => {
|
|
@@ -46,15 +46,15 @@ const unmarshalDataKey = (data) => {
|
|
|
46
46
|
return {
|
|
47
47
|
algorithm: data.algorithm,
|
|
48
48
|
ciphertext: data.ciphertext,
|
|
49
|
-
createdAt: unmarshalDate(data.created_at),
|
|
49
|
+
createdAt: unmarshalDate(data.created_at) ?? null,
|
|
50
50
|
keyId: data.key_id,
|
|
51
|
-
plaintext: data.plaintext
|
|
51
|
+
plaintext: data.plaintext ?? null
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
const unmarshalDecryptResponse = (data) => {
|
|
55
55
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DecryptResponse' failed as data isn't a dictionary.`);
|
|
56
56
|
return {
|
|
57
|
-
ciphertext: data.ciphertext,
|
|
57
|
+
ciphertext: data.ciphertext ?? null,
|
|
58
58
|
keyId: data.key_id,
|
|
59
59
|
plaintext: data.plaintext
|
|
60
60
|
};
|
|
@@ -89,13 +89,13 @@ const unmarshalListAlgorithmsResponse = (data) => {
|
|
|
89
89
|
const unmarshalKeyRotation = (data) => {
|
|
90
90
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'KeyRotation' failed as data isn't a dictionary.`);
|
|
91
91
|
return {
|
|
92
|
-
createdAt: unmarshalDate(data.created_at),
|
|
93
|
-
deletedAt: unmarshalDate(data.deleted_at),
|
|
92
|
+
createdAt: unmarshalDate(data.created_at) ?? null,
|
|
93
|
+
deletedAt: unmarshalDate(data.deleted_at) ?? null,
|
|
94
94
|
index: data.index,
|
|
95
95
|
keyId: data.key_id,
|
|
96
96
|
manuallyRotated: data.manually_rotated,
|
|
97
97
|
status: data.status,
|
|
98
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
98
|
+
updatedAt: unmarshalDate(data.updated_at) ?? null
|
|
99
99
|
};
|
|
100
100
|
};
|
|
101
101
|
const unmarshalListKeyRotationsResponse = (data) => {
|
|
@@ -172,10 +172,10 @@ const marshalCreateKeyRequest = (request, defaults) => ({
|
|
|
172
172
|
origin: request.origin,
|
|
173
173
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
174
174
|
protection_level: request.protectionLevel,
|
|
175
|
-
rotation_policy: request.rotationPolicy
|
|
175
|
+
rotation_policy: request.rotationPolicy != null ? marshalKeyRotationPolicy(request.rotationPolicy, defaults) : void 0,
|
|
176
176
|
tags: request.tags,
|
|
177
177
|
unprotected: request.unprotected,
|
|
178
|
-
usage: request.usage
|
|
178
|
+
usage: request.usage != null ? marshalKeyUsage(request.usage, defaults) : void 0
|
|
179
179
|
});
|
|
180
180
|
const marshalDecryptRequest = (request, defaults) => ({
|
|
181
181
|
associated_data: request.associatedData,
|
|
@@ -202,7 +202,7 @@ const marshalImportKeyMaterialRequest = (request, defaults) => ({
|
|
|
202
202
|
value: request.keyMaterial
|
|
203
203
|
}, {
|
|
204
204
|
param: "encrypted_key_material",
|
|
205
|
-
value: request.encryptedKeyMaterial
|
|
205
|
+
value: request.encryptedKeyMaterial != null ? marshalImportKeyMaterialRequestEncryptedKeyMaterial(request.encryptedKeyMaterial, defaults) : void 0
|
|
206
206
|
}])
|
|
207
207
|
});
|
|
208
208
|
const marshalSignRequest = (request, defaults) => ({ ...resolveOneOf([
|
|
@@ -226,7 +226,7 @@ const marshalUnwrapKeyRequest = (request, defaults) => ({
|
|
|
226
226
|
const marshalUpdateKeyRequest = (request, defaults) => ({
|
|
227
227
|
description: request.description,
|
|
228
228
|
name: request.name,
|
|
229
|
-
rotation_policy: request.rotationPolicy
|
|
229
|
+
rotation_policy: request.rotationPolicy != null ? marshalKeyRotationPolicy(request.rotationPolicy, defaults) : void 0,
|
|
230
230
|
tags: request.tags
|
|
231
231
|
});
|
|
232
232
|
const marshalVerifyRequest = (request, defaults) => ({
|
|
@@ -18,11 +18,11 @@ export interface KeyRotationPolicy {
|
|
|
18
18
|
/**
|
|
19
19
|
* Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
|
|
20
20
|
*/
|
|
21
|
-
rotationPeriod?: string;
|
|
21
|
+
rotationPeriod?: string | null;
|
|
22
22
|
/**
|
|
23
23
|
* Timestamp indicating the next scheduled rotation.
|
|
24
24
|
*/
|
|
25
|
-
nextRotationAt?: Date;
|
|
25
|
+
nextRotationAt?: Date | null;
|
|
26
26
|
}
|
|
27
27
|
export interface KeyUsage {
|
|
28
28
|
/**
|
|
@@ -30,25 +30,25 @@ export interface KeyUsage {
|
|
|
30
30
|
*
|
|
31
31
|
* One-of ('usage'): at most one of 'symmetricEncryption', 'asymmetricEncryption', 'asymmetricSigning', 'keyEncapsulation' could be set.
|
|
32
32
|
*/
|
|
33
|
-
symmetricEncryption?: KeyAlgorithmSymmetricEncryption;
|
|
33
|
+
symmetricEncryption?: KeyAlgorithmSymmetricEncryption | null;
|
|
34
34
|
/**
|
|
35
35
|
* See the `Key.Algorithm.AsymmetricEncryption` enum for a description of values.
|
|
36
36
|
*
|
|
37
37
|
* One-of ('usage'): at most one of 'symmetricEncryption', 'asymmetricEncryption', 'asymmetricSigning', 'keyEncapsulation' could be set.
|
|
38
38
|
*/
|
|
39
|
-
asymmetricEncryption?: KeyAlgorithmAsymmetricEncryption;
|
|
39
|
+
asymmetricEncryption?: KeyAlgorithmAsymmetricEncryption | null;
|
|
40
40
|
/**
|
|
41
41
|
* See the `Key.Algorithm.AsymmetricSigning` enum for a description of values.
|
|
42
42
|
*
|
|
43
43
|
* One-of ('usage'): at most one of 'symmetricEncryption', 'asymmetricEncryption', 'asymmetricSigning', 'keyEncapsulation' could be set.
|
|
44
44
|
*/
|
|
45
|
-
asymmetricSigning?: KeyAlgorithmAsymmetricSigning;
|
|
45
|
+
asymmetricSigning?: KeyAlgorithmAsymmetricSigning | null;
|
|
46
46
|
/**
|
|
47
47
|
* See the `Key.Algorithm.KeyEncapulation` enum for a description of values.
|
|
48
48
|
*
|
|
49
49
|
* One-of ('usage'): at most one of 'symmetricEncryption', 'asymmetricEncryption', 'asymmetricSigning', 'keyEncapsulation' could be set.
|
|
50
50
|
*/
|
|
51
|
-
keyEncapsulation?: KeyAlgorithmKeyEncapsulation;
|
|
51
|
+
keyEncapsulation?: KeyAlgorithmKeyEncapsulation | null;
|
|
52
52
|
}
|
|
53
53
|
export interface ImportKeyMaterialRequestEncryptedKeyMaterial {
|
|
54
54
|
/**
|
|
@@ -85,15 +85,15 @@ export interface KeyRotation {
|
|
|
85
85
|
/**
|
|
86
86
|
* Key rotation creation date.
|
|
87
87
|
*/
|
|
88
|
-
createdAt?: Date;
|
|
88
|
+
createdAt?: Date | null;
|
|
89
89
|
/**
|
|
90
90
|
* Key rotation last modification date.
|
|
91
91
|
*/
|
|
92
|
-
updatedAt?: Date;
|
|
92
|
+
updatedAt?: Date | null;
|
|
93
93
|
/**
|
|
94
94
|
* Key rotation deletion date.
|
|
95
95
|
*/
|
|
96
|
-
deletedAt?: Date;
|
|
96
|
+
deletedAt?: Date | null;
|
|
97
97
|
}
|
|
98
98
|
export interface Key {
|
|
99
99
|
/**
|
|
@@ -115,7 +115,7 @@ export interface Key {
|
|
|
115
115
|
/**
|
|
116
116
|
* See the `Key.Usage` enum for a description of possible values.
|
|
117
117
|
*/
|
|
118
|
-
usage?: KeyUsage;
|
|
118
|
+
usage?: KeyUsage | null;
|
|
119
119
|
/**
|
|
120
120
|
* See the `Key.State` enum for a description of possible values.
|
|
121
121
|
*/
|
|
@@ -127,11 +127,11 @@ export interface Key {
|
|
|
127
127
|
/**
|
|
128
128
|
* Key creation date.
|
|
129
129
|
*/
|
|
130
|
-
createdAt?: Date;
|
|
130
|
+
createdAt?: Date | null;
|
|
131
131
|
/**
|
|
132
132
|
* Key last modification date.
|
|
133
133
|
*/
|
|
134
|
-
updatedAt?: Date;
|
|
134
|
+
updatedAt?: Date | null;
|
|
135
135
|
/**
|
|
136
136
|
* Returns `true` if key protection is applied to the key.
|
|
137
137
|
*/
|
|
@@ -143,7 +143,7 @@ export interface Key {
|
|
|
143
143
|
/**
|
|
144
144
|
* Description of the key.
|
|
145
145
|
*/
|
|
146
|
-
description?: string;
|
|
146
|
+
description?: string | null;
|
|
147
147
|
/**
|
|
148
148
|
* List of the key's tags.
|
|
149
149
|
*/
|
|
@@ -151,11 +151,11 @@ export interface Key {
|
|
|
151
151
|
/**
|
|
152
152
|
* Key last rotation date.
|
|
153
153
|
*/
|
|
154
|
-
rotatedAt?: Date;
|
|
154
|
+
rotatedAt?: Date | null;
|
|
155
155
|
/**
|
|
156
156
|
* Key rotation policy.
|
|
157
157
|
*/
|
|
158
|
-
rotationPolicy?: KeyRotationPolicy;
|
|
158
|
+
rotationPolicy?: KeyRotationPolicy | null;
|
|
159
159
|
/**
|
|
160
160
|
* Refer to the `Key.Origin` enum for a description of values.
|
|
161
161
|
*/
|
|
@@ -163,7 +163,7 @@ export interface Key {
|
|
|
163
163
|
/**
|
|
164
164
|
* Returns the time at which deletion was requested.
|
|
165
165
|
*/
|
|
166
|
-
deletionRequestedAt?: Date;
|
|
166
|
+
deletionRequestedAt?: Date | null;
|
|
167
167
|
/**
|
|
168
168
|
* Refer to the `Key.ProtectionLevel` enum for a description of values.
|
|
169
169
|
*/
|
|
@@ -177,31 +177,31 @@ export type CreateKeyRequest = {
|
|
|
177
177
|
/**
|
|
178
178
|
* Region to target. If none is passed will use default region from the config.
|
|
179
179
|
*/
|
|
180
|
-
region?: Region;
|
|
180
|
+
region?: Region | null;
|
|
181
181
|
/**
|
|
182
182
|
* ID of the Project containing the key.
|
|
183
183
|
*/
|
|
184
|
-
projectId?: string;
|
|
184
|
+
projectId?: string | null;
|
|
185
185
|
/**
|
|
186
186
|
* (Optional) Name of the key.
|
|
187
187
|
*/
|
|
188
|
-
name?: string;
|
|
188
|
+
name?: string | null;
|
|
189
189
|
/**
|
|
190
190
|
* See the `Key.Usage` enum for a description of possible values.
|
|
191
191
|
*/
|
|
192
|
-
usage?: KeyUsage;
|
|
192
|
+
usage?: KeyUsage | null;
|
|
193
193
|
/**
|
|
194
194
|
* (Optional) Description of the key.
|
|
195
195
|
*/
|
|
196
|
-
description?: string;
|
|
196
|
+
description?: string | null;
|
|
197
197
|
/**
|
|
198
198
|
* (Optional) List of the key's tags.
|
|
199
199
|
*/
|
|
200
|
-
tags?: string[];
|
|
200
|
+
tags?: string[] | null;
|
|
201
201
|
/**
|
|
202
202
|
* If not specified, no rotation policy will be applied to the key.
|
|
203
203
|
*/
|
|
204
|
-
rotationPolicy?: KeyRotationPolicy;
|
|
204
|
+
rotationPolicy?: KeyRotationPolicy | null;
|
|
205
205
|
/**
|
|
206
206
|
* Default value is `false`.
|
|
207
207
|
*/
|
|
@@ -209,11 +209,11 @@ export type CreateKeyRequest = {
|
|
|
209
209
|
/**
|
|
210
210
|
* Refer to the `Key.Origin` enum for a description of values.
|
|
211
211
|
*/
|
|
212
|
-
origin?: KeyOrigin;
|
|
212
|
+
origin?: KeyOrigin | null;
|
|
213
213
|
/**
|
|
214
214
|
* Refer to the `Key.Protection` enum for a description of values.
|
|
215
215
|
*/
|
|
216
|
-
protectionLevel?: KeyProtectionLevel;
|
|
216
|
+
protectionLevel?: KeyProtectionLevel | null;
|
|
217
217
|
};
|
|
218
218
|
export interface DataKey {
|
|
219
219
|
/**
|
|
@@ -231,17 +231,17 @@ export interface DataKey {
|
|
|
231
231
|
/**
|
|
232
232
|
* (Optional) Your data encryption key's plaintext allows you to use the key immediately upon creation. It must neither be stored or shared.
|
|
233
233
|
*/
|
|
234
|
-
plaintext?: string;
|
|
234
|
+
plaintext?: string | null;
|
|
235
235
|
/**
|
|
236
236
|
* Data encryption key creation date.
|
|
237
237
|
*/
|
|
238
|
-
createdAt?: Date;
|
|
238
|
+
createdAt?: Date | null;
|
|
239
239
|
}
|
|
240
240
|
export type DecryptRequest = {
|
|
241
241
|
/**
|
|
242
242
|
* Region to target. If none is passed will use default region from the config.
|
|
243
243
|
*/
|
|
244
|
-
region?: Region;
|
|
244
|
+
region?: Region | null;
|
|
245
245
|
/**
|
|
246
246
|
* The key must have an usage set to `symmetric_encryption` or `asymmetric_encryption`.
|
|
247
247
|
*/
|
|
@@ -253,7 +253,7 @@ export type DecryptRequest = {
|
|
|
253
253
|
/**
|
|
254
254
|
* The additional data must match the value passed in the encryption request. Only supported by keys with a usage set to `symmetric_encryption`.
|
|
255
255
|
*/
|
|
256
|
-
associatedData?: string;
|
|
256
|
+
associatedData?: string | null;
|
|
257
257
|
};
|
|
258
258
|
export interface DecryptResponse {
|
|
259
259
|
/**
|
|
@@ -267,13 +267,13 @@ export interface DecryptResponse {
|
|
|
267
267
|
/**
|
|
268
268
|
* If the data was already encrypted with the latest key rotation, no output will be returned in the response object.
|
|
269
269
|
*/
|
|
270
|
-
ciphertext?: string;
|
|
270
|
+
ciphertext?: string | null;
|
|
271
271
|
}
|
|
272
272
|
export type DeleteKeyMaterialRequest = {
|
|
273
273
|
/**
|
|
274
274
|
* Region to target. If none is passed will use default region from the config.
|
|
275
275
|
*/
|
|
276
|
-
region?: Region;
|
|
276
|
+
region?: Region | null;
|
|
277
277
|
/**
|
|
278
278
|
* ID of the key of which to delete the key material.
|
|
279
279
|
*/
|
|
@@ -281,13 +281,13 @@ export type DeleteKeyMaterialRequest = {
|
|
|
281
281
|
/**
|
|
282
282
|
* Default to latest rotation if not set.
|
|
283
283
|
*/
|
|
284
|
-
keyRotationIndex?: number;
|
|
284
|
+
keyRotationIndex?: number | null;
|
|
285
285
|
};
|
|
286
286
|
export type DeleteKeyRequest = {
|
|
287
287
|
/**
|
|
288
288
|
* Region to target. If none is passed will use default region from the config.
|
|
289
289
|
*/
|
|
290
|
-
region?: Region;
|
|
290
|
+
region?: Region | null;
|
|
291
291
|
/**
|
|
292
292
|
* ID of the key to delete.
|
|
293
293
|
*/
|
|
@@ -297,7 +297,7 @@ export type DisableKeyRequest = {
|
|
|
297
297
|
/**
|
|
298
298
|
* Region to target. If none is passed will use default region from the config.
|
|
299
299
|
*/
|
|
300
|
-
region?: Region;
|
|
300
|
+
region?: Region | null;
|
|
301
301
|
/**
|
|
302
302
|
* ID of the key to disable.
|
|
303
303
|
*/
|
|
@@ -307,7 +307,7 @@ export type EnableKeyRequest = {
|
|
|
307
307
|
/**
|
|
308
308
|
* Region to target. If none is passed will use default region from the config.
|
|
309
309
|
*/
|
|
310
|
-
region?: Region;
|
|
310
|
+
region?: Region | null;
|
|
311
311
|
/**
|
|
312
312
|
* ID of the key to enable.
|
|
313
313
|
*/
|
|
@@ -317,7 +317,7 @@ export type EncryptRequest = {
|
|
|
317
317
|
/**
|
|
318
318
|
* Region to target. If none is passed will use default region from the config.
|
|
319
319
|
*/
|
|
320
|
-
region?: Region;
|
|
320
|
+
region?: Region | null;
|
|
321
321
|
/**
|
|
322
322
|
* The key must have an usage set to `symmetric_encryption` or `asymmetric_encryption`.
|
|
323
323
|
*/
|
|
@@ -329,7 +329,7 @@ export type EncryptRequest = {
|
|
|
329
329
|
/**
|
|
330
330
|
* Additional data which will not be encrypted, but authenticated and appended to the encrypted payload. Only supported by keys with a usage set to `symmetric_encryption`.
|
|
331
331
|
*/
|
|
332
|
-
associatedData?: string;
|
|
332
|
+
associatedData?: string | null;
|
|
333
333
|
};
|
|
334
334
|
export interface EncryptResponse {
|
|
335
335
|
/**
|
|
@@ -345,7 +345,7 @@ export type GenerateDataKeyRequest = {
|
|
|
345
345
|
/**
|
|
346
346
|
* Region to target. If none is passed will use default region from the config.
|
|
347
347
|
*/
|
|
348
|
-
region?: Region;
|
|
348
|
+
region?: Region | null;
|
|
349
349
|
/**
|
|
350
350
|
* ID of the key.
|
|
351
351
|
*/
|
|
@@ -353,7 +353,7 @@ export type GenerateDataKeyRequest = {
|
|
|
353
353
|
/**
|
|
354
354
|
* See the `DataKey.Algorithm.SymmetricEncryption` enum for a description of values.
|
|
355
355
|
*/
|
|
356
|
-
algorithm?: DataKeyAlgorithmSymmetricEncryption;
|
|
356
|
+
algorithm?: DataKeyAlgorithmSymmetricEncryption | null;
|
|
357
357
|
/**
|
|
358
358
|
* Default value is `false`, meaning that the plaintext is returned.
|
|
359
359
|
Set it to `true` if you do not wish the plaintext to be returned in the response object.
|
|
@@ -364,7 +364,7 @@ export type GenerateKeyMaterialImportParametersRequest = {
|
|
|
364
364
|
/**
|
|
365
365
|
* Region to target. If none is passed will use default region from the config.
|
|
366
366
|
*/
|
|
367
|
-
region?: Region;
|
|
367
|
+
region?: Region | null;
|
|
368
368
|
/**
|
|
369
369
|
* ID of the key into which to import the key material.
|
|
370
370
|
*/
|
|
@@ -372,7 +372,7 @@ export type GenerateKeyMaterialImportParametersRequest = {
|
|
|
372
372
|
/**
|
|
373
373
|
* Supported values are: `rsa_oaep_2048_sha256`, `rsa_oaep_3072_sha256`, `rsa_oaep_4096_sha256`.
|
|
374
374
|
*/
|
|
375
|
-
wrappingAlgorithm?: GenerateKeyMaterialImportParametersRequestWrappingAlgorithm;
|
|
375
|
+
wrappingAlgorithm?: GenerateKeyMaterialImportParametersRequestWrappingAlgorithm | null;
|
|
376
376
|
};
|
|
377
377
|
export interface GenerateKeyMaterialImportParametersResponse {
|
|
378
378
|
/**
|
|
@@ -392,7 +392,7 @@ export type GetKeyRequest = {
|
|
|
392
392
|
/**
|
|
393
393
|
* Region to target. If none is passed will use default region from the config.
|
|
394
394
|
*/
|
|
395
|
-
region?: Region;
|
|
395
|
+
region?: Region | null;
|
|
396
396
|
/**
|
|
397
397
|
* ID of the key to target.
|
|
398
398
|
*/
|
|
@@ -402,7 +402,7 @@ export type GetPublicKeyRequest = {
|
|
|
402
402
|
/**
|
|
403
403
|
* Region to target. If none is passed will use default region from the config.
|
|
404
404
|
*/
|
|
405
|
-
region?: Region;
|
|
405
|
+
region?: Region | null;
|
|
406
406
|
/**
|
|
407
407
|
* ID of the key.
|
|
408
408
|
*/
|
|
@@ -412,7 +412,7 @@ export type ImportKeyMaterialRequest = {
|
|
|
412
412
|
/**
|
|
413
413
|
* Region to target. If none is passed will use default region from the config.
|
|
414
414
|
*/
|
|
415
|
-
region?: Region;
|
|
415
|
+
region?: Region | null;
|
|
416
416
|
/**
|
|
417
417
|
* The key's origin must be `external`.
|
|
418
418
|
*/
|
|
@@ -422,27 +422,27 @@ export type ImportKeyMaterialRequest = {
|
|
|
422
422
|
*
|
|
423
423
|
* One-of ('material'): at most one of 'keyMaterial', 'encryptedKeyMaterial' could be set.
|
|
424
424
|
*/
|
|
425
|
-
keyMaterial?: string;
|
|
425
|
+
keyMaterial?: string | null;
|
|
426
426
|
/**
|
|
427
427
|
* A salt is random data added to key material to ensure unique derived keys, even if the input is similar. It helps strengthen security when the key material has low randomness (low entropy).
|
|
428
428
|
*/
|
|
429
|
-
salt?: string;
|
|
429
|
+
salt?: string | null;
|
|
430
430
|
/**
|
|
431
431
|
* This material must be encrypted using the public key and the exact wrapping algorithm returned by the `GetKeyMaterialImportParameters` method.
|
|
432
432
|
*
|
|
433
433
|
* One-of ('material'): at most one of 'keyMaterial', 'encryptedKeyMaterial' could be set.
|
|
434
434
|
*/
|
|
435
|
-
encryptedKeyMaterial?: ImportKeyMaterialRequestEncryptedKeyMaterial;
|
|
435
|
+
encryptedKeyMaterial?: ImportKeyMaterialRequestEncryptedKeyMaterial | null;
|
|
436
436
|
};
|
|
437
437
|
export type ListAlgorithmsRequest = {
|
|
438
438
|
/**
|
|
439
439
|
* Region to target. If none is passed will use default region from the config.
|
|
440
440
|
*/
|
|
441
|
-
region?: Region;
|
|
441
|
+
region?: Region | null;
|
|
442
442
|
/**
|
|
443
443
|
* Filter by key usage.
|
|
444
444
|
*/
|
|
445
|
-
usages?: ListAlgorithmsRequestUsage[];
|
|
445
|
+
usages?: ListAlgorithmsRequestUsage[] | null;
|
|
446
446
|
};
|
|
447
447
|
export interface ListAlgorithmsResponse {
|
|
448
448
|
/**
|
|
@@ -454,18 +454,18 @@ export type ListKeyRotationsRequest = {
|
|
|
454
454
|
/**
|
|
455
455
|
* Region to target. If none is passed will use default region from the config.
|
|
456
456
|
*/
|
|
457
|
-
region?: Region;
|
|
457
|
+
region?: Region | null;
|
|
458
458
|
/**
|
|
459
459
|
* ID of the key to list rotations for.
|
|
460
460
|
*/
|
|
461
461
|
keyId: string;
|
|
462
|
-
orderBy?: ListKeyRotationsRequestOrderBy;
|
|
463
|
-
page?: number;
|
|
464
|
-
pageSize?: number;
|
|
462
|
+
orderBy?: ListKeyRotationsRequestOrderBy | null;
|
|
463
|
+
page?: number | null;
|
|
464
|
+
pageSize?: number | null;
|
|
465
465
|
/**
|
|
466
466
|
* See the `KeyRotation.Status` enum for a description of possible values.
|
|
467
467
|
*/
|
|
468
|
-
status?: KeyRotationStatus[];
|
|
468
|
+
status?: KeyRotationStatus[] | null;
|
|
469
469
|
};
|
|
470
470
|
export interface ListKeyRotationsResponse {
|
|
471
471
|
/**
|
|
@@ -481,30 +481,30 @@ export type ListKeysRequest = {
|
|
|
481
481
|
/**
|
|
482
482
|
* Region to target. If none is passed will use default region from the config.
|
|
483
483
|
*/
|
|
484
|
-
region?: Region;
|
|
484
|
+
region?: Region | null;
|
|
485
485
|
/**
|
|
486
486
|
* (Optional) Filter by Organization ID.
|
|
487
487
|
*/
|
|
488
|
-
organizationId?: string;
|
|
488
|
+
organizationId?: string | null;
|
|
489
489
|
/**
|
|
490
490
|
* (Optional) Filter by Project ID.
|
|
491
491
|
*/
|
|
492
|
-
projectId?: string;
|
|
493
|
-
orderBy?: ListKeysRequestOrderBy;
|
|
494
|
-
page?: number;
|
|
495
|
-
pageSize?: number;
|
|
492
|
+
projectId?: string | null;
|
|
493
|
+
orderBy?: ListKeysRequestOrderBy | null;
|
|
494
|
+
page?: number | null;
|
|
495
|
+
pageSize?: number | null;
|
|
496
496
|
/**
|
|
497
497
|
* (Optional) List of tags to filter on.
|
|
498
498
|
*/
|
|
499
|
-
tags?: string[];
|
|
499
|
+
tags?: string[] | null;
|
|
500
500
|
/**
|
|
501
501
|
* (Optional) Filter by key name.
|
|
502
502
|
*/
|
|
503
|
-
name?: string;
|
|
503
|
+
name?: string | null;
|
|
504
504
|
/**
|
|
505
505
|
* Select from symmetric encryption, asymmetric encryption, asymmetric signing or key_encapsulation.
|
|
506
506
|
*/
|
|
507
|
-
usage?: ListKeysRequestUsage;
|
|
507
|
+
usage?: ListKeysRequestUsage | null;
|
|
508
508
|
/**
|
|
509
509
|
* Filter keys based on their deletion status. By default, only keys not scheduled for deletion are returned in the output.
|
|
510
510
|
*/
|
|
@@ -512,7 +512,7 @@ export type ListKeysRequest = {
|
|
|
512
512
|
/**
|
|
513
513
|
* Select from software or hsm.
|
|
514
514
|
*/
|
|
515
|
-
protectionLevel?: KeyProtectionLevel;
|
|
515
|
+
protectionLevel?: KeyProtectionLevel | null;
|
|
516
516
|
};
|
|
517
517
|
export interface ListKeysResponse {
|
|
518
518
|
/**
|
|
@@ -528,7 +528,7 @@ export type ProtectKeyRequest = {
|
|
|
528
528
|
/**
|
|
529
529
|
* Region to target. If none is passed will use default region from the config.
|
|
530
530
|
*/
|
|
531
|
-
region?: Region;
|
|
531
|
+
region?: Region | null;
|
|
532
532
|
/**
|
|
533
533
|
* ID of the key to apply key protection to.
|
|
534
534
|
*/
|
|
@@ -541,14 +541,14 @@ export type RestoreKeyRequest = {
|
|
|
541
541
|
/**
|
|
542
542
|
* Region to target. If none is passed will use default region from the config.
|
|
543
543
|
*/
|
|
544
|
-
region?: Region;
|
|
544
|
+
region?: Region | null;
|
|
545
545
|
keyId: string;
|
|
546
546
|
};
|
|
547
547
|
export type RotateKeyRequest = {
|
|
548
548
|
/**
|
|
549
549
|
* Region to target. If none is passed will use default region from the config.
|
|
550
550
|
*/
|
|
551
|
-
region?: Region;
|
|
551
|
+
region?: Region | null;
|
|
552
552
|
/**
|
|
553
553
|
* ID of the key to rotate.
|
|
554
554
|
*/
|
|
@@ -558,7 +558,7 @@ export type SignRequest = {
|
|
|
558
558
|
/**
|
|
559
559
|
* Region to target. If none is passed will use default region from the config.
|
|
560
560
|
*/
|
|
561
|
-
region?: Region;
|
|
561
|
+
region?: Region | null;
|
|
562
562
|
/**
|
|
563
563
|
* ID of the key to use for signing.
|
|
564
564
|
*/
|
|
@@ -570,19 +570,19 @@ export type SignRequest = {
|
|
|
570
570
|
*
|
|
571
571
|
* One-of ('payload'): at most one of 'digest', 'msg', 'externalMu' could be set.
|
|
572
572
|
*/
|
|
573
|
-
digest?: string;
|
|
573
|
+
digest?: string | null;
|
|
574
574
|
/**
|
|
575
575
|
* Only supported for ML-DSA keys (`raw` signing): the server computes the μ message representative internally before signing. Between 1 and 4096 bytes.
|
|
576
576
|
*
|
|
577
577
|
* One-of ('payload'): at most one of 'digest', 'msg', 'externalMu' could be set.
|
|
578
578
|
*/
|
|
579
|
-
msg?: string;
|
|
579
|
+
msg?: string | null;
|
|
580
580
|
/**
|
|
581
581
|
* Must equal SHAKE256(tr ‖ 0x00 ‖ 0x00 ‖ message), where `tr` is the SHAKE256 of the key's public key. Signatures produced from other pre-hash computations (e.g. HashML-DSA) cannot be verified through this API.
|
|
582
582
|
*
|
|
583
583
|
* One-of ('payload'): at most one of 'digest', 'msg', 'externalMu' could be set.
|
|
584
584
|
*/
|
|
585
|
-
externalMu?: string;
|
|
585
|
+
externalMu?: string | null;
|
|
586
586
|
};
|
|
587
587
|
export interface SignResponse {
|
|
588
588
|
/**
|
|
@@ -598,7 +598,7 @@ export type UnprotectKeyRequest = {
|
|
|
598
598
|
/**
|
|
599
599
|
* Region to target. If none is passed will use default region from the config.
|
|
600
600
|
*/
|
|
601
|
-
region?: Region;
|
|
601
|
+
region?: Region | null;
|
|
602
602
|
/**
|
|
603
603
|
* ID of the key to remove key protection from.
|
|
604
604
|
*/
|
|
@@ -608,10 +608,10 @@ export type UnwrapKeyRequest = {
|
|
|
608
608
|
/**
|
|
609
609
|
* Region to target. If none is passed will use default region from the config.
|
|
610
610
|
*/
|
|
611
|
-
region?: Region;
|
|
611
|
+
region?: Region | null;
|
|
612
612
|
keyId: string;
|
|
613
613
|
ciphertext: string;
|
|
614
|
-
associatedData?: string;
|
|
614
|
+
associatedData?: string | null;
|
|
615
615
|
};
|
|
616
616
|
export interface UnwrapKeyResponse {
|
|
617
617
|
keyId: string;
|
|
@@ -621,7 +621,7 @@ export type UpdateKeyRequest = {
|
|
|
621
621
|
/**
|
|
622
622
|
* Region to target. If none is passed will use default region from the config.
|
|
623
623
|
*/
|
|
624
|
-
region?: Region;
|
|
624
|
+
region?: Region | null;
|
|
625
625
|
/**
|
|
626
626
|
* ID of the key to update.
|
|
627
627
|
*/
|
|
@@ -629,25 +629,25 @@ export type UpdateKeyRequest = {
|
|
|
629
629
|
/**
|
|
630
630
|
* (Optional) Updated name of the key.
|
|
631
631
|
*/
|
|
632
|
-
name?: string;
|
|
632
|
+
name?: string | null;
|
|
633
633
|
/**
|
|
634
634
|
* (Optional) Updated description of the key.
|
|
635
635
|
*/
|
|
636
|
-
description?: string;
|
|
636
|
+
description?: string | null;
|
|
637
637
|
/**
|
|
638
638
|
* (Optional) Updated list of the key's tags.
|
|
639
639
|
*/
|
|
640
|
-
tags?: string[];
|
|
640
|
+
tags?: string[] | null;
|
|
641
641
|
/**
|
|
642
642
|
* If not specified, the key's existing rotation policy applies.
|
|
643
643
|
*/
|
|
644
|
-
rotationPolicy?: KeyRotationPolicy;
|
|
644
|
+
rotationPolicy?: KeyRotationPolicy | null;
|
|
645
645
|
};
|
|
646
646
|
export type VerifyRequest = {
|
|
647
647
|
/**
|
|
648
648
|
* Region to target. If none is passed will use default region from the config.
|
|
649
649
|
*/
|
|
650
|
-
region?: Region;
|
|
650
|
+
region?: Region | null;
|
|
651
651
|
/**
|
|
652
652
|
* ID of the key to use for signature verification.
|
|
653
653
|
*/
|
|
@@ -657,13 +657,13 @@ export type VerifyRequest = {
|
|
|
657
657
|
*
|
|
658
658
|
* One-of ('payload'): at most one of 'digest', 'msg' could be set.
|
|
659
659
|
*/
|
|
660
|
-
digest?: string;
|
|
660
|
+
digest?: string | null;
|
|
661
661
|
/**
|
|
662
662
|
* For ML-DSA keys, the full original message. This also verifies signatures made with `raw` or `external_mu`: send the message whose μ was signed, not the μ itself (a μ payload always fails). Messages over 4096 bytes cannot be verified through this endpoint.
|
|
663
663
|
*
|
|
664
664
|
* One-of ('payload'): at most one of 'digest', 'msg' could be set.
|
|
665
665
|
*/
|
|
666
|
-
msg?: string;
|
|
666
|
+
msg?: string | null;
|
|
667
667
|
/**
|
|
668
668
|
* The message signature to verify.
|
|
669
669
|
*/
|
|
@@ -683,10 +683,10 @@ export type WrapKeyRequest = {
|
|
|
683
683
|
/**
|
|
684
684
|
* Region to target. If none is passed will use default region from the config.
|
|
685
685
|
*/
|
|
686
|
-
region?: Region;
|
|
686
|
+
region?: Region | null;
|
|
687
687
|
keyId: string;
|
|
688
688
|
plaintext: string;
|
|
689
|
-
associatedData?: string;
|
|
689
|
+
associatedData?: string | null;
|
|
690
690
|
};
|
|
691
691
|
export interface WrapKeyResponse {
|
|
692
692
|
keyId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-key-manager",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.24.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.6"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@repo/configs": "^0.1.1",
|
|
40
|
-
"@scaleway/sdk-client": "^2.
|
|
40
|
+
"@scaleway/sdk-client": "^2.17.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@scaleway/sdk-client": "^2.
|
|
43
|
+
"@scaleway/sdk-client": "^2.17.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"package:check": "pnpm publint",
|