import { BaseRestStore, RequestOptions } from './BaseRestStore.js'; import { IndexableThing, AsyncWritableStore, CreateOptions } from '../api/Store.js'; import 'apprt-fetch'; import '../api/ComplexQueryLang.js'; import '@arcgis/core/geometry/Geometry'; import 'apprt-core/Events'; /** * Extends the Base Store implementation with write methods (put/add/delete). */ declare class BaseWriteableRestStore extends BaseRestStore implements AsyncWritableStore { /** * Executes a PUT HTTP request if an id is provided in the item or the options. * Executes a POST HTTP request if no id is provided. * @param item data to send to the backend. * @param options additional options. * @returns the result of the server, normally the new created/updated item. */ put(item: Partial, options?: CreateOptions & RequestOptions): Promise; /** * Adds an object. This will trigger a POST request to the server * if the object has no id. If it has an id a PUT request is executed. * It is much the same as the put method. * You can suppress the switching to put by marking the id as undefined in the options. * @example * const item = { id: 1, name : "hello"}; * // this will still execute a POST request * store.add(item, {id: undefined}); */ add(item: Partial, options?: CreateOptions & RequestOptions): Promise; /** * Deletes an object by its identity. * This will trigger a DELETE request to the server. */ remove(id: IDType, options?: CreateOptions & RequestOptions): Promise; } export { BaseWriteableRestStore };