import { variadicArgumentToArray } from '@sap-cloud-sdk/util' ; import { Destination , DestinationFetchOptions } from '@sap-cloud-sdk/connectivity' ; import { EntityApi , EntityBase } from '../entity-base' ; import { Selectable } from '../selectable' ; import { Orderable } from '../order' ; import { ODataGetAllRequestConfig } from '../request' ; import { EntityDeserializer } from '../entity-deserializer' ; import { ResponseDataAccessor } from '../response-data-accessor' ; import { DeSerializers } from '../de-serializers' ; import { CountRequestBuilder } from './count-request-builder' ; import { GetRequestBuilderBase } from './get-request-builder-base' ; typeparam internal export abstract class GetAllRequestBuilderBase < EntityT extends EntityBase , DeSerializersT extends DeSerializers > extends GetRequestBuilderBase < EntityT , DeSerializersT , ODataGetAllRequestConfig < EntityT , DeSerializersT > > { param entityApi param getAllRequestConfig param entityDeserializer param dataAccessor constructor ( entityApi , getAllRequestConfig , readonly entityDeserializer , readonly dataAccessor ) { super ( entityApi , getAllRequestConfig ) ; } param selects returns select ( ... selects ) ; select ( selects ) ; select ( first , ... rest ) { this . requestConfig . selects = variadicArgumentToArray ( first , rest ) ; return this ; } param orderBy returns orderBy ( orderBy ) ; orderBy ( ... orderBy ) ; orderBy ( first , ... rest ) { this . requestConfig . orderBy = variadicArgumentToArray ( first , rest ) ; return this ; } param top returns top ( top ) { this . requestConfig . top = top ; return this ; } param skip returns skip ( skip ) { this . requestConfig . skip = skip ; return this ; } returns count ( ) { return new CountRequestBuilder ( this ) ; } param destination param options returns async execute ( destination ) { return this . executeRaw ( destination ) . then ( response => this . dataAccessor . getCollectionResult ( response . data ) . map ( json => this . entityDeserializer . deserializeEntity ( json , this . _entityApi , response . headers ) ) ) ; } }