UNPKG

3.94 kBTypeScriptView Raw
1import moment from 'moment';
2import { EdmTypeShared } from '../../edm-types';
3import { Entity, ODataVersionOf, Constructable } from '../../entity';
4import { Filter } from '../../filter';
5import { ConstructorOrField } from '../constructor-or-field';
6import { EdmTypeField } from '../edm-type-field';
7/**
8 * @deprecated Since v1.47.0. Use [[OrderableEdmTypeField]] instead.
9 * Represents a property with a duration value.
10 * @typeparam EntityT - Type of the entity the field belongs to
11 */
12export declare class DurtionFieldBase<EntityT extends Entity, SelectableT extends boolean = false> extends EdmTypeField<EntityT, moment.Duration, false, SelectableT> {
13 /**
14 * Creates an instance of Filter for this field and the given value using the operator 'gt', i.e. `>`.
15 * @param value - Value to be used in the filter
16 * @returns The resulting filter
17 */
18 greaterThan(value: moment.Duration): Filter<EntityT, moment.Duration>;
19 /**
20 * Creates an instance of Filter for this field and the given value using the operator 'ge', i.e. `>=`.
21 * @param value - Value to be used in the filter
22 * @returns The resulting filter
23 */
24 greaterOrEqual(value: moment.Duration): Filter<EntityT, moment.Duration>;
25 /**
26 * Creates an instance of Filter for this field and the given value using the operator 'lt', i.e. `<`.
27 * @param value - Value to be used in the filter
28 * @returns The resulting filter
29 */
30 lessThan(value: moment.Duration): Filter<EntityT, moment.Duration>;
31 /**
32 * Creates an instance of Filter for this field and the given value using the operator 'le', i.e. `<=`.
33 * @param value - Value to be used in the filter
34 * @returns The resulting filter
35 */
36 lessOrEqual(value: moment.Duration): Filter<EntityT, moment.Duration>;
37}
38/**
39 * @deprecated Since v1.47.0. Use [[OrderableEdmTypeField]] instead.
40 * Represents a selectable property with a duration value.
41 * @typeparam EntityT - Type of the entity the field belongs to
42 */
43export declare class DurationField<EntityT extends Entity> extends DurtionFieldBase<EntityT, true> {
44}
45/**
46 * @deprecated Since v1.47.0. Use [[OrderableEdmTypeField]] instead.
47 * Represents a complex type property with a duration value.
48 * @typeparam EntityT - Type of the entity the field belongs to
49 */
50export declare class ComplexTypeDurationPropertyField<EntityT extends Entity, ComplexT = any> extends DurtionFieldBase<EntityT> {
51 /**
52 * The constructor of the entity or the complex type this field belongs to
53 */
54 readonly fieldOf: ConstructorOrField<EntityT, ComplexT>;
55 /**
56 * Creates an instance of ComplexTypeDurationPropertyField.
57 * @param fieldName - Actual name of the field used in the OData request
58 * @param fieldOf - The constructor of the entity or the complex type this field belongs to
59 * @param edmType - Type of the field according to the metadata description
60 */
61 constructor(fieldName: string, fieldOf: ConstructorOrField<EntityT, ComplexT>, edmType: EdmTypeShared<ODataVersionOf<EntityT>>);
62 /**
63 * @deprecated Since v1.19.0.
64 *
65 * Creates an instance of ComplexTypeDurationPropertyField.
66 * @param fieldName - Actual name of the field used in the OData request
67 * @param entityConstructor - Constructor type of the entity the field belongs to
68 * @param parentTypeName - Name of the parent complex type
69 * @param edmType - Type of the field according to the metadata description
70 */
71 constructor(fieldName: string, entityConstructor: Constructable<EntityT>, parentTypeName: string, edmType: EdmTypeShared<ODataVersionOf<EntityT>>);
72 /**
73 * Path to the field to be used in filter and order by queries. Combines the parent complex type name with the field name.
74 * @returns Path to the field to be used in filter and order by queries.
75 */
76 fieldPath(): string;
77}
78//# sourceMappingURL=duration-field.d.ts.map
\No newline at end of file