@@ -915,23 +915,42 @@ class DeleteSingleDocumentParameters(typing.TypedDict):
915915 ignore_not_found : typing .NotRequired [bool ]
916916
917917
918- class DeleteQueryParameters (typing .TypedDict ):
918+ class TruncateDeleteParameters (typing .TypedDict ):
919919 """
920- Parameters for deleting documents.
920+ Parameters for truncating a collection (deleting all documents, keeping schema).
921+
922+ Attributes:
923+ truncate (bool): Truncate the collection, keeping just the schema.
924+ """
925+
926+ truncate : bool
927+
928+
929+ class FilterDeleteParameters (typing .TypedDict ):
930+ """
931+ Parameters for deleting documents by filter.
921932
922933 Attributes:
923- truncate (str): Truncate the collection, keeping just the schema.
924934 filter_by (str): Filter to apply to documents.
925935 batch_size (int): Batch size for deleting documents.
926936 ignore_not_found (bool): Ignore not found documents.
927937 """
928938
929- truncate : typing .NotRequired [bool ]
930939 filter_by : str
931940 batch_size : typing .NotRequired [int ]
932941 ignore_not_found : typing .NotRequired [bool ]
933942
934943
944+ DeleteQueryParameters = typing .Union [TruncateDeleteParameters , FilterDeleteParameters ]
945+ """
946+ Discriminated union of parameters for deleting documents.
947+
948+ Either:
949+ - TruncateDeleteParameters: Use truncate to delete all documents, keeping the schema.
950+ - FilterDeleteParameters: Use filter_by (and optionally batch_size, ignore_not_found) to delete specific documents.
951+ """
952+
953+
935954class DeleteResponse (typing .TypedDict ):
936955 """
937956 Response from deleting documents.
0 commit comments