1 | import { ODataVersion } from '@sap-cloud-sdk/util';
|
2 | import { EdmTypeShared } from '../edm-types';
|
3 | import { Constructable, Entity } from '../entity';
|
4 | import { Field, FieldOptions } from './field';
|
5 | import { ComplexTypeNamespace } from './complex-type-namespace';
|
6 | import type { ConstructorOrField } from './constructor-or-field';
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | export declare abstract class ComplexTypeField<EntityT extends Entity, ComplexT = any, NullableT extends boolean = false, SelectableT extends boolean = false> extends Field<EntityT, NullableT, SelectableT> {
|
24 | readonly fieldOf: ConstructorOrField<EntityT, ComplexT>;
|
25 | |
26 |
|
27 |
|
28 |
|
29 |
|
30 | readonly complexTypeName?: string;
|
31 | |
32 |
|
33 |
|
34 | readonly _complexType: ComplexTypeNamespace<ComplexT>;
|
35 | |
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 | constructor(fieldName: string, entityConstructor: Constructable<EntityT>, complexTypeName: string);
|
44 | /**
|
45 | * @deprecated Since v1.27.0. Use other constructors instead.
|
46 | * Creates an instance of ComplexTypeField.
|
47 | * @param fieldName - Actual name of the field as used in the OData request.
|
48 | * @param fieldOf - Either the parent entity constructor of the parent complex type this field belongs to.
|
49 | */
|
50 | constructor(fieldName: string, fieldOf: ConstructorOrField<EntityT, ComplexT>);
|
51 | /**
|
52 | * Creates an instance of ComplexTypeField.
|
53 | * @param fieldName - Actual name of the field as used in the OData request.
|
54 | * @param fieldOf - Either the parent entity constructor of the parent complex type this field belongs to.
|
55 | * @param complexType - The complex type of the complex type property represented by this.
|
56 | * @param fieldOptions - Optional settings for this field.
|
57 | */
|
58 | constructor(fieldName: string, fieldOf: ConstructorOrField<EntityT, ComplexT>, complexType: ComplexTypeNamespace<ComplexT>, fieldOptions?: FieldOptions<NullableT, SelectableT>);
|
59 | /**
|
60 | * Gets the path to the complex type property represented by this.
|
61 | * @returns The path to the complex type property.
|
62 | */
|
63 | fieldPath(): string;
|
64 | }
|
65 | /**
|
66 | * Convenience method to get the entity constructor of the parent of a complex type.
|
67 | * @param fieldOf - Either an entity constructor or another complex type field.
|
68 | * @returns The constructor of the transitive parent entity;
|
69 | */
|
70 | export declare function getEntityConstructor<EntityT extends Entity, ComplexT>(fieldOf: ConstructorOrField<EntityT, ComplexT>): Constructable<EntityT>;
|
71 | /**
|
72 | * Convenience method to get the [[EdmTypeShared]] from the overloaded constructor.
|
73 | * The two scenarios are:
|
74 | * - `complexTypeNameOrEdmType` is of type `EdmTypeShared` and `edmTypeOrUndefined` is `undefined`
|
75 | * - `complexTypeNameOrEdmType` is of type `string` and `edmTypeOrUndefined` is of type `EdmTypeShared`
|
76 | * @param complexTypeNameOrEdmType - Either the name of the complex type or the EDM type.
|
77 | * @param edmTypeOrUndefined - Either the EDM type or `undefined`.
|
78 | * @returns The EDM type resolved for the two arguments.
|
79 | */
|
80 | export declare function getEdmType<VersionT extends ODataVersion | 'any'>(complexTypeNameOrEdmType: string | EdmTypeShared<VersionT>, edmTypeOrUndefined?: EdmTypeShared<VersionT>): EdmTypeShared<VersionT>;
|
81 | //# sourceMappingURL=complex-type-field.d.ts.map |
\ | No newline at end of file |