Skip to content

Commit ff391f1

Browse files
authored
feat(secret): add secret types in create secret request (#738)
1 parent f95713b commit ff391f1

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ export class API extends ParentAPI {
562562
)
563563

564564
/**
565-
* List tags. List all tags associated to secrets in one or several Projects.
565+
* List tags. List all tags associated with secrets within a given Project.
566566
*
567567
* @param request - The request {@link ListTagsRequest}
568568
* @returns A Promise of ListTagsResponse

packages/clients/src/api/secret/v1alpha1/index.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export type {
2929
Product,
3030
Secret,
3131
SecretStatus,
32+
SecretType,
3233
SecretVersion,
3334
SecretVersionStatus,
3435
UpdateSecretRequest,

packages/clients/src/api/secret/v1alpha1/marshalling.gen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const unmarshalSecret = (data: unknown) => {
4040
region: data.region,
4141
status: data.status,
4242
tags: data.tags,
43+
type: data.type,
4344
updatedAt: unmarshalDate(data.updated_at),
4445
versionCount: data.version_count,
4546
} as Secret
@@ -141,6 +142,7 @@ export const marshalCreateSecretRequest = (
141142
name: request.name,
142143
project_id: request.projectId ?? defaults.defaultProjectId,
143144
tags: request.tags,
145+
type: request.type ?? 'unknown_secret_type',
144146
})
145147

146148
export const marshalCreateSecretVersionRequest = (

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

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ export type Product = 'unknown'
1414

1515
export type SecretStatus = 'ready' | 'locked'
1616

17+
export type SecretType =
18+
| 'unknown_secret_type'
19+
| 'opaque'
20+
| 'network_edge_certificate'
21+
1722
export type SecretVersionStatus =
1823
| 'unknown'
1924
| 'enabled'
@@ -99,8 +104,10 @@ export interface Secret {
99104
versionCount: number
100105
/** Updated description of the secret. */
101106
description?: string
102-
/** True for secrets that are managed by another product. */
107+
/** Returns `true` for secrets that are managed by another product. */
103108
isManaged: boolean
109+
/** Type of the secret. See `Secret.Type` enum for description of values. */
110+
type: SecretType
104111
/** Region of the secret. */
105112
region: Region
106113
}
@@ -145,6 +152,11 @@ export type CreateSecretRequest = {
145152
tags?: string[]
146153
/** Description of the secret. */
147154
description?: string
155+
/**
156+
* Type of the secret. (Optional.) See `Secret.Type` enum for description of
157+
* values. If not specified, the type is `Opaque`.
158+
*/
159+
type?: SecretType
148160
}
149161

150162
export type GetSecretRequest = {
@@ -227,12 +239,9 @@ export type AddSecretOwnerRequest = {
227239
region?: Region
228240
/** ID of the secret. */
229241
secretId: string
230-
/**
231-
* @deprecated (Deprecated: use product field) ID of the product to add (see
232-
* product enum).
233-
*/
242+
/** @deprecated (Deprecated: use `product` field) Name of the product to add. */
234243
productName?: string
235-
/** ID of the product to add (see product enum). */
244+
/** ID of the product to add. See `Product` enum for description of values. */
236245
product?: Product
237246
}
238247

0 commit comments

Comments
 (0)