import { DestinationOptions, Destination, DestinationNameAndJwt } from '../../connectivity/scp-cf'; import { ODataCreateRequestConfig } from '../request'; import { HttpResponse } from '../../http-client'; import type { EntitySerializer } from '../entity-serializer'; import type { ODataUri } from '../uri-conversion/odata-uri'; import type { Constructable, Entity, EntityIdentifiable } from '../entity'; import type { EntityDeserializer } from '../entity-deserializer'; import type { ResponseDataAccessor } from '../response-data-accessor'; import type { Link } from '../selectable'; import { MethodRequestBuilder } from './request-builder-base'; /** * Abstract create request class holding the parts shared in OData v2 and v4. * @typeparam EntityT - Type of the entity to be created */ export declare abstract class CreateRequestBuilder extends MethodRequestBuilder> implements EntityIdentifiable { readonly _entityConstructor: Constructable; readonly _entity: EntityT; readonly odataUri: ODataUri; readonly serializer: EntitySerializer; readonly deserializer: EntityDeserializer; readonly responseDataAccessor: ResponseDataAccessor; /** * Creates an instance of CreateRequestBuilder. * @param _entityConstructor - Constructor type of the entity to be created * @param _entity - Entity to be created */ constructor(_entityConstructor: Constructable, _entity: EntityT, odataUri: ODataUri, serializer: EntitySerializer, deserializer: EntityDeserializer, responseDataAccessor: ResponseDataAccessor); get entity(): EntityT; /** * @deprecated Since v1.29.0. This method should never be called, it has severe side effects. * Builds the payload of the query. * @returns the builder itself */ prepare(): this; /** * Specifies the parent of the entity to create. * @param parentEntity - Parent of the entity to create * @param linkField - Static representation of the navigation property that navigates from the parent entity to the child entity * @returns The entity itself, to facilitate method chaining */ asChildOf(parentEntity: ParentEntityT, linkField: Link): this; /** * Execute query. * @param destination - Destination to execute the request against * @param options - Options to employ when fetching destinations * @returns A promise resolving to the created entity */ execute(destination: Destination | DestinationNameAndJwt, options?: DestinationOptions): Promise; /** * Execute request and return an [[HttpResponse]]. * @param destination - Destination to execute the request against * @param options - Options to employ when fetching destinations * @returns A promise resolving to an [[HttpResponse]]. */ executeRaw(destination: Destination | DestinationNameAndJwt, options?: DestinationOptions): Promise; } export { CreateRequestBuilder as CreateRequestBuilderBase }; //# sourceMappingURL=create-request-builder-base.d.ts.map