UNPKG

@sap-cloud-sdk/core

Version:
33 lines 2.02 kB
import { Constructable, EntityIdentifiable, Entity } from '../entity'; import { Selectable } from '../selectable/selectable'; import { ODataGetAllRequestConfig } from '../request/odata-get-all-request-config'; import { MethodRequestBuilder } from '../request-builder/request-builder-base'; import { ODataGetByKeyRequestConfig } from '../request'; import { Destination, DestinationNameAndJwt, DestinationOptions } from '../../connectivity/scp-cf/destination'; import { HttpResponse } from '../../http-client'; export declare abstract class GetRequestBuilder<EntityT extends Entity, RequestConfigT extends ODataGetAllRequestConfig<EntityT> | ODataGetByKeyRequestConfig<EntityT>> extends MethodRequestBuilder<RequestConfigT> implements EntityIdentifiable<EntityT> { readonly _entityConstructor: Constructable<EntityT>; readonly _entity: EntityT; /** * Creates an instance of GetAllRequestBuilder. * @param _entityConstructor - Constructor of the entity to create the request for. * @param requestConfig - Request config of the get all or get by key request. */ constructor(_entityConstructor: Constructable<EntityT>, requestConfig: RequestConfigT); /** * Restrict the response to the given selection of properties in the request. * @param selects - Fields to select in the request. * @returns The request builder itself, to facilitate method chaining. */ select(...selects: Selectable<EntityT>[]): this; select(selects: Selectable<EntityT>[]): this; /** * Execute request and return an [[HttpResponse]]. * @param destination - Destination to execute the request against * @param options - Options to employ when fetching destinations * @returns A promise resolving to an [[HttpResponse]]. */ executeRaw(destination: Destination | DestinationNameAndJwt, options?: DestinationOptions): Promise<HttpResponse>; } export { GetRequestBuilder as GetRequestBuilderBase }; //# sourceMappingURL=get-request-builder-base.d.ts.map