type operation = | Create of {if_match : string option;if_none_match : string option;body : string;
}| Upsert of {if_match : string option;if_none_match : string option;body : string;
}| Read of {id : string;if_match : string option;if_none_match : string option;
}| Delete of {id : string;if_match : string option;if_none_match : string option;
}| Replace of {id : string;if_match : string option;if_none_match : string option;body : string;
}| Patch of {id : string;if_match : string option;patch_op : patch_operation;
}
and patch_operation = | Add of {path : string;value : string;
}| Set of {path : string;value : string;
}| ReplacePath of {path : string;value : string;
}| Remove of {path : string;
}| Increment of {path : string;value : int;
}
type operation_result = {status_code : int;request_charge : float;etag : string option;resource_body : string option;
}type batch_result = {outcomes : operation_result list;total_request_charge : float;
}type validation_error = batch_validation_error = | Too_many_operations of int| Mixed_patch_operations| Empty_batch
val execute :
?timeout:float ->
?atomic:bool ->
?should_validate:bool ->
partition_key:string ->
string ->
string ->
operation list ->
(batch_result, cosmos_error) Stdlib.result Lwt.t