Skip to content

Commit 0f8a14f

Browse files
committed
feat: view secret value permission compatability
1 parent 5e22583 commit 0f8a14f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

infisical_sdk/api_types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ class BaseSecret(BaseModel):
7474
createdAt: str
7575
updatedAt: str
7676
secretMetadata: Optional[Dict[str, Any]] = None
77+
secretValueHidden: Optional[bool] = False
7778
secretReminderNote: Optional[str] = None
7879
secretReminderRepeatDays: Optional[int] = None
7980
skipMultilineEncoding: Optional[bool] = False

infisical_sdk/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ def list_secrets(
209209
environment_slug: str,
210210
secret_path: str,
211211
expand_secret_references: bool = True,
212+
view_secret_value: bool = True,
212213
recursive: bool = False,
213214
include_imports: bool = True,
214215
tag_filters: List[str] = []) -> ListSecretsResponse:
@@ -217,6 +218,7 @@ def list_secrets(
217218
"workspaceId": project_id,
218219
"environment": environment_slug,
219220
"secretPath": secret_path,
221+
"viewSecretValue": str(view_secret_value).lower(),
220222
"expandSecretReferences": str(expand_secret_references).lower(),
221223
"recursive": str(recursive).lower(),
222224
"include_imports": str(include_imports).lower(),
@@ -241,10 +243,12 @@ def get_secret_by_name(
241243
secret_path: str,
242244
expand_secret_references: bool = True,
243245
include_imports: bool = True,
246+
view_secret_value: bool = True,
244247
version: str = None) -> BaseSecret:
245248

246249
params = {
247250
"workspaceId": project_id,
251+
"viewSecretValue": str(view_secret_value).lower(),
248252
"environment": environment_slug,
249253
"secretPath": secret_path,
250254
"expandSecretReferences": str(expand_secret_references).lower(),

0 commit comments

Comments
 (0)