Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/clients/src/api/secret/v1alpha1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export class API extends ParentAPI {
request.region ?? this.client.settings.defaultRegion,
)}/secrets`,
urlParams: urlParams(
['is_ephemeral', request.isEphemeral],
['is_managed', request.isManaged],
['name', request.name],
['order_by', request.orderBy ?? 'name_asc'],
Expand Down
1 change: 1 addition & 0 deletions packages/clients/src/api/secret/v1alpha1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export type {
Product,
ProtectSecretRequest,
Secret,
SecretEphemeralAction,
SecretStatus,
SecretType,
SecretVersion,
Expand Down
5 changes: 5 additions & 0 deletions packages/clients/src/api/secret/v1alpha1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ export const unmarshalSecret = (data: unknown) => {
return {
createdAt: unmarshalDate(data.created_at),
description: data.description,
ephemeralAction: data.ephemeral_action,
expiresAt: unmarshalDate(data.expires_at),
id: data.id,
isEphemeral: data.is_ephemeral,
isManaged: data.is_managed,
isProtected: data.is_protected,
name: data.name,
Expand Down Expand Up @@ -182,6 +185,8 @@ export const marshalCreateSecretRequest = (
defaults: DefaultValues,
): Record<string, unknown> => ({
description: request.description,
ephemeral_action: request.ephemeralAction ?? 'unknown_ephemeral_action',
expires_at: request.expiresAt,
name: request.name,
path: request.path,
project_id: request.projectId ?? defaults.defaultProjectId,
Expand Down
26 changes: 26 additions & 0 deletions packages/clients/src/api/secret/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ export type ListSecretsRequestOrderBy =

export type Product = 'unknown'

export type SecretEphemeralAction =
| 'unknown_ephemeral_action'
| 'delete_secret'
| 'disable_secret'

export type SecretStatus = 'ready' | 'locked'

export type SecretType =
Expand Down Expand Up @@ -142,6 +147,18 @@ export interface Secret {
type: SecretType
/** Path of the secret. Location of the secret in the directory structure. */
path: string
/**
* Expiration date of the secret. (Optional.) Date on which the secret will be
* deleted or deactivated.
*/
expiresAt?: Date
/**
* Action to be taken when the secret expires. See `Secret.EphemeralAction`
* enum for description of values.
*/
ephemeralAction: SecretEphemeralAction
/** Returns `true` for secrets that are ephemeral. */
isEphemeral: boolean
/** Region of the secret. */
region: Region
}
Expand Down Expand Up @@ -196,6 +213,13 @@ export type CreateSecretRequest = {
* structure. If not specified, the path is `/`.
*/
path?: string
/**
* Expiration date of the secret. (Optional.) Date on which the secret will be
* deleted or deactivated.
*/
expiresAt?: Date
/** Action to be taken when the secret expires. */
ephemeralAction?: SecretEphemeralAction
}

export type CreateFolderRequest = {
Expand Down Expand Up @@ -282,6 +306,8 @@ export type ListSecretsRequest = {
isManaged?: boolean
/** Filter by path (optional). */
path?: string
/** Filter by ephemeral / not ephemeral (optional). */
isEphemeral?: boolean
}

export type ListFoldersRequest = {
Expand Down