improvement: add secret metadata type

This commit is contained in:
Scott Wilson
2025-01-31 17:38:58 -08:00
parent 6d0534b165
commit 800d2c0454
@@ -317,6 +317,8 @@ interface GetSecretsEvent {
}; };
} }
type TSecretMetadata = { key: string; value: string }[];
interface GetSecretEvent { interface GetSecretEvent {
type: EventType.GET_SECRET; type: EventType.GET_SECRET;
metadata: { metadata: {
@@ -325,7 +327,7 @@ interface GetSecretEvent {
secretId: string; secretId: string;
secretKey: string; secretKey: string;
secretVersion: number; secretVersion: number;
secretMetadata?: unknown; secretMetadata?: TSecretMetadata;
}; };
} }
@@ -337,7 +339,7 @@ interface CreateSecretEvent {
secretId: string; secretId: string;
secretKey: string; secretKey: string;
secretVersion: number; secretVersion: number;
secretMetadata?: unknown; secretMetadata?: TSecretMetadata;
}; };
} }
@@ -346,7 +348,12 @@ interface CreateSecretBatchEvent {
metadata: { metadata: {
environment: string; environment: string;
secretPath: string; secretPath: string;
secrets: Array<{ secretId: string; secretKey: string; secretVersion: number; secretMetadata?: unknown }>; secrets: Array<{
secretId: string;
secretKey: string;
secretVersion: number;
secretMetadata?: TSecretMetadata;
}>;
}; };
} }
@@ -358,7 +365,7 @@ interface UpdateSecretEvent {
secretId: string; secretId: string;
secretKey: string; secretKey: string;
secretVersion: number; secretVersion: number;
secretMetadata?: unknown; secretMetadata?: TSecretMetadata;
}; };
} }
@@ -367,7 +374,7 @@ interface UpdateSecretBatchEvent {
metadata: { metadata: {
environment: string; environment: string;
secretPath: string; secretPath: string;
secrets: Array<{ secretId: string; secretKey: string; secretVersion: number; secretMetadata?: unknown }>; secrets: Array<{ secretId: string; secretKey: string; secretVersion: number; secretMetadata?: TSecretMetadata }>;
}; };
} }