Represents a single subresponse to a changeset request within a batch request.

interface WriteResponse<DeSerializersT extends DeSerializers> {
    as?: <EntityT extends EntityBase>(
        entityApi: EntityApi<EntityT, DeSerializersT>,
    ) => EntityT;
    body?: Record<string, any>;
    httpCode: number;
    responseType: "WriteResponse";
    type?: EntityApi<EntityBase, DeSerializersT>;
}

Type Parameters

  • DeSerializersT extends DeSerializers

    Type of the (de-)serializers.

Properties

as?: <EntityT extends EntityBase>(
    entityApi: EntityApi<EntityT, DeSerializersT>,
) => EntityT

Transform the raw string body into an instance of the given constructor. Note that the response may not exist, so you should only call this method if you know that there is data.

body?: Record<string, any>

HTTP raw body.

httpCode: number

HTTP response status code.

responseType: "WriteResponse"

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.