import { Observable } from "rxjs/internal/Observable"; import { IDataObject } from "../data"; import { IObjectBuilder } from "./object-builder"; /** * Creates, modifies and deletes objects */ export interface IModifier { /** * Creates a new object * * @param id New object id * @param parentId Parent id * @param typeId Creating object's type id * @return Fluent interface that enables you to modify created object */ create(id: string, parentId: string, typeId: number): IObjectBuilder; /** * Edits existing object * * @param id Id of object to modify * @returns Fluent interface that enables you to modify created object */ edit(id: string): IObjectBuilder; /** * Applies all the changes have been made in modifier * * @returns Created and edited objects wrapped in cold Observable */ apply(): Observable; }