import { FieldType } from './field-type'; import { IContentItem } from '../interfaces/item/icontent-item.interface'; import { FieldInterfaces } from './field-interfaces'; import { FieldModels } from './field-models'; import { ILink } from '../interfaces/item/ilink.interface'; import { IItemQueryConfig } from '../interfaces/item/iitem-query.config'; import { TypeResolverService } from '../services/type-resolver.service'; export declare namespace Fields { class TextField implements FieldInterfaces.IField { name: string; value: any; /** * Text stored in the field */ text: string; /** * Type of the field */ type: FieldType; /** * Represents text field of Kentico Cloud item * @constructor * @param {string} name - Name of the field * @param {string} value - Value of the field */ constructor(name: string, value: any); } class MultipleChoiceField implements FieldInterfaces.IField { name: string; value: any; /** * Multiple choice options */ options: FieldModels.MultipleChoiceOption[]; /** * Type of the field */ type: FieldType; /** * Represents multiple choice field of Kentico Cloud item * @constructor * @param {string} name - Name of the field * @param {string} value - Value of the field */ constructor(name: string, value: any); } class DateTimeField implements FieldInterfaces.IField { name: string; value: any; /** * Date time value */ datetime: Date; /** * Type of the field */ type: FieldType; /** * Represents date time field of Kentico Cloud item * @constructor * @param {string} name - Name of the field * @param {string} value - Value of the field */ constructor(name: string, value: any); } class RichTextField implements FieldInterfaces.IField { name: string; value: any; modularItems: IContentItem[]; links: ILink[]; typeResolverService: TypeResolverService; enableAdvancedLogging: boolean; itemQueryConfig: IItemQueryConfig; /** * Type of the field */ type: FieldType; /** * Resolved html in field - store here once the html was resolved to avoid resolving it multiple times */ private resolvedHtml; /** * List of modular content items used in this rich text field */ items: IContentItem[]; /** * Represents rich text field of Kentico Cloud item * @constructor * @param {string} name - Name of the field * @param {string} value - Value of the field * @param {IContentItem[]} modularItems - Modular items * @param {ILink[]} links - Links in rich text field * @param {TypeResolverService} typeResolverService - Type resolver service * @param {boolean} enableAdvancedLogging - Indicates if advanced issues are logged in console * @param {IItemQueryConfig} itemQueryConfig - Item query config */ constructor(name: string, value: any, modularItems: IContentItem[], links: ILink[], typeResolverService: TypeResolverService, enableAdvancedLogging: boolean, itemQueryConfig: IItemQueryConfig); getHtml(): string; } class NumberField implements FieldInterfaces.IField { name: string; value: any; /** * Type of the field */ type: FieldType; /** * Number value of this field */ number: number; /** * Represents number field of Kentico Cloud item * @constructor * @param {string} name - Name of the field * @param {string} value - Value of the field */ constructor(name: string, value: any); } class AssetsField implements FieldInterfaces.IField { name: string; value: any; /** * Type of the field */ type: FieldType; /** * List of assets used in this field */ assets: FieldModels.AssetModel[]; /** * Represents asset field of Kentico Cloud item * @constructor * @param {string} name - Name of the field * @param {string} value - Value of the field */ constructor(name: string, value: any); } class UrlSlugField implements FieldInterfaces.IField { name: string; value: string; item: IContentItem; linkResolver: ((link: ILink) => string) | undefined; enableAdvancedLogging: boolean; /** * Type of the field */ type: FieldType; /** * Represents URL slug field of Kentico Cloud item * @constructor * @param {string} name - Name of the field * @param {string} value - Value of the field * @param {IContentItem} item - Content item, required in order to get link object used by resolver * @param {((link: ILink) => string) | undefined} linkResolver - Callback used to resolve links * @param {boolean} enableAdvancedLogging - Indicates if advanced issues are logged in console */ constructor(name: string, value: string, item: IContentItem, linkResolver: ((link: ILink) => string) | undefined, enableAdvancedLogging: boolean); getUrl(): string | null; } class TaxonomyField implements FieldInterfaces.IField { name: string; value: any; taxonomyGroup: string | undefined; /** * Type of the field */ type: FieldType; /** * List of assigned taxonomy terms */ taxonomyTerms: FieldModels.TaxonomyTerm[]; /** * Represents number field of Kentico Cloud item * @constructor * @param {string} name - Name of the field * @param {string} value - Value of the field * @param {string | undefined} taxonomyGroup - Codename of the taxonomy group */ constructor(name: string, value: any, taxonomyGroup: string | undefined); } }