import { ODataHttpClient } from "@odata2ts/http-client-api"; import { ODataEntityModelResponseV2, ODataModelResponseV4 } from "@odata2ts/odata-core"; import { ModelQueryBuilderV2 } from "@odata2ts/odata-query-builder"; import { QueryObjectModel } from "@odata2ts/odata-query-objects"; import { ODataServiceOptionsInternalV2 } from "../ODataServiceOptions"; import { UrlBuilderRequestCmdV2, UrlBuilderWriteRequestCmdV2, UrlWriteRequestCmd } from "../request"; import { ServiceStateHelperV2 } from "./ServiceStateHelperV2.js"; /** * Service for a single, already addressed entity: it updates, patches, deletes and reads it, but never * creates one - that is the entity set's business. So the only write shape it needs is `UpdatableT`, * the model without the properties that cannot change after creation. Creating an entity goes through * {@link EntitySetServiceV2}, which takes the editable model instead. */ export declare class EntityTypeServiceV2 { protected readonly __base: ServiceStateHelperV2; protected constructor(client: ODataHttpClient, basePath: string, name: string, qModel: Q, options?: ODataServiceOptionsInternalV2); getPath(): string; /** * Patch (partially update) the current entity. * Spec: {@link https://www.odata.org/documentation/odata-version-2-0/operations/} - 2.6 Updating Entries * * While the method is called `patch` to align with V4, under the hood a `MERGE` request is sent. * The service should respond with status 204 and no data. * * @param model */ patch(model: Partial, queryFn?: (builder: ModelQueryBuilderV2, qObject: Q) => void): UrlBuilderWriteRequestCmdV2, Partial>; /** * Update the current entity. * Spec: {@link https://www.odata.org/documentation/odata-version-2-0/operations/} - 2.6 Updating Entries * * The service should respond with status 204 and no data. * * @param model */ update(model: UpdatableT, queryFn?: (builder: ModelQueryBuilderV2, qObject: Q) => void): UrlBuilderWriteRequestCmdV2, UpdatableT>; /** * Delete the current entity. * Spec: {@link https://www.odata.org/documentation/odata-version-2-0/operations/} - 2.8 Deleting Entries * * The service should respond with status 204 and no data. */ delete(): UrlWriteRequestCmd; query = T>(queryFn?: (builder: ModelQueryBuilderV2, qObject: Q) => void): UrlBuilderRequestCmdV2 : ODataEntityModelResponseV2, Q, ModelQueryBuilderV2, undefined>; }