Skip to content

Commit 377e7e8

Browse files
Update core to version be52bb12
1 parent ef6be31 commit 377e7e8

File tree

7 files changed

+280
-3
lines changed

7 files changed

+280
-3
lines changed
890 KB
Binary file not shown.
944 KB
Binary file not shown.
997 KB
Binary file not shown.
1.03 MB
Binary file not shown.
886 KB
Binary file not shown.

src/onepassword/secrets.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from .iterator import SDKIterator
55
from typing import Optional, List
66
from pydantic import TypeAdapter
7-
from .types import GeneratePasswordResponse, PasswordRecipe
7+
from .types import GeneratePasswordResponse, PasswordRecipe, ResolveAllResponse
88

99

1010
class Secrets:
@@ -35,6 +35,25 @@ async def resolve(self, secret_reference: str) -> str:
3535
response = TypeAdapter(str).validate_json(response)
3636
return response
3737

38+
async def resolve_all(self, secret_references: List[str]) -> ResolveAllResponse:
39+
"""
40+
Resolve takes in a list of secret references and returns the secrets they point to or errors if any.
41+
"""
42+
response = await _invoke(
43+
{
44+
"invocation": {
45+
"clientId": self.client_id,
46+
"parameters": {
47+
"name": "SecretsResolveAll",
48+
"parameters": {"secret_references": secret_references},
49+
},
50+
}
51+
}
52+
)
53+
54+
response = TypeAdapter(ResolveAllResponse).validate_json(response)
55+
return response
56+
3857
@staticmethod
3958
def validate_secret_reference(secret_reference: str) -> None:
4059
"""

0 commit comments

Comments
 (0)