Add credentials table, CRUD endpoints, and credential parameter (#1767)

Co-authored-by: Muhammed Salih Altun <muhammedsalihaltun@gmail.com>
This commit is contained in:
Shuchang Zheng 2025-02-14 00:00:19 +08:00 committed by GitHub
parent b411af56a6
commit 4407c19417
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 394 additions and 1 deletions

View file

@ -43,6 +43,11 @@ class BitwardenLoginCredentialParameterYAML(ParameterYAML):
bitwarden_collection_id: str | None = None
class CredentialParameterYAML(ParameterYAML):
parameter_type: Literal[ParameterType.CREDENTIAL] = ParameterType.CREDENTIAL # type: ignore
credential_id: str
class BitwardenSensitiveInformationParameterYAML(ParameterYAML):
# There is a mypy bug with Literal. Without the type: ignore, mypy will raise an error:
# Parameter 1 of Literal[...] cannot be of type "Any"
@ -341,6 +346,7 @@ PARAMETER_YAML_SUBCLASSES = (
| WorkflowParameterYAML
| ContextParameterYAML
| OutputParameterYAML
| CredentialParameterYAML
)
PARAMETER_YAML_TYPES = Annotated[PARAMETER_YAML_SUBCLASSES, Field(discriminator="parameter_type")]