import { ODataHttpClient } from "@odata2ts/http-client-api"; import { ODataModelPayloadV4, ODataModelResponseV4 } from "@odata2ts/odata-core"; import { ModelQueryBuilderV4 } from "@odata2ts/odata-query-builder"; import { QueryObjectModel } from "@odata2ts/odata-query-objects"; import { ODataServiceOptionsInternal } from "../ODataServiceOptions"; import { UrlBuilderRequestCmdV4, UrlRequestCmd } from "../request"; import { EntityModificationResponseV4 } from "./ResponseTypeChoicesV4"; import { ServiceStateHelperV4, SubtypeOptions } from "./ServiceStateHelperV4.js"; export declare class EntityTypeServiceV4 { protected readonly __base: ServiceStateHelperV4; constructor(client: ClientType, basePath: string, name: string, qModel: Q, options?: ODataServiceOptionsInternal); getPath(): string; /** * Patch (partially update) the current entity. * Spec: {@link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_UpdateanEntity} * * The response of this operation is dependent on the `Prefer` header. * By default, you get 204 and no response data, while adding the prefer header with `Prefer: return=representation` * should yield status 200 with the proper and complete model. * * If you know in which way your server responds, you can easily supply this information via a boolean switch * to get the correct typing. `true` means that the complete entity is returned, while `false` (default) determines * that no data is returned, e.g. `patch(...)`. * * @param model * @param patchOptions */ patch(model: ODataModelPayloadV4>, patchOptions?: SubtypeOptions, queryFn?: (builder: ModelQueryBuilderV4, qObject: Q) => void): UrlBuilderRequestCmdV4, Q, ModelQueryBuilderV4, ODataModelPayloadV4>>; /** * Update the current entity. * Spec: {@link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_UpdateanEntity} * * The response of this operation is dependent on the `Prefer` header. * By default, you get 204 and no response data, while adding the prefer header with `Prefer: return=representation` * should yield status 200 with the proper and complete model. * * If you know in which way your server responds, you can easily supply this information via a boolean switch * to get the correct typing. `true` means that the complete entity is returned, while `false` (default) determines * that no data is returned, e.g. `update(...)`. * * @param model * @param updateOptions */ update(model: ODataModelPayloadV4, updateOptions?: SubtypeOptions, queryFn?: (builder: ModelQueryBuilderV4, qObject: Q) => void): UrlBuilderRequestCmdV4, Q, ModelQueryBuilderV4, ODataModelPayloadV4>; /** * Delete the current entity. * * Response status 204 and no content is expected. * * Spec: {@link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_DeleteanEntity} */ delete(): UrlRequestCmd; /** * Query the entity. * Get back the complete entity or shape the response structure via `select` and `expand`. * Spec: {@link https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_RequestingIndividualEntities} * * @param queryFn provide the query logic with the help of the builder and the query-object */ query = T>(queryFn?: (builder: ModelQueryBuilderV4, qObject: Q) => void): UrlBuilderRequestCmdV4, Q, ModelQueryBuilderV4, undefined>; }