UNPKG

@sap-cloud-sdk/core

Version:
35 lines 1.98 kB
import { Entity } from '../entity'; import { MethodRequestBuilder } from '../request-builder/request-builder-base'; import { DestinationOptions, Destination, DestinationNameAndJwt } from '../../connectivity/scp-cf'; import { ODataCountRequestConfig } from '../request/odata-count-request-config'; import { HttpResponse } from '../../http-client'; import type { GetAllRequestBuilder } from './get-all-request-builder-base'; /** * Create an OData request to count entities based on the configuration of the request. * A `CountRequestBuilder` allows only for execution of the request. * If you want to apply query parameters like filter, skip or top do it on the [[GetAllRequestBuilder]] the count is created from. * @typeparam EntityT - Type of the entity to be requested */ export declare class CountRequestBuilder<EntityT extends Entity> extends MethodRequestBuilder<ODataCountRequestConfig<EntityT>> { readonly getAllRequest: GetAllRequestBuilder<EntityT>; /** * Creates an instance of CountRequestBuilder. * @param _entityConstructor - Constructor of the entity to create the request for */ constructor(getAllRequest: GetAllRequestBuilder<EntityT>); /** * Execute request. * @param destination - Destination to execute the request against * @param options - Options to employ when fetching destinations * @returns A promise resolving to the number of entities */ execute(destination: Destination | DestinationNameAndJwt, options?: DestinationOptions): Promise<number>; /** * 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>; } //# sourceMappingURL=count-request-builder.d.ts.map