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

Type Parameters

  • DeSerializersT extends DeSerializers

    Type of the (de-)serializers.

Hierarchy

  • BatchResponseTypeGuards<DeSerializersT>
    • ReadResponseCommon

Properties

as: (<EntityT>(entityApi: EntityApi<EntityT, DeSerializersT>) => EntityT[])

Type declaration

    • <EntityT>(entityApi: EntityApi<EntityT, DeSerializersT>): 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 Parameters

      Parameters

      • entityApi: EntityApi<EntityT, DeSerializersT>

      Returns EntityT[]

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

isSuccess: (() => this is ReadResponseCommon<DeSerializersT> | WriteResponsesCommon<DeSerializersT>)

Type declaration

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

Type declaration

responseType: "ReadResponse"

Tag for identifying the type of a batch response.

type: EntityApi<EntityBase, DeSerializersT>

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

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