1 | import { DestinationOptions, Destination, DestinationNameAndJwt } from '../../connectivity/scp-cf';
|
2 | import { ODataCreateRequestConfig } from '../request';
|
3 | import { HttpResponse } from '../../http-client';
|
4 | import type { EntitySerializer } from '../entity-serializer';
|
5 | import type { ODataUri } from '../uri-conversion/odata-uri';
|
6 | import type { Constructable, Entity, EntityIdentifiable } from '../entity';
|
7 | import type { EntityDeserializer } from '../entity-deserializer';
|
8 | import type { ResponseDataAccessor } from '../response-data-accessor';
|
9 | import type { Link } from '../selectable';
|
10 | import { MethodRequestBuilder } from './request-builder-base';
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export declare abstract class CreateRequestBuilder<EntityT extends Entity> extends MethodRequestBuilder<ODataCreateRequestConfig<EntityT>> implements EntityIdentifiable<EntityT> {
|
16 | readonly _entityConstructor: Constructable<EntityT>;
|
17 | readonly _entity: EntityT;
|
18 | readonly odataUri: ODataUri;
|
19 | readonly serializer: EntitySerializer;
|
20 | readonly deserializer: EntityDeserializer;
|
21 | readonly responseDataAccessor: ResponseDataAccessor;
|
22 | |
23 |
|
24 |
|
25 |
|
26 |
|
27 | constructor(_entityConstructor: Constructable<EntityT>, _entity: EntityT, odataUri: ODataUri, serializer: EntitySerializer, deserializer: EntityDeserializer, responseDataAccessor: ResponseDataAccessor);
|
28 | get entity(): EntityT;
|
29 | /**
|
30 | * @deprecated Since v1.29.0. This method should never be called, it has severe side effects. * Builds the payload of the query.
|
31 | * @returns the builder itself
|
32 | */
|
33 | prepare(): this;
|
34 | /**
|
35 | * Specifies the parent of the entity to create.
|
36 | * @param parentEntity - Parent of the entity to create
|
37 | * @param linkField - Static representation of the navigation property that navigates from the parent entity to the child entity
|
38 | * @returns The entity itself, to facilitate method chaining
|
39 | */
|
40 | asChildOf<ParentEntityT extends Entity>(parentEntity: ParentEntityT, linkField: Link<ParentEntityT, EntityT>): this;
|
41 | /**
|
42 | * Execute query.
|
43 | * @param destination - Destination to execute the request against
|
44 | * @param options - Options to employ when fetching destinations
|
45 | * @returns A promise resolving to the created entity
|
46 | */
|
47 | execute(destination: Destination | DestinationNameAndJwt, options?: DestinationOptions): Promise<EntityT>;
|
48 | /**
|
49 | * Execute request and return an [[HttpResponse]].
|
50 | * @param destination - Destination to execute the request against
|
51 | * @param options - Options to employ when fetching destinations
|
52 | * @returns A promise resolving to an [[HttpResponse]].
|
53 | */
|
54 | executeRaw(destination: Destination | DestinationNameAndJwt, options?: DestinationOptions): Promise<HttpResponse>;
|
55 | }
|
56 | export { CreateRequestBuilder as CreateRequestBuilderBase };
|
57 |
|
\ | No newline at end of file |