import { Observable } from "rxjs";
import { tap } from "rxjs/operators";
import { Eno } from "./models/Eno";
import { IEnSrvOptions } from "./IEnSrvOptions";
import { send } from "./send";
import { checkBatchForError } from "./error";

export function writeMany(
  enos: Eno[],
  enSrvOptions: IEnSrvOptions
): Observable<any> {
  return send(enos, enSrvOptions).pipe(tap(checkBatchForError));
}
