File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 2626 DeleteSingleDocumentParameters ,
2727 DirtyValuesParameters ,
2828 DocumentSchema ,
29+ RetrieveParameters ,
2930)
3031
3132if sys .version_info >= (3 , 11 ):
@@ -67,7 +68,10 @@ def __init__(
6768 self .collection_name = collection_name
6869 self .document_id = document_id
6970
70- def retrieve (self ) -> TDoc :
71+ def retrieve (
72+ self ,
73+ retrieve_parameters : typing .Union [RetrieveParameters , None ] = None ,
74+ ) -> TDoc :
7175 """
7276 Retrieve this specific document.
7377
@@ -78,6 +82,7 @@ def retrieve(self) -> TDoc:
7882 endpoint = self ._endpoint_path ,
7983 entity_type = typing .Dict [str , str ],
8084 as_json = True ,
85+ params = retrieve_parameters ,
8186 )
8287 return response
8388
Original file line number Diff line number Diff line change @@ -889,3 +889,16 @@ class DeleteResponse(typing.TypedDict):
889889 """
890890
891891 num_deleted : int
892+
893+
894+ class RetrieveParameters (typing .TypedDict ):
895+ """
896+ Parameters for retrieving documents.
897+
898+ Attributes:
899+ include_fields (str): Fields to include in the retrieved documents.
900+ exclude_fields (str): Fields to exclude from the retrieved documents.
901+ """
902+
903+ include_fields : typing .NotRequired [typing .Union [str , typing .List [str ]]]
904+ exclude_fields : typing .NotRequired [typing .Union [str , typing .List [str ]]]
You can’t perform that action at this time.
0 commit comments