import { Entity } from '../entity'; import { EdmTypeShared } from '../edm-types'; import { Filter } from '../filter'; import { Field, FieldOptions } from './field'; import { ConstructorOrField } from './constructor-or-field'; /** * Represents a property with an enum value. * @typeparam EntityT - Type of the entity the field belongs to. * @typeparam EnumT - Enum type that contains all valid enum entries for this field. * @typeparam NullableT - Boolean type that represents whether the field is nullable. * @typeparam SelectableT - Boolean type that represents whether the field is selectable. */ export declare class EnumField extends Field { readonly _fieldOf: ConstructorOrField; readonly enumType?: Record | undefined; /** * @deprecated Since v1.48.0. This property is not used anymore. */ readonly edmType: EdmTypeShared; /** * Creates an instance of EnumField. * @param fieldName - Actual name of the field used in the OData request. * @param _fieldOf - The constructor of the entity or the complex type field this field belongs to. * @param enumType - Enum type of the field according to the metadata description. * @param fieldOptions - Optional settings for this field. */ constructor(fieldName: string, _fieldOf: ConstructorOrField, enumType?: Record | undefined, fieldOptions?: FieldOptions); /** * Gets the path to the complex type property represented by this. * @returns The path to the complex type property. */ fieldPath(): string; /** * Creates an instance of Filter for this field and the given value using the operator 'eq', i.e. `==`. * @param value - Value to be used in the filter * @returns The resulting filter */ equals(value: EnumType): Filter; /** * Creates an instance of Filter for this field and the given value using the operator 'ne', i.e. `!=`. * @param value - Value to be used in the filter * @returns The resulting filter */ notEquals(value: EnumType): Filter; } /** * Convenient type to reflect all the values of a string based enum as a union type. * @typeparam T - String based enum type * @see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html#template-literal-types */ export declare type EnumType = `${T}`; //# sourceMappingURL=enum-field.d.ts.map