@sap-cloud-sdk/odata-common
Version:
SAP Cloud SDK for JavaScript common functions of OData client generator and OpenAPI clint generator.
32 lines (31 loc) • 1.4 kB
TypeScript
import { ODataRequestConfig } from './odata-request-config';
import type { EntityBase } from '../entity-base';
import type { ODataUri } from '../uri-conversion';
import type { Link } from '../selectable';
import type { DeSerializers } from '../de-serializers';
import type { EntityApi } from '../entity-api';
/**
* OData create request configuration for an entity type.
* @typeParam EntityT - Type of the entity to setup a request for
*/
export declare class ODataCreateRequestConfig<EntityT extends EntityBase, DeSerializersT extends DeSerializers> extends ODataRequestConfig {
readonly entityApi: EntityApi<EntityT, DeSerializersT>;
private oDataUri;
/**
* Keys of the parent of the entity to create. Defined only when attempting to create child entities.
*/
parentKeys: Record<string, any>;
/**
* Field that links the parent entity class to the child entity class.
*/
childField: Link<EntityBase, DeSerializersT, EntityApi<EntityT, any>>;
/**
* Creates an instance of ODataRequest.
* @param entityApi - Entity API for building and executing the request.
* @param oDataUri - URI conversion functions.
*/
constructor(entityApi: EntityApi<EntityT, DeSerializersT>, oDataUri: ODataUri<DeSerializersT>);
resourcePath(): string;
queryParameters(): Record<string, any>;
protected resourcePathAsChild(): string;
}