Skip to content

Commit c209b1f

Browse files
committed
feat: update generated APIs
1 parent 5215582 commit c209b1f

File tree

3 files changed

+74
-68
lines changed

3 files changed

+74
-68
lines changed

packages/clients/src/api/cockpit/v1/index.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export type {
6060
RegionalApiListManagedAlertsRequest,
6161
RegionalApiListTokensRequest,
6262
RegionalApiTriggerTestAlertRequest,
63+
RegionalApiUpdateContactPointRequest,
6364
RegionalApiUpdateDataSourceRequest,
6465
Token,
6566
TokenScope,

packages/clients/src/api/key_manager/v1alpha1/api.gen.ts

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
urlParams,
77
validatePathParam,
88
} from '../../../bridge'
9-
import type { Region } from '../../../bridge'
9+
import type { Region as ScwRegion } from '../../../bridge'
1010
import {
1111
marshalCreateKeyRequest,
1212
marshalDecryptRequest,
@@ -55,13 +55,17 @@ const jsonContentHeaders = {
5555
*/
5656
export class API extends ParentAPI {
5757
/** Lists the available regions of the API. */
58-
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams', 'pl-waw']
58+
public static readonly LOCALITIES: ScwRegion[] = [
59+
'fr-par',
60+
'nl-ams',
61+
'pl-waw',
62+
]
5963

6064
/**
6165
* Create a key. Create a key in a given region specified by the `region`
6266
* parameter. Keys only support symmetric encryption. You can use keys to
63-
* encrypt or decrypt arbitrary payloads, or to generate data encryption keys
64-
* that can be used without being stored in Key Manager.
67+
* encrypt or decrypt arbitrary payloads, or to generate data encryption keys.
68+
* **Data encryption keys are not stored in Key Manager**.
6569
*
6670
* @param request - The request {@link CreateKeyRequest}
6771
* @returns A Promise of Key
@@ -80,7 +84,7 @@ export class API extends ParentAPI {
8084
)
8185

8286
/**
83-
* Get key metadata. Retrieve the metadata of a key specified by the `region`
87+
* Get key metadata. Retrieve metadata for a specified key using the `region`
8488
* and `key_id` parameters.
8589
*
8690
* @param request - The request {@link GetKeyRequest}
@@ -96,7 +100,7 @@ export class API extends ParentAPI {
96100
)
97101

98102
/**
99-
* Update a key. Update a key's metadata (name, description and tags),
103+
* Update a key. Modify a key's metadata including name, description and tags,
100104
* specified by the `key_id` and `region` parameters.
101105
*
102106
* @param request - The request {@link UpdateKeyRequest}
@@ -116,10 +120,9 @@ export class API extends ParentAPI {
116120
)
117121

118122
/**
119-
* Delete a key. Delete an existing key specified by the `region` and `key_id`
120-
* parameters. Deleting a key is permanent and cannot be undone. All data
121-
* encrypted using this key, including data encryption keys, will become
122-
* unusable.
123+
* Delete a key. Permanently delete a key specified by the `region` and
124+
* `key_id` parameters. This action is irreversible. Any data encrypted with
125+
* this key, including data encryption keys, will no longer be decipherable.
123126
*
124127
* @param request - The request {@link DeleteKeyRequest}
125128
*/
@@ -130,10 +133,10 @@ export class API extends ParentAPI {
130133
})
131134

132135
/**
133-
* Rotate a key. Generate a new version of an existing key with randomly
134-
* generated key material. Rotated keys can still be used to decrypt
135-
* previously encrypted data. The key's new material will be used for
136-
* subsequent encryption operations and data key generation.
136+
* Rotate a key. Generate a new version of an existing key with new key
137+
* material. Previous key versions remain usable to decrypt previously
138+
* encrypted data, but the key's new version will be used for subsequent
139+
* encryption operations and data key generation.
137140
*
138141
* @param request - The request {@link RotateKeyRequest}
139142
* @returns A Promise of Key
@@ -150,7 +153,7 @@ export class API extends ParentAPI {
150153
)
151154

152155
/**
153-
* Apply key protection. Apply key protection to a given key specified by the
156+
* Apply key protection. Apply protection to a given key specified by the
154157
* `key_id` parameter. Applying key protection means that your key can be used
155158
* and modified, but it cannot be deleted.
156159
*
@@ -207,9 +210,9 @@ export class API extends ParentAPI {
207210
)
208211

209212
/**
210-
* Disable key. Disable a given key to be used for cryptographic operations.
211-
* Disabling a key renders it unusable. You must specify the `region` and
212-
* `key_id` parameters.
213+
* Disable key. Disable a given key, preventing it to be used for
214+
* cryptographic operations. Disabling a key renders it unusable. You must
215+
* specify the `region` and `key_id` parameters.
213216
*
214217
* @param request - The request {@link DisableKeyRequest}
215218
* @returns A Promise of Key
@@ -247,9 +250,9 @@ export class API extends ParentAPI {
247250
)
248251

249252
/**
250-
* List keys. Retrieve the list of keys created within all Projects of an
251-
* Organization or in a given Project. You must specify the `region`, and
252-
* either the `organization_id` or the `project_id`.
253+
* List keys. Retrieve a list of keys across all Projects in an Organization
254+
* or within a specific Project. You must specify the `region`, and either the
255+
* `organization_id` or the `project_id`.
253256
*
254257
* @param request - The request {@link ListKeysRequest}
255258
* @returns A Promise of ListKeysResponse
@@ -258,16 +261,15 @@ export class API extends ParentAPI {
258261
enrichForPagination('keys', this.pageOfListKeys, request)
259262

260263
/**
261-
* Generate a data encryption key. Generate a new data encryption key to use
262-
* for cryptographic operations outside of Key Manager. Note that Key Manager
263-
* does not store your data encryption key. The data encryption key is
264+
* Create a data encryption key. Create a new data encryption key for
265+
* cryptographic operations outside of Key Manager. The data encryption key is
264266
* encrypted and must be decrypted using the key you have created in Key
265-
* Manager. The data encryption key's plaintext is returned in the response
266-
* object, for immediate usage.
267+
* Manager.
267268
*
268-
* Always store the data encryption key's ciphertext, rather than its
269-
* plaintext, which must not be stored. To retrieve your key's plaintext, call
270-
* the Decrypt endpoint with your key's ID and ciphertext.
269+
* The data encryption key is returned in plaintext and ciphertext but it
270+
* should only be stored in its encrypted form (ciphertext). Key Manager does
271+
* not store your data encryption key. To retrieve your key's plaintext, use
272+
* the `Decrypt` method with your key's ID and ciphertext.
271273
*
272274
* @param request - The request {@link GenerateDataKeyRequest}
273275
* @returns A Promise of DataKey
@@ -286,10 +288,10 @@ export class API extends ParentAPI {
286288
)
287289

288290
/**
289-
* Encrypt data. Encrypt data using an existing key, specified by the `key_id`
290-
* parameter. Only keys with a usage set to **symmetric_encryption** are
291-
* supported by this method. The maximum payload size that can be encrypted is
292-
* 64KB of plaintext.
291+
* Encrypt a payload. Encrypt a payload using an existing key, specified by
292+
* the `key_id` parameter. Only keys with a usage set to
293+
* `symmetric_encryption` are supported by this method. The maximum payload
294+
* size that can be encrypted is 64 KB of plaintext.
293295
*
294296
* @param request - The request {@link EncryptRequest}
295297
* @returns A Promise of EncryptResponse
@@ -308,9 +310,10 @@ export class API extends ParentAPI {
308310
)
309311

310312
/**
311-
* Decrypt data. Decrypt data using an existing key, specified by the `key_id`
312-
* parameter. The maximum payload size that can be decrypted is the result of
313-
* the encryption of 64KB of data (around 131KB).
313+
* Decrypt an encrypted payload. Decrypt an encrypted payload using an
314+
* existing key, specified by the `key_id` parameter. The maximum payload size
315+
* that can be decrypted is equivalent to the encrypted output of 64 KB of
316+
* data (around 131 KB).
314317
*
315318
* @param request - The request {@link DecryptRequest}
316319
* @returns A Promise of DecryptResponse
@@ -329,8 +332,9 @@ export class API extends ParentAPI {
329332
)
330333

331334
/**
332-
* Import key material. Import key material to use to derive a new
333-
* cryptographic key. The key's origin must be `external`.
335+
* Import key material. Import externally generated key material into Key
336+
* Manager to derive a new cryptographic key. The key's origin must be
337+
* `external`.
334338
*
335339
* @param request - The request {@link ImportKeyMaterialRequest}
336340
* @returns A Promise of Key

packages/clients/src/api/key_manager/v1alpha1/types.gen.ts

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
3-
import type { Region } from '../../../bridge'
3+
import type { Region as ScwRegion } from '../../../bridge'
44

55
export type DataKeyAlgorithmSymmetricEncryption =
66
| 'unknown_symmetric_encryption'
@@ -28,11 +28,11 @@ export type ListKeysRequestOrderBy =
2828

2929
export interface KeyRotationPolicy {
3030
/**
31-
* Duration between two key rotations. The minimum duration is 24 hours and
32-
* the maximum duration is 876000 hours (1 year).
31+
* Time interval between two key rotations. The minimum duration is 24 hours
32+
* and the maximum duration is 1 year (876000 hours).
3333
*/
3434
rotationPeriod?: string
35-
/** Date at which the key will be rotated next. */
35+
/** Timestamp indicating the next scheduled rotation. */
3636
nextRotationAt?: Date
3737
}
3838

@@ -54,14 +54,14 @@ export interface Key {
5454
/** Name of the key. */
5555
name: string
5656
/**
57-
* Keys with a usage set to `symmetric_encryption` are used to encrypt and
58-
* decrypt data. The only key algorithm currently supported by Key Manager is
59-
* AES-256-GCM.
57+
* Keys with a usage set to `symmetric_encryption` can encrypt and decrypt
58+
* data using the `AES-256-GCM` key algorithm. Key Manager currently only
59+
* supports `AES-256-GCM`.
6060
*/
6161
usage?: KeyUsage
62-
/** See the `Key.State` enum for a description of values. */
62+
/** See the `Key.State` enum for a description of possible values. */
6363
state: KeyState
64-
/** The rotation count tracks the amount of times that the key was rotated. */
64+
/** The rotation count tracks the number of times the key has been rotated. */
6565
rotationCount: number
6666
/** Key creation date. */
6767
createdAt?: Date
@@ -81,16 +81,16 @@ export interface Key {
8181
rotationPolicy?: KeyRotationPolicy
8282
/** Refer to the `Key.Origin` enum for a description of values. */
8383
origin: KeyOrigin
84-
/** Region of the key. */
85-
region: Region
84+
/** Region where the key is stored. */
85+
region: ScwRegion
8686
}
8787

8888
export type CreateKeyRequest = {
8989
/**
9090
* Region to target. If none is passed will use default region from the
9191
* config.
9292
*/
93-
region?: Region
93+
region?: ScwRegion
9494
/** ID of the Project containing the key. */
9595
projectId?: string
9696
/** (Optional) Name of the key. */
@@ -115,7 +115,7 @@ export type CreateKeyRequest = {
115115
export interface DataKey {
116116
/** ID of the data encryption key. */
117117
keyId: string
118-
/** Symmetric encryption algorithm of the data encryption key. */
118+
/** Symmetric encryption algorithm of the data encryption key (`AES-256-GCM`). */
119119
algorithm: DataKeyAlgorithmSymmetricEncryption
120120
/**
121121
* Your data encryption key's ciphertext can be stored safely. It can only be
@@ -137,7 +137,7 @@ export type DecryptRequest = {
137137
* Region to target. If none is passed will use default region from the
138138
* config.
139139
*/
140-
region?: Region
140+
region?: ScwRegion
141141
/** ID of the key to decrypt. */
142142
keyId: string
143143
/** Data size must be between 1 and 131071 bytes. */
@@ -163,7 +163,7 @@ export type DeleteKeyMaterialRequest = {
163163
* Region to target. If none is passed will use default region from the
164164
* config.
165165
*/
166-
region?: Region
166+
region?: ScwRegion
167167
/** ID of the key of which to delete the key material. */
168168
keyId: string
169169
}
@@ -173,7 +173,7 @@ export type DeleteKeyRequest = {
173173
* Region to target. If none is passed will use default region from the
174174
* config.
175175
*/
176-
region?: Region
176+
region?: ScwRegion
177177
/** ID of the key to delete. */
178178
keyId: string
179179
}
@@ -183,7 +183,7 @@ export type DisableKeyRequest = {
183183
* Region to target. If none is passed will use default region from the
184184
* config.
185185
*/
186-
region?: Region
186+
region?: ScwRegion
187187
/** ID of the key to disable. */
188188
keyId: string
189189
}
@@ -193,7 +193,7 @@ export type EnableKeyRequest = {
193193
* Region to target. If none is passed will use default region from the
194194
* config.
195195
*/
196-
region?: Region
196+
region?: ScwRegion
197197
/** ID of the key to enable. */
198198
keyId: string
199199
}
@@ -203,7 +203,7 @@ export type EncryptRequest = {
203203
* Region to target. If none is passed will use default region from the
204204
* config.
205205
*/
206-
region?: Region
206+
region?: ScwRegion
207207
/** ID of the key to encrypt. */
208208
keyId: string
209209
/** Data size must be between 1 and 65535 bytes. */
@@ -227,7 +227,7 @@ export type GenerateDataKeyRequest = {
227227
* Region to target. If none is passed will use default region from the
228228
* config.
229229
*/
230-
region?: Region
230+
region?: ScwRegion
231231
/** ID of the key. */
232232
keyId: string
233233
/**
@@ -248,7 +248,7 @@ export type GetKeyRequest = {
248248
* Region to target. If none is passed will use default region from the
249249
* config.
250250
*/
251-
region?: Region
251+
region?: ScwRegion
252252
/** ID of the key to target. */
253253
keyId: string
254254
}
@@ -258,17 +258,18 @@ export type ImportKeyMaterialRequest = {
258258
* Region to target. If none is passed will use default region from the
259259
* config.
260260
*/
261-
region?: Region
262-
/** The key's origin must be 'external'. */
261+
region?: ScwRegion
262+
/** The key's origin must be `external`. */
263263
keyId: string
264264
/**
265265
* The key material The key material is a random sequence of bytes used to
266266
* derive a cryptographic key.
267267
*/
268268
keyMaterial: string
269269
/**
270-
* A salt can be used to improve the quality of randomness when the key
271-
* material is generated from a low entropy source.
270+
* A salt is random data added to key material to ensure unique derived keys,
271+
* even if the input is similar. It helps strengthen security when the key
272+
* material has low randomness (low entropy).
272273
*/
273274
salt?: string
274275
}
@@ -278,7 +279,7 @@ export type ListKeysRequest = {
278279
* Region to target. If none is passed will use default region from the
279280
* config.
280281
*/
281-
region?: Region
282+
region?: ScwRegion
282283
/** (Optional) Filter by Organization ID. */
283284
organizationId?: string
284285
/** (Optional) Filter by Project ID. */
@@ -304,7 +305,7 @@ export type ProtectKeyRequest = {
304305
* Region to target. If none is passed will use default region from the
305306
* config.
306307
*/
307-
region?: Region
308+
region?: ScwRegion
308309
/** ID of the key to apply key protection to. */
309310
keyId: string
310311
}
@@ -314,7 +315,7 @@ export type RotateKeyRequest = {
314315
* Region to target. If none is passed will use default region from the
315316
* config.
316317
*/
317-
region?: Region
318+
region?: ScwRegion
318319
/** ID of the key to rotate. */
319320
keyId: string
320321
}
@@ -324,7 +325,7 @@ export type UnprotectKeyRequest = {
324325
* Region to target. If none is passed will use default region from the
325326
* config.
326327
*/
327-
region?: Region
328+
region?: ScwRegion
328329
/** ID of the key to remove key protection from. */
329330
keyId: string
330331
}
@@ -334,7 +335,7 @@ export type UpdateKeyRequest = {
334335
* Region to target. If none is passed will use default region from the
335336
* config.
336337
*/
337-
region?: Region
338+
region?: ScwRegion
338339
/** ID of the key to update. */
339340
keyId: string
340341
/** (Optional) Updated name of the key. */

0 commit comments

Comments
 (0)