@sap-cloud-sdk/odata-v4
Version:
SAP Cloud SDK for JavaScript common functions of OData client generator and OpenAPI clint generator.
23 lines (22 loc) • 1.24 kB
TypeScript
import { DeleteRequestBuilderBase } from '@sap-cloud-sdk/odata-common/internal';
import type { EntityApi } from '@sap-cloud-sdk/odata-common/internal';
import type { DefaultDeSerializers, DeSerializers } from '../de-serializers';
import type { Entity } from '../entity';
/**
* Create OData query to delete an entity.
* @typeParam EntityT - Type of the entity to be deleted.
*/
export declare class DeleteRequestBuilder<EntityT extends Entity, DeSerializersT extends DeSerializers = DefaultDeSerializers> extends DeleteRequestBuilderBase<EntityT, DeSerializersT> {
/**
* Creates an instance of DeleteRequestBuilder. If the entity is passed, a version identifier will also be added.
* @param entityApi - Entity API for building and executing the request.
* @param keysOrEntity - Entity or key-value pairs of key properties for the given entity.
*/
constructor(entityApi: EntityApi<EntityT, DeSerializersT>, keysOrEntity: Record<string, any> | EntityT);
/**
* Add ETag version identifier in the delete request header.
* @param etag - The version identifier of the entity.
* @returns The builder itself, to facilitate method chaining.
*/
setVersionIdentifier(etag: string): this;
}