Represents a response to a retrieve request within a batch request.

interface ReadResponseCommon<DeSerializersT> {
    as: (<EntityT>(entityApi) => EntityT[]);
    body: Record<string, any>;
    httpCode: number;
    isError: (() => this is ErrorResponse);
    isReadResponse: (() => this is ReadResponseCommon<DeSerializersT>);
    isSuccess: (() => this is ReadResponseCommon<DeSerializersT> | WriteResponsesCommon<DeSerializersT>);
    isWriteResponses: (() => this is WriteResponsesCommon<DeSerializersT>);
    responseType: "ReadResponse";
    type: EntityApi<EntityBase, DeSerializersT>;

Type Parameters

  • DeSerializersT extends DeSerializers

    Type of the (de-)serializers.



as: (<EntityT>(entityApi) => EntityT[])

Transform the raw data into an instance of an entity represented by the given entity API. Note, this method transforms the raw data to an array of entities, even if the original request was a GetByKeyRequestBuilder.

Type declaration

body: Record<string, any>

HTTP raw body.

httpCode: number

HTTP response status code.

isError: (() => this is ErrorResponse)

Type declaration

isReadResponse: (() => this is ReadResponseCommon<DeSerializersT>)

Type declaration

isWriteResponses: (() => this is WriteResponsesCommon<DeSerializersT>)

Type declaration

responseType: "ReadResponse"

Tag for identifying the type of a batch response.

EntityApi of the response data. Can be undefined for function/action imports or not mappable entities.

Copyright Ⓒ 2024 SAP SE or an SAP affiliate company. All rights reserved.