UNPKG

@sap-cloud-sdk/core

Version:
34 lines 1.93 kB
import { Constructable, EntityIdentifiable, UpdateRequestBuilder as UpdateRequestBuilderBase } from '../../odata-common'; import { Entity } from '../entity'; import { Destination, DestinationNameAndJwt, DestinationOptions } from '../../connectivity/scp-cf'; import { HttpResponse } from '../../http-client'; /** * Create OData query to update an entity. * @typeparam EntityT - Type of the entity to be updated */ export declare class UpdateRequestBuilder<EntityT extends Entity> extends UpdateRequestBuilderBase<EntityT> implements EntityIdentifiable<EntityT> { readonly _entityConstructor: Constructable<EntityT>; readonly _entity: EntityT; /** * Creates an instance of UpdateRequestBuilder. * @param _entityConstructor - Constructor type of the entity to be updated * @param _entity - Entity to be updated */ constructor(_entityConstructor: Constructable<EntityT>, _entity: EntityT); /** * Executes the query. * @param destination - Destination to execute the request against * @param options - Options to employ when fetching destinations * @returns A promise resolving to the entity once it was updated */ execute(destination: Destination | DestinationNameAndJwt, options?: DestinationOptions): Promise<EntityT>; /** * Execute request and return an [[HttpResponse]]. The request is only executed if some properties of the entity are modified. * @param destination - Destination to execute the request against * @param options - Options to employ when fetching destinations * @returns A promise resolving to an [[HttpResponse]] when the request is executed or `undefined` otherwise. */ executeRaw(destination: Destination | DestinationNameAndJwt, options?: DestinationOptions): Promise<HttpResponse | undefined>; } export { UpdateRequestBuilder as UpdateRequestBuilderV2 }; //# sourceMappingURL=update-request-builder.d.ts.map