Interface containing the functions to extract the data from the response object. For example the getCollectionResult extracts the data from data.d.results per default but this needs to be adjusted in some situations.

Hierarchy

  • ResponseDataAccessor

Properties

getCollectionResult: ((data: any) => any[])

Type declaration

    • (data: any): any[]
    • A function that extracts array data from the response object. The data is extracted per default from data.d.results.

      Parameters

      • data: any

      Returns any[]

getLinkedCollectionResult: ((data: any) => any[])

Type declaration

    • (data: any): any[]
    • Extract the collection data from the one-to-many link response. If the data does not contain a collection, an empty array is returned.

      Parameters

      • data: any

      Returns any[]

getSingleResult: ((data: any) => Record<string, any>)

Type declaration

    • (data: any): Record<string, any>
    • A function that extracts object data from the response object. The data is extracted by default from data.d.results.

      Parameters

      • data: any

      Returns Record<string, any>

isCollectionResult: ((data: any) => boolean)

Type declaration

    • (data: any): boolean
    • Checks if the response is an array-like object.

      Parameters

      • data: any

      Returns boolean

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