UNPKG

1.34 kBTypeScriptView Raw
1import { Constructable, EntityIdentifiable, FieldType, GetByKeyRequestBuilder as GetByKeyRequestBuilderBase } from '../../odata-common';
2import { Entity } from '../entity';
3/**
4 * Create an OData request to get a single entity based on its key properties.
5 * The properties available in the response can be restricted by creating a [[GetAllRequestBuilder.select selection]], where no selection is equal to selecting all fields.
6 * Note that navigational properties are automatically expanded if they included in a select.
7 * @typeparam EntityT - Type of the entity to be requested
8 */
9export declare class GetByKeyRequestBuilder<EntityT extends Entity> extends GetByKeyRequestBuilderBase<EntityT> implements EntityIdentifiable<EntityT> {
10 readonly _entityConstructor: Constructable<EntityT>;
11 readonly _entity: EntityT;
12 /**
13 * Creates an instance of GetByKeyRequestBuilder.
14 * @param _entityConstructor - Constructor of the entity to create the request for
15 * @param keys - Key-value pairs where the key is the name of a key property of the given entity and the value is the respective value
16 */
17 constructor(_entityConstructor: Constructable<EntityT>, keys: Record<string, FieldType>);
18}
19export { GetByKeyRequestBuilder as GetByKeyRequestBuilderV2 };
20//# sourceMappingURL=get-by-key-request-builder.d.ts.map
\No newline at end of file