Interface EntityApi<EntityT, DeSerializersT>

Represents the API of an entity, including its request and entity builders as well as its schema.

Type of the entity without methods.

interface EntityApi<
    EntityT extends EntityBase,
    DeSerializersT extends DeSerializers = DefaultDeSerializers,
> {
    deSerializers: DeSerializersT;
    entityConstructor: Constructable<EntityT>;
    schema: Record<string, any>;
    customField<NullableT extends boolean>(
        fieldName: string,
    ): CustomField<EntityT, DeSerializersT, NullableT>;
    entityBuilder(): EntityBuilderType<EntityT, DeSerializersT>;
    requestBuilder(): RequestBuilder<EntityT, DeSerializersT>;
}

Type Parameters

Properties

deSerializers: DeSerializersT

Set of functions that determine (de-)serialization per EDM type.

entityConstructor: Constructable<EntityT>

Constructor function for the entity.

schema: Record<string, any>

Schema of the entity api.

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

Methods