@sitecore/sc-contenthub-webclient-sdk
Version:
Sitecore Content Hub WebClient SDK.
77 lines (76 loc) • 2.86 kB
TypeScript
import { ConditionalValidationResource } from "../../models/conditional-validation-resource";
import { PropertyDataType } from "./data-type";
import { IMemberDefinition, MemberDefinition } from "./member-definition";
import { MemberDefinitionType } from "./member-definition-type";
/**
* Represents a data schema / domain model for properties on an {@link IEntityDefinition}.
*/
export interface IPropertyDefinition extends IMemberDefinition {
/**
* The {@link DataType} of the value for this property.
*/
readonly dataType: PropertyDataType;
/**
* Indicates whether the property value is indexed and thus searchable via the basic querying API.
* Search for value with indexed querying will always work.
* Note that this value should be set only if required and with good understanding of potential consequences.
*/
indexed: boolean;
/**
* Indicates whether the property is required to be set.
*/
isMandatory: boolean;
/**
* Indicates whether the property is culture sensitive or not.
*/
isMultiLanguage: boolean;
/**
* Indicates whether the value is an array.
*/
isMultiValue: boolean;
/**
* Indicates whether the value of the property is unique among all the property values of this property definition
* and entity definition.
*/
isUnique: boolean;
/**
* Indicates whether the content of this property is boosted when searched for via index querying (Elasticsearch).
*/
boost: boolean;
/**
* Indicates whether the property value is included in the full text search content of the Elasticsearch document.
*/
includeInContent: boolean;
/**
* Indicates whether the property value is included in the collection of words used for auto-complete functionality.
*/
includeInCompletion: boolean;
/**
* Indicates whether this member definition should be stored.
*/
storedInGraph: boolean;
/**
* Indicates whether this member definition will be ignored during imports.
*/
ignoreOnExport: boolean;
/**
* An optional set of conditions that dictate under what conditions the current property is required.
*/
conditionalValidation?: ConditionalValidationResource;
}
export declare class PropertyDefinition extends MemberDefinition implements IPropertyDefinition {
indexed: boolean;
isMandatory: boolean;
isMultiLanguage: boolean;
isMultiValue: boolean;
isUnique: boolean;
boost: boolean;
includeInContent: boolean;
includeInCompletion: boolean;
ignoreOnExport: boolean;
storedInGraph: boolean;
conditionalValidation?: ConditionalValidationResource;
get dataType(): PropertyDataType;
get definitionType(): MemberDefinitionType;
constructor(name: string, type: PropertyDataType);
}